MedVision ad

Nice probability question. (1 Viewer)

seanieg89

Well-Known Member
Joined
Aug 8, 2006
Messages
2,662
Gender
Male
HSC
2007
A man tosses a fair coin repeatedly until he throw n heads in a row. (n a positive integer).

What is the average number of tosses required?

If you cannot solve the general problem, feel free to post solutions for small values of n.
 

Squar3root

realest nigga
Joined
Jun 10, 2012
Messages
4,927
Location
ya mum gay
Gender
Male
HSC
2025
Uni Grad
2024
Just an educated guess; would it be: (1/2)^n ?

Im looking forward to the answer
 

seanieg89

Well-Known Member
Joined
Aug 8, 2006
Messages
2,662
Gender
Male
HSC
2007
Just an educated guess; would it be: (1/2)^n ?

Im looking forward to the answer
Not quite, the answer isn't that simple. (Also if you think about what the question is asking, it cannot be < 1).
 

Squar3root

realest nigga
Joined
Jun 10, 2012
Messages
4,927
Location
ya mum gay
Gender
Male
HSC
2025
Uni Grad
2024
Not quite, the answer isn't that simple. (Also if you think about what the question is asking, it cannot be < 1).
it never is :p

i just realised that

1/2 a throw?
my rationale was that P(head)= 1/2 and P(tail)= 1/2 and if you multiply it out n times it would be to the power of n. i can now see that it is clearly wrong
 

seanieg89

Well-Known Member
Joined
Aug 8, 2006
Messages
2,662
Gender
Male
HSC
2007
As with most of the things that I post here, this is a little tricky. (But it is in the easier 50% I reckon.)

I think a past HSC or well known trial question 8 has asked something like this with n=2? It seems vaguely familiar.
 

Sy123

This too shall pass
Joined
Nov 6, 2011
Messages
3,730
Gender
Male
HSC
2013
How does one even calculate an average?

Is it:



p_m being the probability of getting n heads in a row in m throws.
 

seanieg89

Well-Known Member
Joined
Aug 8, 2006
Messages
2,662
Gender
Male
HSC
2007
How does one even calculate an average?

Is it:



p_m being the probability of getting n heads in a row in m throws.
Yep, except to avoid ambiguity:

p_m is the probability of it taking exactly m throws to obtain the first string of n consecutive heads.
 

Sy123

This too shall pass
Joined
Nov 6, 2011
Messages
3,730
Gender
Male
HSC
2013
Alright, here we go:

First we establish that our flips can be expressed in a string of Hs and Ts representing Heads and Tails respectively. The structure of this string will have to be:

_ _ _ _ _ ...... _ T H H H H .... H

Note, that is an 'n' number of Hs in the end of this string, we need a T before it to start the "streak" of Hs in the end, the rest is arbitrary (with some restrictions**), totaling an 'm' number of digits in our string.

**The restrictions come about when the number of remaining spots to fill 'm-n-1' spots is greater than or equal to 'n'. Since this gives rise for a chance for the streak of n Hs to be established before the 'm' moves have happened.

So now we establish the necessary domains for p_m to evaluate it





The first is clear, the second is since there are only (n+1) slots that are fixed for each string (the end ones as illustrated in the first example). The rest of the slots can be filled arbitrarily.

Now the difficult one is to consider is when

It comes down to finding










And if my calculations are correct this diverges, what have I done wrong?
 

seanieg89

Well-Known Member
Joined
Aug 8, 2006
Messages
2,662
Gender
Male
HSC
2007
Alright, here we go:

First we establish that our flips can be expressed in a string of Hs and Ts representing Heads and Tails respectively. The structure of this string will have to be:

_ _ _ _ _ ...... _ T H H H H .... H

Note, that is an 'n' number of Hs in the end of this string, we need a T before it to start the "streak" of Hs in the end, the rest is arbitrary (with some restrictions**), totaling an 'm' number of digits in our string.

**The restrictions come about when the number of remaining spots to fill 'm-n-1' spots is greater than or equal to 'n'. Since this gives rise for a chance for the streak of n Hs to be established before the 'm' moves have happened.

So now we establish the necessary domains for p_m to evaluate it





The first is clear, the second is since there are only (n+1) slots that are fixed for each string (the end ones as illustrated in the first example). The rest of the slots can be filled arbitrarily.

Now the difficult one is to consider is when

It comes down to finding










And if my calculations are correct this diverges, what have I done wrong?
I will have a closer look at this soon, the approach was quite different to mine.

'nice' means 'simple'?
No, nice just means that there is an aesthetically pleasing solution. The end answer is very simple but the problem isn't that easy.
 
Last edited:

seanieg89

Well-Known Member
Joined
Aug 8, 2006
Messages
2,662
Gender
Male
HSC
2007
Alright, here we go:

First we establish that our flips can be expressed in a string of Hs and Ts representing Heads and Tails respectively. The structure of this string will have to be:

_ _ _ _ _ ...... _ T H H H H .... H

Note, that is an 'n' number of Hs in the end of this string, we need a T before it to start the "streak" of Hs in the end, the rest is arbitrary (with some restrictions**), totaling an 'm' number of digits in our string.

**The restrictions come about when the number of remaining spots to fill 'm-n-1' spots is greater than or equal to 'n'. Since this gives rise for a chance for the streak of n Hs to be established before the 'm' moves have happened.

So now we establish the necessary domains for p_m to evaluate it





The first is clear, the second is since there are only (n+1) slots that are fixed for each string (the end ones as illustrated in the first example). The rest of the slots can be filled arbitrarily.

Now the difficult one is to consider is when

It comes down to finding










And if my calculations are correct this diverges, what have I done wrong?
I am not quite sure what you are doing in the calculation in your third case (if you cannot find any error in your reasoning then can you explain a little clearer please?), but that calculation shouldn't be so simple. After all, it's possible for things to happen like a string containing several occurrences of n consecutive heads. (This cannot be the main problem in your working, but its an example of why things can be tricky to do this way.)

Your P(m-n-1) should depend on m. (Because for example for very large m, a very large proportion of the strings of length (m-n-1) will contain n consecutive heads somewhere.)

I am not certain everything else is right, but this is the most glaring issue.
 

RealiseNothing

what is that?It is Cowpea
Joined
Jul 10, 2011
Messages
4,591
Location
Sydney
Gender
Male
HSC
2013
I'm getting at the moment. Need to check this is right then convert it to an expected average amount of throws.
 

RealiseNothing

what is that?It is Cowpea
Joined
Jul 10, 2011
Messages
4,591
Location
Sydney
Gender
Male
HSC
2013
Thinking about the question would it make more sense if the series converges though?

Or does it make more sense by diverging?

Imo I would expect it to converge.
Exactly, which is why both me and Sy were questioning what we did wrong.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top