Archive for the ‘Probability’ Category.

Young Researchers in Mathematics

There are now some videos available from the Beyond Part III / Young Researchers in Mathematics conference I attended earlier this year. Of particular note is David Spiegelhalter’s plenary lecture on probability and uncertainty. I summarised one of the ideas from that talk – the micromort – on Everything2, mentioning a comparison between the risks of Ecstasy and horse riding by “the chairman of the Advisory Council on the Misuse of Drugs” which had led to calls for his resignation as early as January. The expert in question was Professor David Nutt, whose sacking in October has sparked controversy and debate over the role of science in policy making. Spiegelhalter’s presentation was highly accessible (and amusing!), so anyone interested in learning a bit more about these often-unintuive subjects should check it out.

There is also video from the panel discussion and some of the accessible talks in the various themed sessions. All of which should help convince you to sign up for next year’s Young Researchers In Mathematics conference, running 25-27 March again at Cambridge.

Rule of Succession

Noders – users of Everything2 – often meet up in the real world in what are imaginatively known as nodermeets. Sometimes they even brave the British outdoors, and the two London nodermeets in parks have had an unexpected side effect: at each a couple met and ended up getting married! Next month there will be another such meet, and (as one of the more mathematically-inclined britnoders) I was asked what the odds were of it being three times a charm marriage-wise.

It’s easy to cook up a dodgy mathematical formula in support of a cause, and that particular flavour of bad science seems fairly popular with the media, so I wanted to set things on a vaguely valid theoretical basis for a change. Plus I knew I’d recently seen a similar question – what was the probability of the 44th President of the United States being a white male? – and its solution at a lecture during Beyond Part III; I just couldn’t remember the result or its originator.

Much googling of half-remembered formulae and likely candidate long-dead French mathematicians later, I’d recovered the answer. The desired theorem is the rule of succession, due to Laplace, and it can be described as follows-

If a trial can only succeed or fail, but nothing is known about the probability of either outcome except that there have been s successful trials out of n in total, then the probability of the next trial being a success is (s+1)/(n+2).

As an immediate corollary, if you know nothing about an event except that so far it has happened n times in a row, then the probability it will happen next time is (n+1)/(n+2). (This more specific version is also sometimes refered to as the rule of succession.) Laplace was trying to solve the sunrise problem: as the sun has risen every day, what is the probability of it rising tomorrow? Armed with the rule, we still require an estimate of how many successful sunrises there have been; Laplace, working in the 18th century, took a literal reading of the bible for this, a practice which still appeals to young earth creationists. But although a more modern figure gives a probablity much closer to 1, it still admits a 1/(n+2) chance of the sun not rising tomorrow.

This has often been used as a criticism of the rule of succession, but as often occurs the problem is more one of inappropriate application of a model than a flaw in the model itself: Laplace himself immediately cautioned that “…[the probability of the sun rising tomorrow] is far greater for him who, seeing in the totality of phenomena the principle regulating the days and seasons, realizes that nothing at present moment can arrest the course of it.”

In other words, our astronomical knowledge means that we have more to go on than just observed sunrises in estimating the chance of another, and we should defer to that. The rule of succession is to be used when you have little or no knowledge of the underlying processes or probability of an event. It’s particularly useful when there have only been a few trials, or no successes have been observed at all – the rule of succession provides a non-zero estimate in that case, which is desirable by Cromwell’s rule.

With the small sample space of a pair of nodermeets, and noder romance being infinitely more mysterious than celestial mechanics, I was thus happy to apply the rule of succession and declare the probability of a third marriage to be 3/4.


Proof of the Rule of Succession
This proof is lifted from here, which is easier to read anyway…

Laplace’s assumptions were

  • The event has some chance of happening, between 0 and 1.
  • All possible values of this chance, from 0 to 1, are equally
    probable a priori.
  • His sixth principle of probability: for E an event, C_1…C_n possible causes of E,

    P(C_i|E) = P(E|C_i)*P(C_i) / (Σ_{k=1..n}P(E|C_k)P(C_k)) (this is just Bayes’ Theorem.)
  • His seventh principle of probability: for E an event, F a possible future event and C_1…C_n possible causes,

    P(F|E)=Σ_k=1..n P(F|C_1)P(C_1|E)

We may then derive the special case of the rule of succession. Let E indicate that the event has occurred n times in a row; F that the event will occur next time; and C_x that the chance of the event occurring is x. The C_x are then considered as the possible causes of the event- so P(E|C_x)=x^n and P(F|C_x) is just x. Since there are infinitely many x in [0,1], we pass from summations to integrals in the sixth and seventh principles to obtain infinite versions and thus find

and so

as claimed.

Greedy Pig

This entry first appeared as a writeup for Everything2.

Greedy pig is a simple maths game for groups that serves as an introduction to probability. I used it recently as a warm-up activity for a maths hour with local primary school children (around 11 years old), where it was well-received. For older students, it could provide the starting point for a discussion of topics such as the gambler’s fallacy or for a statistical investigation.

How to Play

A pair of dice are thrown, and their total recorded as a starting score for all participants. Play then proceeds in rounds. Before each round, players decide whether to stick with their current score, or continue playing. To play a round, roll a die; each player who is still in adds that many points to their score- unless a two is thrown, in which case they lose all their points. Play proceeds until all participants have decided to keep their score, or a two eliminates all remaining players. The winners of the game are the players with the highest score; it’s worth playing around three games and taking a combined total.

Practical issues when running the game

Keeping track of who’s in or out is most easily done by having students stand up if they wish to gamble or sit down if they wish to stick with their score. Apart from making it easy to spot when a player is trying to sneak back into the game, this is also good as it gives the students an idea of how confident their peers are to continue, and you’ll get lots of them wavering up and down as they try to decide!

Recording scores of players as they drop out is harder, but vital- children may try to cheat, or accuse each other of doing so, when it comes to declaring their final total. It’s definitely worth keeping a running tally of throws and totals on the blackboard -with the students doing the adding up! For smaller groups, you might be able to give out tokens or numbered cards as players save their score, but with larger groups (we had around 30 students per session) this would probably slow things down a lot. Perhaps give each student a piece of paper and a pen to write their score on (nice and large!) to hold up once they’ve sat down.

Some children are very risk adverse, and sit down almost immediately; others just stay standing until they get knocked out by a two. To make sure this isn’t due to misunderstanding the game, it’s worth doing a practice run first. It’s interesting to watch how strategies adapt as the players get more experience- particularly if the two is thrown surprisingly early or late in a game (we hit a total in the 70s for one session, which skewed things somewhat!)

Strategy

Can we say anything mathematically about when a player should sit down? That is, should we gamble a given total or not? You might want to think about this yourself before reading on.

To model this game, we can consider the expectation of a round- that is, the average outcome in the long run. Suppose then we have a total of N. Obviously, it’s only worth playing if our expected increase in the total offsets the risk of losing it all. One sixth of the time, a one will be thrown in the next round, leading to a gain of 1; with equal probability we might gain 3,4,5, or 6. So five sixths of the time, we gain some amount. But the remaining sixth of the time, we’ll hit a two and lose everything; this can be thought of as a ‘gain’ of minus N. So our expected gain by staying in is:

(1/6)*1+(1/6)*(-N)+(1/6)*3+(1/6)*4+(1/6)*5+(1/6)*6 = (1/6)*(1+3+4+5+6-N) = (19-N)/6.

Hence, for a play to be worthwhile, we need (19-N)/6 (and thus 19-N) to be positive. That is, we should be willing to gamble on a total of 19 or less, but a total of 20 or above should be banked.

Game Theory

However, as is always the case with expectation theory, this analysis depends on playing a large number of games and considering the total (or average) score across them. Playing just a few games tends to encourage an ‘all or nothing’ approach wherein players are more interested in winning in absolute terms (that is, being best in class) than the score attained in the progress.

Of course, the ideal time to bank is just before the two is thrown, thus leaving you with the maximum possible score (anyone who sat out earlier has less; anyone who stayed in scores zero). The problem is that by banking a score in a given round with the hope of winning that particular game, you are effectively gambling on it being the next throw being a two, and you’ll only be right one sixth of the time. The remaining five sixths of the time, you’ll be wrong and the others get a higher score- in a group situation, any of them could now retire with a better score than you, and in a 1-on-1 duel your opponent can bank immediately to guarantee the win.

But then, if everyone adopts this brinksmanship strategy of always staying in, then eventually they will all go over the brink and score zero. Depending on how the payoffs are modelled (which is of course crucial!) this two-player version of a round of Greedy Pig can be interpreted in game-theoretic terms as follows. If neither player has an advantage over the other, either by ending the game with a tied score, or by proceeding to another round, then assign them a score of 1, unless both players tied with zero, in which case score 0. Else, if one player wins the game this round and the other loses, the winner scores 2 and the loser 0. Mixing in the probabilities of winning or losing depending on a play of stick or gamble, we get a payoff bimatrix:


Gamble Stick
Gamble 5/6,5/6 10/6,2/6
Stick 2/6,10/6 1,1

Notice that for player 1 the ‘gamble’ row dominates the ’stick’ row (and equivalently for player 2 in columns), and thus each player must gamble despite the fact that they each prefer the outcome of both sticking (score 1) to both gambling (score 5/6). Thinking of sticking as cooperating, and gambling as defecting, this is precisely the famous prisoner’s dilemma!

Variations

More advanced versions of Greedy Pig, and the resulting changes in optimal strategy, can be explored. For instance, you could cap the number of rounds to be played. A pair of dice could be used, scoring by either adding the total of both or taking their difference; this also allows for a range of elimination conditions: ending the game on a double, when either die is a 2, for a particular total etc. You could also vary the frequency with which players choose to gamble, such as commiting them to two throws of the die each round. But, particularly for younger children, beware of making the game too complicated at the expense of fun!


Based on my experiences running primary school workshops as part of the Science Communcation in Action scheme at the University of Edinburgh. Unfortunately, I do not know who deserves the original credit for this game.

St. Petersburg Paradox

View as: view on E2  view as PDF

A demonstration of how expectation without a notion of utility causes problems in probability theory.