• Quick note - the problem with Youtube videos not embedding on the forum appears to have been fixed, thanks to ZiprHead. If you do still see problems let me know.

Really stupid probability question

MortFurd

Master Poster
Joined
Aug 5, 2006
Messages
2,010
This is probably trivial for anyone who really know how to calculate probabilities.
If you have a wheel like the one on "Wheel of Fortune" that has 12 segments, and only one of them is yellow, then the probability of hitting yellow with one spin of the wheel is one in twelve. What is the probability of hitting yellow at least once if you spin it three times?

To my way of thinking, it ought to be 3 in 12 (also known as 25%.) I may well be wrong. I ran a simulation with python that simulated this 1,000,000 times (one million times the 3 spin scenario, that's 3 million spins.) The result came up around 23%. It comes up 23% no matter how many times I repeat it.

Either I can't calculate probabilities worth a damn (quite likely) or the python random number generator is whacked (not really likely.)

Does anyone know what I'm doing wrong?

BTW: This was a homework assignment for my daughter. I can't follow the truly squirrelly method that they teach here in Germany (draw some kind of tree structure and count nodes and add or multiply according to some rules that aren't clear to me,) and she can't get the right answer either.

If anyone is interested, here's the python program I used for the simulation:
(The forum software keeps jacking around with the code. Remove the part that says rel="nofollow" - that line should just be target=6)
Code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import random

def main():
	n=1000000.0
	count=0.0
	target=6
	for x in range(n):
		a=random.randint(1,12)
		b=random.randint(1,12)
		c=random.randint(1,12)
		if a==target or b==target or c==target:
			count=count+1
	print (count/n)
	return 0

if __name__ == '__main__':
	main()
 
Last edited:
Consider the opposite problem: what is the probability of missing yellow all three times?

It must be (11/12)(11/12)(11/12), as we're doing three independent trials, which is about 0.77.

Therefore, the probability that you don't miss yellow every time (i.e. you hit yellow at least once) is 1 - 0.77 = 0.23.
 
Last edited:
OK, that agrees with the experimental value.
Now, why would I logically calculate the probability of not hitting yellow instead of trying to calculate the probability of hitting yellow?
 
Because it is much easier.

The hard way to calculate the probability of hitting yellow is to figure out all mutually exclusive combinations which have yellow in them, and calculate each one. Such as (Y=yellow, N=non-yellow):

YNN - 1/12 * 11/12 * 11/12
NYN - 1/12 * 11/12 * 11/12
NNY - 1/12 * 11/12 * 11/12
YYN - 1/12 * 1/12 * 11/12
YNY - 1/12 * 1/12 * 11/12
NYY - 1/12 * 1/12 * 11/12
YYY - 1/12 * 1/12 * 1/12

Which is long, tedious, and prone to error. Much easier just to calculate the probability of NNN - 11/12 * 11/12 * 11/12, - and subtract it from 1.
 
Last edited:
Consider the opposite problem: what is the chance of missing yellow every time?

It must be (11/12)(11/12)(11/12), as we're doing three independent trials, which is about 0.77.

Therefore, the probability that you don't miss yellow every time - i.e. you hit yellow at least once - is 1 - 0.77 = 0.23.


Yes, that is the standard "trick" for computing "at least one of" probability problems. But it is informative to see how to calculate it directly. We want the probability of at least one "yellow" coming up in 3 spins. Then, we have to add three probabilities together: the probability of it coming up exactly once, exactly twice, and exactly three times in three spins.

The probabiity of it coming up exactly once: The probability of it coming up on only the first spin is the probability that it comes up on the first spin (1/12) times the probability it does not come up on the second spin (11/12) times the probability it does not come up on the third spin (11/12): 1/12 × 11/12 × 11/12. But with the same probability, it could come up on just the second spin or just the third spin. Thus there are three ways to get exactly one "yellow" in three spins, and so we must multiply the above probabilty by 3, wich gives:

3 × 1/12 × 11/12 × 11/12 = .2101

The probability of it coming up exactly twice. If we hit "yellow" exactly twice in three spins, then we have missed "yellow" in exactly one spin. Just as in the above problem where there were three ways to hit "yellow," in this problem there are three ways to miss it (on the first, the second, or the third spin). Thus using logic exactly analogous to the above problem, the probability of hitting "yellow" exactly twice is:

3 × 11/12 × 1/12 × 1/12 = .0191

The probability of it coming up all three times. This is the easy one:

1/12 × 1/12 × 1/12 = .0006

Finally, to get the probability of getting "yellow" at least once in three spins, we add the above three probabilities together:

.2101 +.0191 + .0006 = .2298

Notice that that agrees with the ctamblyn's shortcut method up to a rounding error.
 
Last edited:
OK, that agrees with the experimental value.
Now, why would I logically calculate the probability of not hitting yellow instead of trying to calculate the probability of hitting yellow?

Because by counting the 'Hits' you have the problem of double counting. This means that your simple counts two hits if both the first and second spin end on yellow. This brings the calculation up a bit (in this case about 2%). Any formulas to compensate become very complicated (even for three spins and much more for more).

This means that it is simpler mathematically to calculate the misses then subtract that result from 1 to get the chance of at least one hit.

ie p(h>=1) = 1-p(h=0). (This is because h can only be 0, 1 , 2 or 3 in your setup).

However p(h>=1) = p(h=1) + p(h=2) + p(h=3).

This is already more complicated than simply calculating p(h=0) then subtracting from 1.

Math is full of tricks like this where we find equivalent ways of calculating the same problem and converting from one to the other depending upon which is a simpler calculation in the situation.
 
This is probably trivial for anyone who really know how to calculate probabilities.
If you have a wheel like the one on "Wheel of Fortune" that has 12 segments, and only one of them is yellow, then the probability of hitting yellow with one spin of the wheel is one in twelve. What is the probability of hitting yellow at least once if you spin it three times?

To my way of thinking, it ought to be 3 in 12 (also known as 25%.) I may well be wrong.

Your initial erroneous analysis is a very common one, and it is not easy to see why it is wrong.

But consider this: If you spun the wheel 12 times, would your chance of getting yellow be 100%? In other words, if you spun the wheel 12 times, are you absolutely positively always going to get at least one yellow, guaranteed (which is what 100% means)? Intuitively, we know that it is possible that we might spin 12 times and yellow might not come up at all. It's very likely that we'd get a yellow, but it's not a sure thing, so we know that the chances can't really be 100%.

And if we spun the wheel 13 times the chances of getting a yellow would not be 108%, for at least two reasons. First, the percentage is meaningless because it is better than certainty. And besides, we know that it is possible, though unlikely, to spin 13 times and not have a yellow come up.

That said, your question is NOT stupid. Calculating the probability of NOT hitting yellow gives you the correct answer with fairly easy calculation and also makes a good deal of intuitive sense.
 
The problem with trying to directly calculate the probability of hitting yellow at least once is that it includes the probabilities of several different outcomes. You can hit yellow once, twice or three times, and those are all included in the probability. That means you need three calculations, which you then add together.

But in order to not hit it at least once you just need to not hit it at all, which is an easier probability to calculate because there's only one calculation to make.

Since the sum of all probabilities is 1 the probability of hitting yellow at least once is 1-P(none).

For this problem the tree diagram would be a real pain as you'd need three consecutive 12 branch trees, with 12x12x12 (1,728) branch endings in total. It would be ridiculous to do it that way.
 
OK, that agrees with the experimental value.
Now, why would I logically calculate the probability of not hitting yellow instead of trying to calculate the probability of hitting yellow?

What Mark6 said. Sometimes it is far easier to work out the probability of an event not occurring.

Your puzzle is a particular case of a more general problem where this trick applies: if we perform n independent trials, each with a probability p of success, what is the probability of having one or more successes? You can do it one of two ways. Let's call X the number of successes, so that what we're after is Pr(X > 0).

The direct, "brute force" way is something like this:
Pr(X > 0) = Pr(X = 1) + Pr(X = 2) + ... + Pr(X = n),​

so you calculate each of the terms on the right and add them up. Correct, but potentially tedious (especially if n is large). Alternatively, we can spot that
Pr(X > 0) = 1 - Pr(X = 0),
so we just calculate the single term on the right, which is easy. Pr(X = 0) is the probability of getting n failures, which is just (1 - p)n, and so
Pr(X > 0) = 1 - (1 - p)n,
which was far easier to do.

The trick can be extended a little. Suppose we spin the wheel 10 times and we want to know the probability of getting at least two yellows. We can either calculate

Pr(X > 1) = Pr(X = 2) + Pr(X = 3) + ... + Pr(X = 10)
and calculate the nine terms on the RHS, or spot that

Pr(X > 1) = 1 - Pr(X = 0) - Pr(X = 1)
and calculate just two terms.


ETA: ninja'd - jt512 showed above how to do it the longer way for n = 3.
 
Last edited:
I'm surprised that the thread has gotten this far without the mention of the word "biomial."
 
...

BTW: This was a homework assignment for my daughter. I can't follow the truly squirrelly method that they teach here in Germany (draw some kind of tree structure and count nodes and add or multiply according to some rules that aren't clear to me,) and she can't get the right answer either.

...

I'm guessing the tree structure is something like this. I've drawn it for just two spins of the wheel to save space.

Code:
     spin1  spin2    outcome         probability

            Y          Y,Y       (1/12)(1/12) = 1/144
           /
          / 1/12
         /
        Y
       / \
 1/12 /   \ 11/12
     /     \
    /       NY         Y,NY      (1/12)(11/12) = 11/144
   /
   \
    \        Y         NY,Y      (11/12)(1/12) = 11/144
     \      /
11/12 \    / 1/12
       \  /
        NY
          \
           \ 11/12
            \
             NY        NY,NY     (11/12)(11/12) = 121/144

The root of the tree at the left is our starting state, before we've spun the wheel. After making the first spin, we must choose either the upper "Y" (yellow) branch or the lower "NY" (not-yellow) branch according to the spin result. Then we make the second spin, and again choose the upper or lower branch according to the spin result.

I've annotated the branches themselves with the probabilities that they are taken. As spin 1 and spin 2 are independent trials, we can find the probability of each ultimate outcome by multiplying the probabilities along the branches taken.

I hope that makes some kind of sense. :)
 
Last edited:
The probabiity of it coming up exactly once: The probability of it coming up on only the first spin is the probability that it comes up on the first spin (1/12) times the probability it does not come up on the second spin (11/12) times the probability it does not come up on the third spin (11/12): 1/12 × 11/12 × 11/12. But with the same probability, it could come up on just the second spin or just the third spin. Thus there are three ways to get exactly one "yellow" in three spins, and so we must multiply the above probabilty by 3, wich gives:

3 × 1/12 × 11/12 × 11/12 = .2101

The probability of it coming up exactly twice. If we hit "yellow" exactly twice in three spins, then we have missed "yellow" in exactly one spin. Just as in the above problem where there were three ways to hit "yellow," in this problem there are three ways to miss it (on the first, the second, or the third spin). Thus using logic exactly analogous to the above problem, the probability of hitting "yellow" exactly twice is:

3 × 11/12 × 1/12 × 1/12 = .0191

The probability of it coming up all three times. This is the easy one:

1/12 × 1/12 × 1/12 = .0006/

To add to your fine explanation: the question then remains, how many combinations are there that exactly 2 (or 1, or 3) spins result in a yellow, out of all 3 spins? That number is called the binomial coefficient, and is pronounced as "3 choose 2". For the formula to calculate the binomial, see the linked-to wiki article.
 
Last edited:
Someone please smack me upside the head.

My assessment of the probability tree solution was just pathetic! :boxedin:
 
Nice problem MortFurd, but definitely not stupid! Probability is a field not well understood by the majority of the population. It is this non-understanding which partly give rise to casino and bookmakers profits.

Remember, punters' behaviour is heavily influenced by a variable reinforcement schedule – the hardest of all to break.

Probability is a minefield! Often the easiest way is to use your method, which goes by the name of Monte Carlo simulation!
 
Last edited:
What the heck, as long as we're going down the road of overkill, let's do a direct calculation in one step. We'll calculate a single fraction, the numerator of which is the total number of outcomes of three spins that include at least 1 yellow, and the denominator of which is the total number of ways that three spins could come out.

Let's do the denomator first. There are 12 possible outcomes per spin and three spins. Thus there are 12^3 possible outcomes of three spins.

Now the numerator, the number of possible "success," or outcomes of three spins that include at least one yellow. If you get yellow on the first spin, then there are 12*12 combinations on the second two spins that would be a success (ie, you'd get at least one yellow). If you don't get yellow on the first spin, then you must have gotten non-yellow. There are thus 11*1*12 ways for a success if your first yellow is on the second spin. Finally, if your first yellow is on the third spin, there are 11*11*1 ways for a success. Now we add those up and divide by the denominator we calculated above:

(1*12*12 + 11*1*12 + 11*11*1) / 12^3 = .2297 ,

again agreeing to within a rounding error.
 
Last edited:
Look up the "Birthday problem" on Wikipedia for a more complicated example. It is fun and marginally related to this. It shows how to calculate the probability that at least 2 people in a room have the same birthday by more easily calculating the probability that none of them have the same birthday.

It turns out if there are 23 people in the room there is a 50% chance that two share the same birthday.
 
Look up the "Birthday problem" on Wikipedia for a more complicated example. It is fun and marginally related to this. It shows how to calculate the probability that at least 2 people in a room have the same birthday by more easily calculating the probability that none of them have the same birthday.


Look it up? Anyone who understand ctamblyn's first post, shoud be able to work it out themselves.
 

Back
Top Bottom