PDA

View Full Version : I need help working out the probability of this event occurring !!


Sirens
08-01-2003, 01:17 AM
Hi Guys,
Lets assume the probability of something occurring is 7/37 or roughy 0.189189
What is the probability of this even occurring four times in a row in (%) terms? Is the value 0.12811 % correct?
does this mean that roughly out of every 780 trials this event will only occur once??

_thankyou for your time_
Sirens

doormat
08-01-2003, 03:43 AM
The short answer is yes, if each "trial" is the start of 4 flips of a heavily biased coin for example. In that case it would actually take 783 flips since your first trial would be flips 1,2,3,4 and your 780th trial would be 780,781,782,783.

doormat

BruceZ
08-01-2003, 09:23 AM
The short answer is yes, if each "trial" is the start of 4 flips of a heavily biased coin for example. In that case it would actually take 783 flips since your first trial would be flips 1,2,3,4 and your 780th trial would be 780,781,782,783.

It isn't 783 flips, it's 780 TRIALS, but only when you define a single TRIAL as an entire SEQUENCE of flips that begins immediately after a failure, and either has 4 consecutive sucesses, or it ends in failure. Not every flip starts a new trial. So if S=success and F=failure, and you got SSFF, you would count that as 2 trials, one for SSF, and one for F. These trials are independent, but the individual flips are not independent with respect to starting a run. Then there are (37/7)^4 = 780.57518 trials, but there will be many more flips because there is more than 1 flip per trial on average. The average number of flips per trial is 1.23175 = 1*(30/37) + 2*(7/37)*(30/37) + 3*(7/37)^2*(30/37) + 4*(7/37)^3*(30/37) + 4*(7/37)^4. This is the EV of the number of flips per trial. Note that 3 in a row and 4 in a row both have 4 flips. The average number of flips in 780.57518 trials is 780.57518 * 1.23175 = <font color="red">961.47 flips</font>. This is called the mean recurrence time.

A formula for mean recurrence time u is:

u = (1 - p^r)/(qp^r)

Where p is the probability of success (7/37)
q is the probability of failure (30/37)
r is the number of times in a row (4)

u = [ 1 - (7/37)^4 ]/ [ (30/37)*(7/37)^4 ] = <font color="red">961.47 flips</font>

An interesting thing about mean recurrence time for success runs like this is that the answer changes for different patterns of success runs of the same length. For example, suppose we wanted to know how often SFFS occurred. Even though this sequence has the same length of 4, and the probability of it occuring on any given try is still (7/37)^4 as before, it turns out that the mean recurrence time is not the same. Another example is that a pattern of all heads or all tails occurs less frequently than other patterns of the same length consisting of both heads and tails. This counterintuitive fact can be understood by noting that these other sequences cannot be broken into trials as we did here. When one sequence fails, another can be starting up in the middle. The trials overlap, so there are effectively more trials for the same number of flips, hence it takes fewer flips for it to occur.

Was this a homework problem?

doormat
08-01-2003, 09:21 PM
Bruce,
I agree with your points and figures as you have defined "trial" but have a question. You are only considering it a trial if you have previously achieved success or failure, whereas I consider every flip to be the start of a trial, which means SSSSSF would be two successes in my "trials" and one success in yours. If every flip is the start of a new trial as was my intention, then I would still think that in any sequence of 783 flips that are recorded, on average you would find SSSS once from a unique starting point. Is that incorrect? I bow to your superior statistical skills.

doormat

BruceZ
08-06-2003, 06:58 AM
If every flip is the start of a new trial as was my intention, then I would still think that in any sequence of 783 flips that are recorded, on average you would find SSSS once from a unique starting point. Is that incorrect?

The original poster asked how long it would take for 4 successes in a row to occur. This is the mean waiting time. It will be the same for either of our definitions of trial, and it will be 961 flips. How often it will occur on average is the mean recurrence time. For my definition of trial, the mean recurssion time and the mean waiting time are the same, since once we get 4 in a row, the whole experiment repeats. By your definition, the mean recurrence time will not be the same, because once you get 4 in a row, it is very easy to get another 4 in a row just by getting one more success. The probability of that is just 10/37. So you can get bursts of success runs of 4 in a row spaced by about 961 flips. You will actually average more than 1 per 783 flips by your definition. For example, it takes 961 flips on average to get 4 in a row by my definition, but when this occurs you will get a second success run with probability 10/37, a third with probability (10/37)^2 and a fourth with probability (10/37)^3. On average then you will get at least one every

961/[ 1 + 2*(10/37) + 3*(10/37)^2 + 4*(10/37)^3) ] = 523 flips.

My definition of trial is what is now used in renewal theory and the theory of runs. It causes each trial to be a replica of the whole experiment. When this theory was first being developed, your definition was used. This led to a lot of complications, and the new definitions eliminate these while still preserving the results we are after.

BruceZ
08-06-2003, 07:54 AM
961/[ 1 + 2*(10/37) + 3*(10/37)^2 + 4*(10/37)^3) ] = 523 flips.

That should be:

961 / [ 1 + (10/37) + (10/37)^2 + (10/37)^3 +... ]

= 961*(1 - 10/37) = 701