1

How can I calculate the probablity of an event to reoccur 9 times in a row within 6000 trials if there is a 1/3 chance of the event to occur in a single trial.

Rube
  • 11
  • Hi and welcome! Two pieces of advice: 1) Please use LaTeX markup. It makes your question easier to read and it makes it much more likely you'll get a nice response. 2) Please give some detail about what you know or have tried for tackling your problem. It makes it easier to help you. – The Count Dec 01 '16 at 02:31
  • 1
    Here's a link to the answer I found most helpful: http://math.stackexchange.com/questions/417762/probability-of-20-consecutive-success-in-100-runs – Rube Dec 01 '16 at 07:44

2 Answers2

0

This is a Bernoulli process, so you can use:

$$P(k)=\binom{n}{k}p^kq^{n-k}$$

where $n=6000$, $k=9$, $p={1\over3}$ and $q=1-p={2\over3}$:

$$P(9)=\binom{6000}{9}\left(\frac{1}{3}\right)^9\left({2\over3}\right)^{6000-9}\approx4,98*10^{-1059}$$

I saw that you wrote "an event to reoccur 9 times in a row"...in this case it is different and we have:

$$P(9)=5992p^kq^{n-k}=5992\left(\frac{1}{3}\right)^9\left({2\over3}\right)^{6000-9}\approx 3.3*10^{-1056}$$

but someone check it please.

MattG88
  • 2,574
  • So what is the probability? I am not sure how to calculate that.. i keep getting 0. – Rube Dec 01 '16 at 03:01
  • You've computed the probability of "the event occurs 9 times in a row and in no other trials." – angryavian Dec 01 '16 at 03:02
  • @angryavian Yes, the last calculation is the probability that "the event occurs 9 times in a row and in no other trials", if I'm not missing something... – MattG88 Dec 01 '16 at 03:07
  • @MattG88 Right. But I think OP is asking for the probability of the event occurring 9 times in a row somewhere in the $6000$ trials. For example, if the event occurred $6000$ times, that would be ok. – angryavian Dec 01 '16 at 03:10
  • I agree with @angryavian comment – Brandon Dec 01 '16 at 03:12
  • 1
    Yes @angryavian I'm asking for the probabily of the event to occur 9 times in a row at any time within 6000 trials. If it occurs 9 times in a row, the trial stops. wasnt sure how to calculate the binomial coefficient. – Rube Dec 01 '16 at 03:20
  • 1
    If the number of trials increase, does that make the probabilty increase too. I can't see it in the equation but i know it should. – Rube Dec 01 '16 at 03:25
0

I will focus on the complementary probability that in $~6000~$ consecutive (independent) Bernoulli trials, at no point is there an occurrence of $~9~$ consecutive successes. The math is somewhat complicated. However, this response provides the formulas needed in order to have a computer program compute the exact probability.

Let $~S~$ denote the collection of all possible occurrences of the $~6000~$ trials. Since each trial either fails or succeeds, you have that $~|S| = 2^{6000}.$

For $~k \in \Bbb{Z_{\geq 0}}, ~k \leq 6000,~$ let $~S_k~$ denote the subset of $~S~$ that represents having exactly $~k~$ failures. Therefore,

$$|S_k| = \binom{6000}{k}.$$

For any element $~x \in S_k,~$ where $~x~$ represents a set of $~6000~$ trials that had exactly $~k~$ failures, the probability of the element $~x~$ occurring is

$$p(k) = \left[ ~\frac{2}{3} ~\right]^k \times \left[ ~\frac{1}{3} ~\right]^{6000 - k} = \frac{2^k}{3^{6000}}.$$

Let $~g(k)~$ denote the number of elements in $~S_k~$ that represent a set of $~6000~$ trials, where

  • There were exactly $~k~$ failures.
  • At no point in the set of $~6000~$ trials, was there an occurrence of $~9~$ consecutive successes.

Then, the desired computation is

$$\sum_{k=0}^{6000} \left[ ~p(k) \times g(k) ~\right] = \frac{1}{3^{6000}} \times \left[ ~2^k \times g(k) ~\right].$$

So, the problem is reduced to providing a formula for $~g(k).$


Consider the following tableau

-F----F-------F...F---F---

which represents $~k~$ failures distributed among $~6000~$ positions. These $~k~$ failures create $~(k+1)~$ islands, and the total size of the sum of these islands is $~6000 - k.~$

For $~i \in \{1,2,\cdots,x_{k+1}\},~$ let $~x_i~$ denote the size of the $~i$-th island. Now consider the following enumeration problem: compute the number of solutions to

  • $x_1 + x_2 + \cdots + x_{k+1} = 6000 - k.$

  • $x_1, x_2, \cdots, x_{k+1} \in \Bbb{Z_{\geq 0}}.$

  • $~x_1, x_2, \cdots, x_{k+1} \leq 8.$

The number of solutions will exactly equal $~g(k).~$ That is, the distribution of the $~k~$ failures is precisely determined by the size of the variables $~x_1,x_2,\cdots,x_{k+1}.~$ Further, there will be no occurrence of $~9~$ (or more) consecutive successes if and only if each of the variables $~x_1,x_2,\cdots,x_{k+1}~$ is less than $~9.~$

So, the entire problem has been reduced to performing the above computation, as a function of $~k.~$ The first thing to do is determine the lower bound for $~k.~$ You need

$$8 \times (k+1) \geq 6000 - k \implies 9k \geq 5992 \implies k \geq 666.$$

Therefore, for $~k < 666,~$ you have that $~g(k) = 0.~$ So now, without loss of generality, $~k \geq 666.$

To compute $~g(k),~$ I will follow the model in this answer, which provides a blueprint of how to combine Inclusion-Exclusion with Stars-And-Bars to attack this generic type of problem.

First, assume that if $~a \in \Bbb{Z_{\geq 0}},~$ and $~b \in \Bbb{Z},~$ that

  • $\displaystyle b < 0 \implies \binom{b}{a} = 0.$

  • $\displaystyle b < a \implies \binom{b}{a} = 0.$

Now, assume that $~k~$ is some fixed element in $~\{666, 667, \cdots, 6000\},~$ and define:

  • $\displaystyle T_0 = \binom{k+1}{0} \times \binom{6000 - [9 \times 0]}{k}.$
  • $\displaystyle T_1 = \binom{k+1}{1} \times \binom{6000 - [9 \times 1]}{k}.$
  • $\displaystyle T_2 = \binom{k+1}{2} \times \binom{6000 - [9 \times 2]}{k}.$
  • Similarly, for $~r \in \{3,4,\cdots,k+1\},$

    $\displaystyle T_r = \binom{k+1}{r} \times \binom{6000 - [9 \times r]}{k}.$

Then, following the analysis in the linked article,

$$g(k) = \sum_{r=0}^{k+1} (-1)^{r+1} T_r.$$


$\underline{\text{Final Summary}}$

The probability of no occurrence of $~9~$ consecutive successes can be computed as follows:

For $~k \in \{666,667,\cdots,6000\}~$:

$$p(k) = \frac{2^k}{3^{6000}}.$$

Assuming that $~k~$ is fixed:

$$T_0 = \binom{k+1}{0} \times \binom{6000 - [9 \times 0]}{k}.$$

$$T_1 = \binom{k+1}{1} \times \binom{6000 - [9 \times 1]}{k}.$$

$$T_2 = \binom{k+1}{2} \times \binom{6000 - [9 \times 2]}{k}.$$

For $~r \in \{3,4,\cdots,k+1\},$

$$T_r = \binom{k+1}{r} \times \binom{6000 - [9 \times r]}{k}.$$

$$g(k) = \sum_{r=0}^{k+1} (-1)^{r+1} T_r.$$

Then, the overall computation of the probability of no occurrences of 9 consecutive successes is

$$\sum_{k=666}^{6000} \left[ ~p(k) \times g(k) ~\right].$$

user2661923
  • 42,303
  • 3
  • 21
  • 46