My Math Forum  

Go Back   My Math Forum > High School Math Forum > Probability and Statistics

Probability and Statistics Basic Probability and Statistics Math Forum


Thanks Tree1Thanks
  • 1 Post By EvanJ
Reply
 
LinkBack Thread Tools Display Modes
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!
VisionaryLen is offline  
 
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.
VisionaryLen is offline  
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 View Post
(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.
EvanJ is offline  
April 17th, 2017, 06:42 PM   #4
Senior Member
 
Joined: Jul 2016
From: USA

Posts: 108
Thanks: 13

Quote:
Originally Posted by EvanJ View Post
I got an answer of 73, which is about half of your answer.
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.
VisionaryLen is offline  
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 View Post
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.
The issue is the probability of 5 consecutive heads compared to the probability of having 5 consecutive of the same side. With five coins, the probability of 5 consecutive heads is 1/32. The probability of 5 consecutive of the same side is 2/32. I don't think the answer for 5 consecutive of the same side would be double the answer for 5 consecutive heads. The first event has double the probability of the second event, but here's an example of how that doesn't make one answer double the other answer. With 4 coins, the probability of at least 2 heads (that do not have to be consecutive) is 11/16. The probability that a coin lands on heads or tails is 1 and is double the probability that it lands on heads. However, the probability of at least 2 heads or at least 2 tails is 1. It can't be double 11/16 because that would make it greater than 1.
EvanJ is offline  
April 18th, 2017, 05:42 PM   #6
Global Moderator
 
greg1313's Avatar
 
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.
greg1313 is offline  
April 18th, 2017, 06:27 PM   #7
Senior Member
 
romsek's Avatar
 
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%.
romsek is online now  
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 View Post
I hate logarithms, so I didn't use them.
I'm curious, do you have a reason?
Joppy is online now  
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 View Post
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 View Post
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).
Thanks from greg1313

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

  My Math Forum > High School Math Forum > Probability and Statistics

Tags
coin, probability, question, simple or challenging



Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
need help with umat challenging probability question magic123 Probability and Statistics 0 July 18th, 2014 02:54 PM
Probability coin toss question Skyanne Probability and Statistics 6 July 27th, 2012 10:54 AM
SIMPLE COIN Question helppls123 Advanced Statistics 1 March 25th, 2012 05:59 AM
challenging probability question wawar05 Advanced Statistics 7 October 26th, 2011 12:54 PM
Probability question[ coin flipping ] tnutty Probability and Statistics 3 January 27th, 2011 04:32 PM





Copyright © 2017 My Math Forum. All rights reserved.