Oenobareus

From the Greek meaning 'heavy with wine'
A blog devoted to science and reason
Written after a glass or two of Pinot Noir.
Showing posts with label probability. Show all posts
Showing posts with label probability. Show all posts

Saturday, May 25, 2013

I Didn't Win $600 Million.

Here is my ticket for the May 18 Power Ball lottery.  Here are the winning numbers: 10 12 14 22 52 and the Power Ball was 11. You can see I didn't pick one number correctly.


Being the geek that I am, I immediately wondered what the probability was that someone could pick six numbers and not get one right.



Calculating the probability is simple.  The probability is just the number of desired outcomes divided by the total number of outcomes.  Now it gets a bit more complicated if you haven't had a statistics course.



In the Power Ball lottery, there are white balls numbered 1 through 59 and red ones (the Power Balls) numbered 1 through 35.  We need to know how many possible drawings there are.  In the vernacular of statistics and probability, we want the number of possible combinations.*



Let's first calculate the number of ways there are to pick 5 numbers out of 59. 


The ! means factorial; that is 5! is 1 X 2 X 3 X 4 X 5. The answer is 5,006,386.There are only 35 ways to pick one number out of thirty-five. So the total number of combinations is 5,006,386 X 35 = 175,223,510. Because there is only one winning combination, the probability of winning is 1/175,223,510.


In order to pick not even one number correctly, we need to exclude the 5 correct white balls and then calculate the number of ways to pick five numbers out from 54 white balls.

This equals 3,162,510.  Then multiplying by 34, the number of non-winning red balls, yields the number of combinations with no correct numbers. 107,525,340.


Now we're ready.  The probability of picking six numbers in the Power Ball lottery and not having a single one correct is 


Pretty damn likely, isn't it.


Let's go back and examine the likelihood of winning.  One chance out of 175.2 million.  Suppose every adult in the US bought a Power Ball ticket. That's 192.9 million people. This means that if every adult played, there's about a 90% chance that someone will win.  The actual probability that someone will win is much less, since only 32 states plus the District of Columbia and the U.S, Virgin Islands participate. 



Unfortunately, the numbers don't lie. That winner will never be me or you.  



Not winning may be the best thing to ever happen to us though. The National Endowment for Financial Education estimates that 70% of those who enjoyed quick wealth lose that money within several years.



It's not even a good deal for the states. The lottery turns out to be a regressive tax, a tax that hits the poor the hardest. In most, if not all, lottery proceeds are meant to be spent on education.  Yet in California, lottery revenues in 2010 added only 1.3% to the education budget.



So I only play when the jackpot hits enormous numbers and then I buy one ticket.  You know the difference between buying one Power Ball ticket and buying ten?  You're out $18 more when you buy ten.



* If the order in which the balls are picked made a difference, we would need to calculate the number of permutations.  In the May 18th Power Ball for example, it didn't matter that the 22 ball was picked before the 10 ball.


Saturday, November 5, 2011

Don't Ask Marilyn - Part 4 or Let's Do Math!


I want to conclude this series on the Marilyn von Savant's die roll problem (see the original column from Parade magazine and my part 1, part 2, and part 3) with a proper probability calculation, even though my analysis using entropy is spot on.  When I'm done, I will be writing about beer.  Here's a brief highlight of what's  to come.  Beer bubbles are cool, and drinking beer may aid women in preventing osteoporosis.

My reader thinks that Marilyn's die roll problem is one of conditional probability.  I disagree.

Conditional probability means "what is the probability that an event occurs (let's call this event B) if we already know that another event (let's call this event A) has already occurred."  To use the phrase of my reader and one that is used in conditional probability, "what is the probability that event B occurs given that event A has already occurred."

Two examples to illustrate:
  • I throw a die, and I roll a 4.  What's the probability that the next roll is a 1 given that the first roll is a 4?  Since these two events are independent, the probability of rolling a 1 is 1/6.  In other words, knowing I threw a 4 does not affect the next roll.
  • I throw a die, but don't tell you what I roll, except I do tell you it's not a 5 or a 6.  What's the probability that it's a 4 given that it's not a 5 or a 6?  The answer - 1/4.

MATH ALERT!   In chapter 4 of "Introduction to Probability" by Grinstead and Snell, conditional probability is calculated with the formula

In order to calculate the conditional probability P(B|A) [the probability that B occurs given that A has already happened], we need to calculate P(A) [the probability that A happened] and P(A and B) [the probability of A and B; the upside down U is the mathematical symbol for union and can be understood to mean 'and.']

Let's examine the two examples from above.
  • P(A) = 1/6.  P(A and B) = 1/36.  Then P(B|A) = 1/6.
  • P(A) = 4/6, since knowing that the roll is not 5 or 6 is the same as knowing that it is a 1, 2, 3, or 4.  P(A and B) = 1/6.  Then P(B|A) = 1/4.

Now I examine Marilyn's problem.  There are two possible outcomes. Roll (a) 11111111111111111111 and roll (b) 66234441536125563152.  

So let's assign events and be careful.  Event B is roll (b), since I'm interested in knowing what the probability of rolling (b) given that a die has been rolled 20 times.  Then event A is rolling a die 20 times.

P(A and B) = the probability of rolling (b) and rolling a die 20 times = 2.7 x 10^-16.
P(A) = the probability of rolling a die 20 times = 1.

Therefore, Then P(B|A) = the probability of rolling (b) given that a die has been rolled 20 times = 2.7 x 10^-16.

See.  George Alland, the math teacher that challenged Marilyn, is correct.  Marilyn is wrong in insisting "It was far more likely to have been that mix than a series of ones."  Marilyn corrects her mistake when she writes that "a jumble of numbers" is more likely.  This was my point in part 1, part 2, and part 3.

There is one more issue I'd like to address. Something that might help clarify the difference between 'that mix' and 'a jumble.'  There is in math the concepts of permutations and combinations.

A permutation is a arrangement of things in which order of the things matters.  Suppose you buy a raffle ticket an your number is 407.  Do you win if the number called is 074?  No, because the order of those digits matter.  Now suppose you buy a lottery ticket. and your numbers are 1, 13, 25, 26, 33, and 42.  Do you win when you see the ping pong balls come up 13, 26, 42, 33, 1, 25?  Yes you do, because the only thing that matters is the combination of numbers, not the order in which they are drawn.  When Marilyn wrote 'that mix' she - perhaps inadvertently - specified a particular order, one permutation.  When she wrote 'a jumble' - perhaps she caught her previous mistake - she now highlights the combination, not the order.

UPDATE:
How does the probability change when when we consider the combination rather than the permutation?

Event B is roll (b), since I'm interested in knowing what the probability of rolling (b) given that either (a) or (b) is rolled. Event A is now rolling (a) or (b).

P(A and B) = 2.7 x 10^-16.
P(A) = 5.4 x 10^-16.
Therefore, Then P(B|A) = 1/2.


But if I change the event B to rolling three 1s, three 2s, three 3s, three 4s, four 5s, and four 6s,  then

P(A and B) = 0.239.
P(A) = 0.239+ 2.7 x 10^-16.
Therefore, Then P(B|A) = 1.

I hope this settles the matter. I need a beer.

p.s. Many thanks to my reader. He truly highlights the need for all of us to be clear in our writing and our mathematics. I hope that all my readers hold me to such standards.

Wednesday, November 2, 2011

Don't Ask Marilyn - Part 3 or I Get Email



UPDATED!  See below.
My correspondence concerning the Ask Marilyn column with a reader continues.  The emails are copied below.  I have removed the reader's name and have only deleted some friendly asides and such. I have more comments about the Marilyn vos Savant column after the emails.
10/30/2011
READER: In any event, I'm not sure what you're saying.  In your 1st blog
entry, you say Marilyn is incorrect.  In your 2nd blog entry, you
seem to say Marilyn actually is correct.

10/30/2011
VP: In her first answer, she writes "It was far more likely to have been that mix [emphasis added] than a series of ones."  In my view, when she writes 'that mix', she is referring to that one specific roll, and that roll has the same probability as all 1s.  That's why I claimed "Marilyn's first answer is wrong" in my first post.

However, in her answer to George Alland, she changes her answer to '"It was far more likely to be (b), a jumble [emhasis added] of numbers."  She has changed the conditions of the problem from considering one particular throw to a roll that is jumbled.  That's why I wrote in my first post "Her second answer (the "jumble of numbers" is more likely) is correct..."

As you wrote, Marilyn may sometimes be ambiguous and being confined to one small column in Parade magazine, that can be all too easy. 

10/30/2011
READER: You are correct that when Marilyn writes "that mix", she is talking
about the specific series (b).

However, what you are omitting in your analysis of Marilyn's answer,
is that "that mix", viz., (b), is indeed "far more likely" GIVEN THAT
the rolled series must be either (a) or (b).

The "GIVEN THAT" clause is crucial in determining likelihood.  I had
stated this key point in my first response to your blog entry, along
with the other key point that the writing down of the series occurs
after the 20 die rolls.

Changing Marilyn's problem by omitting the "GIVEN THAT" clause
constraint, would make your probability analysis correct and your
ambiguity complaint reasonable.

BTW, I'm not a die-hard Marilyn fan.  When she messes up, e.g., when
she claimed that Wiles' proof of Fermat's Last Theorem was invalid,
I'm the first to throw a stone.

11/2/2011
VP: I must admit that I'm at a loss.  I fail to grasp how the phrase 'given that' affects the probabilities.  Could you explain further?

The reader points to the original problem as stated by Marilyn.  I reread it and I see that there's an even more egregious error.  Marilyn writes 'It’s (b) because the roll has already occurred.'  This implies there is some conditional probability.

As far as my understanding of probability goes, there's three issues here.  (1) What is the probability of rolling a die twenty times and getting one out of 3,656,158,440,062,976 possible outcomes?  (2) What is the probability of rolling a die twenty times and getting a particular mix of 1s, 2s, 3s, 4s, 5s, and 6s?   And (3) this problem does not involve any conditional probabilities.

Are there any readers who can find some oversight, misconception, and/or goof on my part?

UPDATE  11/2/2011  Email

First note that Marilyn doesn't explicitly use the words "given that".  However, the meaning of her wording involves the same idea, viz., conditional probability.

You can google something like:  "given that" probability to find numerous examples using the phrase "given that" in this conditional probability context, e.g.,    http://www.mathgoodies.com/lessons/vol6/conditional.html
OK, let's move to Marilyn's article.  I've carefully chosen wording and formatting to make what's going on easier to understand.

The 1st half of Marilyn's article basically says:

    The specific mix of numbers (b) 66234441536125563152
    is as likely to appear next, as
    the specific series (a) 11111111111111111111,
    GIVEN THAT
    I've already written down (a) and (b).

Hopefully, you agree with this wording and the correctness of the statement, so far.

The 2nd half of Marilyn's article basically says:

    The specific mix of numbers (b) 66234441536125563152
    is more likely to have been the rolled series, than
    the specific series (a) 11111111111111111111,
    GIVEN THAT
    I wrote down (a) and (b) after I finished rolling the die,
    AND
    the series I rolled is indeed either (a) or (b).

Please take a moment to confirm that this captures the meaning of the 2nd half of Marilyn's article.

Now, do you also see how the "given that" clause for the 2nd half fundamentally changes the likelihood of (a) vs. (b), even though Marilyn still compares explicitly "that mix", 66234441536125563152, with the all ones series?

Note that Marilyn is NOT saying that, if we run the entire experiment again, that 66234441536125563152 would again be the series written 
down on the piece of paper.

Saturday, October 29, 2011

Don't Ask Marilyn - Part 2


I received the email below from a reader in response to last Sunday's post :
Dr. Vann Priest,

Regarding your Oct. 23, 2011 Oenobareus blog post about "Ask Marilyn":

Like everyone, Marilyn sometimes makes mistakes or writes ambiguously,
but not this time.

The reason is that, according to Marilyn's problem, the writing down
of the series occurs AFTER the 20 die rolls.  In addition, either (a)
or (b) MUST represent the actual result of that 20 die rolls.

Marilyn doesn't give the calculations, but (b) is vastly more likely
to have been the actually rolled series.

If Marilyn's problem had said that the 20 die rolls occurs AFTER
writing down (a) and (b), then your probability calculations for
rolling (b) would be correct.  But then the probability of either
(a) or (b) being the actually rolled series would be spectacularly
unlikely.

Best regards,
[name redacted]

I wish to thank this reader, because I it caused me to go back and more carefully consider probability theory.  I wondered if knowing that Marilyn actually did write down the sequence of rolls somehow affects the probability.

I no longer own my probability and statistics book from my undergraduate days, so did a quick Google search and found "Introduction to Probability" by Grinstead and Snell.  This text is published by the American Mathematical Society, is freely available, and may be distributed under the terms of the GNU Free Documentation License.

Knowledge can affect the probability.  [See chapter 4 - 'Conditional Probability']  Back in 1990, Marilyn wrote about the Monty Hall problem.   Many people, including me, were convinced Marilyn was wrong.  It was only after I sat down and carefully considered the effect of knowing what was behind door #3 that I was convinced that Marilyn was indeed correct, and I learned a lesson about conditional probability.  See Example 4.6, p. 136 for a good discussion of the Monty Hall problem.

Here is a conditional probability example from the text - 

Example 4.1 An experiment consists of rolling a die once. Let X be the outcome. Let F be the event {X=6},and let E be the event {X>4}. We assign the distribution function m(ω) = 1/6 for ω = 1,2,...,6. Thus, P(F) = 1/6. Now suppose that the die is rolled and we are told that the event E has occurred. This leaves only two possible outcomes: 5 and 6. In the absence of any other information, we would still regard these outcomes to be equally likely, so the probability of F becomes 1/2, making P (F |E) = 1/2.

So someone rolled a die, told someone else that the outcome was greater than 4.  So we now know the outcome was either a five or a six.  Since both are equally likely, the probability is 1/2.

Now let's discuss last Sunday's "Ask Marilyn" column.  My analysis of the probability of throwing the two sequences  (11111111111111111111 or 66234441536125563152) is correct. Both sequences are equally likely to be thrown.  

But what happens when Marilyn tells us one of them actually occurred?  Nothing!  Conditional probability deals with the probability of future events based on knowledge of past events.  There are no future events in this situation.

Now allow me to further explain why the sequence 66234441536125563152 is the more likely one.  I alluded to it in last Sunday's post.  The reason is entropy.

Entropy is defined to be a measure of the number of possible arrangements. Each distinct arrangement is called a microstate.  Each of the rolls 11111111111111111111 and 66234441536125563152 are microstates.  Both as I have shown are equally likely; this is the fundamental assumption in statistical mechanics  However, with a thermodynamic system (and a good analogy to thermodynamic systems is dice), we usually do not concern ourselves with which microstate the system has.  Physicists are concerned with the macrostate of the system.  The macrostate of the system is specified by some measurable parameters.  From the Second Law of Thermodynamics, we can infer that the most likely macrostate is the one with the largest number of microstates.

An example is in order.  Let's consider the air in your room.  To be able to write down the microstate, we would have to know the position and velocity of each molecule, but to write down the macrostate, we simply have to measure the temperature, air pressure, and the volume of the room.  The air in your room fills the entire volume, because the number of microstates where the gas fills the entire room is larger than astronomical.  The air does not occupy the bottom few inches, because the number of microstates, while still unbelieveably large, is tiny compared to when the air fills the room.

Here's the problem with the dice - it's too easy to emphasize either the microstates or the macrostate, and I'm convinced the confusion lies here.  There are 3,656,158,440,062,976 ways (microstates) to throw a die twenty times.  One of those must occur.  Which one?  We have no way to predict.  It could be 11111111111111111111 or 66234441536125563152 or 56241113533264432213 or one of the other 3,656,158,440,062,973 possible rolls.

For throwing a die twenty times, the most likely thing (macrostate) to happen is for four numbers to come up three times and two numbers to come up four times, and this is what Marilyn describes as jumbled.  For Marilyn's two choices, I pick 66234441536125563152, because this unlikely roll corresponds to the most likely macrostate.

After all this, I realize what really irks me about Marilyn's response to the math instructor.  She makes no attempt to explain.  All she writes in defense of her position is an appeal to her readers sense of what the correct answer is and a restatement that she is right.  If I ever attempt to do in a classroom what she does in this column, my students may print this blog post out, fold it into a paper airplane, and bombard me.  Just wait until my back is turned, so you don't poke my eye out.

Sunday, October 23, 2011

Don't Ask Marilyn


In Parade magazine - that free magazine that appears in your Sunday paper - has a column written by Marilyn Vos Savant who is in the Guiness Book of World Records for supposedly having the world's highest IQ.

Here is today's column:
I’m a math instructor and I think you’re wrong about this question: “Say you plan to roll a die 20 times. Which result is more likely: (a) 11111111111111111111; or (b) 66234441536125563152?” You said they’re equally likely because both specify the number for each of the 20 tosses. I agree so far. However, you added, “But let’s say you rolled a die out of my view and then said the results were one of those series. Which is more likely? It’s (b) because the roll has already occurred. It was far more likely to have been that mix than a series of ones.” I disagree. Each of the results is equally likely—or unlikely. This is true even if you are not looking at the result. —George Alland, Woodbury, Minn. 
My answer was correct. To convince doubting readers, I have, in fact, rolled a die 20 times and noted the result, digit by digit. It was either: (a) 11111111111111111111; or (b) 63335643331622221214.

 Do you still believe that the two series are equally likely to be what I rolled? Probably not! One of them is handwritten on a slip of paper in front of me, and I’m sure readers know that (b) was the result.

The same goes for the first scenario: A person rolled a die out of my view and then informed me the result was one of these series: (a) 11111111111111111111; or (b) 66234441536125563152. It was far more likely to be (b), a jumble of numbers.
Having the highest IQ does not make one immune from being wrong.  The math teacher is right.  

Here's why.  The probability of throwing any number 1 through 6 on a fair die is 1/6.  So throwing a 1 has a probability of 1/6.  Throwing two 1s in a row is 1/6 x 1/6.  Throwing three 1s is 1/6 x 1/6 x 1/6.  Etc.  Throwing twenty 1s has a probability of 2.7 x 10^-16.  Not very likely is it?

Let's look at the other sequence.  The probability of throwing a 6 is 1/6.  The probability of throwing a 6, and then another 6 is 1/6 x 1/6.  The probability of throwing a 6, 6, and a 2 is 1/6 x 1/6 x 1/6.  The probability of throwing a 6, 6, 2, and a 3 is 1/6 x 1/6 x 1/6 x 1/6. And so on.  Then the probability of 66234441536125563152 is also 2.7 x 10^-16.  It doesn't make any difference if she plans on rolling the dice or she does it out of sight.

So what's going on, because Marilyn's answer does make common sense, even if her mathematics is off.  To understand what really makes the answer (b) requires some understanding of entropy - this is what she refers to as jumbled.

Look at the first sequence.  It is twenty 1s.  Now examine the second sequence except don't pay attention to the order.  That roll has three 1s, three 2s, three 3s, three 4s, four 5s, four 6s.  The probability of throwing  three 1s, three 2s, three 3s, three 4s, four 5s, four 6s is 0.239.  24%  That's pretty likely.  The reason this is so likely is that there are a very large number of ways to throw three 1s, three 2s, three 3s, three 4s, four 5s, four 6s.  There's only one way to throw twenty 1s.

Marilyn's first answer is wrong.  Her second answer (the "jumble of numbers" is more likely) is correct, but she makes no attempt to explain.  Not so smart, in my opinion.