Flipping a coin (similar to the ballot problem)

  • Thread starter Thread starter Random Variable
  • Start date Start date
AI Thread Summary
The discussion revolves around calculating the probability that the number of heads flipped is always greater than the number of tails when flipping a coin n times, with a probability p for heads. Initial attempts to solve the problem involve identifying patterns in small values of n and defining a recursive function H(n,k) to represent valid sequences. The challenge lies in deriving a formula or summation for H(n,k) to facilitate computation. Participants suggest that framing the problem in mathematical terms and recognizing the underlying probability distribution may provide insights. The conversation emphasizes the complexity of the problem and the need for a structured approach to find a solution.
Random Variable
Messages
114
Reaction score
0

Homework Statement



You flip a coin n times. The probabilty of getting a head on any flip is p. What is the probability that the number of heads flipped is always greater than the number of tails flipped?

The Attempt at a Solution



For example,

if n=1, the only possibility is H
if n=2, the only possibility is HH
if n=3, the two possibilities are HHH or HHT
if n=4, the three possibilites are HHHH, HHHT, or HHTH
if n=5, the six possibilites are HHHHH, HHHHT, HHHTT, HHHTH, HHTHH, and HHTHT

Of course you could keep doing this until you notice a pattern, take a guess at the formula, and then try to prove that forumula by induction. (I tried that approach but didn't get anywhere). Conditioning on the first flip clearly won't simplify the problem, and conditioning on the (n-1) flip or the nth flip doesn't seem to simplify matters either. I'm stumped.
 
Physics news on Phys.org
There's more possibility to n=3 and n=4 isn't it?


HHH, HHT, HTH, THH?
 
SiYuan said:
There's more possibility to n=3 and n=4 isn't it?


HHH, HHT, HTH, THH?

No. After every flip the total number of heads flipped up to that point must be greater than the number of tails flipped up to that point.
 
I'll tell you where I am so far. Let H(n,k) be the number of good sequences of length n (where heads lead all the time) and k is number of heads-number of tails. You can just define H(n,k)=0 if k>n or k<=0. Ok, so far? Write a recursion relation for H(n+1,k) in terms of H(n,...). That's easy. Now take the whole list [H(n,n),H(n,n-1)...H(n,1)] and figure out how to use it to construct the list [H(n+1,n+1),H(n+1,n),...,H(n+1,1)]. It's pretty easy. You just take the original list, chop off a bit, add some zeros in two different ways and add them. That let's you write a really simple computer program to compute the H(n+1) list from the H(n) list. That's great. Now that you have a simple way to construct the recursion you sit back an wait for your intuition to kick and tell you how to sum the whole thing up. Unfortunately, I'm still waiting. Any good ideas?
 
Random Variable said:
You flip a coin n times. The probabilty of getting a head on any flip is p. What is the probability that the number of heads flipped is always greater than the number of tails flipped?

I would suggest writing the question in mathematical terms to see what you are missing.

HINT: What type of probability distribution is this?

CS
 
I tried to combine those 2 formulas but it didn't work. I tried using another case where there are 2 red balls and 2 blue balls only so when combining the formula I got ##\frac{(4-1)!}{2!2!}=\frac{3}{2}## which does not make sense. Is there any formula to calculate cyclic permutation of identical objects or I have to do it by listing all the possibilities? Thanks
Since ##px^9+q## is the factor, then ##x^9=\frac{-q}{p}## will be one of the roots. Let ##f(x)=27x^{18}+bx^9+70##, then: $$27\left(\frac{-q}{p}\right)^2+b\left(\frac{-q}{p}\right)+70=0$$ $$b=27 \frac{q}{p}+70 \frac{p}{q}$$ $$b=\frac{27q^2+70p^2}{pq}$$ From this expression, it looks like there is no greatest value of ##b## because increasing the value of ##p## and ##q## will also increase the value of ##b##. How to find the greatest value of ##b##? Thanks
Back
Top