Wednesday, April 21, 2010

Marbles, Coin and Die


If I have:
a normal coin with a heads and tails;
a 6-sided die;
and a bag containing 4 blue and 2 red marbles,
what is the probability of me flipping a heads, rolling a 4, and picking out a red marble?


Probability of flipping a heads: 1/2
Probability of rolling a 4: 1/6
Probability of selecting a red marble: 2/6

Then multiply the results, so:
1/2 x 1/6 x 2/6= 1/36 or 0.027 to 3 decimal places

Monday, April 19, 2010

The Gardner Sisters


Gretchen and Henry invited the four Gardner sisters over to their house for an afternoon tea. Henry went to the cabinet to take out some plates (they have both blue and green plates in the cabinet), and the first two plates he took out were blue. "What are the odds?" asked Martina Gardner, the youngest.

Henry thought for a moment, and then replied, "Knowing how many plates of each color I have, the probability that I would pull out two blue ones is exactly 1/2!" Martina then asked if Henry could feed two dozen people if he used all of his plates. "Not quite," he replied.

She then told him how many plates he had. What number did she say?


Henry has 21 plates, and 15 of them are blue.

This makes the probability of drawing two plates (15/21) * (14/20), which equals 1/2.

Martina had to ask if he could feed two dozen people because there are other (larger) numbers that work. For example, if he had 85 blue plates out of 120 total, the probability that he would pull out two blue ones would have been (85/120) * (84/119), or 1/2. Other numbers work, as well, but all are greater than 120.

Sunday, April 18, 2010

Another Game of Dice

Your friend offers to play a game of dice with you. He explains the game to you.

"We each get one die, the highest die wins. If we tie, I win, but since you always lose when you roll a one, if you roll a one you can roll again. If you get a one the second time you have to keep it."

What is each person's probability of winning?

What are the probabilities of winning if you can keep rolling until you get something besides a one?

In the first game the probabilities of winning are 37/72 for your friend and 35/72 for you. In the second game each player has a 50% probability of winning.

There are 36 combinations (6 x 6) for your die and your friend's die on the first roll. In the first game if you don't roll a one on the first roll then that roll is equally likely to be a 2, 3, 4, 5 or 6, which can beat 1, 2, 3, 4, 5 different numbers, respectively. That gives a

(1+2+3+4+5)/36 = 15/36

probability of winning on the first roll. There is a 1/6 chance of rolling a one, in which case you have a 15/36 probability of winning on the second roll, which gives a

1/6 * 15/36 = 15/216 = 5/72

probability of winning on the second roll for a total probability of winning of

15/36 + 5/72 = 30/72 + 5/72 = 35/72 = .486111...

In the second game we never keep a one, so there are only 30 combinations (5 x 6) for the final roll. As shown above, there are 15 ways to win, which gives a probability of

15/30 = 1/2

of winning the second game.

Duplicate Lottery Picks

In the Massachusetts Megabucks lottery, six different numbers from 1 to 42 (inclusive) are selected. When you buy a ticket, you can ask for a "quick pick" in which the computer chooses the numbers for you, and you can purchase up to five games on a single ticket. We'll assume that the computer's random number generator is fair, giving each possible combination an equal probability of being chosen.

1. If I "quick pick" for two games, what are the chances that the two games have the same combination of numbers?

2. If I "quick pick" for five games (one five-game ticket), what are the chances that there are two games on that ticket with the same combination?

3 (The toughie). How many five-game quick-pick tickets would I have to buy in order to have a greater than 50% chance of having at least one ticket with two games on it that match exactly?

1. 1/5245786. The first game on the ticket will be some combination. Then you just calculate the chances that the second game on the ticket will match it. This number of combinations is (42 choose 6) or

42! / 6! (42-6)! = 5245786

So the chances that they match is 1 over this number.

2. For this sort of problem, where you are asking what are the chances of something happening at least once out of several opportunities to happen, you first calculate the opposite -- the chances of it NOT happening in all the tries -- and subtract from 1. So, what are the chances that the 5 games on the ticket are all different?

We know that there are 5245786 possibilities for any one game. In the first game, we choose one of them. The second game now has a 5245785 / 5245786 chance of being different from that first one. Now the third game has a 5245784 / 5245786 chance of being different from either of the first two; and the fourth has a 5245783 / 5245786 chance of being a new selection. When you have the chances of individual events occurring, and you want to know the chance of them ALL occurring, you just multiply. We multiply the chances of all these events occurring (that is, each choice being different) to get:

(5245785 * 5245784 * 5245783 * 5245782) / 5245786 ^ 4

This equals


Remember, this is the chance of all of the games on a five-game ticket being different. So the chance of at least two of them being the same is 1 minus this number, or


which is a really tiny number.

3. We take a similar approach with this calculation that we took before: figure out the chance of it not happening for N tickets, and subtract that value from 1. Then we set that chance to 0.5 and solve for N.

We already know the chance of it happening in one try: the tiny number above, which, for now, we'll call p. So the chance of it NOT happening in one try is (1-p). The chance of it NOT happening in n tries is (1-p)^n, so the chance of it happening at least once in n tries is [1 - (1-p)^n]. We set this formula to 0.5 and solve for n.

Of course, solving for n is tricky, unless you are comfortable with logarithms. I start with the equation

0.5 = [1 - (1-p)^n]

0.5 = (1-p)^n

Take natural logarithm of both sides
ln(0.5) = ln( (1-p)^n)

Use logarithm magic
ln(0.5) = n * ln(1-p)

Divide both sides by ln(1-p)
n = ln(0.5) / ln(1-p)

Plug in the number (which we already know) for p and let the calculator do what it's good at
n = 363610.07359999192796640483226154

which is how many tickets we would have to buy to have a 50% chance of seeing one ticket with a match. Since we can't buy fractional tickets, we round up, to make sure we have a greater than 50% chance.

So we need to buy 363611 five-game tickets to have a better than 50% chance of having at least one ticket on which two games match exactly.

St. Petersburg Paradox

You are offered a game to play with a single fair coin. It costs 20 dollars to play this game, but you can win much more than that. The way it works is that you continue to flip the coin until you get tails. For every heads you get before that, your payoff doubles. For example, if you get:
Tails, then you would earn 4 dollars.
In other words, you get: 2^heads dollars after you play. The question is: would you come out with more or less money after you played this game an INFINITE number of times? Remember, each game costs 20 dollars!

You would come out with an INFINITE amount of money! Here's why:

The way to calculate an expected value of a game=(the probability of event1)*(the payoff from event1)+(the probability of event2)*(the payoff from event2)...

Let's say:
event3=Heads,Heads,Tails, and so on.

The probability of these events are:
event3=1/2*1/2*1/2=1/8, and so on.

The payoff of these events are:
event4=8, and so on.

Plugging this into the expected value formula, we get:

This simplifies to:
Any number added an infinite number of times will sum to infinity, so your expected value of this game is infinity.