Thursday, July 17, 2014

Simple population genetics math

The simplest equations of population genetics.

For example, given two alleles A and a, with P(A)=p and P(a)=q, where p+q=1 (mutually exclusive), the probability of AA=p^2, aa=q^2 and Aa=2pq...

That's true assuming random mating, no selection and no gene flow from other populations.

If you observe that the frequency of AA in reality is greater than p^2, that might mean allele A is being selected for, i.e. is increasing in frequency because its bearers have more kids.

If the frequency of Aa exceeds 2pq, well that's pretty weird. It might mean that AA's are mating with aa's more frequently than random chance predicts. Opposites attract?

Other formulas describe:

  • fitness: fitness of AA= w = kids(AA) / kids(any genotype)
  • mutation
  • inbreeding
  • effective population size
  • genetic drift
  • narrow sense heritability
  • response to selection for a continuous (many gene controlled) trait (like height or IQ)


This is the beginning of a collection of the simplest math of various fields inspired by Yudkowsky: "But for people who can read calculus, and sometimes just plain algebra, the drop-dead basic mathematics of a field may not take that long to learn. And it's likely to change your outlook on life more than the math-free popularizations or the highly technical math."

Sumner on AD

Sumner says dispense with the talk of Aggregate Supply vs. Aggregate Demand shocks, and replace with Nominal vs. Real shock distinctions. "A nominal shock is an unexpected change in NGDP. A real shock changes the price/output split for any given level of NGDP." Why the need for the change? Because the AS v. AD framework is confusing.
Level 1: If people decide to spend less, then aggregate demand will fall. By "spend less" the speaker usually means save a larger fraction of their income.
Level 2: But saving equals investment, so if society saves more it will invest more. You are "spending more" on investment projects.
Level 3: But planned savings may exceed planned investment.
Level 4: In that case interest rates will fall, equalizing actual saving and investment.
Level 5: But perhaps it's income that falls, and that is what equalizes actual saving and actual investment.
Level 6: But why should income fall? How does an attempt to save more reduce M*V?
Level 7: If you try to save more and as a result interest rates fall, then velocity will tend to decline, as there is a lower opportunity cost of holding onto cash.
Level 8: Yes, velocity would fall, but I asked why M*V would fall. If the central bank uses the Taylor Rule, or if it targets inflation or NGDP, it will adjust the money supply to prevent M*V from falling.
Level 9: That may be true if interest rates are positive, but at the zero bound they cannot offset the fall in V.
Level 10: Sure they can. There is nothing special about the zero bound in interest rates. All that matters is the zero bound in eligible assets left to buy. And no central bank has ever come close to that zero bound. No central bank has ever said they were out of ammunition.
Level 11: But central banks are reluctant to do unconventional monetary policies at the zero bound, and hence if people try to save more, then M will not fully offset V. 
I could go on and on, but I decided to let my opponents have the last word. After all, this "enlightenment" stuff is kind of arrogant. Now let's consider an extra 100 million immigrants suddenly flooding into the US. Does this raise AS or AD? 
Level 1: Clearly AD rises, there are lots more shoppers!
Level 2: No, that's an AS shock, there are lots more workers.
Level 3: It depends on the monetary policy. Under the gold standard M is unaffected. So it's a positive supply shock and the wave of immigration causes deflation. Remember 1865-96?
Level 4: No, the wave of immigrants raises the return to capital. Interest rates rise and velocity increases. Both AS and AD rise.
Level 5: But we are probably not at the zero bound if 100 million immigrants pour in, and we now have fiat money, so it entirely depends on whether the central bank is targeting inflation or NGDP.

Thursday, June 26, 2014

Why self-experiment

Cost, incentives and knowledge mean small self-experiments are virtually guaranteed to pay off better than distant grand ones, says Seth Roberts, contrasting self medical experiments with "ending poverty":
My personal science is the polar opposite of what Sachs did. He tried to help others (poor Africans), I try to help myself. He tries to help people he knows almost nothing about, I try to help myself — and I know a lot about myself. He tried to do something big (end poverty). I try to do something small (e.g., sleep better). What he did cost millions of dollars. What I do costs nothing. I can test a new idea about how to sleep better in days. Sachs took years to test his ideas. For me, failure costs almost nothing. Sachs’s failure cost him years of his life. You have to be an extraordinary person with great talent to do what Sachs did. Whereas anyone can do personal science.
Relates to recent Hanson post on 'big-scope bias'.

Thursday, June 19, 2014

Sailer on Gladwell

A classic:
...Gladwell devotes 47 pages to propounding the argument of an airline consultant named David Greenberg that (in Gladwell`s exaggerated version): “The single most important variable in determining whether a plane crashes is not the plane, it`s not the maintenance, it`s not the weather, it`s the culture the pilot comes from.”
Greenberg argued that in a highly deferential culture like Korea, co-pilots were afraid to speak up when their commanding officers were flying the plane into a mountain. Thus, in 2000, after a series of crashes, Korean Air hired Greenberg to train its cockpit crews in the more broadly participatory style that American airlines have espoused since the invention of “Crew Resource Management” in 1979. And Korean Air stopped having so many crashes.
Gladwell grandly entitles this notion of the dangers of excessive deference “The Ethnic Theory of Plane Crashes.” He illustrates it with a long account of a Colombian airliner that crashed on Long Island in 1990 because the first officer never made clear to the surly New York air traffic controllers that they were running out of fuel and needed emergency priority to land.
Yet is Colombia truly a “high deference” culture? Judging by its drug lords, jungle rebels, and military coups, it might seem a rather aggressive culture. Perhaps that Colombian co-pilot held his tongue not out of deference to a bunch of lowly air traffic controllers, but out of the Colombian`s traditional macho pride.
Or maybe he had poor English language skills and couldn`t think of the right phrase. Who knows? At this point, it`s all speculation because everybody is dead.
Is “cultural deference” the single most important variable in airline safety, as Gladwell claims? Let`s try a simple reality check: Does Japan, a famously polite and deferential country, have a disproportionate number of crashes?
I spent a few hours poking around on the Internet and, which lists every “fatal event” involving a scheduled airliner. According to the rigorous definition they employ, there were 45 fatal airline events on Earth between the beginning of 2004 and October 2008. I entered all 45 into an Excel spreadsheet and looked at the results.
  • First, not one of the 45 crashes involved a Japanese airline.
This is not to say that excessive deference to captains might not be a problem. After all, American airlines have been fighting it for almost 30 years. But apparently it`s the kind of problem that a highly competent country like Japan can train its aircrews to avoid.
  • Second, my spreadsheet quickly suggested a far more general “ethnic theory of plane crashes”—one that Malcolm Gladwell would never, ever mention.
The International Civil Aviation Organization summarizes the number of departures by region, allowing us roughly to estimate rates of crashing per flight.
North America (the U.S. and Canada) accounts for 42 percent of the world`s airline departures, but only seven percent of the fatal events on AirSafe`s list of 2004-2008.
But Latin America has only seven percent of the departures, but 18 percent of the fatal crashes, since 2004. Thus, airlines headquartered in Latin America have been 16 times as dangerous as airlines based in North America.
Africa and the Middle East, lumped together, are 42 times as dangerous as North America—with five percent of all departures and 33 percent of all crashes.
In summary, First World airlines are fairly safe.
In contrast, the old Second World (the ex-Soviet Union) looks quite dangerous, with nine crashes among its airlines.
And the Third World (Africa, the Middle East, Latin America, South Asia, and Southeast Asia) is, unsurprisingly to VDARE.COM readers, highly dangerous relative to its small number of departures. Third World airlines accounted for 29 of the last 45 fatal events.
None of this is astonishing. Third World and ex-Soviet countries are much more dangerous in general (here`s a website that tracks Third World bus plunges), most likely due to lower levels of general competence.
Still, that`s a rather important thing to know. Wouldn`t you say? Useful when booking your next overseas trip?
Malcolm Gladwell`s books are sold in vast quantities in airport bookstores to frequent fliers. So you might imagine he`d want to clue his loyal readers in on how to minimize the danger of dying in a crash. But that would involve violating the taboos against political incorrectness—which could make him as popular on the corporate speaking circuit as Charles Murray.
Forget it!
And “The Ethnic Theory of Plane Crashes” is perhaps the bestchapter in Gladwell`s new opus.
“Rice Paddies and Math Tests” isn`t the worst chapter, either, but it`s still lame.
Gladwell argues that the reason Chinese kids are good at math is because they work hard.
Math requires hard work, no doubt. But discounting aptitude this completely is something that only somebody as bad with numbers as Gladwell would do. Anybody with any skill at math knows that, no matter how hard you try, you`ll always run into somebody who is better at it than you are.
Why do the Chinese work hard? Because, according to Gladwell, their ancestors worked in rice paddies, which demand much more effort than the wheat fields harvested by lazy Europeans.
To explain why whites are so lazy, Gladwell contrasts the “autonomous” work of Chinese rice growers to the closely managed work of European farmers:
“The peasants of Europe worked essentially as low-paid slaves of an aristocratic landlord, with little control over their own destinies. Growing rice is too complicated and intricate for a system that requires farmers to be coerced and bullied into going out into the fields each morning. By the fourteenth and fifteenth centuries, landlords in central and Southern China had an almost completely hands-off relationships with their tenants: they would collect a fixed rent and let farmers go about their business.”
Malcolm apparently believes that European aristocrats would, in the manner of Parris Island drill sergeants, wake up their tenants each morning and force them out of their beds!
These Da Vinci Code-quality howlers pop up repeatedly inOutliers.
Nonetheless, Gladwell is certainly right that rice farmers work hard. Not surprisingly, though, he fails to mention the even more relevant contrast to rice farming: the “female farming” culturesof tropical Africa, which demand mostly just hoeing by women, with very little labor from men. By Gladwell`s logic, that might explain a lot about African-American culture, but he wouldn`t go there even if he ever thought of it.
Rice growing makes the Chinese hard working, which, in Gladwell`s theory, makes them good at math.
(Of course, vast numbers of Chinese live in the wheat belt, around the Yellow River. Indeed, that`s where Chinese cultureoriginated. But never mind that…)
Is Gladwell arguing, as geneticist Henry Harpending and evolutionary theorist Gregory Cochran document in their upcoming book The 10,000 Year Explosion: How Civilization Accelerated Human Evolution, that the life or death Malthusian struggle to grow enough food to survive caused humans to evolve rapidly in recent millennia?
Is Gladwell theorizing that rice growing selected Chinese genes for hard work and/or math?
Of course not! It`s all a cultural legacy from working in the rice paddies, he says.
No nature, just nurture. Nobody here but us chickens.
Let`s try a reality check. Why don`t the rice paddy cultures of Southeast Asia, such as Cambodia and Indonesia, produce math wizards? There has been a sizable Filipino population in California for several generations, but very few make it to Cal Tech.
It`s a puzzlement. At least to Gladwell...

Wednesday, June 11, 2014

Tim Ferriss on choice minimization

Choices sap energy. Minimize the ones that don't matter. Ferriss' rules for doing that:
1. Set rules for yourself so you can automate as much decision-making as possible (see the rules I use to outsource my e-mail to Canada as an example of this)
2. Don’t provoke deliberation before you can take action.One simple example: don’t scan the inbox on Friday evening or over the weekend if you might encounter work problems that can’t be addressed until Monday.
3. Don’t postpone decisions or open “loops,” to use GTD parlance, just to avoid uncomfortable conversations.If an acquaintance asks you if you want to come to their house for dinner next week, and you know you won’t, don’t say “I’m not sure. I’ll let you know next week.” Instead, use something soft but conclusive like “Next week? I’m pretty sure I have another commitment on Thursday, but thank you for the invite. Just so I don’t leave you hanging, let’s assume I can’t make it, but can I let you know if that changes?” Decision made. Move on.
4. Learn to make non-fatal or reversible decisions as quickly as possible.Set time limits (I won’t consider options for more than 20 minutes), option limits (I’ll consider no more than 3 options), or finance thresholds (Example: If it costs less than $100 [or the potential damage is less than $100], I’ll let a virtual assistant make the judgment call or consider no more than 3 options).
I wrote most of this post after landing at the monster that is ATL airport in Atlanta. I could have considered half a dozen types of ground transportation in 15 minutes and saved 30-40%, but I grabbed a taxi instead. To use illustrative numbers: I didn’t want to sacrifice 10 attention units of my remaining 50 of 100 total potential units, since those 10 units couldn’t then be spent on this article. I had about 8 hours before bedtime due to time zone differences—plenty of time—but scarce usable attention after an all-nighter of fun and the cross-country flight. Fast decisions preserve usable attention for what matters.
5. Don’t strive for variation—and thus increase option consideration—when it’s not needed. Routine enables innovation where it’s most valuable.In working with athletes, for example, it’s clear that those who maintain the lowest bodyfat percentage eat the same foods over and over with little variation. I’ve eaten the same “slow carb” breakfast and lunch for nearly two years, putting variation only into meals that I focus on for enjoyment: dinner and all meals on Saturdays. This same routine-variation distinction can be found in exercise vs. recreation. For fat-loss and muscle gain (even as much as 34 lbs. in four weeks), I’ve followed the same time-minimal exercise protocol with occasional experiments since 1996. For recreation, however, where the focus is enjoyment and not efficacy, I tend to try something new each weekend, whether climbing at Mission Cliffs in SF or mountain biking from tasting to tasting in Napa.
Don’t confuse what should be results-driven with routine (e.g. exercise) with something enjoyment-driven that benefits from variation (e.g. recreation).
6. Regret is past-tense decision making. Eliminate complaining to minimize regret.Condition yourself to notice complaints and stop making them with a simple program like the 21-day no-complaint experiment. Just a bracelet and awareness can prevent wasted past-tense deliberation that improves nothing and depletes your attention and emotional reserves.

Monday, June 9, 2014

Falkenstein on Stoicism

Barbara Ehrenreich has a new book out about the perils of positive thinking, and it highlights a growing counter-movement in the self-help genre. Studies suggests all those 'Think to Win!' books are actually harmful to your health. Books like The Little Gold Book of YES! Attitude or The Secret are all about you getting you to be positive all the time to achieve, well, anything. Tony Robbins, Joel Osteen, Martin Seligman, Nathaniel Branden, all preach the power of positive thinking. Like methamphetamine this is invigorating at first, enervating in the end. Research has shown that depressed people are actually more realistic about their abilities than optimists. Woody Allen's joke about the secret of happiness being abject stupidity is funny because it's kinda true (as most jokes are). That just depresses me further. 
The problem with optimism is that it's blatantly incorrect: we aren't all above average in everything, things do not always get better, and we can't always get what we want. The problem with realism is that by itself it is depressing, a demotivator that does not elevate...

Friedman was a symmetric monetarist

Ben Cole:
No less than three times in his career—at least three—iconic monetarist Milton Friedman bluntly blamed economic contractions on too-tight central bank policies.
The Great Depression, the U.S. recession of 1958, and Japan’s Eternal Stagnation after 1992.
In the last two cases, Friedman unabashedly told central bankers to print a lot more money—in fact, in 1998 he told the Bank of Japan to start buying bonds, and if that didn’t work, then to keep buying more bonds. Run the presses until they melt...
Symmetric, whereas most right-wingers today think Central Banks can only fail in one direction.