The probability distribution of the number of coin flips needed to get $n$ heads or $k$ tails
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
Suppose we are flipping a fair coin. Let n,k be fixed numbers. We flip the coin until we get a total of n heads or a total of k tails. What is the probability distribution of the number of coin flips needed to get n heads or k tails? If it is easier, what is the expectation? The support of this discrete distribution is from the min(n,k) to n+k-1.
probability
add a comment |Â
up vote
0
down vote
favorite
Suppose we are flipping a fair coin. Let n,k be fixed numbers. We flip the coin until we get a total of n heads or a total of k tails. What is the probability distribution of the number of coin flips needed to get n heads or k tails? If it is easier, what is the expectation? The support of this discrete distribution is from the min(n,k) to n+k-1.
probability
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Suppose we are flipping a fair coin. Let n,k be fixed numbers. We flip the coin until we get a total of n heads or a total of k tails. What is the probability distribution of the number of coin flips needed to get n heads or k tails? If it is easier, what is the expectation? The support of this discrete distribution is from the min(n,k) to n+k-1.
probability
Suppose we are flipping a fair coin. Let n,k be fixed numbers. We flip the coin until we get a total of n heads or a total of k tails. What is the probability distribution of the number of coin flips needed to get n heads or k tails? If it is easier, what is the expectation? The support of this discrete distribution is from the min(n,k) to n+k-1.
probability
asked 2 days ago
Cihan T
1
1
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
0
down vote
The probability of getting the $n$-th head on the $r$-th toss,
is that of the $r$-th toss being a head, and exactly $n-1$ of the first
$r-1$ tosses being heads, that is $p_r=
2^-rbinomr-1n-1$. In this case
this probability is only relevant if $r-n<k$. There is a similar
formula for the probability that the $k$-th tail occurs on the
$r$-th toss, that is $q_r=2^-rbinomr-1k-1$. So the probability
you seek is $p_r+q_r$ if $nle r<k+n$ and $kle r<k+n$, is $p_r$
if $nle r<k+n$ and $k>r$ and is $q_r$ if
if $kle r<k+n$ and $r>k$.
Thank you! I think this is right. Is there a name for this distribution? I want to find a closed form for its expectation. Also, is there a way to find a multinomial version. By that I mean instead of a coin flip, we can have a roll of a die. We stop if we get k1 ones, or k2 twos etc until k6 sixes. It is probably elementary to figure it all out, but I was wondering if it had a name so that I can lookup properties, asymptotics etc. Thanks again.
â Cihan T
2 days ago
add a comment |Â
up vote
0
down vote
This is a negative binomial distribution.
Suppose that $X sim NegBin(r;p)$
The probability mass function is given as
$$f(k;r,p) equiv Pr(X=k) = binomk+r-1kp^k(1-p)^r $$
where $k$ is the number of successes and $r$ is the number of failures with probability $p$
We have
$$E(X) = fracrp $$
In your specific case we have
$$ X sim NegBin(k;p) $$
Then our mass function is
$$f(n;k,p) equiv Pr(X=n) = binomn+k-1np^n(1-p)^k $$
where we have $n$ heads and $k$ tails.
Given that you said it was fair $p =frac12$
$$f(n;k,p) equiv Pr(X=n) = binomn+k-1n(frac12)^n(frac12)^k $$
$$f(n;k,p) equiv Pr(X=n) = binomn+k-1n(frac12)^n+k$$
$$f(n;k,p) equiv Pr(X=n) = binomn+k-1n2^-(n+k)$$
There is no $n$ in your answer.
â Lord Shark the Unknown
2 days ago
Thanks for the response. It is not negative binomial because we stop either when we get n ones or k zeros.
â Cihan T
2 days ago
Ahh that is unfortunate..
â Geronimo
2 days ago
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
The probability of getting the $n$-th head on the $r$-th toss,
is that of the $r$-th toss being a head, and exactly $n-1$ of the first
$r-1$ tosses being heads, that is $p_r=
2^-rbinomr-1n-1$. In this case
this probability is only relevant if $r-n<k$. There is a similar
formula for the probability that the $k$-th tail occurs on the
$r$-th toss, that is $q_r=2^-rbinomr-1k-1$. So the probability
you seek is $p_r+q_r$ if $nle r<k+n$ and $kle r<k+n$, is $p_r$
if $nle r<k+n$ and $k>r$ and is $q_r$ if
if $kle r<k+n$ and $r>k$.
Thank you! I think this is right. Is there a name for this distribution? I want to find a closed form for its expectation. Also, is there a way to find a multinomial version. By that I mean instead of a coin flip, we can have a roll of a die. We stop if we get k1 ones, or k2 twos etc until k6 sixes. It is probably elementary to figure it all out, but I was wondering if it had a name so that I can lookup properties, asymptotics etc. Thanks again.
â Cihan T
2 days ago
add a comment |Â
up vote
0
down vote
The probability of getting the $n$-th head on the $r$-th toss,
is that of the $r$-th toss being a head, and exactly $n-1$ of the first
$r-1$ tosses being heads, that is $p_r=
2^-rbinomr-1n-1$. In this case
this probability is only relevant if $r-n<k$. There is a similar
formula for the probability that the $k$-th tail occurs on the
$r$-th toss, that is $q_r=2^-rbinomr-1k-1$. So the probability
you seek is $p_r+q_r$ if $nle r<k+n$ and $kle r<k+n$, is $p_r$
if $nle r<k+n$ and $k>r$ and is $q_r$ if
if $kle r<k+n$ and $r>k$.
Thank you! I think this is right. Is there a name for this distribution? I want to find a closed form for its expectation. Also, is there a way to find a multinomial version. By that I mean instead of a coin flip, we can have a roll of a die. We stop if we get k1 ones, or k2 twos etc until k6 sixes. It is probably elementary to figure it all out, but I was wondering if it had a name so that I can lookup properties, asymptotics etc. Thanks again.
â Cihan T
2 days ago
add a comment |Â
up vote
0
down vote
up vote
0
down vote
The probability of getting the $n$-th head on the $r$-th toss,
is that of the $r$-th toss being a head, and exactly $n-1$ of the first
$r-1$ tosses being heads, that is $p_r=
2^-rbinomr-1n-1$. In this case
this probability is only relevant if $r-n<k$. There is a similar
formula for the probability that the $k$-th tail occurs on the
$r$-th toss, that is $q_r=2^-rbinomr-1k-1$. So the probability
you seek is $p_r+q_r$ if $nle r<k+n$ and $kle r<k+n$, is $p_r$
if $nle r<k+n$ and $k>r$ and is $q_r$ if
if $kle r<k+n$ and $r>k$.
The probability of getting the $n$-th head on the $r$-th toss,
is that of the $r$-th toss being a head, and exactly $n-1$ of the first
$r-1$ tosses being heads, that is $p_r=
2^-rbinomr-1n-1$. In this case
this probability is only relevant if $r-n<k$. There is a similar
formula for the probability that the $k$-th tail occurs on the
$r$-th toss, that is $q_r=2^-rbinomr-1k-1$. So the probability
you seek is $p_r+q_r$ if $nle r<k+n$ and $kle r<k+n$, is $p_r$
if $nle r<k+n$ and $k>r$ and is $q_r$ if
if $kle r<k+n$ and $r>k$.
answered 2 days ago
Lord Shark the Unknown
83.9k949111
83.9k949111
Thank you! I think this is right. Is there a name for this distribution? I want to find a closed form for its expectation. Also, is there a way to find a multinomial version. By that I mean instead of a coin flip, we can have a roll of a die. We stop if we get k1 ones, or k2 twos etc until k6 sixes. It is probably elementary to figure it all out, but I was wondering if it had a name so that I can lookup properties, asymptotics etc. Thanks again.
â Cihan T
2 days ago
add a comment |Â
Thank you! I think this is right. Is there a name for this distribution? I want to find a closed form for its expectation. Also, is there a way to find a multinomial version. By that I mean instead of a coin flip, we can have a roll of a die. We stop if we get k1 ones, or k2 twos etc until k6 sixes. It is probably elementary to figure it all out, but I was wondering if it had a name so that I can lookup properties, asymptotics etc. Thanks again.
â Cihan T
2 days ago
Thank you! I think this is right. Is there a name for this distribution? I want to find a closed form for its expectation. Also, is there a way to find a multinomial version. By that I mean instead of a coin flip, we can have a roll of a die. We stop if we get k1 ones, or k2 twos etc until k6 sixes. It is probably elementary to figure it all out, but I was wondering if it had a name so that I can lookup properties, asymptotics etc. Thanks again.
â Cihan T
2 days ago
Thank you! I think this is right. Is there a name for this distribution? I want to find a closed form for its expectation. Also, is there a way to find a multinomial version. By that I mean instead of a coin flip, we can have a roll of a die. We stop if we get k1 ones, or k2 twos etc until k6 sixes. It is probably elementary to figure it all out, but I was wondering if it had a name so that I can lookup properties, asymptotics etc. Thanks again.
â Cihan T
2 days ago
add a comment |Â
up vote
0
down vote
This is a negative binomial distribution.
Suppose that $X sim NegBin(r;p)$
The probability mass function is given as
$$f(k;r,p) equiv Pr(X=k) = binomk+r-1kp^k(1-p)^r $$
where $k$ is the number of successes and $r$ is the number of failures with probability $p$
We have
$$E(X) = fracrp $$
In your specific case we have
$$ X sim NegBin(k;p) $$
Then our mass function is
$$f(n;k,p) equiv Pr(X=n) = binomn+k-1np^n(1-p)^k $$
where we have $n$ heads and $k$ tails.
Given that you said it was fair $p =frac12$
$$f(n;k,p) equiv Pr(X=n) = binomn+k-1n(frac12)^n(frac12)^k $$
$$f(n;k,p) equiv Pr(X=n) = binomn+k-1n(frac12)^n+k$$
$$f(n;k,p) equiv Pr(X=n) = binomn+k-1n2^-(n+k)$$
There is no $n$ in your answer.
â Lord Shark the Unknown
2 days ago
Thanks for the response. It is not negative binomial because we stop either when we get n ones or k zeros.
â Cihan T
2 days ago
Ahh that is unfortunate..
â Geronimo
2 days ago
add a comment |Â
up vote
0
down vote
This is a negative binomial distribution.
Suppose that $X sim NegBin(r;p)$
The probability mass function is given as
$$f(k;r,p) equiv Pr(X=k) = binomk+r-1kp^k(1-p)^r $$
where $k$ is the number of successes and $r$ is the number of failures with probability $p$
We have
$$E(X) = fracrp $$
In your specific case we have
$$ X sim NegBin(k;p) $$
Then our mass function is
$$f(n;k,p) equiv Pr(X=n) = binomn+k-1np^n(1-p)^k $$
where we have $n$ heads and $k$ tails.
Given that you said it was fair $p =frac12$
$$f(n;k,p) equiv Pr(X=n) = binomn+k-1n(frac12)^n(frac12)^k $$
$$f(n;k,p) equiv Pr(X=n) = binomn+k-1n(frac12)^n+k$$
$$f(n;k,p) equiv Pr(X=n) = binomn+k-1n2^-(n+k)$$
There is no $n$ in your answer.
â Lord Shark the Unknown
2 days ago
Thanks for the response. It is not negative binomial because we stop either when we get n ones or k zeros.
â Cihan T
2 days ago
Ahh that is unfortunate..
â Geronimo
2 days ago
add a comment |Â
up vote
0
down vote
up vote
0
down vote
This is a negative binomial distribution.
Suppose that $X sim NegBin(r;p)$
The probability mass function is given as
$$f(k;r,p) equiv Pr(X=k) = binomk+r-1kp^k(1-p)^r $$
where $k$ is the number of successes and $r$ is the number of failures with probability $p$
We have
$$E(X) = fracrp $$
In your specific case we have
$$ X sim NegBin(k;p) $$
Then our mass function is
$$f(n;k,p) equiv Pr(X=n) = binomn+k-1np^n(1-p)^k $$
where we have $n$ heads and $k$ tails.
Given that you said it was fair $p =frac12$
$$f(n;k,p) equiv Pr(X=n) = binomn+k-1n(frac12)^n(frac12)^k $$
$$f(n;k,p) equiv Pr(X=n) = binomn+k-1n(frac12)^n+k$$
$$f(n;k,p) equiv Pr(X=n) = binomn+k-1n2^-(n+k)$$
This is a negative binomial distribution.
Suppose that $X sim NegBin(r;p)$
The probability mass function is given as
$$f(k;r,p) equiv Pr(X=k) = binomk+r-1kp^k(1-p)^r $$
where $k$ is the number of successes and $r$ is the number of failures with probability $p$
We have
$$E(X) = fracrp $$
In your specific case we have
$$ X sim NegBin(k;p) $$
Then our mass function is
$$f(n;k,p) equiv Pr(X=n) = binomn+k-1np^n(1-p)^k $$
where we have $n$ heads and $k$ tails.
Given that you said it was fair $p =frac12$
$$f(n;k,p) equiv Pr(X=n) = binomn+k-1n(frac12)^n(frac12)^k $$
$$f(n;k,p) equiv Pr(X=n) = binomn+k-1n(frac12)^n+k$$
$$f(n;k,p) equiv Pr(X=n) = binomn+k-1n2^-(n+k)$$
edited 2 days ago
answered 2 days ago
Geronimo
807715
807715
There is no $n$ in your answer.
â Lord Shark the Unknown
2 days ago
Thanks for the response. It is not negative binomial because we stop either when we get n ones or k zeros.
â Cihan T
2 days ago
Ahh that is unfortunate..
â Geronimo
2 days ago
add a comment |Â
There is no $n$ in your answer.
â Lord Shark the Unknown
2 days ago
Thanks for the response. It is not negative binomial because we stop either when we get n ones or k zeros.
â Cihan T
2 days ago
Ahh that is unfortunate..
â Geronimo
2 days ago
There is no $n$ in your answer.
â Lord Shark the Unknown
2 days ago
There is no $n$ in your answer.
â Lord Shark the Unknown
2 days ago
Thanks for the response. It is not negative binomial because we stop either when we get n ones or k zeros.
â Cihan T
2 days ago
Thanks for the response. It is not negative binomial because we stop either when we get n ones or k zeros.
â Cihan T
2 days ago
Ahh that is unfortunate..
â Geronimo
2 days ago
Ahh that is unfortunate..
â Geronimo
2 days ago
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%2fmath.stackexchange.com%2fquestions%2f2871708%2fthe-probability-distribution-of-the-number-of-coin-flips-needed-to-get-n-heads%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