Ask the Wizard: Probability - Coins
If a coin was flipped 1000 times what is the probability the total number of heads would fall in the range of 452 to 548? | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Probability of Player A Winning | ||||||||
| Player A | Player B | |||||||
| HHH | HHT | HTH | HTT | THH | THT | TTH | TTT | |
| HHH | 1/2 | 2/5 | 2/5 | 1/8 | 5/12 | 3/10 | 1/2 | |
| HHT | 1/2 | 2/3 | 2/3 | 1/4 | 5/8 | 1/2 | 7/10 | |
| HTH | 3/5 | 1/3 | 1/2 | 1/2 | 1/2 | 3/8 | 7/12 | |
| HTT | 3/5 | 1/3 | 1/2 | 1/2 | 1/2 | 3/4 | 7/8 | |
| THH | 7/8 | 3/4 | 1/2 | 1/2 | 1/2 | 1/3 | 3/5 | |
| THT | 7/12 | 3/8 | 1/2 | 1/2 | 1/2 | 1/3 | 3/5 | |
| TTH | 7/10 | 1/2 | 5/8 | 1/4 | 2/3 | 2/3 | 1/2 | |
| TTT | 1/2 | 3/10 | 5/12 | 1/8 | 2/5 | 2/5 | 1/2 | |
A memory device to select the optimal pattern is his first and second picks should be your second and third respectively. Your first pick should be the opposite of your third. For example if your opponent chooses HTT your second and third picks should be HT. Your last pick is T so your first should be H, for an HHT pattern. Following this strategy your probability of winning will be 2/3 to 7/8, depending on what pattern your opponent picks.
Hello, my name is Patty. You have a very nice site and you seem like a very knowledgeable man. Definelty the kind of man I want by my side in a Casino!!!!!!! I was wondering if you could help me. I told my boy friend that I would look for an answer to a problem on the internet. If you were to help me, it would really make me look good.
My boy friend is a coin collector. He bought a bag of wheat pennies. I don’t know much about coins myself. (He is teaching me as time goes by) But he said that he was amazed that one certain year wasn’t represented in the bag because they are so common. He said the odds of that happening had to be a billion to one. I told him I would try to ask people in my office (the self proclaimed geniuses!!) and if they didn’t know, I would try to do a little research online. I came across you.
Anyway if you can help. I would greatly appreciate it. The bag had approximately 5,500 pennies. The total amount of wheat pennies minted by all the US mints was 24,267,000,000 The number of 1955’s that were minted (The one he was looking for) was 330,000,000. Some of the guys in my office say that there are other factors like; demographics, the fact that the MInts may not have distributed all the pennies etc. ...................... I would assume that they are correct but, I (and I’m sure my boy friend also) would settle on knowing the approximant odds!!!!!!!!! I hope you can help.
— Patty
My father is a coin collector so I asked him for help on this one. Here is what he said,
Here is my guess. In the year 1955, there were a small number of Lincoln cents struck in Philadelphia with the date struck twice. no one knows exactly how many They were mixed with other cents for circulation before the error was discovered. An uncirculated specimen today is worth about $2000.to $6000. I suspect that the bag of "wheats" had already been culled of all of its 1955’s by someone looking for double-die specimens. Here is a picture of one: 1955 Doubled Die Obverse One Cent.
Note that this website is selling "wheats" and you can bet that some culling of dates has already occurred after the coins were collected by the dealer. I would have thought that the 1955’s that were not double-die would have been returned to the collection, but perhaps they are sold separately, or melted down. The copper in wheat pennies is worth much more than one cent today. That is why they switched to copper-plated zinc cents a few decades ago. There is a possibility that the mint itself decided not to distribute many of the 1955’s, and melted them down after minting to avoid a frantic scramble for the rare double-die specimens. The mint and Post Office has always been embarrassed by printing errors, and tries to keep them out of circulation
In your last column you said that "The probability of 5500 coins not being a 55 can be very closely approximated as 0.9864012865500 = 1 in 507,033,772,284,213,000,000,000,000,000,000."
I assume "approximated" because of the effect of removal as you go through the 5500 coins. Talk about a minuscule effect of removal! This is a good example of the target coins becoming LESS likely as you remove non-targets, because the effect of removal is so small compared to the much larger probability of a crooked game, i.e. the target coins have been removed.
— Pete from NY
There are two tables in a room. On the one to the right there are a 100 coins, 20 with H facing up and the rest (80) with the T side facing up. There are no coins on the other table. The goal is to somehow move the coins so that there will be an equal number of coins with H facing up, on both tables. You cannot see the coins (dark room) or touch them to tell if they’re facing "up" or "down".
— Dan from Tel Aviv
My friend offered to bet me $20.00 and give me 3 to 1 odds that if I flipped a coin 100 times, it would have come up exactly 50 heads and 50 tails. If it did, I would win $60.00 and if it didn’t, I would owe him $20.00. Should I have taken the bet? Also, if 50/50 is not the most likely outcome, is there another outcome (like 51/49) that is more likely to occur?
— Joe from Colorado
The following table shows the probability for each of 30 to 70 heads/tails.
| Probability of Total Heads/Tails in 100 Flips | |
| Heads/Tails | Probability |
| 30, 70 | 0.000023 |
| 31, 69 | 0.000052 |
| 32, 68 | 0.000113 |
| 33, 67 | 0.000232 |
| 34, 66 | 0.000458 |
| 35, 65 | 0.000864 |
| 36, 64 | 0.001560 |
| 37, 63 | 0.002698 |
| 38, 62 | 0.004473 |
| 39, 61 | 0.007111 |
| 40, 60 | 0.010844 |
| 41, 59 | 0.015869 |
| 42, 58 | 0.022292 |
| 43, 57 | 0.030069 |
| 44, 56 | 0.038953 |
| 45, 55 | 0.048474 |
| 46, 54 | 0.057958 |
| 47, 53 | 0.066590 |
| 48, 52 | 0.073527 |
| 49, 51 | 0.078029 |
| 50 | 0.079589 |
The general formula for the probability of w wins out of n trials, where the probability of each win is p, is combin(n,w) × pw × (1-p)(n-w) = [n!/(w! × (n-w)!] × pw × (1-p)(n-w).
If I flip a coin 1,000 times, what is the probability that I will see a streak of at least 10 heads or tails in a row?
— Monroe from San Francisco, CA

For more on this topic, please visit What were the Odds of Having Such a Terrible Streak at the Casino?
(483K) by Frank Martin.
If a coin is flipped 100 times, what is the probability of getting a streak of at least 7 heads in a row at least once?
— Don from New York
f(n)= pr(tails in first flip)×f(n-1) +
pr(heads in first flip, tails in second flip)×f(n-2) +
pr(heads in first 2 flips, tails in third flip)×f(n-3) +
pr(heads in first 3 flips, tails in third flip)×f(n-4) +
pr(heads in first 4 flips, tails in fourth flip)×f(n-5) +
pr(heads in first 5 flips, tails in fifth flip)×f(n-6) +
pr(heads in first 6 flips, tails in sixth flip)×f(n-7) +
pr(heads in first 7 flips) =
(1/2)×f(n-1) +
(1/2)2×f(n-2) +
(1/2)3×f(n-3) +
(1/2)4×f(n-4) +
(1/2)5×f(n-5) +
(1/2)6×f(n-6) +
(1/2)7×f(n-7) +
(1/2)7
Where:
f(n)=probability of success within n flips.
pr(x)=probability of x happening.
Spreadsheets are perfect for problems like this. In the screenshots of the spreadsheet below, I put in a probability of 0 for cells B2 to B8, because you can’t have 7 heads in a row in 6 or fewer flips. For cell B9, I put in the formula:
=(1/2)*B8+(1/2)^2*B7+(1/2)^3*B6+(1/2)^4*B5+(1/2)^5*B4+(1/2)^6*B3+(1/2)^7*B2+(1/2)^7
Then I copied and pasted it from cells B10 to cell B102, which corresponds to 100 flips. That probability is 0.317520. A random simulation confirms it.
![]() | ![]() |
After this originally published, Rick Percy shared his matrix algebra solution with me. Here it is in my own words. I assume the reader knows the basics of matrix albegra already.
First, there are eight possible states the flipper can be in at any one point:
p1 = Probability of success, given that you need 7 more heads from the current point.
p2 = Probability of success, given that you need 6 more heads from the current point.
p3 = Probability of success, given that you need 5 more heads from the current point.
p4 = Probability of success, given that you need 4 more heads from the current point.
p5 = Probability of success, given that you need 3 more heads from the current point.
p6 = Probability of success, given that you need 2 more heads from the current point.
p7 = Probability of success, given that you need 1 more heads from the current point.
p8 = Probability of success, given that you don’t need any more heads = 1.
Let’s define the maxtrix Sn as the probability of being in each state after the nth flip. S0 represents the probabilities before the first flip, where there is a 100% chance of being in state 0. So S0 =
| 1 0 0 0 0 0 0 0 |
Let T be the transformation matrix from two consecutive flips, or Sn to Sn+1, where Sn+1 = T × Sn
- If you’re in state 1 then after one flip you have a 0.5 chance of being in state 2 (with a heads), and 0.5 of remaining at state 1 (with a tails).
- If you’re in state 2 then after one flip you have a 0.5 chance of being in state 3 (with a heads), and 0.5 of returning to state 1 (with a tails).
- If you’re in state 3 then after one flip you have a 0.5 chance of being in state 4 (with a heads), and 0.5 of returning to state 1 (with a tails).
- If you’re in state 4 then after one flip you have a 0.5 chance of being in state 5 (with a heads), and 0.5 of returning to state 1 (with a tails).
- If you’re in state 5 then after one flip you have a 0.5 chance of being in state 6 (with a heads), and 0.5 of returning to state 1 (with a tails).
- If you’re in state 6 then after one flip you have a 0.5 chance of being in state 7 (with a heads), and 0.5 of returning to state 1 (with a tails).
- If you’re in state 7 then after one flip you have a 0.5 chance of being in state 8 (with a heads), and 0.5 of returning to state 1 (with a tails).
- If you’re in state 8 then you have achieved success, and will remain in state 8 with a probability of 1.0.
Putting all that in the form of the transition matrix T =
| 0.5 0.5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 |
| 0.5 0.0 0.5 0.0 0.0 0.0 0.0 0.0 0.0 |
| 0.5 0.0 0.0 0.5 0.0 0.0 0.0 0.0 0.0 |
| 0.5 0.0 0.0 0.0 0.5 0.0 0.0 0.0 0.0 |
| 0.5 0.0 0.0 0.0 0.0 0.5 0.0 0.0 0.0 |
| 0.5 0.0 0.0 0.0 0.0 0.0 0.5 0.0 0.0 |
| 0.5 0.0 0.0 0.0 0.0 0.0 0.0 0.5 0.0 |
| 0.5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5 |
| 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 |
To get to the probability of each state after one flip...
(1) S1 = S0 × T
How about after two flips?
(2) S2 = S1 × T
Let’s substitute equation (1) in equation (2)...
(3) S2 = S0 × T × T = S0 × T2
What about after 3 flips?
(4) S3 = S2 × T
Substituting equation (3) into (4)...
(5) S3 = S0 × T2 × T = S0 × T3
We can keep doing this all the way to the state after the 100th flip...
S100 = S0 × T100
So, what is T100? Before computers it must have been a huge pain to figure such things out. However, with Excel’s MMULT function and a lot of copying and pasting we find T100 =
| 0.342616 0.171999 0.086347 0.043347 0.021761 0.010924 0.005484 0.317520 |
| 0.339863 0.170617 0.085653 0.042999 0.021586 0.010837 0.005440 0.323005 |
| 0.334379 0.167864 0.084271 0.042305 0.021238 0.010662 0.005352 0.333929 |
| 0.323454 0.162380 0.081517 0.040923 0.020544 0.010313 0.005178 0.355690 |
| 0.301693 0.151455 0.076033 0.038170 0.019162 0.009620 0.004829 0.399038 |
| 0.258346 0.129694 0.065109 0.032686 0.016409 0.008237 0.004135 0.485384 |
| 0.171999 0.086347 0.043347 0.021761 0.010924 0.005484 0.002753 0.657384 |
| 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1.000000 |
The term in the upper right shows us the probability of being in state 8 after 100 flips, which is 0.317520.
Have you heard the story of the Australian cricket player who called the toss of a coin incorrectly for 35 straight games, before getting the 36th call correct? What are the odds of that?
— Mick from Wollongong, Australia
, who indeed called the coin toss incorrectly 35 times in a row. The probability of getting exactly 35 or more incorrect is (1/2)35 = 1 in 34,359,738,368. To put that in perspective, the probability of hitting the Powerball
is 1 in 195,249,054. That is 176 times more likely than missing 35 consecutive coin tosses.
Do you have any advice for betting on the flip of a coin?
— Krazycat
Yes! Bet on the side face up in the flipper's hand. The academic paper Dynamical Bias in the Coin Toss
by Persi Diaconis, Susan Holmes, and Richard Montgomery concludes that the coin will land on the same side it started on 51% of the time.
This question was raised and discussed in the forum of my companion site Wizard of Vegas
.
On average, how many trials will it take in a 50/50 game to lose two in a row? How about 3, 4, n in a row?
— JyBrd0403
Let's solve for the two loss case first.
Let x be the expected number of future flips starting from the beginning or after any win.
Let y be the expected number of future flips after one loss.
We can set up the following two equations:
(1) x = 1 + .5x + .5y
The one represents that the player must flip the coin to change states. There is a 50% chance of a win, remaining in state x. There is a 50% chance of a loss, advancing to state y.
(2) y = 1 + .5x
From state y again, the 1 represents the flip at that point. There is a 50% chance of a win, reverting to state x. There is a 50% chance of a loss, ending the game, necessitating no additional flips, so it is an implied 0.5*0.
Multiply both equations by 2 and reorder to get:
(3) x - y =2
(4) -x + 2y = 2
Add the two equations to get:
(5) y = 4
Plug that into any equation from (1) to (4) and get x=6.
For the three loss case, define the three possible states as:
Let x be the expected number of future flips starting from the beginning or after any win.
Let y be the expected number of future flips after one loss.
Let z be the expected number of future flips after two losses.
The initial equations are:
x = 1 + .5x + .5y
y = 1 + .5x + .5z
z = 1 + .5x
We can set up the initial states in matrix form as:
| 0.5 | -0.5 | 0 | 1 |
| -0.5 | 1 | -0.5 | 1 |
| -0.5 | 0 | 1 | 1 |
If you remember your matrix algebra, we can solve for x as determinant(A)/determinant(B) where
A =
| 1 | -0.5 | 0 |
| 1 | 1 | -0.5 |
| 1 | 0 | 1 |
B =
| 0.5 | -0.5 | 0 |
| -0.5 | 1 | -0.5 |
| -0.5 | 0 | 1 |
| 0.5 | -0.5 | 0 |
| -0.5 | 1 | -0.5 |
| -0.5 | 0 | 1 |
Excel has a handy determinant function: =mdeterm(range). In this case x = mdeterm(matrix A)/mdeterm(matrix B) = 1.75/0.125 = 14.
We can use recursion for additional consecutive losses. Let's consider 4. We know from above it will take 14 flips on average to get 3 losses in a row. At that point the coin will be flipped again, with a 50% chance of starting over. So:
x = 14 + 1 + x/2
x/2 = 15
x = 30
In other words, add one to the previous answer and then double.
It is not difficult to see the pattern. The expected number of flips to get n losses in a row is 2n+1-2.
This question was raised and discussed on my forum at Wizard of Vegas
.
Copyright © 1998-2013 Wizard of Odds Consulting, Inc. All rights reserved. • About | Privacy & Terms | Site Map | Links | Contact
The Wizard’s other sites: Wizard of Vegas | Wizard of Macau | Math Problems | Diversity Tomorrow • Recommended: Vegas Click • Sponsored by: Online Casino





