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
New contributor
Dihan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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
New contributor
Dihan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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
New contributor
Dihan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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
New contributor
Dihan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Dihan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 3 hours ago


Ben
14.9k12179
14.9k12179
New contributor
Dihan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 4 hours ago
Dihan
183
183
New contributor
Dihan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Dihan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Dihan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
1
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
2 hours ago
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$.
New contributor
Xiaomi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Thank you so much
– Dihan
2 hours ago
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
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
2 hours ago
add a comment |Â
up vote
1
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
2 hours ago
add a comment |Â
up vote
1
down vote
accepted
up vote
1
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 3 hours ago


Ben
14.9k12179
14.9k12179
Thank you so much. make sense
– Dihan
2 hours ago
add a comment |Â
Thank you so much. make sense
– Dihan
2 hours ago
Thank you so much. make sense
– Dihan
2 hours ago
Thank you so much. make sense
– Dihan
2 hours ago
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$.
New contributor
Xiaomi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Thank you so much
– Dihan
2 hours ago
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$.
New contributor
Xiaomi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Thank you so much
– Dihan
2 hours ago
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$.
New contributor
Xiaomi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
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$.
New contributor
Xiaomi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 3 hours ago
New contributor
Xiaomi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
answered 3 hours ago
Xiaomi
212
212
New contributor
Xiaomi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Xiaomi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Xiaomi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Thank you so much
– Dihan
2 hours ago
add a comment |Â
Thank you so much
– Dihan
2 hours ago
Thank you so much
– Dihan
2 hours ago
Thank you so much
– Dihan
2 hours ago
add a comment |Â
Dihan is a new contributor. Be nice, and check out our Code of Conduct.
Dihan is a new contributor. Be nice, and check out our Code of Conduct.
Dihan is a new contributor. Be nice, and check out our Code of Conduct.
Dihan is a new contributor. Be nice, and check out our Code of Conduct.
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