Monthly Archives: June 2010

Surf

I hope this will not come as too much of a disappointment to anyone, but despite the title, this post has nothing to do with the ocean. Here “Surf” refers to the newly established Sydney R user group. While the acronym may be a little forced (it actually stands for “Sydney Users of R Forum”), as a long-time user of the R programming language for statistics and a resident of Sydney, I have signed up and will be doing my best to make it to the first meeting. Any other Sydney-siders who read the post on graphing in R and would like to learn more about R may be interested in coming along too as the group is aimed as much at beginners as old-timers like the Mule. I might even see you there.

If I do make it along to the meeting, I will report back here on what it was like.

UPDATE: I did make it along and will in fact be presenting at the next forum meeting.

The Monty Hall Problem

It’s probability time again!

The discussions about the Tuesday’s Child problem were intense, so a break from probability puzzles was in order. But now that your brains are well rested, it is time to move on to the next puzzle from the Probability Paradoxes post: the Monty Hall problem. If you thought that the first puzzle was controversial, you ain’t seen nothing yet! Monty Hall has generated so much discussion (and, at times, acrimony), that there was enough material for someone to write a book on the subject.

In a possibly futile attempt to avoid some of that controversy, I will be taking a different approach to the discussion this time. I tried to come up with the “best” or “most reasonable” assumptions needed to solve the Tuesday’s Child puzzle, but in the case of Monty Hall I will side-step those sorts of questions and simply provide a framework for calculating solutions for a range of possible assumptions.

So here we go. Remember that the scenario we are presented with is as follows.

Suppose you’re on a game show, and you’re given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1, and the host, who knows what’s behind the doors, opens another door, say No. 3, which has a goat. He then says to you, “Do you want to pick door No. 2?” Is it to your advantage to switch your choice?

I am going to jump right into the mathematics of conditional probability again. I will use “Car” to denote the possibility that door No. 1 (your door) has a car behind it and “Goat” to denote the possibility that it has a goat behind it. Without necessarily assuming Monty opens door No. 3, I will denote by R (for “reveal”) the possibility that Monty opens a door other than the one you have chosen and thereby reveals a goat.

With all of that in mind, I will compute the probabilities P(Car |  R) and P(Goat | R), that is the probability that you have picked a car or a goat respectively, given that Monty has shown you a goat behind another door. Even allowing for the goat being as good-looking as the one pictured here, I will also assume that you really want to win a car not a goat. On that basis, you should switch doors if P(Goat | R) is greater than P(Car | R) and stick with your original choice if P(Goat | R) is less than P(Car | R). If the two probabilities are the same, there is no advantage or disadvantage in switching.

Despite being a very easy theorem to prove, Bayes’ Theorem is one of the most fundamental results in probability and I will make use of it here.

P(\hbox{Car}| R) = \frac{P(\hbox{Car}) P(R | \hbox{Car})}{P(R)}.

The probability P(R) can be broken down in terms of the two mutually exclusive possibilities ‘Car’ and ‘Goat’:

P(R) = P(R | \hbox{Car}) P(\hbox{Car}) + P(R | \hbox{Goat}) P(\hbox{Goat})

Combining this with Bayes’ Theorem and the (fairly uncontroversial) facts P(Car) = 1/3 and P(Goat) = 2/3, we can conclude that

P(\hbox{Car}| R) = \frac{\frac{1}{3}P(R |  \hbox{Car})}{P(R | \hbox{Car}) \frac{1}{3} + P(R | \hbox{Goat}) \frac{2}{3}}.

Tidying this up a bit gives us a formula that will be able to deal with many (but by no means all) possible assumptions for the problem.

P(\hbox{Car}| R) = \frac{P(R |  \hbox{Car})}{P(R |  \hbox{Car}) + 2 P(R | \hbox{Goat})}

Of course, once we have this, we also know P(Goat | R) as it is 1 – P(Car | R).

All we need to do to use this formula is come up with assumptions that can be formulated in terms of P(R | Car) and P(R | Goat). Here are some examples of what we can do.

Case 1 (Classical)

Here we assume that Monty knows everything in advance about where the goats and the car are and that he can and always will show you a goat behind another door. This means that

P(R | Car) = P(R | Goat) = 1

Plugging this into the formula gives P(Car | R) = 1/3 and P(Goat | R) = 2/3, which means that we are better off switching. This is the standard solution to the Monty Hall problem and may come as a surprise to many people as the most common response, even with the assumption of an omniscient Monty, is that it doesn’t matter whether you switch or not.

Case 2 (Nice Monty)

This time we will still assume that Monty knows everything, but now he really wants you to win the car. So, he will only open a door to show you a goat if you have made the wrong initial choice. If you picked the car in the first place, he will simply open your door and congratulate you on your win. This means that

P(R | Car) = 0 and P(R | Goat) = 1 and so P(Car | R) = 0 and P(Goat | R) = 1. Once again you should switch. This time this conclusion should be obvious.

Case 3 (Nasty Monty)

Now Monty still has all the facts, but would prefer you to pick a goat. Perhaps Monty loves goats or perhaps the show is losing money and he doesn’t want to fork out for another car. Either way, these assumptions mean that

P(R | Car) = 1 and P(R | Goat) = 0 and so P(Car | R) = 1 and P(Goat | R) = 0. Now you should stick to your guns. Again, this conclusion should be obvious.

Case 4 (Lucky Monty)

Now we will stop assuming that Monty knows everything. When he opens the second door, he has no idea whether he’s going to spoil everything by revealing the car. If he does that, the show’s segment would, of course, end a little sooner than he had hoped. If you have picked the car, he will be fine, but if you picked a goat, he has a 50/50 chance of revealing the car instead of a goat. Translating all of this into mathematics gives:

P(R | Car) = 1 and P(R | Goat) = 1/2 and this time P(Car | R) = 1/2 and P(Goat | R) = 1/2. So, if Monty just happened to be lucky and show you a goat, it will not make any difference if you switch or not. Your odds will be the same either way.

Many other possible assumptions about what Monty does or does not know or do can also be cast in terms of P(R | Car) and P(R | Goat) and for each of these possibilities, it is therefore straightforward to decide whether to stick or switch.

In the debate over the Monty Hall problem, some have argued that Case 4 is a “better” interpretation of the puzzle than Case 1. While I won’t comment on that, I am sure that my attempt to evade the issue will not be enough to keep everybody happy with this solution. It seems that the Monty Hall controversy will not die.

Update: for anyone not convinced by the formula for the classical case, this spreadsheet may help.

High-frequency trading

In a recent episode, the ever-brilliant Planet Money podcast looked at the arcane world of high-frequency trading. The usual clarity of exposition was further enhanced by something of a Mule theme. It seems that Planet Money host Chana Joffe-Walt is, like me, a Tom Waits enthusiast and she found a way to fuse “Whats He Building in There?” from the Mule Variations album with the otherwise non-musical subject of the podcast. An inspired choice.

So, what is high-frequency trading? Here is how Planet Money describes it.

In high-frequency trading, people program computers to buy and sell stocks in quick succession under certain, pre-defined circumstances. The idea is to profit from fleeting changes in the price of a stock.

This type of trading is made possible by the increased use of electronic trading platforms for financial markets around the world and is a special case of so-called “algorithmic trading” (or “algos”). It has been estimated that as much as 75% of the trades on the New York stock exchange were generated by algos and perhaps 50% on some European markets.

High-frequency trading has been generating some controversy in recent years:

High-frequency traders often confound other investors by issuing and then canceling orders almost simultaneously. Loopholes in market rules give high-speed investors an early glance at how others are trading. And their computers can essentially bully slower investors into giving up profits — and then disappear before anyone even knows they were there.

Critics of high-frequency trading argue that it is a form of front-running, a practice which is illegal in most jurisdictions. The counter-argument in defence of the algos is that it increases the efficiency of the market. As Steve Rubinow of NYSE Euronext explains to Planet Money:

Every innovation of this type makes the market more efficient. … The faster we trade, and the more people you have trading, any aberrations that exist in the market are taken out of the market really really quickly, which makes for a fairer market for all participants … Those prices are about as fair as they could be.

Efficient markets are a good thing and I have used a similar argument here on the blog to defend short-selling. Nevertheless, there has always been something about high-frequency trading that makes me uneasy. In an interview with Edge, Emanuel Derman seems to put the finger on the source of this unease:

Also, people who benefit from it tend to over-accentuate the need for efficiency. Everybody who makes money out of something to do with trading tends to say, oh, we’re got to do this because it makes the market more efficient. But a lot of the people who provide this so-called liquidity and efficiency are not there when you really need it. It’s only liquidity when the world is running smoothly. When the world is running roughly, they can withdraw their liquidity. There is no terrible need to be allowed to trade large amounts in fractions of a second. It’s kind of a self-serving argument. Maybe a tax on trading to insert some friction isn’t a bad idea, just as long term capital gains are taxed lower than short term gains.

Derman started working as a “quant” in financial market around 25 years ago and had a long stint at Goldman Sachs. His response is not likely to be one of knee-jerk suspicion, but rather the considered voice of experience.

Joffe-Wolt’s reinterpretation of Waits conjured up an atmosphere of mystery and fear when exploring NYSE Euronext’s new data centre. Perhaps a bit of fear of high-frequency trading is healthy.

Image Source: Discogs

RSPT – A Fair Valuation Based on True Value of New and Existing Mines

Following on from the interest generated by his last post, Mule Stable regular Zebra (James Glover) returns to the subject of the Resources Super Profits Tax in another guest post.

In a previous post I explained how the formula for the RSPT (Resource Super Profits Tax) was derived by considering the Government to be a 40% silent investor in any mining project. I showed that the correct deduction from the return on investments is indeed GBR (Government Bond Rate), as proposed, not a higher rate that includes a “price of risk”. One important thing I missed in this analysis, however, was whether the investment amount (I) was the correct basis for valuing the Government’s new 40% “investment”. I aim to show that the correct variable should actually be the Market Value of Assets (MVA) and as such the appropriate deduction from profits is several times (maybe as much as 4 times) higher for established mines.In the example given based on the mining industry “price to earnings ratio” of 14 the RSPT would only be 9% of earnings. I should emphasise this is not about having separate formulas for new and existing mines but correctly taking into account the fair, market based, price the Govt should pay for it’s 40% share of the earnings.

For new mines MVA = I (where all “=” signs should be taken to mean “approximately equal” to head off the pedants) so the proposed tax is correct in this case.

The Government says that in return for this tax take they are taking downside risk as well as upside benefit. One of the criticisms of the RSPT is that the Government is effectively nationalising 40% of ongoing mines and the GBR deduction is irrelevant as there is no serious downside risk. In the framework I propose the Government is not currently proposing to pay a fair price for this “nationalisation”. If the fair price of the Government’s stake is taken into account then the tax from existing mines is considerably lower than proposed. It may be as low as 9% of earnings. This does not require a backdown by either the miners or the Government, although the Government’s tax take might be less than forecast

If the Government is going to nationalise 40% of a mine – at a fair price – then it needs to effectively pay 40% of the Market Value of Assets (or MVA) for the mine. For new mines the Investment = Equity + Debt is pretty much set at this value. The Government RSPT tax is then:

Tax = 40% x (Earnings – GBR x MVA)

The first term is the Government’s 40% share of the earnings (here taken as Earnings before Tax). The second term is the deduction for the interest that recognizes that the funding of the Government’s share is undertaken by the mine at the Government Bond Rate or GBR. There is no good reason for the Government to pay less than the market value of this asset or MVA. For a new mine just starting up MVA = I, the investment amount, so

Tax = 40% x (Earnings – GBR x I)

If ROI = Return on Investment = Earnings/I then we can write this as:

Tax = 40% x (ROI – GBR) x I

which is the proposed RSPT formula.
For an ongoing mining operation with established operations and contracts, the market value will exceed the book value several times over. I am going to take the very simple assumption that MVA = Price ie the market value of the assets is the market value of the equity. This ignores leverage and is probably too simplistic. Price is based on share price and the number of outstanding shares. In terms of PE-ratio (the ratio of Price to Earnings as determined by the share price) we can write

Tax = 40% x Earnings x (1 – GBR x PE-ratio)

Compared to the original formula the deduction is  40% x GBR x PE-ratio x Earnings. Alternatively we can write this as 40% x GBR x I x MBR where MBR is the Market to Book ratio = MVA/I. So the original Govt funding deduction is just multiplied by MBR. The current formula assumes implicitly that MBR = 1. For existing businesses eg. banks MVA/BVA can be as high as 4 (which is BHPs current value). This gives a very simple deduction in terms of % of earnings, rather than Investment/I, of 40% x GBR x PE-ratio. Note that this is really the same formula for new and existing mines; it just makes proper allowance for the true value of established mines.

So what is the fair deduction for existing mines? It obviously varies with share price and hence market conditions. For mines which are privately held we need a proxy based on publicly traded stocks. The PE-ratio for traded mining stocks is currently about 14. So now, using GBR=5.5%, the  fair deduction for the Govt’s nationalised share for existing mines is not 5.5% (as many erroneously claim) or 22% (allowing for a 25% ROI) but 31%! Note this deduction is off the 40% so the total RSPT tax on earnings would be 9%.

So under a scheme based on a fair deduction for existing mining assets the tax should be:

RSPT = 40% x  Earnings x (1 – 5.5% x 14) = 9% x Earnings.

After 30% company tax this represent a total tax of 38%. Even if we don’t know what the PE-ratio would be for mines which aren’t publicly traded we can use an industry based proxy for the mines whose stocks are publicly traded. Currently this is in the range 13-14. If I was the miners I’d be pretty happy with that. Maybe they should have taken a closer look at the RSPT before opposing it. All the miners have to do is get the Govt to accept it should pay a fair value for its stake and the framework I propose makes that transparent.

Eliminating the irrelevant

After going to all the trouble of explaining the “classical” analysis of the Tuesday’s Child problem, here I will explain why I think that analysis ends up with the wrong answer.

This will get into the nuts and bolts of the mathematics of probability again, but I will start with some of the questions which led me to rethink this problem.

In her Math Blog, Tanya Khovanova approaches the problem in a very interesting way. Paraphrasing Tanya, if Mr Smith tells you that one of his two children is a boy born on Tuesday, you will (if you accept the classical reasoning) revise the probability of two boys from 1/4 to 13/27. But, you would do the same if he said the boy was born on Wednesday, or indeed any day of the week. So if he said he had a boy born on *$$*@day (his voice was muffled and you couldn’t quite catch which day he said), wouldn’t you then revise your probability to 13/27 too? After all, you’d make that revision regardless of what day he actually said! If so, couldn’t you then revise the probability to 13/27 even if he doesn’t mention a day of the week and just said he had a boy? This clearly makes no sense and suggests there is a problem with the classical analysis.

The crux of the problem is that if Mr Smith is volunteering information, he could just as easily have spoken of a day other than Tuesday. Indeed, he may have said ‘I have two girls’, ‘Anyone for tennis?’ or ‘The UK doesn’t have a solvency problem the way Greece does’. The situation is very different if you are asking the questions of Mr Smith. If you ask him whether he has a boy born on Tuesday, he is restricted to saying ‘yes’ or ‘no’. At least, that’s the case if you allow the one big assumption I am making here, namely that whatever Mr Smith says, he is telling the truth (even about macroeconomics).

So, exactly how the information is revealed makes a difference. That in itself is well understood, but at this point many people will simply give up saying that there are too many options open to Mr Smith so it is impossible to come to any sensible conclusions. So, they will either give up on the problem or rephrase it to one that can be answered, such as where you ask the questions of Mr Smith, as I did in the Tuesday’s Child post. But, if you rephrase the problem, you are solving a different problem and giving up on the original one. What I will argue here is that all those options open to Mr Smith do not matter at all. Mathematically we can eliminate “irrelevant” options and come up with a perfectly defensible solution to the problem.

To ease into the mathematics, I will go back to Gardner’s simpler two boys problem:

Mr Smith says, ‘I have two children and at least one of them is a boy.’ What is the probability that the other child is a boy?

Before trying to answer that, I will instead ask if Mr Smith had two boys, what is the probability that he would say ‘I have two children and at least one of them is a boy’. It is impossible to say: there are so many other things he could have said instead. But what if I asked about the probability that Mr Smith would say ‘I have two children and at least one of them is a boy’. Again it’s impossible to say, so instead I will ask how does that probability compare to the probability of him saying ‘I have two children and at least one of them is a girl’? I would argue that, by symmetry, these two probabilities have to be the same (whatever they may be). As soon as you accept that, the classical solution falls apart.

Now for the mathematics. To save a bit of space I’ll use X to denote the event “Mr Smith says, ‘I have two children and at least one of them is a boy’.” and I will write Y for “Mr Smith says, ‘I have two children and at least one of them is a girl’.” In mathematical terms, my symmetry argument is that P(X | BG) = P(Y | BG), even though we don’t know what either of these probabilities are. This is the sort of reasoning I will use to calculate the conditional probability:

P(BB | X) = P(BB)\frac{P(X | BB)}{P(X)}

Even though I will not be able to calculate either the top or the bottom term of this fraction, I will be able to calculate the ratio. To do this, I will use an equation I call “eliminating the irrelevant”. For any events A, B and Z, if A is a subset of Z and Z is independent of B then a bit of algebra will show that.

\frac{P(A | B)}{P(A)} = \frac{P(A | B\cap Z)}{P(A|Z)}.

I can apply that to the current problem by setting Z = X\cup Y as long as Z is independent of BB. While we have not been told that is the case, it would seem to be an extremely reasonable assumption. If you think of all the other things Mr Smith might have said, is there any reason to assume that he would be more likely to say something other than X or Y simply because he had two boys rather than two girls? I don’t think so. It’s certainly possible that there could be a link, in much the same way that a coin could be biased, but in the absence of any other information we would start by assuming heads and tails are equally likely.

Note that Y by itself is not independent of BB, nor is X. What I am arguing is that the fact that Mr Smith has two boys (BB) does not affect the likelihood that he will say either X or Y as opposed to something else entirely.

The formula above thus allows us to calculate the conditional probability we are after as follows:

P(BB | X) = P(BB)\frac{P(X | BB\cap Z)}{P(X | Z)}.

In one fell swoop, we have eliminated the irrelevant alternatives for Mr Smith and now have something we can work with, even though we will never know what the probability of X actually is!

The top line of the fraction is straightforward. If Mr Smith is restricted to X or Y and has two boys, only X is possible, so P(X | BB\cap Z) = 1. The bottom line requires a bit more work. As in the last post, we can break it up into disjoint alternatives:

P(X | Z) = P(X | Z\cap BB) P(BB) + P(X | Z\cap BG) P(BG) +P(X | Z\cap GB) P(GB).

Note that I have taken the liberty of dropping one term here as I know that P(X | Z\cap GG)=0. By symmetry, since Mr Smith is restricted to X and Y, P(X | Z\cap BG)=\frac{1}{2} and the same applies for the GB term. So, we now have

P(X | Z) = 1\times\frac{1}{4}+ \frac{1}{2}\times\frac{1}{4} + \frac{1}{2}\times\frac{1}{4} = \frac{1}{2}.

Now we’ve got everything we need and so

P(BB | X) = \frac{1}{4}\times\frac{1}{\frac{1}{2}} = \frac{1}{2}.

So instead of the classical conclusion that the probability that Mr Smith has two boys is 1/3, we have arrived at a figure of 1/2. The key to this result is that when we ask Mr Smith whether he has at least one boy, the probability that he says ‘yes’ is the same whether he has BB, BG or GB. When he makes an utterance of his own accord, although we don’t know what the probability values P(X | BB), P(X | BG) or P(X | GB) are, I am contending that P(X | BB) is double the other two (because in those cases he could have volunteered information about a girl). So, when Mr Smith volunteers that he has at least one boy, he is giving more information to us than if he simply answers ‘yes’ to our question.

The same reasoning will also give a probability of 1/2 for two boys in the Tuesday’s child case (there you would set Z to cover the 14 options for Mr Smith of saying one of boy/girl and one of Monday/Tuesday/Wednesday, etc).

To sum up, if Mr Smith volunteers ‘I have two children and at least one is a boy,’ then the probability that he has two boys is 1/2, whereas if you ask him ‘do you have two children and at least one boy’ and he answers ‘yes’, the probability that he has two boys is 1/3. Likewise, if he volunteers that he has a boy born on a Tuesday, the probability that he has two boys is 1/2 but if you ask him whether he does and he says yes, the probability of two boys is 13/27.

This gives the satisfying (and, I think, intuitive) result that the day of the week does not matter and Tanya’s paradox of a muffled word changing the probabilities is resolved.

Tuesday’s Child

Following on from the teasers in the probability paradoxes post, here is a closer look at “Tuesday’s child”. While it may not strictly be a paradox, it still has the rich potential for generating controversy. In fact, I don’t agree with what could be called the “classical” analysis of the problem. Here I will look at this classical approach and save my own interpretation for a later post.

A warning: this will be the most mathematical post on the blog to date, so it is not for the faint-hearted!

All of these probability paradoxes hinge on the notation of conditional probability. Conditional probability is the probability of one event given that another event has occurred. As a simple example, imagine roll a dice and A denotes “rolling a six” and B denotes “rolling an even number”. Then the probability of rolling a six is 1/6, but the probability of rolling a 6 given that I roll an even number is 1/3.

Now, before getting onto Tuesday’s child, I will go back to the simpler paradox, which I introduced in the Martin Gardner post. Note that throughout this post I will assume that girls and boys are equally likely and I will ignore identical twins (no offence to identical twins, of course!). I’ll quote from Gardner’s “Mathematical Puzzles and Diversions”:

Mr Smith says, ‘I have two children and at least one of them is a boy.’ What is the probability that the other child is a boy? One is tempted to say 1/2 until he lists the three possible combinations of equally probable possibilities – BB, BG, GB. Only one is BB, hence the probability is 1/3. Had Smith said that his oldest (or tallest, heaviest, etc.) child is a boy, then the situation is entirely different. Now the combinations are restricted to BB and BG, and the probability that the other child is male jumps to 1/2.

Without going into my reasons in this post, I don’t agree with Gardner’s solution to the problem as he posed it. But, with a little tweak, I would agree. If instead you ask Mr Smith whether he has at least one boy among his two children and he says ‘yes’ (as opposed to having him volunteer the details), then the probability that he has two boys is 1/3.

I’ll tweak the Tuesday’s child problem in the same way for now. Imagine the problem is now as follows:

Mr Smith has two children. You ask whether he has at least one boy born on a Tuesday. He says ‘yes’. A lucky guess perhaps, but now you wonder what the chances are that Mr Smith’s other child is also a boy.

At this point, we could enumerate all the possible combinations of children and weekdays of birth. All up there are 2\times 7\times 2\times 7 = 196 possibilities. Looking through that list, we would then scratch all of those that do not have at least one boy born on a Tuesday. In the list that remains, look at the proportion made up by families with two boys. Try it and you’ll find your revised list has 27 combinations in it and 13 of them have two boys, so the probability we are after is 13/27.

For me, that looks a bit much like hard work, so instead I would call on a bit more of the mathematics of conditional probability. Feel free to stop reading now if you don’t have the stomach for even more mathematics!

Mathematically, conditional probability is defined as follows:

P(A | B) = \frac{P(A \cap B)}{P(B)}
where the left hand term denotes the “probability of A given B” (and P denotes “probability of”). The top term on the fraction is “A intersection B”, which simply means that both A and B occur.

I will denote by X the “event” that Mr Smith said ‘yes’ to the at least one boy born on Tuesday question (the inverted commas are there because “event” is actually a technical term in probability). The probability we want to calculate is

P(BB | X) = P(BB) \frac{P(X | BB)}{P(X)}

Starting with the conditional probability on the top of this fraction, if we have a two-boy family, the answer to “do you have a boy” will certainly be “yes”, so we need to know the probability of at least one of the boys having a Tuesday birth date. There are 7 possible birthdates for each child, giving 49 possibilities. Of these, 7 have a Tuesday for the elder child and 7 for the younger, but this double-counts the case where both were born on a Tuesday, so we have:

P(X|BB) = \frac{13}{49}.

One way to calculate the probability of X itself is to break it down into different possible gender combinations:

P(X) = P(X \cap BB)+P(X\cap GG)+P(X\cap BG)+P(X\cap GB).

Here I am using the fact that probabilities of “disjoint” (non-overlapping) events add up, i.e. P(A \cup B) = P(A) + P(B) if A and B are disjoint. Using the conditional probability formula, this gives:

P(X) = P(X | BB) P(BB)+P(X | GG) P(GG) +P(X | BG) P(BG)+P(X | GB) P(GB).

Now the probability of the boy in a mixed gender family being born on a Tuesday is 1/7 and the probability of having boy-girl or girl-boy are both genders is 1/4. Combining this with the fact that the probability of a boy born on Tuesday is zero in a two-girl family and what we already know about a boy-boy family know gives us

P(X) = \frac{13}{49}\times \frac{1}{4} + 0 + \frac{1}{7}\times\frac{1}{4} + \frac{1}{7}\times\frac{1}{4}= \frac{13 + 2\times 7}{49}\times\frac{1}{4} = \frac{27}{49}\times\frac{1}{4}

Putting this all together, we have

P(BB | X) = \frac{1}{4}\times\frac{13}{49}/(\frac{27}{49}\times\frac{1}{4}) = \frac{13}{27}.

While you are waiting for the next post with an alternative interpretation, you might want to think about Gardner’s two boy problem a bit more. In order to get to the classical conclusion that there is a 1/3 chance Mr Smith has two boys then you effectively have to assume that if he had one boy and one girl, he would definitely say ‘I have two children and at least one of them is a boy’ and not ‘I have two children and at least one of them is a girl’. Does that really make sense?

UPDATE: Here is a spreadsheet which simulates the classic version of the Gardner problem (i.e. assuming that you ask Mr Smith the question), and here is an alternative analysis.

Probability Paradoxes

Probability is tricky.

If you are one of those people who likes to say “I was never any good at maths at school”, your response to this would be “of course!”. But probability seems to be tricky for mathematicians too, even for mathematicians who teach probability.

GoatI have always loved probability paradoxes and clearly remember spending most of a train-trip to Edinburgh almost 20 years ago debating the famous Monty Hall problem (see below).

Now I’ve been thinking about paradoxes again. It all started with a passing reference to the two boys paradox in my recent post about the passing of Martin Gardner. Commenting on that post, Bob Walters (who was in fact my honours supervisor a long time ago) drew my attention to his own reflections on that paradox, which opened a can of worms for me. I’ve been obsessing on the topic ever since.

Rather than jumping straight to my conclusions, I thought it would only be fair to give readers a chance to think things through themselves first. So in this post, I will simply state a few well-known probability paradoxes and discuss my own thoughts on each of them in future posts. Feel free to share your thoughts in the comments.

Tuesday’s Child

Bob’s post alerted me to a variant of the two boys problem that has been generating a lot of discussion (here, here, here and here among other places). Appropriately enough, all of this discussion emerged from the most recent Gathering for Gardner, a conference on mathematical puzzles held in honor of Martin Gardner.

So here is the puzzle.

A man says to you “I have two children, one is a boy born on a Tuesday”. What is the probability the man has two boys?

This is a more complicated version of the original puzzle where the man simply says “I have two children, one is a boy”. Classically, the answer to this one is that the probability of two boys is 1/3. The argument is that there are four equally likely probabilities to start with: Boy-Boy, Boy-Girl, Girl-Boy and Boy-Boy*. The statement rules out Girl-Girl, and Boy-Boy is one of the three equally likely remaining possibilities.

I say “classically” because I no longer agree with this reasoning. I’ll explain why in a later post, and for now I’ll just pose another question. Is there any difference between the scenario in which you ask the man “do you have at least one boy?” and the scenario in which the man simply volunteers the information? I think there is a difference and understanding this difference is the key to the puzzle. As for Tuesday’s child, does the day of the week have any bearing on the probability?

Monty Hall

This is perhaps the most famous of all probability paradoxes. It derives its name from the host of an old American TV game show called “Let’s Make a Deal”. Here’s how the problem was posed in a letter to the “Ask Marilyn” column in Parade magazine.

Suppose you’re on a game show, and you’re given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1, and the host, who knows what’s behind the doors, opens another door, say No. 3, which has a goat. He then says to you, “Do you want to pick door No. 2?” Is it to your advantage to switch your choice?

Should you switch? Does it matter? When the problem appeared in Parade, it generated an enormous volume of mail, arguing both ways. So, if you think the answer is obvious, it may be worth thinking again!

The Envelope

This is perhaps the trickiest problem of the three.

You are given the choice of two sealed envelopes and told that they both contain money, and that one envelope contains exactly twice as much as the other. You pick an envelope and open it, discovering that it contains, say, $20. You are then given the option of keeping the $20 or switching envelopes.

It is suggested that there is a 50% chance that the other envelope contains $10 and a 50% chance that it contains $40 and that your expected pay-off is therefore 0.5 x $10 + 0.5 x $40 = $25 if you switch. Is this reasoning correct and should you therefore change envelopes?

If that reasoning is correct, doesn’t it also mean that you should switch if the first envelope contains $30 or $500? In which case, why even bother opening the envelope if you know you are always going to switch?

* Here I’m assuming that human babies are equally likely to be boys or girls, which is probably not quite true.

Rolling Stone vs Triple J

Last month Rolling Stone published a revised list of the 500 Greatest Songs of All Time. The last version of the list was published in 2004 and, while the update brings the count of 21st century songs from 3 to 28, there have not been too many significant changes. The top ten songs remain the same.

 TrackArtist

1 Like a Rolling Stone Bob Dylan
2 (I Can’t Get No) Satisfaction The Rolling Stones
3 Imagine John Lennon
4 What’s Going On Marvin Gaye
5 Respect Aretha Franklin
6 Good Vibrations The Beach Boys
7 Johnny B. Goode Chuck Berry
8 Hey Jude The Beatles
9 Smells Like Teen Spirit Nirvana
10 What’d I Say Ray Charles

Rolling Stone Top 10 Songs

The Beatles still have more tracks in the list than any other band.

Artist Song Count
1 The Beatles 23
2 The Rolling Stones 14
3 Bob Dylan 13
4 Elvis Presley 11
5 U2 8

Rolling Stone Top 5 Artists

But what interests me most is what this list has to say about Rolling Stone, its readers and the compilers of the list. A while ago I wrote a post about Triple J’s Hottest 100 of All Time where I noted that the Triple J’s list was heavily skewed to the 1990s. This chart shows the distribution by decade.

Triple J tracks by Decade

So how does the Rolling Stone list compare? Here is its distribution.Rolling Stone by decade

The difference between the two should be clear, but just to labour the point, here are the two distributions side by side (and converted to percentages since the Rolling Stone list has five times as many songs in it).

Rolling Stone vs Triple J by Decade

I suppose it should come as no surprise that the baby-boomers love their 60s and 70s music and the Gen-Ys love their 90s music. But, having spent my formative music-listening years in the 80s, I cannot help but feel that decade is under-represented by both charts. Or is that an accurate reflection of the quality of music in the 80s?

And another question: how likely is it that this post will end up in the headlines of Bubblepedia? Fortunately, not very.

Data: the list was obtained from here, a reference obtained from the Wikipedia entry. I fixed some typos, added years and loaded the data into a Google docs spreadsheet. Let me know if you see any remaining errors.