Monday, April 27, 2015

Over-confidence Bias

Wikipedia defines "Overconfidence Effect" as:
The overconfidence effect is a well-established bias in which a person's subjective confidence in his or her judgments is reliably greater than the objective accuracy of those judgments, especially when confidence is relatively high.
A related cognitive bias in the behavioral economics literature is "illusory superiority" which wikipedia defines as:
Illusory superiority is a cognitive bias whereby individuals overestimate their own qualities and abilities, relative to others. This is evident in a variety of areas including intelligence, performance on tasks or tests, and the possession of desirable characteristics or personality traits.
For example something like 80% of drivers think they are better drivers than the median.

In a recent EconTalk interview, Phil Rosenzweig, discusses how many of the key findings of behavioral economics are sometimes misinterpreted, and often misapplied.

For example, when people are asked about their ability to draw or paint, a large majority think they are worse than the median.

The interview also touched upon a possible explanation for both these views (above-median driver, and below-median "drawer"), which was interesting, since I personally hold both these views, of course!

For instance, when we drive, we occasionally see road crashes. Since we don't get into accidents all that often, we surmise "I must be better than average".  On the other hand, we see beautiful sketches and paintings in restaurants, museums, and art fairs. These pieces or art become the benchmark, against which we compare our ability. Naturally, we think, "I am not that good".

Rosensweig's key point is something else: the features artificially introduced in a laboratory setting to make a psychology experiment scientifically valid, often dilute its applicability to the real-life phenomenon that motivated the study.

Friday, April 24, 2015

Power Laws, Log-Log Plots, and Those Pesky Additive Constants

Suppose you have a scatter plot of datapoints (xy) from a simulation or experiment, and you want to either find out the underlying relationship between x and y, or perhaps, test to see if the data obeys a certain theoretically derived power-law relationship.

For concreteness, suppose theory suggests that \(y = bx^n\), with \(n=2\). You don't know the true \(b\) (which, let us suppose is 1), and you want to test whether the data obeys a quadratic power-law relation.

If this is what your raw data looks like:
The natural thing to do, of course, would be to look at the same data, through the lens of a log-log plot.

When you do so, and compare the data with a line of slope 2 (to test \(n = 2\)?), you conclude that the data does indeed obey the theoretical power-law.
Why does this work? The slope,\[\frac{d \log y}{d \log x} = \frac{x}{y} \frac{dy}{dx} = \frac{x}{bx^n} n bx^{n-1} = n.\]
Now, suppose that the theoretical model had a perhaps undetermined additive constant, so that \(y = a + bx^n\), instead of \(y = bx^n\). Again, you are really interested in \(n\), and do not have a good idea about the true value of \(a\) or \(b\) (which, let us suppose, unbeknownst to you, are 0.01, and 1, respectively).

In this case a log-log plot is no longer a straight line. Indeed, at small values of x, the slope appears to be much smaller than 2. In fact, the slope appears to be zero.
If you only had data from the small-x regime, you may reject the theory (or the data).

Or, perhaps, as is likely, you are much smarter than me, and you may make a subtler claim.

In any case, It is easy to show that for \(y = a + bx^n\),\[\frac{d \log y}{d \log x} = n \left(\frac{1}{1 + \frac{a}{bx^n}} \right).\] For \(x < (a/b)^{1/n}\), the constant term, which may be thought of as \(a x^{0}\), dominates, and pulls the slope closer to zero.

For  \(x \gg (a/b)^{1/n}\), the second term which contains the power-law dependence takes over. For sufficiently large \(x\), the same data (see plot below, which stretches out to 100x times the previous plot) are no longer as tainted by the signature of the pesky constant term.
A similar lesson holds for \(n < 0\). Suppose \(n = -2\) in the example above. The power-law is now clear for small x, and is corrupted by the constant term at large x, which pulls the slope upwards to zero.

Thursday, April 23, 2015

Dr. Mehmet Oz

People are endlessly fascinating. Here's a story describing the making of Dr. Oz, as we know him today.
Oz has achieved some of the greatest scientific accomplishments of his career at Columbia. While a resident there, he was the four-time winner of the prestigious Blakemore research prize, which goes to the most outstanding surgery resident. He now holds 11 patents for inventing methods and devices involved in heart surgeries and transplants. This includes helping to research and develop the left ventricular assist device, or LVAD, which helps keep people alive while they're awaiting a heart transplant. Oz had a hand in turning the hospital's LVAD program into one of the biggest and most active in the world.
and
I asked Green whether he'd want to be Oz's patient, and he said, "If you did a poll of the staff at Columbia and asked them, 'If you needed a heart operation and Mehmet was there, would you want him?' they'd say yes."
For balance, here's Steve Novella's skeptical take.
A recent example is an episode a few weeks ago in which Dr. Oz uncritically promoted homeopathy. He told his audience that the evidence shows that homeopathy works, even if the mechanism may be mysterious. He stated this as a non-controversial fact, which was very misleading. Every objective review of the clinical evidence demonstrates that homeopathic products do not work for any indication.

Friday, April 17, 2015

Weekend Links

1. The not so Golden Ratio (FastCompany)
In the world of art, architecture, and design, the golden ratio has earned a tremendous reputation. Greats like Le Corbusier and Salvador DalĂ­ have used the number in their work. The Parthenon, the Pyramids at Giza, the paintings of Michelangelo, the Mona Lisa, even the Apple logo are all said to incorporate it. 
It's bullshit. The golden ratio's aesthetic bona fides are an urban legend, a myth, a design unicorn. Many designers don't use it, and if they do, they vastly discount its importance. There's also no science to really back it up. Those who believe the golden ratio is the hidden math behind beauty are falling for a 150-year-old scam.
2. On definitions and why 0! = 1 (John D. Cook)
Things are defined the way they are for good reasons. This seems blatantly obvious now, but it was eye-opening when I learned this my first year in college. Our professor, Mike Starbird, asked us to go home and think about how convergence of a series should be defined. Not how it is defined, but how it should be defined. We were not to look up the definition up but to think about what it should be. The next day we proposed our definitions. In good Socratic fashion Starbird showed us the flaws of each and lead us to arrive at the standard definition.
3. Americanism? Really? (The Independent) Language associated with the US, that originated in Britain. For context, read how much suffering it causes in the wrong circles. I also thought that recommendations in The Economist's style guide were funny/interesting.
If you use Americanisms just to show you know them, people may find you a tad tiresome, so be discriminating. Many American words and expressions have passed into the language; others have vigour, particularly if used sparingly. Some are short and to the point (so prefer lay off to make redundant). But many are unnecessarily long (so use and not additionally, car not automobile, company not corporation, court not courtroom or courthouse, transport not transportation, district not neighbourhood, oblige not obligate, rocket not skyrocket, stocks not inventories unless there is the risk of confusion with stocks and shares). Spat and scam, two words beloved by some journalists, have the merit of brevity, but so do row and fraud; squabble and swindle might sometimes be used instead. The military, used as a noun, is nearly always better put as the army. Normalcy and specialty have good English alternatives, normality and speciality (see Spellings). Gubernatorial is an ugly word that can almost always be avoided.
4. What the Higgs! (an old but great NYT explanation)

Tuesday, April 14, 2015

Randomness, Gullibility, and Fraud

On a recent EconTalk episode on randomness, the guest, Campbell Harvey provided an interesting example at the intersection of probability and gullibility. I paraphrase:

Suppose you get an email predicting the winner of a football game. You ignore it, but after the game, you notice that the prediction did come out true.

Probably lucky, you say to yourself.

The next week you get a similar email predicting the winner of another football game. You later find out that that prediction also came true.

This happens for ten weeks in a row.

The emailer correctly predicts the winner in every game.

You sign up for the newsletter!

But what's going on behind the scenes. The emailer spams 100,000 email address; in half of them he predicts Team A is going to win, and in the other half he predicts that Team B is going to win.

One set gets the "correct prediction".

The following week he spams the 50,000 recipients who got the correct prediction. Again, he goes 50-50.

You see where this is going.

After 10 weeks, by pure chance, there will be 100 "suckers" who think you got 10/10.

Don't be a sucker!

Thursday, April 9, 2015

Physics Links

The recent episode of Skeptics Guide to the Universe podcast had two interesting "basic" physics stories.

1. A new twist to how long it takes to "fall through" a tunnel that stretches from one end of the earth to the other.

The standard answer models the earth is a sphere of uniform density, and resulting trajectory is simple harmonic oscillation, with time period \[T = 2 \pi \sqrt{\frac{R}{g}},\] where R is the radius of the earth, and g=9.8 m/s^2 is the gravitational acceleration on the surface.

The required time is T/2 which is approximately 42 minutes.

2. Does a half dead battery bounce more than a full battery when dropped? Neat videos here.
However, “maximum bounce” is reached when the battery is down to about half its charge, at which point the amount of bounce levels off despite the fact that more zinc oxide is still forming. So the bounce technique can reveal that a battery is not fresh, but it is not an indicator that it’s entirely flat. Still, it’s an easy and instant way of checking the profusion of batteries filling our drawers – no multimeter required.

Tuesday, April 7, 2015

Inset Plots in Veusz

Over the past six months, I've pretty much completed the transition from Grace to Veusz, as my primary graphing software, for journal-quality plots.

As I have grown familiar with the software, I've come to realize that it is powerful, has much better documentation and support on the web (which is somewhat surprising since Veusz is just as specialized, and much newer).

Anyway, thanks to Google Analytics, I know that this post on "how to create inset plots or subplots with Grace" is quite popular. I thought I ought do a short-series where I repeat how to do the same common stuff with Veusz.

Here is the first installation. It discusses how to do inset plots.

Really, it is a cinch!

1. Load in the appropriate datafile. Here my datafile has three columns. Click on the images if you want to see a larger version.


2. Choose a scatter plot, and plot one of the datasets (here x v/s z).


3. Add another graph by clicking the graph icon.


4. You can right-click on "graph1" and choose to "hide" or "show" it. Let's hide it for now.


5. With graph1 out of the way, resize, move, and adjust graph2.


6. "Show" graph1 by right-clicking. Notice that graph2 might be under graph1 and hence invisible. Right click on graph2 and move it up or down.


7. That's it. You can now go in and decorate the two graphs to your heart's content.



Thursday, April 2, 2015

Links: Teaching and Research

1. Fareed Zakaria in the WaPo: "Why America’s obsession with STEM education is dangerous"
In truth, though, the United States has never done well on international tests, and they are not good predictors of our national success. Since 1964, when the first such exam was administered to 13-year-olds in 12 countries, America has lagged behind its peers, rarely rising above the middle of the pack and doing particularly poorly in science and math. And yet over these past five decades, that same laggard country has dominated the world of science, technology, research and innovation.
2. Teaching evolution in the University of Kentucky (James Krupa in Slate)
Unfortunately, one of the most misused words today is also one of the most important to science: theory. Many incorrectly see theory as the opposite of fact. The National Academy of Sciences provides concise definitions of these critical words: A fact is a scientific explanation that has been tested and confirmed so many times that there is no longer a compelling reason to keep testing it; a theory is a comprehensive explanation of some aspect of nature that is supported by a vast body of evidence generating testable and falsifiable predictions. 
In science, something can be both theory and fact. We know the existence of pathogens is a fact; germ theory provides testable explanations concerning the nature of disease. We know the existence of cells is a fact and that cell theory provides testable explanations of how cells function. Similarly, we know evolution is a fact and that evolutionary theories explain biological patterns and mechanisms. The late Stephen Jay Gould said it best: “Evolution is a theory. It is also a fact. And facts and theories are different things, not rungs in a hierarchy of increasing certainty. Facts are the world’s data. Theories are structures of ideas that explain and interpret facts.”
3. Yet another peer-review scandal (Steve Novella at Neurologica). The line that caught my attention was:
I will note, as I have in the past, that a review of the acupuncture literature, for example, showed that 100% of studies coming out of China are positive. This is not statistically possible, even if acupuncture worked...
4. Does ESP work? Depends on whether you are a frequentist, or a Bayesian. John D. Cook gives the lowdown.