What's wrong with this approach for finding expected number of throws before 2 identical throws?












0












$begingroup$


I am trying to find the expected number of throws before a die shows up the same twice in a row.



The definition of expected value is $$E(n) = sum_nnP(n)$$



I have seen other answers elsewhere on how to solve this problem, but my approach is thus:



Succeeding on the $n^{th}$ throw requires that you failed on the $(n-1)^{th}$ throw. So it makes sense that $$P(n) = frac{1}{6}(1-P(n-1))$$ since, after $n-1$ throws, you must roll what was rolled on the $(n-1)^{th}$ throw, and there is a $1/6$ chance of that. Having Wolfram do the heavy lifting with $P(2) = 1/6$ I get $$P(n) = frac{1}{7}(-frac{1}{6})^n((-6)^n+6)$$



So it seems to me that $$E(n) = sum_{n=2}^infty nP(n)$$ but, apparently, this is divergent. So what is wrong with this approach?










share|cite|improve this question









$endgroup$








  • 2




    $begingroup$
    The answer will be $7$. The first throw cannot trigger the end, but from then on each throw has a $frac{1}{6}$ chance to match the throw previous regardless what it happened to be and so this becomes effectively the same as trying to calculate the expected number of throws until rolling a $1$ (after taking the off-by-one error into account).
    $endgroup$
    – JMoravitz
    Dec 14 '18 at 5:32












  • $begingroup$
    Okay, thank you for the comment. But I am not only interested in the answer; I am also interested in why my approach doesn't work. Can you shed light on that?
    $endgroup$
    – john morrison
    Dec 14 '18 at 5:34










  • $begingroup$
    The probability that your first success occurs on the $n$'th throw is $frac{1}{6}$ (the probability that the $n$'th throw matched the $n-1$'st) times the probability that the first $n-1$ attempts were all failures. Note that the probability that the first $n-1$ attempts are all failures is not the same thing as $1$ minus the probability that the $n-1$'st throw is the first success. Instead $1-P(n-1)$ also includes in it the chance that the first success occurred within the earlier attempts before the $n-1$'st throw.
    $endgroup$
    – JMoravitz
    Dec 14 '18 at 5:44






  • 1




    $begingroup$
    Rather, for $n>1$ you have $P(n) = frac{1}{6}times left(frac{5}{6}right)^{n-2}$
    $endgroup$
    – JMoravitz
    Dec 14 '18 at 5:45












  • $begingroup$
    Perfect sense. Perhaps you should make this an answer?
    $endgroup$
    – john morrison
    Dec 14 '18 at 5:58
















0












$begingroup$


I am trying to find the expected number of throws before a die shows up the same twice in a row.



The definition of expected value is $$E(n) = sum_nnP(n)$$



I have seen other answers elsewhere on how to solve this problem, but my approach is thus:



Succeeding on the $n^{th}$ throw requires that you failed on the $(n-1)^{th}$ throw. So it makes sense that $$P(n) = frac{1}{6}(1-P(n-1))$$ since, after $n-1$ throws, you must roll what was rolled on the $(n-1)^{th}$ throw, and there is a $1/6$ chance of that. Having Wolfram do the heavy lifting with $P(2) = 1/6$ I get $$P(n) = frac{1}{7}(-frac{1}{6})^n((-6)^n+6)$$



So it seems to me that $$E(n) = sum_{n=2}^infty nP(n)$$ but, apparently, this is divergent. So what is wrong with this approach?










share|cite|improve this question









$endgroup$








  • 2




    $begingroup$
    The answer will be $7$. The first throw cannot trigger the end, but from then on each throw has a $frac{1}{6}$ chance to match the throw previous regardless what it happened to be and so this becomes effectively the same as trying to calculate the expected number of throws until rolling a $1$ (after taking the off-by-one error into account).
    $endgroup$
    – JMoravitz
    Dec 14 '18 at 5:32












  • $begingroup$
    Okay, thank you for the comment. But I am not only interested in the answer; I am also interested in why my approach doesn't work. Can you shed light on that?
    $endgroup$
    – john morrison
    Dec 14 '18 at 5:34










  • $begingroup$
    The probability that your first success occurs on the $n$'th throw is $frac{1}{6}$ (the probability that the $n$'th throw matched the $n-1$'st) times the probability that the first $n-1$ attempts were all failures. Note that the probability that the first $n-1$ attempts are all failures is not the same thing as $1$ minus the probability that the $n-1$'st throw is the first success. Instead $1-P(n-1)$ also includes in it the chance that the first success occurred within the earlier attempts before the $n-1$'st throw.
    $endgroup$
    – JMoravitz
    Dec 14 '18 at 5:44






  • 1




    $begingroup$
    Rather, for $n>1$ you have $P(n) = frac{1}{6}times left(frac{5}{6}right)^{n-2}$
    $endgroup$
    – JMoravitz
    Dec 14 '18 at 5:45












  • $begingroup$
    Perfect sense. Perhaps you should make this an answer?
    $endgroup$
    – john morrison
    Dec 14 '18 at 5:58














0












0








0





$begingroup$


I am trying to find the expected number of throws before a die shows up the same twice in a row.



The definition of expected value is $$E(n) = sum_nnP(n)$$



I have seen other answers elsewhere on how to solve this problem, but my approach is thus:



Succeeding on the $n^{th}$ throw requires that you failed on the $(n-1)^{th}$ throw. So it makes sense that $$P(n) = frac{1}{6}(1-P(n-1))$$ since, after $n-1$ throws, you must roll what was rolled on the $(n-1)^{th}$ throw, and there is a $1/6$ chance of that. Having Wolfram do the heavy lifting with $P(2) = 1/6$ I get $$P(n) = frac{1}{7}(-frac{1}{6})^n((-6)^n+6)$$



So it seems to me that $$E(n) = sum_{n=2}^infty nP(n)$$ but, apparently, this is divergent. So what is wrong with this approach?










share|cite|improve this question









$endgroup$




I am trying to find the expected number of throws before a die shows up the same twice in a row.



The definition of expected value is $$E(n) = sum_nnP(n)$$



I have seen other answers elsewhere on how to solve this problem, but my approach is thus:



Succeeding on the $n^{th}$ throw requires that you failed on the $(n-1)^{th}$ throw. So it makes sense that $$P(n) = frac{1}{6}(1-P(n-1))$$ since, after $n-1$ throws, you must roll what was rolled on the $(n-1)^{th}$ throw, and there is a $1/6$ chance of that. Having Wolfram do the heavy lifting with $P(2) = 1/6$ I get $$P(n) = frac{1}{7}(-frac{1}{6})^n((-6)^n+6)$$



So it seems to me that $$E(n) = sum_{n=2}^infty nP(n)$$ but, apparently, this is divergent. So what is wrong with this approach?







probability recurrence-relations dice






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Dec 14 '18 at 5:26









john morrisonjohn morrison

605




605








  • 2




    $begingroup$
    The answer will be $7$. The first throw cannot trigger the end, but from then on each throw has a $frac{1}{6}$ chance to match the throw previous regardless what it happened to be and so this becomes effectively the same as trying to calculate the expected number of throws until rolling a $1$ (after taking the off-by-one error into account).
    $endgroup$
    – JMoravitz
    Dec 14 '18 at 5:32












  • $begingroup$
    Okay, thank you for the comment. But I am not only interested in the answer; I am also interested in why my approach doesn't work. Can you shed light on that?
    $endgroup$
    – john morrison
    Dec 14 '18 at 5:34










  • $begingroup$
    The probability that your first success occurs on the $n$'th throw is $frac{1}{6}$ (the probability that the $n$'th throw matched the $n-1$'st) times the probability that the first $n-1$ attempts were all failures. Note that the probability that the first $n-1$ attempts are all failures is not the same thing as $1$ minus the probability that the $n-1$'st throw is the first success. Instead $1-P(n-1)$ also includes in it the chance that the first success occurred within the earlier attempts before the $n-1$'st throw.
    $endgroup$
    – JMoravitz
    Dec 14 '18 at 5:44






  • 1




    $begingroup$
    Rather, for $n>1$ you have $P(n) = frac{1}{6}times left(frac{5}{6}right)^{n-2}$
    $endgroup$
    – JMoravitz
    Dec 14 '18 at 5:45












  • $begingroup$
    Perfect sense. Perhaps you should make this an answer?
    $endgroup$
    – john morrison
    Dec 14 '18 at 5:58














  • 2




    $begingroup$
    The answer will be $7$. The first throw cannot trigger the end, but from then on each throw has a $frac{1}{6}$ chance to match the throw previous regardless what it happened to be and so this becomes effectively the same as trying to calculate the expected number of throws until rolling a $1$ (after taking the off-by-one error into account).
    $endgroup$
    – JMoravitz
    Dec 14 '18 at 5:32












  • $begingroup$
    Okay, thank you for the comment. But I am not only interested in the answer; I am also interested in why my approach doesn't work. Can you shed light on that?
    $endgroup$
    – john morrison
    Dec 14 '18 at 5:34










  • $begingroup$
    The probability that your first success occurs on the $n$'th throw is $frac{1}{6}$ (the probability that the $n$'th throw matched the $n-1$'st) times the probability that the first $n-1$ attempts were all failures. Note that the probability that the first $n-1$ attempts are all failures is not the same thing as $1$ minus the probability that the $n-1$'st throw is the first success. Instead $1-P(n-1)$ also includes in it the chance that the first success occurred within the earlier attempts before the $n-1$'st throw.
    $endgroup$
    – JMoravitz
    Dec 14 '18 at 5:44






  • 1




    $begingroup$
    Rather, for $n>1$ you have $P(n) = frac{1}{6}times left(frac{5}{6}right)^{n-2}$
    $endgroup$
    – JMoravitz
    Dec 14 '18 at 5:45












  • $begingroup$
    Perfect sense. Perhaps you should make this an answer?
    $endgroup$
    – john morrison
    Dec 14 '18 at 5:58








2




2




$begingroup$
The answer will be $7$. The first throw cannot trigger the end, but from then on each throw has a $frac{1}{6}$ chance to match the throw previous regardless what it happened to be and so this becomes effectively the same as trying to calculate the expected number of throws until rolling a $1$ (after taking the off-by-one error into account).
$endgroup$
– JMoravitz
Dec 14 '18 at 5:32






$begingroup$
The answer will be $7$. The first throw cannot trigger the end, but from then on each throw has a $frac{1}{6}$ chance to match the throw previous regardless what it happened to be and so this becomes effectively the same as trying to calculate the expected number of throws until rolling a $1$ (after taking the off-by-one error into account).
$endgroup$
– JMoravitz
Dec 14 '18 at 5:32














$begingroup$
Okay, thank you for the comment. But I am not only interested in the answer; I am also interested in why my approach doesn't work. Can you shed light on that?
$endgroup$
– john morrison
Dec 14 '18 at 5:34




$begingroup$
Okay, thank you for the comment. But I am not only interested in the answer; I am also interested in why my approach doesn't work. Can you shed light on that?
$endgroup$
– john morrison
Dec 14 '18 at 5:34












$begingroup$
The probability that your first success occurs on the $n$'th throw is $frac{1}{6}$ (the probability that the $n$'th throw matched the $n-1$'st) times the probability that the first $n-1$ attempts were all failures. Note that the probability that the first $n-1$ attempts are all failures is not the same thing as $1$ minus the probability that the $n-1$'st throw is the first success. Instead $1-P(n-1)$ also includes in it the chance that the first success occurred within the earlier attempts before the $n-1$'st throw.
$endgroup$
– JMoravitz
Dec 14 '18 at 5:44




$begingroup$
The probability that your first success occurs on the $n$'th throw is $frac{1}{6}$ (the probability that the $n$'th throw matched the $n-1$'st) times the probability that the first $n-1$ attempts were all failures. Note that the probability that the first $n-1$ attempts are all failures is not the same thing as $1$ minus the probability that the $n-1$'st throw is the first success. Instead $1-P(n-1)$ also includes in it the chance that the first success occurred within the earlier attempts before the $n-1$'st throw.
$endgroup$
– JMoravitz
Dec 14 '18 at 5:44




1




1




$begingroup$
Rather, for $n>1$ you have $P(n) = frac{1}{6}times left(frac{5}{6}right)^{n-2}$
$endgroup$
– JMoravitz
Dec 14 '18 at 5:45






$begingroup$
Rather, for $n>1$ you have $P(n) = frac{1}{6}times left(frac{5}{6}right)^{n-2}$
$endgroup$
– JMoravitz
Dec 14 '18 at 5:45














$begingroup$
Perfect sense. Perhaps you should make this an answer?
$endgroup$
– john morrison
Dec 14 '18 at 5:58




$begingroup$
Perfect sense. Perhaps you should make this an answer?
$endgroup$
– john morrison
Dec 14 '18 at 5:58










0






active

oldest

votes












Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3038990%2fwhats-wrong-with-this-approach-for-finding-expected-number-of-throws-before-2-i%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3038990%2fwhats-wrong-with-this-approach-for-finding-expected-number-of-throws-before-2-i%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

ComboBox Display Member on multiple fields

Is it possible to collect Nectar points via Trainline?