Powered By Blogger

Friday, November 25, 2016

Book Review: Philosophy of Science for Scientists by Lars-Goran Johansson

This review originally was posted to the Mathematical Association of America's Book Review Site.

Many years ago my wife and I hosted a married couple we didn’t know for dinner. He was a law school student but she was a local Ph.D. student studying the philosophy of science. Having recently obtained my doctorate in engineering I commented that there was no such thing as a philosophy to science. Rather, I naively said, science flowed from observations of facts, logical and mathematical arguments, or simply from one’s own thoughts of how the world behaved. Was I wrong.

This woman explained that there was, indeed, a philosophy to science. She told me how scientists held particular views on what to study and how to study it and that the scientific method was subjected to biases and underlining prejudices of the scientist himself.  I was flabbergasted, surprised to hear such thoughts because I believed science was, shall we say, independent of the scientist.

Along comes this splendid book, Philosophy of Science for Scientists by Lars-Goran Johansson: a lovely text book for undergraduates. The book is a highly readable introduction to how one can view the practice of science. I wish I had read such a book while in school and I wish my professors had spent some time, even just a lecture or two, explaining how students can see science from a view point a bit removed from our studies. It would have expanded everyone’s view of science and opened us to a better way to see what we were doing.

The book begins with a look how science started in ancient Greece where Thales believed water was “responsible for the change in all things.” A reasonable position, writes Johansson, because all living things require water. This approach is consistent with a modern view of science that is based on observation. We observe the world, form hypotheses, and conduct tests and experiments to verify our hypotheses. The ancients did not have access to the complicated experimental apparatuses we have (no super colliders, few controlled experiments) but they were excellent observers of their world.

The text shows how knowledge can grow with propositions to justify a true belief.  For example, ancient astronomers observed the planets and formed an argument of planets revolving around our Earth. We have better knowledge today but at that time, their geocentric model fit their observations quite well. While we now subscribe to a heliocentric solar system, ancient tables depicting the orbit of the moon about earth are very accurate up to this day.

There is a lovely treatment of hypothesis testing with a slightly contrived example of a medical test for an AIDS medicine. The authors state the null hypothesis to test, provide example data, and discuss how one can either accept or reject the null hypothesis. It’s a simple example, but illustrative. (In engineering I never learned of hypothesis testing in school but learned of it in operations research. This would have been good to hear first in a classroom.)

Here’s a great example of observation bias of the observer. Robert Rosenthal, a psychologist, asked students to experiment with mice to see how well they performed in solving a maze to find a food bowl. The students measured the time it took each mouse to get to the bowl. They were told some of the mice were “gifted” and would solve the maze quicker than the other mice. The students found the gifted the mice did, indeed, find the food quicker than the other mice. The students also found the gifted mice refused to move only 11% of the time but the other, non-gifted, mice refused to move 20% of the time. Of course, there were no differences between the mice, only the bias of the students from the original instructions.

The book touches on what I think is a crucial topic: paradigm shifts.  A short discussion from Thomas Kuhn’s The Structure of Scientific Revolutions, now over 50-years old, shows how Kuhn viewed changes in scientific thought. For example, there is Newton’s analysis of lunar motion as continual free fall. Interestingly, earlier in the book we met Ptolemy’s geocentric view of the solar system, and the inevitable use of epicycles to explain, say, the retrograde motion of Mars. I believe it would have been beneficial for the author to have gone from epicycles to the concept of encrustation within Complexity theory to show a current view of the shift in paradigms. (This is one of the few shortcomings I found.)

The next part of the book explores Causes, Explanations, Laws and Models. Cause is wonderfully illustrated by an experiment on the wing length of fruit flies with a genetic defect. Fruit flies with this defect will have shortened wings if the temperature is around 20-degrees Celsius when the flies are maturing. If, however, the temperature is 32-degrees Celsius the wings grow to normal length. Does the genetic defect cause the wing length shortening or does the temperature do so? The answer depends on how we compare populations of fruit flies: If we compare at the same temperature then the defect is caused by the gene. If we compare populations at different temperatures then we would say temperature is the cause of the defect. It’s an interesting discussion point and worthwhile for students to think about.

The author explores Explanations with an example of storks and birth rates; the two declined remarkably between 1966 and 1980. Figure 1 shows the plot from the text and notice the whimsy of the drawing. The correlation between birth rates and the presence of storks was so consistent it was calculated that the probability of coincidence was 0.1.  The author suggests the correlation was due to industrialization Again, this is an interesting discussion point for students.

The author goes on with causes and effects, and Bayesian probabilities. The author presents a good argument for why explanations need to show the reason for a phenomena and not just some relationship. For example, ancient observers could predict a new moon accurately but they did not know why their predictions were true. Along comes Newton with his theory of gravity to explain orbital motion as a mathematical law, not just a table of observations. New moons are predicted with reason, not just tabular notions.

The author discusses other topics and the reader will find all of them of interest. In short, this is an excellent introduction to understanding science in a general sense. Students and practitioners will find it worthwhile to read and discuss. I wish I had read such a text long ago but I am glad to have benefited from it even now. 
Figure 1: Correlation of births and stork sitings.

Thursday, July 14, 2016

Warren Buffett's Cube of Gold

In his 2011 annual letter to shareholders Mr. Warren Buffet, chairman of Berkshire Hathaway,  discussed the amazing rise in price of gold. Gold, at that time, was becoming extremely expensive (or valuable) and some shareholders wondered why Mr. Buffett did not buy gold to hold as the price increased.

Part of his response was:
"Today the world’s gold stock is about 170,000 metric tons. If all of this gold were melded together, it would form a cube of about 68 feet per side. (Picture it fitting comfortably within a baseball infield. [Bases are 90-feet apart.]) At $1,750 per ounce – gold’s price as I write this – its value would be $9.6 trillion. Call this cube pile A."
I remember reading that gold is extremely malleable and can be spread very thin. My thought was:

How much of our planet Earth could be covered by this hypothetical cube of gold?

To answer this question, I will use the data in the following table:

Factor or Formula
Density of gold
19.32 g/cm^3
Compute mass of hypothetical cube
Convert feet to meters
3.2808 feet per meter

Ounces to kilograms
35.274 ounces per kg
Convert mass to another unit
Ounce of gold to area
1-ounce covers 100 square feet
Radius of earth
6,353,000 meters
To find surface area of our planet
Surface area of a sphere (that is, Earth for our case)
 \(4 \pi r^2 \)
Formula (r is the radius of the sphere)

Step 1: How much gold is in this cube?

For a cube of 68-feet per side there are \( 68 \times 68 \times 68 \; = \; 314, 432 \; \; ft^3 \) of gold. From the table above we have the density of gold, but not in units of feet. Let’s first convert the density from grams to kilograms:
\[ Density = 19.32 \;\; g \; /  \; cm^3 \times \left( 100 \; cm \; / \; m \right)^3 \\  = 19,320 \; \; kg \;  /  \; m^3 \]
And let’s convert the density from meters to units of feet:
\[ Density = 19,320 \; \; kg/m^3 \times \left( 1\; meter\; / \; 3.2808 feet \right)^3 \\ = 547.10 \; kg \;  per \; ft^3  \]
Now we can compute the amount of gold in this hypothetical cube as: \( 314, 432 \times 547.10 = 172,025,747 \) kg of gold.

 Step 2: How big an area will the gold cube cover?

This site notes an ounce of gold ("about the size of quarter") can be pounded into a 100 square foot sheet, which is pretty thin if you think about it. There are 35.274 ounces per kilogram so our cube has
\[172,025,747 kg \times \left(35.274 \; ounces\; / \; kg \right) \\ =  6,068,036,199   \; \; ounces \]
and for that many ounces of gold, we have a surface area of
\[ 6,068,036,199 \; ounces \;  \times \left( 100 ft^2 \; / \; ounce \right) \\  = 606,803,619,900 \; ft^2 \]
That cube covers over 606 billion square feet.

Step 3: What is the surface area of Earth?

The surface area of earth is:
\[ S_{earth} = 4 \times \pi \times r_{earth}^2 \] and we use the radius of Earth given in the table to find:
\[ S_{earth} = 4 \times \pi \times \left( 6353000^2 \right) \\ = 507,186,370,915,240 \; m^2 \]
which we can convert to square feet as:
\[  507,186,370,915,240 \; m^2 \times (3.2808 \; feet \; / \;  meter)^2 \\ = 5,459,175,891,528,360 \; ft^2 \]

Step 4: What is the ratio of the gold cube area to the surface area of Earth?

As a fraction, the gold cube covers 0.0111 percent of Earth:
\[ \frac{606,803,619,900}{5,459,175,891,528,360} \times 100  = 0.0111 \; percent \]
 which is a pretty small relative to the size of Earth.

What’s the point?

While this cube costs $9, 600 ,000 ,000 ,000 it only covers a bit more that one-hundredth of one percent of the planet. Of course, the whole idea of gold as valuable is because it’s so rare, and these calculations confirm that. But it was fun to do the math, don't you think?

Check out:

Gold fun facts from the American Museum of Natural History.

Tuesday, April 05, 2016

The Dark Net by Jamie Bartlett

When the internet started, there were no homes connected to it. If you wanted to use email, and no one who didn’t already have email even knew what email was, you had to have an account on a computer at a research center like MIT. If you did, you could send email to others who had an account, you could transfer files from one computer to another (with FTP, file transfer protocol) and you could remotely log into another machine with telnet. And, there were news groups which were text-based lists of articles, called postings, of various topics such as food, humor, sex, etc. 

Fast forward thirty years to today and that limited research network is now a global network connecting users across the globe to one another. Anyone with a cell-phone can connect to anyone else. You don’t need an account on a school computer, your identity can be hidden (although not necessarily your internet protocol (IP) address) and you can access websites, forums, email, chats, etc. So, what’s life like on this new, global network?

The internet, of course, is filled with good things like news, email, social software, and, as you know, shopping on Amazon or eBay. But for Jamie Bartlett, the internet has a dark side filled with illegal activities and socially unacceptable sites packed with people who pay for the privilege to be part of a sex show. 

We begin this unseemly trip with Sara, a college student who thinks her computer offers some sort of anonymity, but it doesn’t. She puts on a striptease in front of her webcam on a public site and chats with viewers. She goes so far as to write her name on her naked body. Before she’s done entertaining (she’s not being paid) some of the viewers have “doxed” her: they find her real name, raid her Facebook account, send her nude photos to her friends and family, and essentially disrupt (maybe ruin) her life in the span of a just a few minutes. It’s a horrific description of an innocent girl’s demise written so graphically as to make you pity her naiveté and abhor the evil of these viewers who can’t resist shaming her. 

I was pleased to find usenet newsgroups are still around but then shocked to realize how misused they are on the dark net. The group alt.suicide.holiday makes its appearance where people openly discuss their desire to kill themselves. Suicide is a sickness and one might think, just maybe, this newsgroup would somehow help the mentally ill to avoid suicide and find help. No such luck. Mr. Bartlett introduces us to “Cami” who encourages Nadia, a 19-year old Canadian girl, to kill herself. Reading the dialogue one would think Cami is a kindred spirit and needs help, too. But we soon learn Cami is not a girl, not suicidal, and has no interest in helping Nadia. Rather, Cami is a middle-aged man, a nurse, husband, and father who has spent years encouraging distraught girls to kill themselves. He thinks five actually did. On the web, there are dangerous people.

If you want to purchase illegal goods like drugs or guns you’ll find them on the Silk Road. This is a site that only exists via the TOR router (The Onion Router, developed by the Navy) so users are almost impossible to trace and anonymity is all but ensured. The first Silk Road was run by Ross Ulbricht until he was arrested by the FBI on October 1, 2013. Ulbricht managed the site for a small fee amounting over time to $150 million in Bitcoins, the currency of choice for no traceability. There is now a Silk Road 2 showing that markets will spring to serve customers no matter what the merchandise. 

For the sex-side to this dark net we meet Vex who works on the Chaturbate site. Viewers can find sex shows with Vex and maybe a friend or two of hers will join in. She makes money from the shows and fans can tip her with Bitcoins. The site monitors who tips and how much so the bigger the tipper the more his (and most viewers are men) suggestions the models may perform. Some fans are quite fond of the various models and buy them gifts from the model’s Amazon wish list. 

The dark web exists, is easy to access, and contains things unavailable elsewhere. It’s a model of free enterprise, marketing, and business without regulation. For those interested in what happens when there are few rules, Bartlett has a written a fine guide to this side of the internet.

Monday, April 04, 2016

Book Review: A Sampler of Useful Computational Tools for Applied Geometry, Computer Graphics, and Image Processing By Daniel Cohen-Or (Editor), Chen Greif, Tao Ju, Niloy J. Mitra, Areil Shamir, Olga Sorkine-Hornung, and Hao (Richard) Zhang

Here is a useful book (the title is correct!) that covers a wealth of processing tools in a single volume accessible to experts and novices alike. Topics include analytic geometry, linear algebra, least squares solutions, principal component analysis and singular value decomposition, spectral transforms, solution of linear systems, and graphs and images, to name a few.  All topics are applicable to image processing and most are applicable to other areas as well.

Each chapter is stand-alone so the reader can learn the material quickly without the need to study earlier chapters to understand later chapters. If the reader doesn’t know what he needs, the table of contents shows the reader what’s in each chapter and whether the material might apply to his problem.

The text is lucid, easy to read, and follows a logical progression. Equations are explained and the authors provide ample figures and pictures to illustrate the concepts and discussions.

For example, the authors discuss how to determine is two lines intersect in 3-space with a step-by-step development of the mathematics and resulting algorithm. Next, they show how to fit a line to data points in a least squares sense and give pictorial examples in 2- and 3-space. The chapter on Least-Squares Solutions shows how to fit, say a curve to data points from an edge of an image and how to weight the data points to compensate for outliers. The chapter on spectral transforms provides an excellent discussion on image compression techniques such as the Discrete Cosine Transform and Laplacian smoothing. 

Incidentally, the book intuitively discusses how one can use Laplacian equations for image reconstruction and image manipulation. There is an image, for example, where most of the image is missing but with an image completeness algorithm based on smoothness (that is, find the best image that is smooth relative to the known data) one sees a fitted image quite close to the original. (Incidentally, it has always amazed me how much information one can discard from an image and yet still recover the original image, almost precisely.)

What is more, the book discusses Poisson panoramic image stitching and shows a beautiful example of city landscape before and after the processing. This tells part of the story of current digital cameras that allow one to take multiple pictures of a scene with each picture angularly offset from the other. The processed image is a smooth panoramic view that would be unobtainable otherwise. The stitching and smooth transition between images is both natural and unnoticeable.

On a slightly negative note, the chapter on topology is a bit weak.  Of course, topology is a complicated and involved topic and while the gist of it can be explained succinctly, applications require more space than the authors had to produce a well-balanced text. Still, as a reference that at least mentions this topic the authors do an admirable job summarizing the details.

In conclusion, this book is a good collection of algorithms and tools for computer graphics. The topics are useful, well-presented, and collected in a single book for easy access. If you work in this area, you’ll find this book beneficial.

(This review was originally posted to the Mathematical Association of America's Book Reviews and can be found here.)