My Math Forum Simple/Challenging Coin Probability Question

 Probability and Statistics Basic Probability and Statistics Math Forum

 April 16th, 2017, 08:59 PM #1 Senior Member   Joined: Jul 2016 From: USA Posts: 108 Thanks: 13 Simple/Challenging Coin Probability Question I have a pretty simple word problem. How many times do I have to flip a coin to have a 90% chance of it landing on heads five times in a row? My answer is approximately 145 times. This should be fun to figure out. I am really looking forward to seeing what answers you guys come up with!
 April 17th, 2017, 10:18 AM #2 Senior Member   Joined: Jul 2016 From: USA Posts: 108 Thanks: 13 Here is the solution I came up with: The probability of landing on 5 heads in a row is 0.5^5 So the probability of failure is 1-0.5^5 So if you flip the coin n times then the probability of failure will be (1-0.5^5)^n (1-0.5^5)^n = P Solve for n with algebra using logarithms log(P)/log(1-0.5^5) = n So P = probability of failure but if we subtract P from 1 then the statement would only be true if P = probability of success log_(1-0.5^5)(1-P)=n Each attempt of success requires 5 flips so we multiply by 5 5*log_(1-0.5^5)(1-P)=n Okay, so here is where things get dirty. As soon as you land on tails, it is an automatic failure for that particular attempt of 5 in a row. It does NOT wait to finish the 5 flips to begin the next attempt of success. So we need to figure out the average number of attempts we are given for some amount of flips. A new attempt begins after we fail (land on tails). So basically the number of attempts is half of the number of flips because the probability of tails (failing) is 1/2. Let's replace that 5 with a 2 and we are finished!!! 2*log(1-P)/log(1-0.5^5) = n That is our final formula. All we need to do is substitute 0.9 as the probability (P) and evaluate. 2*log(1-0.9)/log(1-0.5^5) = 145.050677... COOL BEANS! That means if we flip the coin 145 times, we have roughly a 90% chance of landing on 5 heads in a row! And using the formula we can substitute any value of probability for P.
April 17th, 2017, 02:50 PM   #3
Senior Member

Joined: Oct 2013
From: New York, USA

Posts: 561
Thanks: 79

Quote:
 Originally Posted by VisionaryLen (1-0.5^5)^n = P
I hate logarithms, so I didn't use them. The value inside the parenthesis is 31/32. I made a spreadsheet where Column A was 31/32 and Column B was the counting numbers, which are n. I calculated Column A to the Column B power and looked at when it got below .1, at which point the probability of at least 5 consecutive heads got above .9. I got an answer of 73, which is about half of your answer.

April 17th, 2017, 06:42 PM   #4
Senior Member

Joined: Jul 2016
From: USA

Posts: 108
Thanks: 13

Quote:
I think I know why. Look at the last bit of my explanation where I multiply the answer by 2. Let me know if it makes sense.

April 18th, 2017, 02:30 PM   #5
Senior Member

Joined: Oct 2013
From: New York, USA

Posts: 561
Thanks: 79

Quote:
 Originally Posted by VisionaryLen I think I know why. Look at the last bit of my explanation where I multiply the answer by 2. Let me know if it makes sense.

April 18th, 2017, 05:42 PM   #6
Global Moderator

Joined: Oct 2008
From: London, Ontario, Canada - The Forest City

Posts: 7,593
Thanks: 937

Math Focus: Elementary mathematics and beyond
Quote:
 How many times do I have to flip a coin to have a 90% chance of it landing on heads five times in a row?
Each coin flip is independent, so the probability of flipping 5 consecutive heads is $\left(\frac12\right)^5=1/32$, no matter how many times the coin is flipped.

 April 18th, 2017, 06:27 PM #7 Senior Member     Joined: Sep 2015 From: Southern California, USA Posts: 1,493 Thanks: 752 https://math.stackexchange.com/quest...length-n-conta goes into this problem in excruciating detail. This coin flip problem is completely analgous to the consecutive 1's in a n bit string. For this problem you'd use the formula at the link to determine how many strings of length n have all 1 substrings of only length 4 or less. You would divide that number by $2^n$, i.e. the total number of $n$ bit strings. You would then subtract this from $1$ to obtain the probability you are after. Repeat this with increasing n (in some intelligent way) until the probability becomes 90%.
April 18th, 2017, 08:47 PM   #8
Senior Member

Joined: Feb 2016
From: Australia

Posts: 1,352
Thanks: 463

Math Focus: Yet to find out.
Quote:
 Originally Posted by EvanJ I hate logarithms, so I didn't use them.
I'm curious, do you have a reason?

April 21st, 2017, 02:10 PM   #9
Senior Member

Joined: Oct 2013
From: New York, USA

Posts: 561
Thanks: 79

Quote:
 Originally Posted by greg1313 Each coin flip is independent, so the probability of flipping 5 consecutive heads is $\left(\frac12\right)^5=1/32$, no matter how many times the coin is flipped.
The question allows multiple sets of 5 coins. For example, if I flip 5 coins and you flip 5 coins, the probability that at least one of us gets all 5 heads is greater than 1/32. To make an analogy, if you have a 40 percent chance at getting a 90 or higher on every test you take, each test increases the probability that you will get 90 or higher at least once.

Quote:
 Originally Posted by Joppy I'm curious, do you have a reason?
I like y = x^2 and y = 3^x because they are easily written in a y = form. A logarithm is like 3 = 10^y (or e^y for natural logarithms).

Last edited by EvanJ; April 21st, 2017 at 02:13 PM.

 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post magic123 Probability and Statistics 0 July 18th, 2014 02:54 PM Skyanne Probability and Statistics 6 July 27th, 2012 10:54 AM helppls123 Advanced Statistics 1 March 25th, 2012 05:59 AM wawar05 Advanced Statistics 7 October 26th, 2011 12:54 PM tnutty Probability and Statistics 3 January 27th, 2011 04:32 PM

 Contact - Home - Forums - Cryptocurrency Forum - Top