Actually, we'll go ahead and solve a more general problem -- the case of tossing n coins up to k times in the manner described.
First, note that when tossing one coin k times, the probability that you will win is on minus the probability that it will come up tails all k times, or 1 - 1/2^k. Now, consider the case of tossing n coins -- we can keep track of each coin individually, since whether one coin has come up heads in the past does not affect the performance of any other coin. So this is the same as playing n independent one-coin games simultaneously, and you win the large game iff you win all n one-coin games. Thus, the probability of winning an n-coin, k-round game is (1 - 1/2^k)^n.
Taking this particular case, we see that the probability of winning a 5-coin, 3-round game is (1-1/8)^5 = (7/8)^5 = 16807/32768 = 0.512908935546875. Since this is greater than 1/2, you should play the game if you are offered even money.
2007-10-11 05:39:34
·
answer #1
·
answered by Pascal 7
·
5⤊
0⤋
I read the problem differently then the others who have answered. I read it as if I flip the five coins and toss two heads, then I keep the two heads and flip the other three coins. If when flipping these three coins I flip two heads I keep these two heads and flip the last coin once again. if this last coin comes up heads I win. If it comes up tails I lose. In other words you only continue to flip coins that have landed tails and the game stops when you have flipped five heads or have had a toss with no heads.
I will use some short hand for this. It might lot look like short hand, but this is the function in R (www.r-project.org) for getting binomial probabilities.
if X is a binomial random variable with n trials and success probability p then:
P(X = x) = dbinom(x, n, p)
P(win | 5 heads on first toss) = dbinom(5, 5, 0.5) = 0.03125
P(win | 4 heads on first toss)
= dbinom(4, 5, 0.5) * (dbinom(1, 1, 0.5)) = 0.078125
P(win | 3 heads on first toss)
= dbinom(3, 5, 0.5) * (dbinom(2, 2, 0.5) + dbinom(1, 2, 0.5) * dbinom(1, 1, 0.5))
= 0.15625
P(win | 2 heads on first toss)
= dbinom(2, 5, 0.5) * (dbinom(3, 3, 0.5) + dbinom(2, 3, 0.5) * dbinom(1, 1, 0.5) + dbinom(1, 3, 0.5) * (dbinom(2, 2, 0.5) + dbinom(1, 2, 0.5) * dbinom(1, 1, 0.5)))
= 0.15625
P(win | 1 head on first toss) = dbinom(1, 5, 0.5) * ( dbinom(4, 4, 0.5) + dbinom(3, 4, 0.5) * dbinom(1, 1, 1/2) + dbinom(2, 4, 1/2) * (dbinom(2, 2, 0.5) + dbinom(1, 2, 0.5) * dbinom(1, 1, 0.5)) + dbinom(1, 4, 0.5) * ((dbinom(3, 3, 0.5) + dbinom(2, 3, 0.5) * dbinom(1, 1, 0.5) + dbinom(1, 3, 0.5) * (dbinom(2, 2, 0.5) + dbinom(1, 2, 0.5) * dbinom(1, 1, 0.5)))))
= 0.078125
P(win | 0 heads on first toss) = 0
sorry that the above is difficult to read, but there is a recursive function to this, i just wrote it out explicitly. it works by considering the different ways to get to five heads without having a toss of all tails.
if you sum up all the probabilities you find the solution to be 50%.
as such you will not win or lose any money in the long run so go play for fun.
-------------
to get the solution for only getting three tosses i will use the same equations but remove the parts requiring a fourth toss.
P(win | 5 heads on first toss) = dbinom(5, 5, 0.5) = 0.03125
P(win | 4 heads on first toss)
= dbinom(4, 5, 0.5) * (dbinom(1, 1, 0.5)) = 0.078125
P(win | 3 heads on first toss)
= dbinom(3, 5, 0.5) * (dbinom(2, 2, 0.5) + dbinom(1, 2, 0.5) * dbinom(1, 1, 0.5))
= 0.15625
P(win | 2 heads on first toss)
= dbinom(2, 5, 0.5) * (dbinom(3, 3, 0.5) + dbinom(2, 3, 0.5) * dbinom(1, 1, 0.5))
= 0.09765625
P(win | 1 head on first toss) = dbinom(1, 5, 0.5) * ( dbinom(4, 4, 0.5) + dbinom(3, 4, 0.5) * dbinom(1, 1, 1/2) + dbinom(2, 4, 1/2) * (dbinom(2, 2, 0.5)) + dbinom(1, 4, 0.5) * ((dbinom(3, 3, 0.5)))) = 0.04882812
the sum of these probabilities is 0.3339844, so don't play the game, you will lose money in the long run.
2007-10-13 19:08:53
·
answer #3
·
answered by Merlyn 7
·
0⤊
1⤋