There’s a one in five chance…

When the big little clown was in fourth grade, he and his friends were really into Texas Hold’em. I regularly hosted a bunch of nine year olds for poker sessions. They couldn’t get enough of it. The Little Clown and I used to play all the time, even when his friends weren’t around.

Texas Hold'em
Texas Hold’em

Nine year old poker players are pretty easy to beat because they tend to be very aggressive, betting on all kinds of crazy hands. After The Little Clown went all in with three cards to a straight for the umpteenth time I decided it was time for a lesson in probability. As synchronicity would have it, The Little Clown’s annual science fair was coming up and we agreed that he would choose as his question:

What should I bet if I draw three cards to a straight in Texas Hold’em?

We filled in the forms and it didn’t take long before his teacher contacted me, appalled that a nine year old would be playing poker, let alone that he would have the audacity to want to study the topic in a science project. After some negotiation, we compromised on a less provocative hypothesis:

What is the probability of getting a pair if you draw two random cards from a deck?

Science Project

Little Clown did a science project every year from kindergarden to fifth grade but this one was my favourite as it fulfilled all of my criteria for a good science project.

  1. There should be an obvious hypothesis that is wrong.
  2. The hypothesis can easily be proved wrong by an experiment.
  3. The experimental result can easily be confirmed with maths.

Excuse me for a second while I rant a little about elementary school science projects.

Paper Mache Volcano from Science Project Lab
Paper Mache Volcano from Science Project Lab

Who exactly was it that decided that filling a cardboard volcano with baking soda and vinegar was a good science project? What is the child learning from the experiment?  What is the hypothesis? How come the vast majority of children’s science projects are either variants on the volcano “experiment” or an exercise in building a model out of lollipop sticks and elastic bands?

I predict that if I leave bread out for three months it will go moldy.

I predict that if I make a little car that is jet-propelled by a balloon, the car will be jet-propelled by the balloon.

How is that science? Where is the experiment?


What are the chances?

The poker experiment is perfect because 9 years olds (like most people) don’t really get probability and will always get the answer wrong (that’s why they are easy to beat at poker). It’s also easy to demonstrate by choosing random pairs of cards from a deck and recording the results. The maths is a bit harder, but this was actually my favourite bit of maths instruction ever with my budding scientist. We started with a coin.

What is the chance of getting heads if you flip a coin?

We tried it a hundred times and confirmed our intuitions before moving on to something more complex.

What are the chances of getting two heads if you flip two coins?

This was a little bit harder but we figured it out and experiments again confirmed our intuition. We tried more coins.

What are the chances of getting three heads if you flip three coins?


Intuition failed us here but … maths to the rescue! Do 9 years olds know about exponents? *shrug* Mine did and we got the results quickly and confirmed it with experiments. From there, it was trivial to try four coins and five coins so we moved on to dice.

What are the chances of getting a six if you roll a dice?

Intuition was inadequate again, but again the maths held up (hooray, maths!). Exponents still work if the base is 6 instead of 2 and the experiment confirmed it.

What are the chances of getting two sixes if you roll two dice?

By now it was easy and we zoomed through three dice and four dice. Time for cards.

What are the chances of getting a pair if your draw two cards from a deck?

A deck of cards is trickier because you have to deal with the whole take-one-away thing but, luckily, 51 is divisible by 3 and the maths is not hard, even for a nine year old. The experiments are more tedious because you have to deal a lot of pairs to demonstrate a 1 in 17 chance and nine year olds are not famous for their patience. Fortunately my nine year old was already a pretty good Logo programmer as he was already a four year veteran of the business having started to learn Logo in first grade.

I helped him recreate the coin-flip experiment in Logo and then we did it again for the coins. The cards were beyond his programming skills but he followed along OK when I wrote the code and he got a kick out of the results.

Chance of a Pair

Challenger School – where my little clown learned his nine year old skills – gets a bad rap for allegedly teaching rote learning. But the rap couldn’t be further from the truth. Having sent one little clown to Challenger and another to public school, I can attest that only one of them was ever subject to rote learning and it wasn’t the Challenger clown.

Challenger is intensely academic and, while I can understand that it is not right for every kid, mine was challenged in ways that he didn’t experience again until high school. In fact, I wonder whether the transition from high-performing fifth grader to coasting sixth grader wasn’t detrimental to his determination as it taught him that coasting was an option; an option unavailable to him at Challenger.

Fast-forward nine years and my little clown is now all grown up and accepted to UC Santa Barbara and, under protest, Ragged Clown Sr and Ragged Clown Jr are on their first road trip together to go check out Jr’s home for the next four years. It’s a long trip so we brought along Jad Abumrad and Robert Krulwich for company.

Jad and Robert – and their magnificent Radiolab podcast – have long been our companions on road trips. On this particular trip, the podcast app summoned up the episode “Are You Sure?”

Radiolab episodes have a certain structure. There is always a main theme – in this episode the theme was doubt –  and they do a powerful job of exploring variations on the theme with an  eclectic selection of interviews and zany editing and contributions from psychologists, scientists and moral philosophers – and anyone else who has a good story to tell.

The first segment was interesting albeit not relevant to my story here. A couple of devout Christians were due to get married until one of them started to wonder whether all that stuff in the bible was actually true. That topic would make a great blog post, but it was the second segment that intrigued me more.

Annie Duke is a decision strategist – a poker player – and won the poker world championship in 2004. In her segment, Annie describes the strategy that professional poker players use for winning poker games: know the odds. But knowing the odds doesn’t just mean knowing which hand is likely to win; it means understanding that the hand that is most likely to win will often lose (and vice versa). The secret is in knowing the pot odds.


If there is a $300 in the pot and you have to bet $100 to stay in, you could lose the pot three times and still break even if you win the next hand.


So you could lose a hundred dollars on Monday, a hundred dollars on Tuesday, you could lose another hundred dollars on Wednesday, but if you win the hundred back on Thursday, you are good.


So you just need to win one out of every four times

In other words, it’s not enough to know your chances of winning. The important thing is that your chances of winning are greater than the pot odds.

The climax of the story has Annie playing against her brother in the final of the World Hold’em Championship. They are playing for two million dollars and she’s holding a pair of sixes and her brother goes all in with a pair of sevens before the flop. Her brother is 82% to win the hand. Amazingly, the flop gives Annie a full house and she wins the $2,000,000.

Pocket Nines
Pocket Nines

Aside from the lessons on how to play hold’em, Annie’s good luck highlighted some fundamentally different ways of thinking in the Clown household. There’s one strand of thought that says, if there is a chance that a bad thing might happen at a particular event, you should avoid events like that in the future. Bad movie? No more movies! Awkward silence or said the wrong thing at a social gathering? No more social gatherings! On the other hand, the more optimistic clowns are willing to tolerate a lot of  crap movies and awkward gatherings in the knowledge that, eventually, you’ll find a movie to enjoy or that a social gathering will sparkle. Even without knowing the pot odds, I’m pretty certain that if you never take a chance, you’ll never win.

Final word from Annie:

It’s not about winning the hand all the time. It’s about winning the hand enough of the time […] That embracing of uncertainty does some really wonderful things for you.


You learn how to avoid that very human tendency to feel ashamed or embarrassed when you lose. You just float right above it.

Annie’s brother:

If you are making good decisions, then you are making good decisions.


You have to be somewhat outcome blind.

By coincidence, Annie was a psych major and Little Clown is majoring in bio-psych at UCSB. He’s gonna be a scientist!

UC Santa Barbara
UC Santa Barbara

I hope he’ll learn from Annie and take some chances. I hope he’ll win some too.

Who cares about this stuff?

The Times has a great series of essays by Errol Morris on Thomas Kuhn’s The Structure of Scientific Revolutions.

According to the author, Structure is a post-modern work which makes the relativist claim that people in one paradigm (or culture or era) are unable to fairly judge the ideas of another paradigm because the two are paradigms are incommensurable.

The series takes us on a breathtaking tour of the meaning of the word incommensurable through three thousand years of the history of mathematics taking in Pythagoras, the legend of the execution of Hippasus for showing that the square root of two is irrational, Socrates & Plato and the moment that Thomas Kuhn threw an ashtray at the author’s head before throwing him out of Princeton.

Before reading today’s article (article 3 of 5), I had taken seriously Kuhn’s claim that each so-called paradigm shift creates an unbridgable divide from the previous paradigm that scientists are unable to cross. Kuhn – like the creators of The legend of Hippasus’s murder – created the legend of incommensurability to imply a dramatic resolution to a crisis that never existed. He created a legend which – like all legends, we learn – is more memorable than fact.

At the end of today’s article I was left wondering: how many people are actually interested in this stuff?…

Who cares about Theories of Naming and incommensurability and proofs of irrationality and philosophy and maths and greek history.

…and where can I meet them?

Part 4 was published just now. I have reading to do.

Where Your Friends Are


Marvellous visualization of where friends tend to cluster in Facebook. Apparently everyone in Dixie knows someone in Atlanta and all the Mormons are friends with each other.

My latest visualization shows the information by location, with connections drawn between places that share friends. For example, a lot of people in LA have friends in San Francisco, so there’s a line between them.

Looking at the network of US cities, it’s been remarkable to see how groups of them form clusters, with strong connections locally but few contacts outside the cluster. For example Columbus, OH and Charleston WV are nearby as the crow flies, but share few connections, with Columbus clearly part of the North, and Charleston tied to the South:

Take a look at his country-level visualization too.

Integration is just a better multiplication

Regular readers know that I am a big fan of Better Explained in which Kalid makes mathematical ideas accessible.

Today’s installment:

Integration is just multiplication when one of the operands is changing.

Most people grok integration as area under a curve but, as Kalid explains, area is just one convenient way of visualizing multiplication…but we don’t need to visualize multiplication as multiplication is already pretty straightforward – in the simplest case, it’s just repeated addition.

Many ideas in maths start out simple like that and then gradually generalize to a more complex idea. In Kalid’s words:

Our understanding of multiplication changed over time:

  • With integers (3 × 4), multiplication is repeated addition
  • With real numbers (3.12 x sqrt(2)), multiplication is scaling
  • With negative numbers (-2.3 * 4.3), multiplication is flipping and scaling
  • With complex numbers (3 * 3i), multiplication is rotating and scaling

We’re evolving towards a general notion of “applying” one number to another, and the properties we apply (repeated counting, scaling, flipping or rotating) can vary. Integration is another step along this path.

In other words,

Integration is just a better multiplication

or, conversely,

Multiplication is a special case of integration when the values are static.

Is it a cat?

Last time I visited Better Explanations, I got stuck there for hours. I resisted this time once I realized I was reading all the same articles for a second time.

Today’s bait showed up in my RSS feed.

Suppose we want to define a cat:

  • Caveman definition: A furry animal with claws, teeth, a tail, 4 legs, that purrs when happy and hisses when angry.
  • Evolutionary definition: Mammalian descendants of a certain species (F. catus), sharing certain characteristics.
  • Modern definition: You call those definitions? Cats are animals sharing the following DNA: ACATACATACATACAT.

The modern definition is precise, sure. But is it the best? Is it what you’d teach a child learning the word? Does it give better insight into the catness of the animal? Not really. The modern definition is useful, but after getting an understanding of what a cat is. It shouldn’t be our starting point.

He goes on to explain that, when we teach biology to little kids we start with the simple definition and only gradually work our way up to the modern definition. But when we teach maths, we leap straight in to the modern definition and start teaching them the formula – so they never really understand the basic concepts behind the formula.

He illustrates his point by walking through what it means to be a circle  and what e is all about.

Cool stuff.

Pick me Kate! Pick me!

Since I have access to all the songs in the world I told Rhapsody to just play me some songs that you think I might like.

Rhapsody thought I might like to listen to some Kate Bush which was nice because I haven’t listened to Kate Bush since I was about thirteen with hormones and she was about 19 and hot and she lived in the same town as me – Bexleyheath.

I listened to a few familiar tracks – weird as ever – and then suddenly our Kate seemed to be singing “three point one four one five nine…”. That’s odd I thought and glanced at the title.

Sure enough, the song was called ?.

“I wonder if there is a story behind the song?” I wondered. And googled.

The song is fairly recent and is a tribute to a man who is infatuated with everyone’s favourite transcendental number.

It starts…

“Sweet and gentle and sensitive man
With an obsessive nature and deep fascination for numbers
And a complete infatuation with the calculation of PI

…and then continues with Kate singing the first 150 digits of pi…but she gets it wrong! She skips a few around 137!

Clearly Kate is much too smart to make a mistake like that and there is bound to be a fascinating explanation…and…the interwebs are full of them.

Some of my favourites:

the best Craftsmen always make one deliberate mistake in anything they create so that the Gods don’t punish them for their arrogance.

The supposed mistakes in pi are all deliberate, and she has actually used them (and lots of other tricks) to embed a secret message in the song. It is our job to decode what that message is.

If that’s what Kate says pi is, then thats good enough for me. I’m hacking my calculator and patching my maths libraries.

And my favourite theory of all:

Kate Bush has been looking all her life for a man who is so geeky that he would notice an error in the Pi song. She’ll be reading your blog and fantasising about you now, you lucky bugger,

Why Radians?

Ever wondered why there are 360 degrees?

Constellations make a circle throughout the year — ever see the Big Dipper upside down sometimes? (Never fear, it’ll be rightside-up in 6 months). Here’s a theory about how degrees came to pass:

  • Humans noticed that constellations moved in a full circle every year
  • Every day, they moved a tiny bit (” a degree”)
  • Since a year has about 360 days, a circle had 360 degrees

But, but… why not 365 degrees in a circle?

Cut ‘em some slack: they had sundials and didn’t know a year should have a convenient 365.242199 degrees like you do.

360 is close enough for government work. It fits nicely into the Babylonian base-60 number system, and divides well (by 2, 3, 4, 6, 10, 12, 15, 30, 45, 90… you get the idea).

According to Better Explained, degrees are subjective but radians are objective.

A degree is the amount I, an observer, need to tilt my head to see you, the mover. It’s a tad self-centered, don’t you think?

Much of physics (and life!) involves leaving your reference frame and seeing things from another’s viewpoint. Instead of wondering how far we tilted our heads, consider how far the other person moved.

Problem 12

To save you going all the way to Project Euler to read it, I have copied problem 12 here for your puzzle solving convenience…

The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28.

The first ten terms would be:

1, 3, 6, 10, 15, 21, 28, 36, 45, 55, …

Let us list the factors of the first seven triangle numbers:

1: 1
3: 1,3
6: 1,2,3,6
10: 1,2,5,10
15: 1,3,5,15
21: 1,3,7,21
28: 1,2,4,7,14,28

We can see that 28 is the first triangle number to have over five divisors.

What is the value of the first triangle number to have over five hundred divisors?

In case you were wondering, the answer to problem 10 is

primes =
puts primes.find_primes_less_than(2000000).inject{|s,n| s+n}

How come inject and collect haven’t caught on in other languages? They are awesome.