Conditional probability for consecutive Bernoulli trials
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
3
down vote
favorite
Independent trials, each of which is a success with probability $p$, are performed until there are $k$ consecutive successes. Let $N_k$ denote the number of necessary trials to obtain $k$ consecutive
successes, and show that:
$$mathbbE(N_k|N_kâÂÂ1) = N_kâÂÂ1 + 1 + (1 â p)mathbbE(N_k).$$
stochastic-processes conditional-expectation
add a comment |Â
up vote
3
down vote
favorite
Independent trials, each of which is a success with probability $p$, are performed until there are $k$ consecutive successes. Let $N_k$ denote the number of necessary trials to obtain $k$ consecutive
successes, and show that:
$$mathbbE(N_k|N_kâÂÂ1) = N_kâÂÂ1 + 1 + (1 â p)mathbbE(N_k).$$
stochastic-processes conditional-expectation
add a comment |Â
up vote
3
down vote
favorite
up vote
3
down vote
favorite
Independent trials, each of which is a success with probability $p$, are performed until there are $k$ consecutive successes. Let $N_k$ denote the number of necessary trials to obtain $k$ consecutive
successes, and show that:
$$mathbbE(N_k|N_kâÂÂ1) = N_kâÂÂ1 + 1 + (1 â p)mathbbE(N_k).$$
stochastic-processes conditional-expectation
Independent trials, each of which is a success with probability $p$, are performed until there are $k$ consecutive successes. Let $N_k$ denote the number of necessary trials to obtain $k$ consecutive
successes, and show that:
$$mathbbE(N_k|N_kâÂÂ1) = N_kâÂÂ1 + 1 + (1 â p)mathbbE(N_k).$$
stochastic-processes conditional-expectation
stochastic-processes conditional-expectation
edited Sep 25 at 4:58
Ben
15.3k12181
15.3k12181
asked Sep 25 at 3:54
Dihan
184
184
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
2
down vote
accepted
You are conditioning on $N_k-1$, which means you are conditioning on the fact that you have $k-1$ consecutive successes. Let $X sim textBern(p)$ be the outcome of the next trial and consider the cases:
- If $X=1$ then you now have $k$ consecutive successes;
- If $X=0$ then you now have $0$ consecutive successes and you have to start all over again.
Hence, by application of the law-of-total probability you have:
$$beginequation beginaligned
mathbbE(N_k|N_k-1)
&= mathbbP(X=1|N_k-1) mathbbE(N_k|N_k-1,X=1) + mathbbP(X=0|N_k-1) mathbbE(N_k|N_k-1,X=0) \[6pt]
&= p mathbbE(N_k|N_k-1,X=1) + (1-p) mathbbE(N_k|N_k-1,X=0) \[6pt]
&= p(N_k-1+1) + (1-p) (N_k-1+1 + mathbbE(N_k)) \[6pt]
&= p(N_k-1+1) + (1-p) (N_k-1+1) + (1-p) mathbbE(N_k) \[6pt]
&= N_k-1+1 + (1-p) mathbbE(N_k). \[6pt]
endaligned endequation$$
Thank you so much. make sense
â Dihan
Sep 25 at 6:17
add a comment |Â
up vote
2
down vote
I'll give you the basic reasoning here, but you can write it out formally yourself.
Let $N_k$ be the number of trials necessary to obtain $k$ consecutive successes.
We want to show
$$E[ N_k | N_k-1]= N_k-1 + 1 + (1-p)E[N_k]$$
Firstly, given $N_k-1$, consider the possible values of $N_k-1+1$. If the trial immediately following the $N_k-1$'th trial is a success, then clearly $N_k = N_k-1+1$ with probability $p$.
Next, suppose the trial following $N_k-1$ is a failure. So that we have $N_k-1+1$ total trails with the last one being a failure. Well, since the last one is a failure, then by the independence of each trial, under this situation we would have the conditional expected number of trials until $k$ consecutive successes as
$$N_k-1 + 1 + E[N_k]$$
Since we already have $N_k-1 + 1$ trials, but the last one being a failure "resets" our expectation back to $E[N_k]$.
Hence you can express the original expectation as
$$E[ N_k | N_k-1]= p(N_k-1 + 1) + (1-p)(N_k-1 + 1 + E[N_k])$$
$$=N_k-1 + 1 + (1-p)E[N_k]$$
This answer uses the law of total expectation: $E[ E[X|Y] ] = E[X]$. Here we take $Y$ as the result of the $N_k-1+1$ trial, and $X$ as $N_k|N_k-1$.
Thank you so much
â Dihan
Sep 25 at 6:16
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
You are conditioning on $N_k-1$, which means you are conditioning on the fact that you have $k-1$ consecutive successes. Let $X sim textBern(p)$ be the outcome of the next trial and consider the cases:
- If $X=1$ then you now have $k$ consecutive successes;
- If $X=0$ then you now have $0$ consecutive successes and you have to start all over again.
Hence, by application of the law-of-total probability you have:
$$beginequation beginaligned
mathbbE(N_k|N_k-1)
&= mathbbP(X=1|N_k-1) mathbbE(N_k|N_k-1,X=1) + mathbbP(X=0|N_k-1) mathbbE(N_k|N_k-1,X=0) \[6pt]
&= p mathbbE(N_k|N_k-1,X=1) + (1-p) mathbbE(N_k|N_k-1,X=0) \[6pt]
&= p(N_k-1+1) + (1-p) (N_k-1+1 + mathbbE(N_k)) \[6pt]
&= p(N_k-1+1) + (1-p) (N_k-1+1) + (1-p) mathbbE(N_k) \[6pt]
&= N_k-1+1 + (1-p) mathbbE(N_k). \[6pt]
endaligned endequation$$
Thank you so much. make sense
â Dihan
Sep 25 at 6:17
add a comment |Â
up vote
2
down vote
accepted
You are conditioning on $N_k-1$, which means you are conditioning on the fact that you have $k-1$ consecutive successes. Let $X sim textBern(p)$ be the outcome of the next trial and consider the cases:
- If $X=1$ then you now have $k$ consecutive successes;
- If $X=0$ then you now have $0$ consecutive successes and you have to start all over again.
Hence, by application of the law-of-total probability you have:
$$beginequation beginaligned
mathbbE(N_k|N_k-1)
&= mathbbP(X=1|N_k-1) mathbbE(N_k|N_k-1,X=1) + mathbbP(X=0|N_k-1) mathbbE(N_k|N_k-1,X=0) \[6pt]
&= p mathbbE(N_k|N_k-1,X=1) + (1-p) mathbbE(N_k|N_k-1,X=0) \[6pt]
&= p(N_k-1+1) + (1-p) (N_k-1+1 + mathbbE(N_k)) \[6pt]
&= p(N_k-1+1) + (1-p) (N_k-1+1) + (1-p) mathbbE(N_k) \[6pt]
&= N_k-1+1 + (1-p) mathbbE(N_k). \[6pt]
endaligned endequation$$
Thank you so much. make sense
â Dihan
Sep 25 at 6:17
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
You are conditioning on $N_k-1$, which means you are conditioning on the fact that you have $k-1$ consecutive successes. Let $X sim textBern(p)$ be the outcome of the next trial and consider the cases:
- If $X=1$ then you now have $k$ consecutive successes;
- If $X=0$ then you now have $0$ consecutive successes and you have to start all over again.
Hence, by application of the law-of-total probability you have:
$$beginequation beginaligned
mathbbE(N_k|N_k-1)
&= mathbbP(X=1|N_k-1) mathbbE(N_k|N_k-1,X=1) + mathbbP(X=0|N_k-1) mathbbE(N_k|N_k-1,X=0) \[6pt]
&= p mathbbE(N_k|N_k-1,X=1) + (1-p) mathbbE(N_k|N_k-1,X=0) \[6pt]
&= p(N_k-1+1) + (1-p) (N_k-1+1 + mathbbE(N_k)) \[6pt]
&= p(N_k-1+1) + (1-p) (N_k-1+1) + (1-p) mathbbE(N_k) \[6pt]
&= N_k-1+1 + (1-p) mathbbE(N_k). \[6pt]
endaligned endequation$$
You are conditioning on $N_k-1$, which means you are conditioning on the fact that you have $k-1$ consecutive successes. Let $X sim textBern(p)$ be the outcome of the next trial and consider the cases:
- If $X=1$ then you now have $k$ consecutive successes;
- If $X=0$ then you now have $0$ consecutive successes and you have to start all over again.
Hence, by application of the law-of-total probability you have:
$$beginequation beginaligned
mathbbE(N_k|N_k-1)
&= mathbbP(X=1|N_k-1) mathbbE(N_k|N_k-1,X=1) + mathbbP(X=0|N_k-1) mathbbE(N_k|N_k-1,X=0) \[6pt]
&= p mathbbE(N_k|N_k-1,X=1) + (1-p) mathbbE(N_k|N_k-1,X=0) \[6pt]
&= p(N_k-1+1) + (1-p) (N_k-1+1 + mathbbE(N_k)) \[6pt]
&= p(N_k-1+1) + (1-p) (N_k-1+1) + (1-p) mathbbE(N_k) \[6pt]
&= N_k-1+1 + (1-p) mathbbE(N_k). \[6pt]
endaligned endequation$$
answered Sep 25 at 4:56
Ben
15.3k12181
15.3k12181
Thank you so much. make sense
â Dihan
Sep 25 at 6:17
add a comment |Â
Thank you so much. make sense
â Dihan
Sep 25 at 6:17
Thank you so much. make sense
â Dihan
Sep 25 at 6:17
Thank you so much. make sense
â Dihan
Sep 25 at 6:17
add a comment |Â
up vote
2
down vote
I'll give you the basic reasoning here, but you can write it out formally yourself.
Let $N_k$ be the number of trials necessary to obtain $k$ consecutive successes.
We want to show
$$E[ N_k | N_k-1]= N_k-1 + 1 + (1-p)E[N_k]$$
Firstly, given $N_k-1$, consider the possible values of $N_k-1+1$. If the trial immediately following the $N_k-1$'th trial is a success, then clearly $N_k = N_k-1+1$ with probability $p$.
Next, suppose the trial following $N_k-1$ is a failure. So that we have $N_k-1+1$ total trails with the last one being a failure. Well, since the last one is a failure, then by the independence of each trial, under this situation we would have the conditional expected number of trials until $k$ consecutive successes as
$$N_k-1 + 1 + E[N_k]$$
Since we already have $N_k-1 + 1$ trials, but the last one being a failure "resets" our expectation back to $E[N_k]$.
Hence you can express the original expectation as
$$E[ N_k | N_k-1]= p(N_k-1 + 1) + (1-p)(N_k-1 + 1 + E[N_k])$$
$$=N_k-1 + 1 + (1-p)E[N_k]$$
This answer uses the law of total expectation: $E[ E[X|Y] ] = E[X]$. Here we take $Y$ as the result of the $N_k-1+1$ trial, and $X$ as $N_k|N_k-1$.
Thank you so much
â Dihan
Sep 25 at 6:16
add a comment |Â
up vote
2
down vote
I'll give you the basic reasoning here, but you can write it out formally yourself.
Let $N_k$ be the number of trials necessary to obtain $k$ consecutive successes.
We want to show
$$E[ N_k | N_k-1]= N_k-1 + 1 + (1-p)E[N_k]$$
Firstly, given $N_k-1$, consider the possible values of $N_k-1+1$. If the trial immediately following the $N_k-1$'th trial is a success, then clearly $N_k = N_k-1+1$ with probability $p$.
Next, suppose the trial following $N_k-1$ is a failure. So that we have $N_k-1+1$ total trails with the last one being a failure. Well, since the last one is a failure, then by the independence of each trial, under this situation we would have the conditional expected number of trials until $k$ consecutive successes as
$$N_k-1 + 1 + E[N_k]$$
Since we already have $N_k-1 + 1$ trials, but the last one being a failure "resets" our expectation back to $E[N_k]$.
Hence you can express the original expectation as
$$E[ N_k | N_k-1]= p(N_k-1 + 1) + (1-p)(N_k-1 + 1 + E[N_k])$$
$$=N_k-1 + 1 + (1-p)E[N_k]$$
This answer uses the law of total expectation: $E[ E[X|Y] ] = E[X]$. Here we take $Y$ as the result of the $N_k-1+1$ trial, and $X$ as $N_k|N_k-1$.
Thank you so much
â Dihan
Sep 25 at 6:16
add a comment |Â
up vote
2
down vote
up vote
2
down vote
I'll give you the basic reasoning here, but you can write it out formally yourself.
Let $N_k$ be the number of trials necessary to obtain $k$ consecutive successes.
We want to show
$$E[ N_k | N_k-1]= N_k-1 + 1 + (1-p)E[N_k]$$
Firstly, given $N_k-1$, consider the possible values of $N_k-1+1$. If the trial immediately following the $N_k-1$'th trial is a success, then clearly $N_k = N_k-1+1$ with probability $p$.
Next, suppose the trial following $N_k-1$ is a failure. So that we have $N_k-1+1$ total trails with the last one being a failure. Well, since the last one is a failure, then by the independence of each trial, under this situation we would have the conditional expected number of trials until $k$ consecutive successes as
$$N_k-1 + 1 + E[N_k]$$
Since we already have $N_k-1 + 1$ trials, but the last one being a failure "resets" our expectation back to $E[N_k]$.
Hence you can express the original expectation as
$$E[ N_k | N_k-1]= p(N_k-1 + 1) + (1-p)(N_k-1 + 1 + E[N_k])$$
$$=N_k-1 + 1 + (1-p)E[N_k]$$
This answer uses the law of total expectation: $E[ E[X|Y] ] = E[X]$. Here we take $Y$ as the result of the $N_k-1+1$ trial, and $X$ as $N_k|N_k-1$.
I'll give you the basic reasoning here, but you can write it out formally yourself.
Let $N_k$ be the number of trials necessary to obtain $k$ consecutive successes.
We want to show
$$E[ N_k | N_k-1]= N_k-1 + 1 + (1-p)E[N_k]$$
Firstly, given $N_k-1$, consider the possible values of $N_k-1+1$. If the trial immediately following the $N_k-1$'th trial is a success, then clearly $N_k = N_k-1+1$ with probability $p$.
Next, suppose the trial following $N_k-1$ is a failure. So that we have $N_k-1+1$ total trails with the last one being a failure. Well, since the last one is a failure, then by the independence of each trial, under this situation we would have the conditional expected number of trials until $k$ consecutive successes as
$$N_k-1 + 1 + E[N_k]$$
Since we already have $N_k-1 + 1$ trials, but the last one being a failure "resets" our expectation back to $E[N_k]$.
Hence you can express the original expectation as
$$E[ N_k | N_k-1]= p(N_k-1 + 1) + (1-p)(N_k-1 + 1 + E[N_k])$$
$$=N_k-1 + 1 + (1-p)E[N_k]$$
This answer uses the law of total expectation: $E[ E[X|Y] ] = E[X]$. Here we take $Y$ as the result of the $N_k-1+1$ trial, and $X$ as $N_k|N_k-1$.
edited Sep 25 at 4:48
answered Sep 25 at 4:37
Xiaomi
3299
3299
Thank you so much
â Dihan
Sep 25 at 6:16
add a comment |Â
Thank you so much
â Dihan
Sep 25 at 6:16
Thank you so much
â Dihan
Sep 25 at 6:16
Thank you so much
â Dihan
Sep 25 at 6:16
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstats.stackexchange.com%2fquestions%2f368533%2fconditional-probability-for-consecutive-bernoulli-trials%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password