stats: avg number of time you have to flip a coin to ensure a head

F-T-S

Rookie
ensure a head? lol. well the you have to give a specific percentage you want it under, like less than 1 percent there is no head. (no pun intended)
 

The Wreck

Semi-Pro
It's a random event so you can never ENSURE it. Each coin flip is independent. So you are no more likely to get a head on your 1000th coin flip as you are on your first coin flip. So the technical answer would be zero (or inifinite) as you can never guarantee it will happen.
 

goran_ace

Hall of Fame
when you flip a coin there are two outcomes, heads or tails.

let x = # of coin flips (or since the outcome of a coin flip has no effect on any other coin flips you can also just throw a bunch of different coins all at once)

probability of not throwing a head, or essentially the probability of throwing all tails in x flips = 1/(2^x)

so the probability of throwing at least one head in x flips = 1 - (1/(2^x))
 

pushing_wins

Hall of Fame
zero percent would have to be infinite flips


the law of large number says - if we flip a coin 100 times, we will have 50 heads.

similarly, if we flip a coin twice, we should get one head. 2 is the lowest number of flips to flip a head. is 2 the answer?
 

goran_ace

Hall of Fame
if you take 'ensure' to mean 100% certainty then you can throw the coin an infinite number of times and can never 'ensure' a head, but if you want 99% probability you can get there with 7 flips.
 

goran_ace

Hall of Fame
the law of large numbers does not state that out of 100 flips you will have 50 heads. it only states that you can expect to have approximately 50 heads. at a larger numbers of flips you will can expect even closer to that 50%.

law of averages isn't really a statistical term and doesn't apply. it's known by another term - gambler's fallacy.

if you threw 99 tails in a row, would you bet on the next throw being heads or tails? according to the law of averages you'd bet heads thinking things should even out and you are about due for a head any time now.

in theory those 99 throws have no affect on that 100th throw so the probability of throwing a head is still 1/2 = 50%. but the thinking man would know that odds of throwing 99 tails in a row are ridiculous so its likely not a fair coin flip and the coin is likely biased towards heads :)

hope this helps
 

ramseszerg

Professional
expected waiting time is 2. But to ensure with 100% certainty that you have a head.. can't be done. Unless you flip an infinite number of times.
 

pushing_wins

Hall of Fame
the law of large numbers does not state that out of 100 flips you will have 50 heads. it only states that you can expect to have approximately 50 heads. at a larger numbers of flips you will can expect even closer to that 50%.

law of averages isn't really a statistical term and doesn't apply. it's known by another term - gambler's fallacy.

if you threw 99 tails in a row, would you bet on the next throw being heads or tails? according to the law of averages you'd bet heads thinking things should even out and you are about due for a head any time now.

in theory those 99 throws have no affect on that 100th throw so the probability of throwing a head is still 1/2 = 50%. but the thinking man would know that odds of throwing 99 tails in a row are ridiculous so its likely not a fair coin flip and the coin is likely biased towards heads :)

hope this helps

the probablity of getting 50heads and 50 tails in 100 flips is 0.079589.

however, the law of large numbers says you should expect the number of heads to be 50.

how do you reconcile the two?
 

GetBetterer

Hall of Fame
I skipped Statistics and went directly to Calculus and never took it in College, but just by going off a guess:

There's a 1/2 chance it would work the first time, another 1/2 chance it would work the second, and a 1/2 chance the third and so forth.

This leads us to 1/infinity using basic probability. However, if we find the limit of 1/infinity, we get 0.
 

The Wreck

Semi-Pro
the probablity of getting 50heads and 50 tails in 100 flips is 0.079589.

however, the law of large numbers says you should expect the number of heads to be 50.

how do you reconcile the two?

Because 100 is not a "large" number in the scope of this scenario.
 

Steady Eddy

Legend
expected waiting time is 2. But to ensure with 100% certainty that you have a head.. can't be done. Unless you flip an infinite number of times.
Yep, let A be the average # of flips it takes to get a heads, if you miss on your first try, your average has just grown by 1, so A = .5(1) + .5(A + 1), which implies that A = 2

the probablity of getting 50heads and 50 tails in 100 flips is 0.079589.

however, the law of large numbers says you should expect the number of heads to be 50.

how do you reconcile the two?
There's no contradiction. By "expectation" all that is meant is that this is the average result, not a guaranteed result, hence, both are true.
 

pushing_wins

Hall of Fame
in a driving test center, 50% of the drivers tested walk away with a license.

from that statistic, can we find out the average number of times a driver has to take the driving test before passing?



--------------------------------
thats the question that lead me to think coin question.
 

baek57

Professional
in a driving test center, 50% of the drivers tested walk away with a license.

from that statistic, can we find out the average number of times a driver has to take the driving test before passing?



--------------------------------
thats the question that lead me to think coin question.

i'll have to go with two on that one too.
 

sureshs

Bionic Poster
when you flip a coin there are two outcomes, heads or tails.

let x = # of coin flips (or since the outcome of a coin flip has no effect on any other coin flips you can also just throw a bunch of different coins all at once)

probability of not throwing a head, or essentially the probability of throwing all tails in x flips = 1/(2^x)

so the probability of throwing at least one head in x flips = 1 - (1/(2^x))

If p(x) = 1 - (1/(2^x))

shouldn't the answer be Integral(0..inf) of x*p(x)dx ?
 

pushing_wins

Hall of Fame
Poor question, no answer.



maybe so

but could you help with the real life question?

the passing rate at driving test center is 50%.


can you infer from that the average number of attempts to pass at that test center?

if there is not enough info, u can make some reasonable assumptions.


the pass rate is 100% ------> everyone pass first attempt
0% --------> never pass
50% --------> ????????
 
Last edited:

RyanRF

Professional
If you flip a coin 1 time the chance of getting at least one head is 50%

If you flip a coin 2 times, the chance of getting at least one head is 75%

So, if you flip the coin 2 or more times, it is more likely that you will get at least one head than no heads at all.

However, you used the word 'ensure'. It is impossible to ensure anything when it comes to chance. Even flipping the coin an infinite number of times could result in an endless string of tails.
 

RyanRF

Professional
maybe so

but could you help with the real life question?

the passing rate at driving test center is 50%.


can you infer from that the average number of attempts to pass at that test center?

if there is not enough info, u can make some reasonable assumptions.


the pass rate is 100% ------> everyone pass first attempt
0% --------> never pass
50% --------> ????????

My answer above applies to this too
 

F-T-S

Rookie
in a driving test center, 50% of the drivers tested walk away with a license.

from that statistic, can we find out the average number of times a driver has to take the driving test before passing?



--------------------------------
thats the question that lead me to think coin question.

would be twice if that's all testers
 

pushing_wins

Hall of Fame
If you flip a coin 1 time the chance of getting at least one head is 50%

If you flip a coin 2 times, the chance of getting at least one head is 75%

So, if you flip the coin 2 or more times, it is more likely that you will get at least one head than no heads at all.

However,you used the word 'ensure'. It is impossible to ensure anything when it comes to chance. Even flipping the coin an infinite number of times could result in an endless string of tails.

doesnt the law of large numbers rule out that scenario?
 

Steady Eddy

Legend
in a driving test center, 50% of the drivers tested walk away with a license.

from that statistic, can we find out the average number of times a driver has to take the driving test before passing?



--------------------------------
thats the question that lead me to think coin question.
There's a difference, though. We're justified in thinking of each coin flip as being independent of the others, but it harder to assume that with drivers. For example, a driver who fails the test her first time, might not have a 50% chance of passing her second time because the class of people who don't pass the test might not be as good at taking the test. Also, someone who keeps retaking the test might be getting better each time, so his probability may not be staying at 50%.

Go ahead and model it by thinking of a coin flip, just remember that the reality might be different.

Wolfram Alpha says the integral does not exist (does not converge)
What integral would that be? I see this as the sum of an infinite series.

It is impossible to ensure anything when it comes to chance. Even flipping the coin an infinite number of times could result in an endless string of tails.
Yes, since the chance of missing 10 times in a row is 1/1024, and 1024 > 1000, the chance is smaller than 1-in-a-thousand. So the chance of missing 20 times in a row is smaller than 1-in-a-million, 30 in a row smaller than 1-in-a-billion. We can say that as the number of flips approaches infinity the chance of getting a head approaches 100%, but for any finite number of flips, it is still possible to not get a single head.
 

goran_ace

Hall of Fame
the law of large numbers doesn't rule out anything. it only states that you can expect that your results will look more and more like your predicted with large numbers of trials. it doesn't influence nth coin flip in any way.

you can't apply your knowledge of probability to your real life situation because it is not a completley random and discrete event like a coin flip. with a coin flip, it doesn't matter what your previous result is, your probability is the same on the next coin flip. with a driving test, there's a learning/experience curve. if you've failed the test on your first try, your previous experience makes it more likely you'll be able to pass the second time around. you've been there before. you know what to expect, you know what the difficulty level of questions of the written/computer portion (and will likely see repeat questions), you know the route of the road test, you know what you need to work on for your second test, maybe you're less nervous this time. if you fail the second, you've got less to work on and can concentrate your efforts on those areas to pass the third time around.

also, it's not a level playing field. some people are just smarter than others. with a coin flip if you flip that coin seven times you have a really good chance of getting a head. if you've failed a driving test 6 times already.... well, you're probably going to fail it a 7th and probably shouldn't be on the road even if you do eventually pass. might want to take the bus.
 
Last edited:

Polaris

Hall of Fame
I assume that "Number of tosses needed to ensure a head" is the same as "number of tosses required for the first head".

The probability of ensuring a "Head" in exactly 1 trial is p
The probability of ensuring a "Head" in exactly 2 trials is (1-p)*p
...
The probability of ensuring a "Head" in exactly n trials is ((1-p)^(n-1))*p

This is a geometric random variable, so the average number of tosses is 1/p.

For a fair coin, the average number of times to ensure a head is 2.
 
Last edited:

sphinx780

Hall of Fame
If you start to flip the drivers, how many would you have to flip to ensure that one of them lands on their head?
 

pushing_wins

Hall of Fame
I assume that "Number of tosses needed to ensure a head" is the same as "number of tosses required for the first head".

The probability of ensuring a "Head" in exactly 1 trial is p
The probability of ensuring a "Head" in exactly 2 trials is (1-p)*p
...
The probability of ensuring a "Head" in exactly n trials is ((1-p)^(n-1))*p

This is a geometric random variable, so the average number of tosses is 1/p.

For a fair coin, the average number of times to ensure a head is 2.


why does geometic mean apply here?
 
Last edited:

pushing_wins

Hall of Fame
There's a difference, though. We're justified in thinking of each coin flip as being independent of the others, but it harder to assume that with drivers. For example, a driver who fails the test her first time, might not have a 50% chance of passing her second time because the class of people who don't pass the test might not be as good at taking the test. Also, someone who keeps retaking the test might be getting better each time, so his probability may not be staying at 50%.

Go ahead and model it by thinking of a coin flip, just remember that the reality might be different.

What integral would that be? I see this as the sum of an infinite series.


Yes, since the chance of missing 10 times in a row is 1/1024, and 1024 > 1000, the chance is smaller than 1-in-a-thousand. So the chance of missing 20 times in a row is smaller than 1-in-a-million, 30 in a row smaller than 1-in-a-billion. We can say that as the number of flips approaches infinity the chance of getting a head approaches 100%, but for any finite number of flips, it is still possible to not get a single head.


what are some reasonable assumptions we should use in our model?
 
Last edited:

pushing_wins

Hall of Fame
the law of large numbers doesn't rule out anything. it only states that you can expect that your results will look more and more like your predicted with large numbers of trials. it doesn't influence nth coin flip in any way.

you can't apply your knowledge of probability to your real life situation because it is not a completley random and discrete event like a coin flip. with a coin flip, it doesn't matter what your previous result is, your probability is the same on the next coin flip. with a driving test, there's a learning/experience curve. if you've failed the test on your first try, your previous experience makes it more likely you'll be able to pass the second time around. you've been there before. you know what to expect, you know what the difficulty level of questions of the written/computer portion (and will likely see repeat questions), you know the route of the road test, you know what you need to work on for your second test, maybe you're less nervous this time. if you fail the second, you've got less to work on and can concentrate your efforts on those areas to pass the third time around.

also, it's not a level playing field. some people are just smarter than others. with a coin flip if you flip that coin seven times you have a really good chance of getting a head. if you've failed a driving test 6 times already.... well, you're probably going to fail it a 7th and probably shouldn't be on the road even if you do eventually pass. might want to take the bus.

i do understand the difference.

i feel it is necessary to be able the answer the coin problem b4 i tackle the real life problem
 

struggle

Legend
~80% chance of "tails" when flipping a regulation size flying disc (Discraft Ultrastar 175gram or even a Wham-O 175g).

i know, unrelated. just saying...
 

ramseszerg

Professional
whats that?

Just something I learned in grade 12 stats. It's the number of tries you can expect to have before getting the event based on the probability of the event. For example, if the probability of the event is 10%, you can expect that after 10 tries you will get the event.
 

Claudius

Professional
I assume that "Number of tosses needed to ensure a head" is the same as "number of tosses required for the first head".

The probability of ensuring a "Head" in exactly 1 trial is p
The probability of ensuring a "Head" in exactly 2 trials is (1-p)*p
...
The probability of ensuring a "Head" in exactly n trials is ((1-p)^(n-1))*p

This is a geometric random variable, so the average number of tosses is 1/p.

For a fair coin, the average number of times to ensure a head is 2.

You might know more about this than I do, but from what I understand, the number of heads in exactly n trials is a binomial random variable, with probability of k successes (heads) being:

P[X=k]= n!/[k!(n-k)!] * p^k*(1-p)^(n-k)

or more clearly:

1da936af4f7b569bf1eb0a709f124fa3.png


where p,r = .5 if the coin is fair.

So P[ensuring a head in exactly n trials] = n!/(n-1)!*p*(1-p)^(n-1)

where p = .5
 
Last edited:

Steady Eddy

Legend
what are some reasonable assumptions we should use in our model?
We can't know from the data we have. We don't know if the probability of passing remains at .5 for subsequent testing. It might get higher (the test taker gets better), or lower (anyone who fails it at all has a lower chance). Leave it as being a constant .5, but just remember not to be too dogmatic about what the results will be.

Just something I learned in grade 12 stats. It's the number of tries you can expect to have before getting the event based on the probability of the event. For example, if the probability of the event is 10%, you can expect that after 10 tries you will get the event.
Yeah, for example, suppose you must roll a six on a die to begin a game, how many rolls does this take on average? A cute method is to realize that if you miss on your first try, you average will be one more than the true average. So, avg = (1)(1/6) + (avg + 1)(5/6)
avg = 1/6 + (5/6)avg + 5/6
avg = 1 + (5/6)avg)
(1/6)avg = 1
avg = 6

Generally, if your chance of success is 1/n, it will take n trials on average for the first success.

You might know more about this than I do, but from what I understand, the number of heads in exactly n trials is a binomial random variable, with probability of k successes (heads) being:

P[X=k]= n!/[k!(n-k)!] * p^k*(1-p)^(n-k)

or more clearly:

1da936af4f7b569bf1eb0a709f124fa3.png


where p,r = .5 if the coin is fair.

So P[ensuring a head in exactly n trials] = n!/(n-1)!*p*(1-p)^(n-1)

where p = .5
Polaris is right, this is a geometric distribution. You don't have to bother with finding the binomial coefficient, because a geometric distribution stops after the first success. Since the "success" always occurs on the last spot only, it's not like a binomial distribution in that way.
 

ramseszerg

Professional
Yeah, for example, suppose you must roll a six on a die to begin a game, how many rolls does this take on average? A cute method is to realize that if you miss on your first try, you average will be one more than the true average. So, avg = (1)(1/6) + (avg + 1)(5/6)
avg = 1/6 + (5/6)avg + 5/6
avg = 1 + (5/6)avg)
(1/6)avg = 1
avg = 6

Generally, if your chance of success is 1/n, it will take n trials on average for the first success.


I don't understand this proof. What does each term in "avg = (1)(1/6) + (avg + 1)(5/6)" represent?
 

Steady Eddy

Legend
I don't understand this proof. What does each term in "avg = (1)(1/6) + (avg + 1)(5/6)" represent?
Two outcomes are possible on the first trial. Either a success, or a miss. If it's a success, then we score "1", (for one trial), and that will happen 1/6 of the time. If it's a miss, (which will happen 5/6 of the time), we have to try again. What is our expectation after a miss? Since the die has no memory, it is simply 1 more than than the average was previously. This sounds like circular thinking since we use what we're looking for in the right side of the equation, but it works!

Here's an alternative, (longer), way.

Avg = (1)(1/6) + (2)(5/6)(1/6) + (3)(5/6)(5/6)(1/6) + ...
Avg(5/6) =------(1)(5/6)(1/6) + (2)(5/6)(5/6)(1/6) + ...
By subtracting the bottom row from the top row, we get...
Avg(1/6) = (1)(1/6) + (1)(5/6)(1/6) + (1)(5/6)(5/6)(1/6) +...

Multiply each side by 6 and sum the infinite series and ya get...6!
 

mightyrick

Legend
Just something I learned in grade 12 stats. It's the number of tries you can expect to have before getting the event based on the probability of the event. For example, if the probability of the event is 10%, you can expect that after 10 tries you will get the event.

You can "expect" all you want. You can't ensure it. This whole question is ridiculous. At what point does 50% probability become 100% probablity? Never. Geez, let this thread die, already.
 

OTMPut

Hall of Fame
I don't understand this proof. What does each term in "avg = (1)(1/6) + (avg + 1)(5/6)" represent?

this is one nice example which illustrates how "casting in the language of mathematics" quickly leads to a solution.
i wish they make this point early enough in life. the point that math is a language and using it to express certain problems helps solve those problems relatively easily (just as language itself helps solve problems!).
 

OTMPut

Hall of Fame
You might know more about this than I do, but from what I understand, the number of heads in exactly n trials is a binomial random variable, with probability of k successes (heads) being:

P[X=k]= n!/[k!(n-k)!] * p^k*(1-p)^(n-k)

or more clearly:

1da936af4f7b569bf1eb0a709f124fa3.png


where p,r = .5 if the coin is fair.

So P[ensuring a head in exactly n trials] = n!/(n-1)!*p*(1-p)^(n-1)

where p = .5

the random variable he referred to was the number of throws before you need before you get your first head. this random variable has a geometric distribution.
 
Top