Probability of binary consecutive occurence with unequal probability

In summary: Re: Probability of binary consecutive occurence with uneqaul probabilityIn summary, the conversation discusses calculating the expected number of consecutive occurrences of 0 or 1 with unequal probabilities in a given N-length binary series. The formula for calculating this is provided, along with an example for when the probabilities are equal. The conversation also explores the possibility of using the Monte Carlo method to calculate an estimate, and clarifies the use of probabilities in relation to symbols and strings of symbols.
  • #1
cygi1989
4
0
I have been with this to some forums but it didn't help and I was advised to come to this one, so here is the question.

My task is to compute given N - length binary series and P = p(0) and 1-P = p(1) expected number of consecutive occurence of 0 or 1 of k - length.
For example 10011100 has one serie of 1 with length 1 and one serie with length 3,
and also have two series of 0 of length 2.
I know that when the probability of 0 and 1 is equal than
Expected number of series of 0 or 1 of k-lenth in n-length binary numbers is = (n-k+3)/2^(k+2).
But what the case when probability of 0 is for example (0.4) or any another?

Sebastian
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
Re: Probability of binary consecutive occurence with uneqaul probability

In order to clarify the question let's consider an example: if $p(0)=p(1)=\frac{1}{2}$ what is the probability to have a sequence of three ones in a string of four binary symbols?... in this case the possible strings are 1110 and 0111 on a total of 16 strings so that the requested probability is $\displaystyle P=\frac{2}{16}=\frac{1}{8}$...

Is that correct?...

Kind regards

$\chi$ $\sigma$
 
  • #3
Re: Probability of binary consecutive occurence with uneqaul probability

Yes, it's correct.
Regards to my formula it gives
(4 - 3 + 3 ) / (2^ 5) = 4 / 32 = 1 / 8.
My exact task is to find expected number of series of k - lenth for k = 1 .. 6, with P(1) = 800 / 2007 and N = 2007
 
  • #4
Re: Probability of binary consecutive occurence with uneqaul probability

cygi1989 said:
Yes, it's correct.
Regards to my formula it gives
(4 - 3 + 3 ) / (2^ 5) = 4 / 32 = 1 / 8.
My exact task is to find expected number of series of k - lenth for k = 1 .. 6, with P(1) = 800 / 2007 and N = 2007

Does this need to be an exact closed form solution or will an Monte-Carlo estimate be OK?

CB
 
  • #5
Re: Probability of binary consecutive occurence with uneqaul probability

Exact result will be better I guess because I have calculated estimation by myself (I run this test for 1000 esembles) and I need to compare my result with expected ones. Anyway, what result will come from Monte Carlo method and how to calculate it?
 
  • #6
Re: Probability of binary consecutive occurence with uneqaul probability

cygi1989 said:
Exact result will be better I guess because I have calculated estimation by myself (I run this test for 1000 esembles) and I need to compare my result with expected ones. Anyway, what result will come from Monte Carlo method and how to calculate it?

It sounds like you already have a Monte-Carlo estimate (which would be produced by generating random strings of length 2007 and counting run lengths for lengths 1..6 and dividing the totals by 2007).

CB
 
  • #7
Re: Probability of binary consecutive occurence with uneqaul probability

cygi1989 said:
I have been with this to some forums but it didn't help and I was advised to come to this one, so here is the question.

My task is to compute given N - length binary series and P = p(0) and 1-P = p(1) expected number of consecutive occurence of 0 or 1 of k - length.
For example 10011100 has one serie of 1 with length 1 and one serie with length 3,
and also have two series of 0 of length 2.
I know that when the probability of 0 and 1 is equal than
Expected number of series of 0 or 1 of k-lenth in n-length binary numbers is = (n-k+3)/2^(k+2).
But what the case when probability of 0 is for example (0.4) or any another?

Sebastian

Let p the probability of the symbol 1 [and 1-p the probability of the symbol 0...]. A sequence of k consecutive ones is detected if in a string of k+2 symbols the first and the last are 0 and all others are 1. The probability of such a recurrence is...

$\displaystyle P_{k}= p^{k}\ (1-p)^{2}$ (1)

... and because in a sequence of n symbols there are n-k+3 possible subsequence on k+2 symbols, the expected number of k consecutive 1 is...

$\displaystyle E_{n,k}= (n-k+3)\ P_{k}=(n-k+3)\ p^{k}\ (1-p)^{2}$ (2)

For $p=\frac{1}{2}$ we find Your formula...

Kind regards

$\chi$ $\sigma$
 
  • #8
Re: Probability of binary consecutive occurence with uneqaul probability

chisigma said:
Let p the probability of the symbol 1 [and 1-p the probability of the symbol 0...]. A sequence of k consecutive ones is detected if in a string of k+2 symbols the first and the last are 0 and all others are 1. The probability of such a recurrence is...

$\displaystyle P_{k}= p^{k}\ (1-p)^{2}$ (1)

... and because in a sequence of n symbols there are n-k+3 possible subsequence on k+2 symbols, the expected number of k consecutive 1 is...

And are they independent/uncorrelated?

CB
 
  • #9
Re: Probability of binary consecutive occurence with uneqaul probability

CaptainBlack said:
And are they independent/uncorrelated?

CB

Is the 'they' related to the symbols, to the strings of k+2 symbols or to something else... please?...

Kind regards

$\chi$ $\sigma$
 
  • #10
Re: Probability of binary consecutive occurence with uneqaul probability

chisigma said:
Is the 'they' related to the symbols, to the strings of k+2 symbols or to something else... please?...

Kind regards

$\chi$ $\sigma$

The strings of k+2 symbols.

CB
 
  • #11
Re: Probability of binary consecutive occurence with uneqaul probability

CaptainBlack said:
The strings of k+2 symbols.

CB

Very well!... let's suppose to have a sequence of random binary symbols $a_{i}$ and, independently from i, is $P\{a_{i}=1\} = p \implies P\{a_{i}=0\}=1-p$. Now we consider a subsequence of k+2 consecutive symbols $\overrightarrow {a}_{i}= [a_{i},a_{i+1}, ... , a_{i+k+1}]$. Independently from i is...

$\displaystyle P_{i,k}=P\{\overrightarrow {a}_{i}= [0,1, ... . 1, 0]\}= p^{k}\ (1-p)^2$ (1)

... so that, if You observe m subsequences of k+2 consecutive symbols, the expected value of times on which is $\overrightarrow {a}_{i}= [0,1, ... , 1, 0]$ is $m\ P_{i,k}$...

Kind regards

$\chi$ $\sigma$
 
  • #12
Re: Probability of binary consecutive occurence with uneqaul probability

chisigma said:
Let p the probability of the symbol 1 [and 1-p the probability of the symbol 0...]. A sequence of k consecutive ones is detected if in a string of k+2 symbols the first and the last are 0 and all others are 1. The probability of such a recurrence is...

$\displaystyle P_{k}= p^{k}\ (1-p)^{2}$ (1)

... and because in a sequence of n symbols there are n-k+3 possible subsequence on k+2 symbols, the expected number of k consecutive 1 is...

$\displaystyle E_{n,k}= (n-k+3)\ P_{k}=(n-k+3)\ p^{k}\ (1-p)^{2}$ (2)

For $p=\frac{1}{2}$ we find Your formula...

Kind regards

$\chi$ $\sigma$

Absolutely brilliant. Many thanks!
 

FAQ: Probability of binary consecutive occurence with unequal probability

What is the definition of probability of binary consecutive occurrence with unequal probability?

The probability of binary consecutive occurrence with unequal probability refers to the likelihood of two binary events happening in a row, where the probabilities of the events are not equal.

How is the probability of binary consecutive occurrence with unequal probability calculated?

The probability of binary consecutive occurrence with unequal probability can be calculated by multiplying the probability of the first event by the probability of the second event. For example, if the probability of event A is 0.4 and the probability of event B is 0.6, then the probability of both events occurring in a row is 0.4 * 0.6 = 0.24.

What is the difference between independent and dependent events in terms of probability of binary consecutive occurrence with unequal probability?

In independent events, the probability of one event occurring does not affect the probability of the other event occurring. In this case, the probability of binary consecutive occurrence with unequal probability is calculated by multiplying the individual probabilities. In dependent events, the probability of one event occurring can affect the probability of the other event occurring, and the calculation of the probability of binary consecutive occurrence with unequal probability is more complex.

How can the concept of probability of binary consecutive occurrence with unequal probability be applied in real life?

This concept can be applied in various fields such as gambling, finance, and sports. For example, in gambling, the probability of consecutive wins or losses can be calculated to inform betting strategies. In finance, the probability of consecutive positive or negative market movements can be used in risk management. In sports, the probability of a team winning or losing multiple games in a row can be analyzed for performance predictions.

What are some limitations of using the probability of binary consecutive occurrence with unequal probability?

One limitation is that it assumes that the events are independent, which may not always be the case in real life. Additionally, it only considers two events in a row and does not account for longer sequences. Furthermore, the probability of an event occurring can change over time, making it difficult to accurately predict consecutive occurrences. It is important to consider these limitations when applying this concept in practical situations.

Similar threads

Back
Top