Expected number of events to get a certain outcome

shylock92

New member
Joined
Dec 1, 2016
Messages
3
I have a formula to get 5 consecutive heads or tails from a repetitive coin flip that says the expected number of flips to see 5 heads in a row is 62.

2(2power5-1)=62

To get 30 heads or tails in a row this gives me

2(2power30-1)=2147483646

Is this correct, that's over 2 billion flips before expecting to see a run like this, seems far too high.

Would be most grateful if someone could answer this query and also provide a formula from 5000 flips which tells me the probability of seeing this run of 30 consecutive heads or tails.

Many Thanks in advance
 
Actually I think the first scenario was just for heads not either 5 heads or 5 tails. The 2nd problem is basically asking how big a sample size to expect for a consecutive run of 30 heads OR tails.

So perhaps just (2power30)-1 for either occurrence to give 1073741823

when i prog this into LOG (samplesize)/-LOG(1-probability) it does indeed come out the expected longest streak for 1073741823 flips is 30.

For 5000 flips i have an expected longest streak value of 12.29.

So what's needed now is to gain a probability for seeing a streak of 30 (H or T) from a sample of 5000 flips?
1073741823

 
Top