Probability of events with retries?
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
Let's say I want to roll $n$ 20-sided dice, and I want none of those dice to be a 1. I figure that the probability at least one die will be a 1 is $frac1920^n$. But now let's say that we will re-roll each individual die that is a 1 up to $r$ times. I want to know 2 things:
- Given the above, what is the probability one or more of the dice will be a 1?
- Suppose I play this game a million times. How many dice rolls will a given game make on average? In other words, for each game, I will make $n+t$ dice rolls, where $t$ is the number of retries I've made. What would $t$ be on average?
probability statistics
 |Â
show 1 more comment
up vote
2
down vote
favorite
Let's say I want to roll $n$ 20-sided dice, and I want none of those dice to be a 1. I figure that the probability at least one die will be a 1 is $frac1920^n$. But now let's say that we will re-roll each individual die that is a 1 up to $r$ times. I want to know 2 things:
- Given the above, what is the probability one or more of the dice will be a 1?
- Suppose I play this game a million times. How many dice rolls will a given game make on average? In other words, for each game, I will make $n+t$ dice rolls, where $t$ is the number of retries I've made. What would $t$ be on average?
probability statistics
The probability for exactly one die to be 1 is $$n choose 1left(frac120right)left(frac1920right)^n-1$$
â BlackMath
Aug 27 at 17:19
I suppose I should refine the question: what is the probability one or more dice is 1?
â Jason Baker
Aug 27 at 17:21
Can you clarify what "How many dice rolls will a given game make on average?" means? I don't follow what you're asking for there.
â Aaron Montgomery
Aug 27 at 17:24
Dear Jason, please clarify the question by editing it. Am leaving this question open only because I remember probability comes as an important topic in many technical interviews.
â Nick
Aug 27 at 20:57
1
@Nick - Better?
â Jason Baker
Aug 30 at 16:59
 |Â
show 1 more comment
up vote
2
down vote
favorite
up vote
2
down vote
favorite
Let's say I want to roll $n$ 20-sided dice, and I want none of those dice to be a 1. I figure that the probability at least one die will be a 1 is $frac1920^n$. But now let's say that we will re-roll each individual die that is a 1 up to $r$ times. I want to know 2 things:
- Given the above, what is the probability one or more of the dice will be a 1?
- Suppose I play this game a million times. How many dice rolls will a given game make on average? In other words, for each game, I will make $n+t$ dice rolls, where $t$ is the number of retries I've made. What would $t$ be on average?
probability statistics
Let's say I want to roll $n$ 20-sided dice, and I want none of those dice to be a 1. I figure that the probability at least one die will be a 1 is $frac1920^n$. But now let's say that we will re-roll each individual die that is a 1 up to $r$ times. I want to know 2 things:
- Given the above, what is the probability one or more of the dice will be a 1?
- Suppose I play this game a million times. How many dice rolls will a given game make on average? In other words, for each game, I will make $n+t$ dice rolls, where $t$ is the number of retries I've made. What would $t$ be on average?
probability statistics
edited Aug 31 at 22:19
asked Aug 27 at 17:05
Jason Baker
112
112
The probability for exactly one die to be 1 is $$n choose 1left(frac120right)left(frac1920right)^n-1$$
â BlackMath
Aug 27 at 17:19
I suppose I should refine the question: what is the probability one or more dice is 1?
â Jason Baker
Aug 27 at 17:21
Can you clarify what "How many dice rolls will a given game make on average?" means? I don't follow what you're asking for there.
â Aaron Montgomery
Aug 27 at 17:24
Dear Jason, please clarify the question by editing it. Am leaving this question open only because I remember probability comes as an important topic in many technical interviews.
â Nick
Aug 27 at 20:57
1
@Nick - Better?
â Jason Baker
Aug 30 at 16:59
 |Â
show 1 more comment
The probability for exactly one die to be 1 is $$n choose 1left(frac120right)left(frac1920right)^n-1$$
â BlackMath
Aug 27 at 17:19
I suppose I should refine the question: what is the probability one or more dice is 1?
â Jason Baker
Aug 27 at 17:21
Can you clarify what "How many dice rolls will a given game make on average?" means? I don't follow what you're asking for there.
â Aaron Montgomery
Aug 27 at 17:24
Dear Jason, please clarify the question by editing it. Am leaving this question open only because I remember probability comes as an important topic in many technical interviews.
â Nick
Aug 27 at 20:57
1
@Nick - Better?
â Jason Baker
Aug 30 at 16:59
The probability for exactly one die to be 1 is $$n choose 1left(frac120right)left(frac1920right)^n-1$$
â BlackMath
Aug 27 at 17:19
The probability for exactly one die to be 1 is $$n choose 1left(frac120right)left(frac1920right)^n-1$$
â BlackMath
Aug 27 at 17:19
I suppose I should refine the question: what is the probability one or more dice is 1?
â Jason Baker
Aug 27 at 17:21
I suppose I should refine the question: what is the probability one or more dice is 1?
â Jason Baker
Aug 27 at 17:21
Can you clarify what "How many dice rolls will a given game make on average?" means? I don't follow what you're asking for there.
â Aaron Montgomery
Aug 27 at 17:24
Can you clarify what "How many dice rolls will a given game make on average?" means? I don't follow what you're asking for there.
â Aaron Montgomery
Aug 27 at 17:24
Dear Jason, please clarify the question by editing it. Am leaving this question open only because I remember probability comes as an important topic in many technical interviews.
â Nick
Aug 27 at 20:57
Dear Jason, please clarify the question by editing it. Am leaving this question open only because I remember probability comes as an important topic in many technical interviews.
â Nick
Aug 27 at 20:57
1
1
@Nick - Better?
â Jason Baker
Aug 30 at 16:59
@Nick - Better?
â Jason Baker
Aug 30 at 16:59
 |Â
show 1 more comment
2 Answers
2
active
oldest
votes
up vote
2
down vote
If I got your question right,
Let's consider one game, the probability of getting a $1$ is given by $1-left( frac1920 right)^r$, now the probability of getting at least a $1$ is the complement of getting no $1$s, that is $1-left(1-1+ left( frac1920 right)^r right)^n=1-left( frac1920 right)^nr$
I will ignore the million time thing, since if you take the average of an expectation you end up with the same result (due to unbiasedness of the average estimator). For one game, the probability of throwing the die $kin [1:r-1]$ times is $frac120 left( frac1920 right)^k-1$ and the probability of throwing $r$ times is $left( frac1920 right)^r-1$ (the last throw can be $1$ or not). A good sanity check is to verify this sums to $1$.
To obtain the expectation we compute
beginalign*
½0 sum_k=1^r-1 k left( frac1920 right)^k-1 + r left( frac1920 right)^r-1\
=&left(frac1920right)^r - 1 r + frac2019 frac(-19 (19^r - 20^r) - 19^r r)20^r
endalign*
by the Arithmetico-geometric formula (and after few steps)
EDIT : I think that my first one is wrong, see Mike Earnest's answer. And by the way you may have to use $r+1$ instead of $r$ in my formula for the second one depending if you are allowed throw the dice $r$ times or re-throw it $r$ times
If I understand the second part correctly, it seems that it only calculates the number of retried rolls. So then if I want the total number of rolls, I would have to add n?
â Jason Baker
Aug 31 at 21:09
Well you would need to do $n$ times the experiment so multiply the result by $n$. But if you are looking for the average then you also need to divide by $n$ which cancels and so the result is what I gave.
â P. Quinton
Sep 1 at 9:16
add a comment |Â
up vote
1
down vote
In order for a die to end up being $1$, it has come up $1$ a total of $r+1$ times in a row. Therefore, each die ends up being one with probability $(1/20)^r+1$, so
$$
P(textat least one die is 1)=1-P(textno dice are 1)=boxed1-bigg(1-frac120^r+1bigg)^n.
$$
To compute the expected number of rolls, we compute the expected number of rolls for each die and multiply by $n$. Let $X$ be the number times a particular die is rolled, and let's compute $P(X> k)$. The die is rolled more than $k$ times if and only if its first $k$ rolls are $1$, and $k<r$. Therefore,
$$
P(X>k) = frac120^k,qquad k=0,1,dots,r.
$$
Then the expected value is
$$
E[X]=sum_k=0^r P(X>k)=sum_k=0^r frac120^k=frac1-(1/20)^r+11-1/20.
$$
Therefore,
$$
E[#text of rolls]=ncdot E[X]=boxedncdot frac2019Big(1-frac120^r+1Big).
$$
For example, when $r=0$, the expected number of rolls is $n$. As $r$ tends to infinity, the expected number of rolls tends to $ncdot frac2019$.
I'm not sure I understand the output of the last formula. If I assume 0 retries, then it always gives me 1. Should I multiply the number by $n$ to get the total number of rolls?
â Jason Baker
Aug 31 at 22:05
@JasonBaker Oh, when you said rolls, I though you meant you rerolled all the die at once, so the number of rolls was always at most $r+1$. Like in Yahtzee how the number of rolls is always at most 3, instead of 15. IâÂÂll fix
â Mike Earnest
Aug 31 at 22:09
Oh, no we'd re-roll the dice individually
â Jason Baker
Aug 31 at 22:11
@JasonBaker Fixed. But why are you counting the number of individual die rolls?
â Mike Earnest
Aug 31 at 22:26
I'm trying to run a program that has a certain chance of success over a large set of inputs. I'm trying to determine how adding retries affects the success rate and how many additional runs retries will incur. The dice game is an analogy.
â Jason Baker
Aug 31 at 22:31
 |Â
show 1 more comment
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
If I got your question right,
Let's consider one game, the probability of getting a $1$ is given by $1-left( frac1920 right)^r$, now the probability of getting at least a $1$ is the complement of getting no $1$s, that is $1-left(1-1+ left( frac1920 right)^r right)^n=1-left( frac1920 right)^nr$
I will ignore the million time thing, since if you take the average of an expectation you end up with the same result (due to unbiasedness of the average estimator). For one game, the probability of throwing the die $kin [1:r-1]$ times is $frac120 left( frac1920 right)^k-1$ and the probability of throwing $r$ times is $left( frac1920 right)^r-1$ (the last throw can be $1$ or not). A good sanity check is to verify this sums to $1$.
To obtain the expectation we compute
beginalign*
½0 sum_k=1^r-1 k left( frac1920 right)^k-1 + r left( frac1920 right)^r-1\
=&left(frac1920right)^r - 1 r + frac2019 frac(-19 (19^r - 20^r) - 19^r r)20^r
endalign*
by the Arithmetico-geometric formula (and after few steps)
EDIT : I think that my first one is wrong, see Mike Earnest's answer. And by the way you may have to use $r+1$ instead of $r$ in my formula for the second one depending if you are allowed throw the dice $r$ times or re-throw it $r$ times
If I understand the second part correctly, it seems that it only calculates the number of retried rolls. So then if I want the total number of rolls, I would have to add n?
â Jason Baker
Aug 31 at 21:09
Well you would need to do $n$ times the experiment so multiply the result by $n$. But if you are looking for the average then you also need to divide by $n$ which cancels and so the result is what I gave.
â P. Quinton
Sep 1 at 9:16
add a comment |Â
up vote
2
down vote
If I got your question right,
Let's consider one game, the probability of getting a $1$ is given by $1-left( frac1920 right)^r$, now the probability of getting at least a $1$ is the complement of getting no $1$s, that is $1-left(1-1+ left( frac1920 right)^r right)^n=1-left( frac1920 right)^nr$
I will ignore the million time thing, since if you take the average of an expectation you end up with the same result (due to unbiasedness of the average estimator). For one game, the probability of throwing the die $kin [1:r-1]$ times is $frac120 left( frac1920 right)^k-1$ and the probability of throwing $r$ times is $left( frac1920 right)^r-1$ (the last throw can be $1$ or not). A good sanity check is to verify this sums to $1$.
To obtain the expectation we compute
beginalign*
½0 sum_k=1^r-1 k left( frac1920 right)^k-1 + r left( frac1920 right)^r-1\
=&left(frac1920right)^r - 1 r + frac2019 frac(-19 (19^r - 20^r) - 19^r r)20^r
endalign*
by the Arithmetico-geometric formula (and after few steps)
EDIT : I think that my first one is wrong, see Mike Earnest's answer. And by the way you may have to use $r+1$ instead of $r$ in my formula for the second one depending if you are allowed throw the dice $r$ times or re-throw it $r$ times
If I understand the second part correctly, it seems that it only calculates the number of retried rolls. So then if I want the total number of rolls, I would have to add n?
â Jason Baker
Aug 31 at 21:09
Well you would need to do $n$ times the experiment so multiply the result by $n$. But if you are looking for the average then you also need to divide by $n$ which cancels and so the result is what I gave.
â P. Quinton
Sep 1 at 9:16
add a comment |Â
up vote
2
down vote
up vote
2
down vote
If I got your question right,
Let's consider one game, the probability of getting a $1$ is given by $1-left( frac1920 right)^r$, now the probability of getting at least a $1$ is the complement of getting no $1$s, that is $1-left(1-1+ left( frac1920 right)^r right)^n=1-left( frac1920 right)^nr$
I will ignore the million time thing, since if you take the average of an expectation you end up with the same result (due to unbiasedness of the average estimator). For one game, the probability of throwing the die $kin [1:r-1]$ times is $frac120 left( frac1920 right)^k-1$ and the probability of throwing $r$ times is $left( frac1920 right)^r-1$ (the last throw can be $1$ or not). A good sanity check is to verify this sums to $1$.
To obtain the expectation we compute
beginalign*
½0 sum_k=1^r-1 k left( frac1920 right)^k-1 + r left( frac1920 right)^r-1\
=&left(frac1920right)^r - 1 r + frac2019 frac(-19 (19^r - 20^r) - 19^r r)20^r
endalign*
by the Arithmetico-geometric formula (and after few steps)
EDIT : I think that my first one is wrong, see Mike Earnest's answer. And by the way you may have to use $r+1$ instead of $r$ in my formula for the second one depending if you are allowed throw the dice $r$ times or re-throw it $r$ times
If I got your question right,
Let's consider one game, the probability of getting a $1$ is given by $1-left( frac1920 right)^r$, now the probability of getting at least a $1$ is the complement of getting no $1$s, that is $1-left(1-1+ left( frac1920 right)^r right)^n=1-left( frac1920 right)^nr$
I will ignore the million time thing, since if you take the average of an expectation you end up with the same result (due to unbiasedness of the average estimator). For one game, the probability of throwing the die $kin [1:r-1]$ times is $frac120 left( frac1920 right)^k-1$ and the probability of throwing $r$ times is $left( frac1920 right)^r-1$ (the last throw can be $1$ or not). A good sanity check is to verify this sums to $1$.
To obtain the expectation we compute
beginalign*
½0 sum_k=1^r-1 k left( frac1920 right)^k-1 + r left( frac1920 right)^r-1\
=&left(frac1920right)^r - 1 r + frac2019 frac(-19 (19^r - 20^r) - 19^r r)20^r
endalign*
by the Arithmetico-geometric formula (and after few steps)
EDIT : I think that my first one is wrong, see Mike Earnest's answer. And by the way you may have to use $r+1$ instead of $r$ in my formula for the second one depending if you are allowed throw the dice $r$ times or re-throw it $r$ times
edited Aug 28 at 7:25
answered Aug 27 at 17:29
P. Quinton
23410
23410
If I understand the second part correctly, it seems that it only calculates the number of retried rolls. So then if I want the total number of rolls, I would have to add n?
â Jason Baker
Aug 31 at 21:09
Well you would need to do $n$ times the experiment so multiply the result by $n$. But if you are looking for the average then you also need to divide by $n$ which cancels and so the result is what I gave.
â P. Quinton
Sep 1 at 9:16
add a comment |Â
If I understand the second part correctly, it seems that it only calculates the number of retried rolls. So then if I want the total number of rolls, I would have to add n?
â Jason Baker
Aug 31 at 21:09
Well you would need to do $n$ times the experiment so multiply the result by $n$. But if you are looking for the average then you also need to divide by $n$ which cancels and so the result is what I gave.
â P. Quinton
Sep 1 at 9:16
If I understand the second part correctly, it seems that it only calculates the number of retried rolls. So then if I want the total number of rolls, I would have to add n?
â Jason Baker
Aug 31 at 21:09
If I understand the second part correctly, it seems that it only calculates the number of retried rolls. So then if I want the total number of rolls, I would have to add n?
â Jason Baker
Aug 31 at 21:09
Well you would need to do $n$ times the experiment so multiply the result by $n$. But if you are looking for the average then you also need to divide by $n$ which cancels and so the result is what I gave.
â P. Quinton
Sep 1 at 9:16
Well you would need to do $n$ times the experiment so multiply the result by $n$. But if you are looking for the average then you also need to divide by $n$ which cancels and so the result is what I gave.
â P. Quinton
Sep 1 at 9:16
add a comment |Â
up vote
1
down vote
In order for a die to end up being $1$, it has come up $1$ a total of $r+1$ times in a row. Therefore, each die ends up being one with probability $(1/20)^r+1$, so
$$
P(textat least one die is 1)=1-P(textno dice are 1)=boxed1-bigg(1-frac120^r+1bigg)^n.
$$
To compute the expected number of rolls, we compute the expected number of rolls for each die and multiply by $n$. Let $X$ be the number times a particular die is rolled, and let's compute $P(X> k)$. The die is rolled more than $k$ times if and only if its first $k$ rolls are $1$, and $k<r$. Therefore,
$$
P(X>k) = frac120^k,qquad k=0,1,dots,r.
$$
Then the expected value is
$$
E[X]=sum_k=0^r P(X>k)=sum_k=0^r frac120^k=frac1-(1/20)^r+11-1/20.
$$
Therefore,
$$
E[#text of rolls]=ncdot E[X]=boxedncdot frac2019Big(1-frac120^r+1Big).
$$
For example, when $r=0$, the expected number of rolls is $n$. As $r$ tends to infinity, the expected number of rolls tends to $ncdot frac2019$.
I'm not sure I understand the output of the last formula. If I assume 0 retries, then it always gives me 1. Should I multiply the number by $n$ to get the total number of rolls?
â Jason Baker
Aug 31 at 22:05
@JasonBaker Oh, when you said rolls, I though you meant you rerolled all the die at once, so the number of rolls was always at most $r+1$. Like in Yahtzee how the number of rolls is always at most 3, instead of 15. IâÂÂll fix
â Mike Earnest
Aug 31 at 22:09
Oh, no we'd re-roll the dice individually
â Jason Baker
Aug 31 at 22:11
@JasonBaker Fixed. But why are you counting the number of individual die rolls?
â Mike Earnest
Aug 31 at 22:26
I'm trying to run a program that has a certain chance of success over a large set of inputs. I'm trying to determine how adding retries affects the success rate and how many additional runs retries will incur. The dice game is an analogy.
â Jason Baker
Aug 31 at 22:31
 |Â
show 1 more comment
up vote
1
down vote
In order for a die to end up being $1$, it has come up $1$ a total of $r+1$ times in a row. Therefore, each die ends up being one with probability $(1/20)^r+1$, so
$$
P(textat least one die is 1)=1-P(textno dice are 1)=boxed1-bigg(1-frac120^r+1bigg)^n.
$$
To compute the expected number of rolls, we compute the expected number of rolls for each die and multiply by $n$. Let $X$ be the number times a particular die is rolled, and let's compute $P(X> k)$. The die is rolled more than $k$ times if and only if its first $k$ rolls are $1$, and $k<r$. Therefore,
$$
P(X>k) = frac120^k,qquad k=0,1,dots,r.
$$
Then the expected value is
$$
E[X]=sum_k=0^r P(X>k)=sum_k=0^r frac120^k=frac1-(1/20)^r+11-1/20.
$$
Therefore,
$$
E[#text of rolls]=ncdot E[X]=boxedncdot frac2019Big(1-frac120^r+1Big).
$$
For example, when $r=0$, the expected number of rolls is $n$. As $r$ tends to infinity, the expected number of rolls tends to $ncdot frac2019$.
I'm not sure I understand the output of the last formula. If I assume 0 retries, then it always gives me 1. Should I multiply the number by $n$ to get the total number of rolls?
â Jason Baker
Aug 31 at 22:05
@JasonBaker Oh, when you said rolls, I though you meant you rerolled all the die at once, so the number of rolls was always at most $r+1$. Like in Yahtzee how the number of rolls is always at most 3, instead of 15. IâÂÂll fix
â Mike Earnest
Aug 31 at 22:09
Oh, no we'd re-roll the dice individually
â Jason Baker
Aug 31 at 22:11
@JasonBaker Fixed. But why are you counting the number of individual die rolls?
â Mike Earnest
Aug 31 at 22:26
I'm trying to run a program that has a certain chance of success over a large set of inputs. I'm trying to determine how adding retries affects the success rate and how many additional runs retries will incur. The dice game is an analogy.
â Jason Baker
Aug 31 at 22:31
 |Â
show 1 more comment
up vote
1
down vote
up vote
1
down vote
In order for a die to end up being $1$, it has come up $1$ a total of $r+1$ times in a row. Therefore, each die ends up being one with probability $(1/20)^r+1$, so
$$
P(textat least one die is 1)=1-P(textno dice are 1)=boxed1-bigg(1-frac120^r+1bigg)^n.
$$
To compute the expected number of rolls, we compute the expected number of rolls for each die and multiply by $n$. Let $X$ be the number times a particular die is rolled, and let's compute $P(X> k)$. The die is rolled more than $k$ times if and only if its first $k$ rolls are $1$, and $k<r$. Therefore,
$$
P(X>k) = frac120^k,qquad k=0,1,dots,r.
$$
Then the expected value is
$$
E[X]=sum_k=0^r P(X>k)=sum_k=0^r frac120^k=frac1-(1/20)^r+11-1/20.
$$
Therefore,
$$
E[#text of rolls]=ncdot E[X]=boxedncdot frac2019Big(1-frac120^r+1Big).
$$
For example, when $r=0$, the expected number of rolls is $n$. As $r$ tends to infinity, the expected number of rolls tends to $ncdot frac2019$.
In order for a die to end up being $1$, it has come up $1$ a total of $r+1$ times in a row. Therefore, each die ends up being one with probability $(1/20)^r+1$, so
$$
P(textat least one die is 1)=1-P(textno dice are 1)=boxed1-bigg(1-frac120^r+1bigg)^n.
$$
To compute the expected number of rolls, we compute the expected number of rolls for each die and multiply by $n$. Let $X$ be the number times a particular die is rolled, and let's compute $P(X> k)$. The die is rolled more than $k$ times if and only if its first $k$ rolls are $1$, and $k<r$. Therefore,
$$
P(X>k) = frac120^k,qquad k=0,1,dots,r.
$$
Then the expected value is
$$
E[X]=sum_k=0^r P(X>k)=sum_k=0^r frac120^k=frac1-(1/20)^r+11-1/20.
$$
Therefore,
$$
E[#text of rolls]=ncdot E[X]=boxedncdot frac2019Big(1-frac120^r+1Big).
$$
For example, when $r=0$, the expected number of rolls is $n$. As $r$ tends to infinity, the expected number of rolls tends to $ncdot frac2019$.
edited Aug 31 at 22:25
answered Aug 27 at 17:44
Mike Earnest
17.4k11749
17.4k11749
I'm not sure I understand the output of the last formula. If I assume 0 retries, then it always gives me 1. Should I multiply the number by $n$ to get the total number of rolls?
â Jason Baker
Aug 31 at 22:05
@JasonBaker Oh, when you said rolls, I though you meant you rerolled all the die at once, so the number of rolls was always at most $r+1$. Like in Yahtzee how the number of rolls is always at most 3, instead of 15. IâÂÂll fix
â Mike Earnest
Aug 31 at 22:09
Oh, no we'd re-roll the dice individually
â Jason Baker
Aug 31 at 22:11
@JasonBaker Fixed. But why are you counting the number of individual die rolls?
â Mike Earnest
Aug 31 at 22:26
I'm trying to run a program that has a certain chance of success over a large set of inputs. I'm trying to determine how adding retries affects the success rate and how many additional runs retries will incur. The dice game is an analogy.
â Jason Baker
Aug 31 at 22:31
 |Â
show 1 more comment
I'm not sure I understand the output of the last formula. If I assume 0 retries, then it always gives me 1. Should I multiply the number by $n$ to get the total number of rolls?
â Jason Baker
Aug 31 at 22:05
@JasonBaker Oh, when you said rolls, I though you meant you rerolled all the die at once, so the number of rolls was always at most $r+1$. Like in Yahtzee how the number of rolls is always at most 3, instead of 15. IâÂÂll fix
â Mike Earnest
Aug 31 at 22:09
Oh, no we'd re-roll the dice individually
â Jason Baker
Aug 31 at 22:11
@JasonBaker Fixed. But why are you counting the number of individual die rolls?
â Mike Earnest
Aug 31 at 22:26
I'm trying to run a program that has a certain chance of success over a large set of inputs. I'm trying to determine how adding retries affects the success rate and how many additional runs retries will incur. The dice game is an analogy.
â Jason Baker
Aug 31 at 22:31
I'm not sure I understand the output of the last formula. If I assume 0 retries, then it always gives me 1. Should I multiply the number by $n$ to get the total number of rolls?
â Jason Baker
Aug 31 at 22:05
I'm not sure I understand the output of the last formula. If I assume 0 retries, then it always gives me 1. Should I multiply the number by $n$ to get the total number of rolls?
â Jason Baker
Aug 31 at 22:05
@JasonBaker Oh, when you said rolls, I though you meant you rerolled all the die at once, so the number of rolls was always at most $r+1$. Like in Yahtzee how the number of rolls is always at most 3, instead of 15. IâÂÂll fix
â Mike Earnest
Aug 31 at 22:09
@JasonBaker Oh, when you said rolls, I though you meant you rerolled all the die at once, so the number of rolls was always at most $r+1$. Like in Yahtzee how the number of rolls is always at most 3, instead of 15. IâÂÂll fix
â Mike Earnest
Aug 31 at 22:09
Oh, no we'd re-roll the dice individually
â Jason Baker
Aug 31 at 22:11
Oh, no we'd re-roll the dice individually
â Jason Baker
Aug 31 at 22:11
@JasonBaker Fixed. But why are you counting the number of individual die rolls?
â Mike Earnest
Aug 31 at 22:26
@JasonBaker Fixed. But why are you counting the number of individual die rolls?
â Mike Earnest
Aug 31 at 22:26
I'm trying to run a program that has a certain chance of success over a large set of inputs. I'm trying to determine how adding retries affects the success rate and how many additional runs retries will incur. The dice game is an analogy.
â Jason Baker
Aug 31 at 22:31
I'm trying to run a program that has a certain chance of success over a large set of inputs. I'm trying to determine how adding retries affects the success rate and how many additional runs retries will incur. The dice game is an analogy.
â Jason Baker
Aug 31 at 22:31
 |Â
show 1 more 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%2f2896412%2fprobability-of-events-with-retries%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
The probability for exactly one die to be 1 is $$n choose 1left(frac120right)left(frac1920right)^n-1$$
â BlackMath
Aug 27 at 17:19
I suppose I should refine the question: what is the probability one or more dice is 1?
â Jason Baker
Aug 27 at 17:21
Can you clarify what "How many dice rolls will a given game make on average?" means? I don't follow what you're asking for there.
â Aaron Montgomery
Aug 27 at 17:24
Dear Jason, please clarify the question by editing it. Am leaving this question open only because I remember probability comes as an important topic in many technical interviews.
â Nick
Aug 27 at 20:57
1
@Nick - Better?
â Jason Baker
Aug 30 at 16:59