Probability of getting $n$ tails in a row











up vote
0
down vote

favorite












Imagine we have an unusual coin. Probability of getting a tail is equal to $p in [0, 1]$. Of course that means that probability of getting a head is equal to $q = 1-p in [0, 1]$.

Let's define a random variable $X$
$$X = text{the amount of throws until getting n tails in a row}$$
I am to calculate $mathbb{E}(X)$, where $mathbb{E}$ is the expected value. How can it be found? I would appreciate any tips or hints.










share|cite|improve this question






















  • @drhab I think your proposed solution was nearly correct. To get $k$ tails in a row I must first get $k-1$ tails in a row. So, we go out $mu_{k-1}$ turns and toss. either I win or I restart. If we restart I then expect $1+mu_{k-1}+mu_k$ tosses (including the $1+mu_{k-1}$ tosses I have already done). Thus $mu_k=p(1+mu_{k-1})+q(1+mu_{k-1}+mu_k)$. No?
    – lulu
    22 hours ago












  • @lulu That gives $mu_k=p^{-1}+mu_{k-1}$ and seems not to agree with what I found now after some struggling. On the other hand I have not the guts to say it is wrong, since it looks good. Good chance that my revised is answer is wrong also.
    – drhab
    20 hours ago












  • @drhab Does it? I get $mu_k=mu_{k-1}+1+qmu_kimplies pmu_k=mu_{k-1}+1$ Thus $mu_k=frac 1ptimes (1+mu_{k-1})$ Which seems to harmonize with your new answer.
    – lulu
    20 hours ago












  • @lulu Ah, yes. I misunderstood at first hand because in my new answer $mu_k$ is defined on a different way than in my first answer, $mu_n$ and $mu_0$ somehow "switched" of meaning.
    – drhab
    20 hours ago












  • @drhab I think your first answer (correctly modified) is the way to go. Comparatively clear.
    – lulu
    20 hours ago















up vote
0
down vote

favorite












Imagine we have an unusual coin. Probability of getting a tail is equal to $p in [0, 1]$. Of course that means that probability of getting a head is equal to $q = 1-p in [0, 1]$.

Let's define a random variable $X$
$$X = text{the amount of throws until getting n tails in a row}$$
I am to calculate $mathbb{E}(X)$, where $mathbb{E}$ is the expected value. How can it be found? I would appreciate any tips or hints.










share|cite|improve this question






















  • @drhab I think your proposed solution was nearly correct. To get $k$ tails in a row I must first get $k-1$ tails in a row. So, we go out $mu_{k-1}$ turns and toss. either I win or I restart. If we restart I then expect $1+mu_{k-1}+mu_k$ tosses (including the $1+mu_{k-1}$ tosses I have already done). Thus $mu_k=p(1+mu_{k-1})+q(1+mu_{k-1}+mu_k)$. No?
    – lulu
    22 hours ago












  • @lulu That gives $mu_k=p^{-1}+mu_{k-1}$ and seems not to agree with what I found now after some struggling. On the other hand I have not the guts to say it is wrong, since it looks good. Good chance that my revised is answer is wrong also.
    – drhab
    20 hours ago












  • @drhab Does it? I get $mu_k=mu_{k-1}+1+qmu_kimplies pmu_k=mu_{k-1}+1$ Thus $mu_k=frac 1ptimes (1+mu_{k-1})$ Which seems to harmonize with your new answer.
    – lulu
    20 hours ago












  • @lulu Ah, yes. I misunderstood at first hand because in my new answer $mu_k$ is defined on a different way than in my first answer, $mu_n$ and $mu_0$ somehow "switched" of meaning.
    – drhab
    20 hours ago












  • @drhab I think your first answer (correctly modified) is the way to go. Comparatively clear.
    – lulu
    20 hours ago













up vote
0
down vote

favorite









up vote
0
down vote

favorite











Imagine we have an unusual coin. Probability of getting a tail is equal to $p in [0, 1]$. Of course that means that probability of getting a head is equal to $q = 1-p in [0, 1]$.

Let's define a random variable $X$
$$X = text{the amount of throws until getting n tails in a row}$$
I am to calculate $mathbb{E}(X)$, where $mathbb{E}$ is the expected value. How can it be found? I would appreciate any tips or hints.










share|cite|improve this question













Imagine we have an unusual coin. Probability of getting a tail is equal to $p in [0, 1]$. Of course that means that probability of getting a head is equal to $q = 1-p in [0, 1]$.

Let's define a random variable $X$
$$X = text{the amount of throws until getting n tails in a row}$$
I am to calculate $mathbb{E}(X)$, where $mathbb{E}$ is the expected value. How can it be found? I would appreciate any tips or hints.







probability






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked 22 hours ago









Hendrra

978413




978413












  • @drhab I think your proposed solution was nearly correct. To get $k$ tails in a row I must first get $k-1$ tails in a row. So, we go out $mu_{k-1}$ turns and toss. either I win or I restart. If we restart I then expect $1+mu_{k-1}+mu_k$ tosses (including the $1+mu_{k-1}$ tosses I have already done). Thus $mu_k=p(1+mu_{k-1})+q(1+mu_{k-1}+mu_k)$. No?
    – lulu
    22 hours ago












  • @lulu That gives $mu_k=p^{-1}+mu_{k-1}$ and seems not to agree with what I found now after some struggling. On the other hand I have not the guts to say it is wrong, since it looks good. Good chance that my revised is answer is wrong also.
    – drhab
    20 hours ago












  • @drhab Does it? I get $mu_k=mu_{k-1}+1+qmu_kimplies pmu_k=mu_{k-1}+1$ Thus $mu_k=frac 1ptimes (1+mu_{k-1})$ Which seems to harmonize with your new answer.
    – lulu
    20 hours ago












  • @lulu Ah, yes. I misunderstood at first hand because in my new answer $mu_k$ is defined on a different way than in my first answer, $mu_n$ and $mu_0$ somehow "switched" of meaning.
    – drhab
    20 hours ago












  • @drhab I think your first answer (correctly modified) is the way to go. Comparatively clear.
    – lulu
    20 hours ago


















  • @drhab I think your proposed solution was nearly correct. To get $k$ tails in a row I must first get $k-1$ tails in a row. So, we go out $mu_{k-1}$ turns and toss. either I win or I restart. If we restart I then expect $1+mu_{k-1}+mu_k$ tosses (including the $1+mu_{k-1}$ tosses I have already done). Thus $mu_k=p(1+mu_{k-1})+q(1+mu_{k-1}+mu_k)$. No?
    – lulu
    22 hours ago












  • @lulu That gives $mu_k=p^{-1}+mu_{k-1}$ and seems not to agree with what I found now after some struggling. On the other hand I have not the guts to say it is wrong, since it looks good. Good chance that my revised is answer is wrong also.
    – drhab
    20 hours ago












  • @drhab Does it? I get $mu_k=mu_{k-1}+1+qmu_kimplies pmu_k=mu_{k-1}+1$ Thus $mu_k=frac 1ptimes (1+mu_{k-1})$ Which seems to harmonize with your new answer.
    – lulu
    20 hours ago












  • @lulu Ah, yes. I misunderstood at first hand because in my new answer $mu_k$ is defined on a different way than in my first answer, $mu_n$ and $mu_0$ somehow "switched" of meaning.
    – drhab
    20 hours ago












  • @drhab I think your first answer (correctly modified) is the way to go. Comparatively clear.
    – lulu
    20 hours ago
















@drhab I think your proposed solution was nearly correct. To get $k$ tails in a row I must first get $k-1$ tails in a row. So, we go out $mu_{k-1}$ turns and toss. either I win or I restart. If we restart I then expect $1+mu_{k-1}+mu_k$ tosses (including the $1+mu_{k-1}$ tosses I have already done). Thus $mu_k=p(1+mu_{k-1})+q(1+mu_{k-1}+mu_k)$. No?
– lulu
22 hours ago






@drhab I think your proposed solution was nearly correct. To get $k$ tails in a row I must first get $k-1$ tails in a row. So, we go out $mu_{k-1}$ turns and toss. either I win or I restart. If we restart I then expect $1+mu_{k-1}+mu_k$ tosses (including the $1+mu_{k-1}$ tosses I have already done). Thus $mu_k=p(1+mu_{k-1})+q(1+mu_{k-1}+mu_k)$. No?
– lulu
22 hours ago














@lulu That gives $mu_k=p^{-1}+mu_{k-1}$ and seems not to agree with what I found now after some struggling. On the other hand I have not the guts to say it is wrong, since it looks good. Good chance that my revised is answer is wrong also.
– drhab
20 hours ago






@lulu That gives $mu_k=p^{-1}+mu_{k-1}$ and seems not to agree with what I found now after some struggling. On the other hand I have not the guts to say it is wrong, since it looks good. Good chance that my revised is answer is wrong also.
– drhab
20 hours ago














@drhab Does it? I get $mu_k=mu_{k-1}+1+qmu_kimplies pmu_k=mu_{k-1}+1$ Thus $mu_k=frac 1ptimes (1+mu_{k-1})$ Which seems to harmonize with your new answer.
– lulu
20 hours ago






@drhab Does it? I get $mu_k=mu_{k-1}+1+qmu_kimplies pmu_k=mu_{k-1}+1$ Thus $mu_k=frac 1ptimes (1+mu_{k-1})$ Which seems to harmonize with your new answer.
– lulu
20 hours ago














@lulu Ah, yes. I misunderstood at first hand because in my new answer $mu_k$ is defined on a different way than in my first answer, $mu_n$ and $mu_0$ somehow "switched" of meaning.
– drhab
20 hours ago






@lulu Ah, yes. I misunderstood at first hand because in my new answer $mu_k$ is defined on a different way than in my first answer, $mu_n$ and $mu_0$ somehow "switched" of meaning.
– drhab
20 hours ago














@drhab I think your first answer (correctly modified) is the way to go. Comparatively clear.
– lulu
20 hours ago




@drhab I think your first answer (correctly modified) is the way to go. Comparatively clear.
– lulu
20 hours ago










2 Answers
2






active

oldest

votes

















up vote
2
down vote













Let's say that we are in status $k$ if our last $k$ throws ended up in tail and the (eventual) throw before this sequence of tails is not a tail.



Let $mu_k$ denote the expectation of the number of throws needed to arrive at $n$ tails in a row if we are in status $k$.



Then $mu_n=0$ and to be found is $mu_0$.



For $k=0,1,2,dots n-1$ we have:$$mu_{k}=p(1+mu_{k+1})+q(1+mu_0)=1+pmu_{k+1}+qmu_0$$



So we have the following equalities:





  • $mu_0=1+pmu_1+qmu_0$ so that $mu_0=frac1p+mu_1$


  • $mu_1=1+pmu_2+qmu_0=1+pmu_2+frac{q}p+qmu_1$ so that $mu_1=frac1p+frac q{p^2}+mu_2=frac1{p^2}+mu_2$


This makes us suspect that $mu_k=sum_{i=k+1}^np^{-i}$ for $k=0,1,dots,n$ and substitution in $(1)$ confirms that conjecture.



The the outcome is:$$mathbb EX=sum_{i=1}^np^{-i}$$





addendum:



Another way to look at it is this:



Let $nu_k$ denote the expectation of the number of throws needed to achieve exactly $k$ tails in a row.



Then $nu_0=0$ and to be found is $nu_n$.



Now let it be that after $X$ steps we have a consecutive row of exactly $k-1$ tails. Then by throwing tails we need $X+1$ throws to get a consecutive row of exactly $k$ tails. By throwing heads we come back in start position and from there $X+1+Y$ steps will be needed to get a consecutive row of exactly $k$ tails. This with $mathbb EX=nu_{k-1}$ and $mathbb EY=nu_{k}$ hence giving the equality:$$nu_k=p(1+nu_{k-1})+q(1+nu_{k-1}+nu_k)$$or shorter:$$pnu_k=1+nu_{k-1}$$



This leads easily to:$$nu_k=sum_{i=1}^kp^{-i}text{ for }k=1,2,dots$$so that: $$nu_n=sum_{i=1}^np^{-i}$$





Credit for the second solution (definitely the most elegant one) goes to @lulu.



I was on a path that was nice but not completely okay.



Someone attended me on that (thank you @saulspatz).



Then someone said to me: take the original path, but with an adaption (thank you @lulu).






share|cite|improve this answer



















  • 1




    I did this too, but on reflection, I don't think it's right. If we toss a tail, we can't say we just need $n-1$ tails in a row. If the next toss is heads, we're back to needing $n$ tails in a row.
    – saulspatz
    22 hours ago










  • @saulspatz You are correct. I will delete this within some minutes. Thank you.
    – drhab
    22 hours ago




















up vote
0
down vote













This is a finite-state absorbing Markov chain. The state is the number of consecutive tails we have tossed so far. We start in state $0$ and the absorbing state is $n$. If we are in state $k<n$ then we transition to state $k+1$ with probability $p$ and we transition to state $0$ with probability $q,$ so that the first column on the matrix $Q$ described in the wiki has $q$ in every position, and the entries on the superdiagonal are all $p.$



You need to figure out $(I-Q)^{-1}$






share|cite|improve this answer





















    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',
    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%2f3004813%2fprobability-of-getting-n-tails-in-a-row%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote













    Let's say that we are in status $k$ if our last $k$ throws ended up in tail and the (eventual) throw before this sequence of tails is not a tail.



    Let $mu_k$ denote the expectation of the number of throws needed to arrive at $n$ tails in a row if we are in status $k$.



    Then $mu_n=0$ and to be found is $mu_0$.



    For $k=0,1,2,dots n-1$ we have:$$mu_{k}=p(1+mu_{k+1})+q(1+mu_0)=1+pmu_{k+1}+qmu_0$$



    So we have the following equalities:





    • $mu_0=1+pmu_1+qmu_0$ so that $mu_0=frac1p+mu_1$


    • $mu_1=1+pmu_2+qmu_0=1+pmu_2+frac{q}p+qmu_1$ so that $mu_1=frac1p+frac q{p^2}+mu_2=frac1{p^2}+mu_2$


    This makes us suspect that $mu_k=sum_{i=k+1}^np^{-i}$ for $k=0,1,dots,n$ and substitution in $(1)$ confirms that conjecture.



    The the outcome is:$$mathbb EX=sum_{i=1}^np^{-i}$$





    addendum:



    Another way to look at it is this:



    Let $nu_k$ denote the expectation of the number of throws needed to achieve exactly $k$ tails in a row.



    Then $nu_0=0$ and to be found is $nu_n$.



    Now let it be that after $X$ steps we have a consecutive row of exactly $k-1$ tails. Then by throwing tails we need $X+1$ throws to get a consecutive row of exactly $k$ tails. By throwing heads we come back in start position and from there $X+1+Y$ steps will be needed to get a consecutive row of exactly $k$ tails. This with $mathbb EX=nu_{k-1}$ and $mathbb EY=nu_{k}$ hence giving the equality:$$nu_k=p(1+nu_{k-1})+q(1+nu_{k-1}+nu_k)$$or shorter:$$pnu_k=1+nu_{k-1}$$



    This leads easily to:$$nu_k=sum_{i=1}^kp^{-i}text{ for }k=1,2,dots$$so that: $$nu_n=sum_{i=1}^np^{-i}$$





    Credit for the second solution (definitely the most elegant one) goes to @lulu.



    I was on a path that was nice but not completely okay.



    Someone attended me on that (thank you @saulspatz).



    Then someone said to me: take the original path, but with an adaption (thank you @lulu).






    share|cite|improve this answer



















    • 1




      I did this too, but on reflection, I don't think it's right. If we toss a tail, we can't say we just need $n-1$ tails in a row. If the next toss is heads, we're back to needing $n$ tails in a row.
      – saulspatz
      22 hours ago










    • @saulspatz You are correct. I will delete this within some minutes. Thank you.
      – drhab
      22 hours ago

















    up vote
    2
    down vote













    Let's say that we are in status $k$ if our last $k$ throws ended up in tail and the (eventual) throw before this sequence of tails is not a tail.



    Let $mu_k$ denote the expectation of the number of throws needed to arrive at $n$ tails in a row if we are in status $k$.



    Then $mu_n=0$ and to be found is $mu_0$.



    For $k=0,1,2,dots n-1$ we have:$$mu_{k}=p(1+mu_{k+1})+q(1+mu_0)=1+pmu_{k+1}+qmu_0$$



    So we have the following equalities:





    • $mu_0=1+pmu_1+qmu_0$ so that $mu_0=frac1p+mu_1$


    • $mu_1=1+pmu_2+qmu_0=1+pmu_2+frac{q}p+qmu_1$ so that $mu_1=frac1p+frac q{p^2}+mu_2=frac1{p^2}+mu_2$


    This makes us suspect that $mu_k=sum_{i=k+1}^np^{-i}$ for $k=0,1,dots,n$ and substitution in $(1)$ confirms that conjecture.



    The the outcome is:$$mathbb EX=sum_{i=1}^np^{-i}$$





    addendum:



    Another way to look at it is this:



    Let $nu_k$ denote the expectation of the number of throws needed to achieve exactly $k$ tails in a row.



    Then $nu_0=0$ and to be found is $nu_n$.



    Now let it be that after $X$ steps we have a consecutive row of exactly $k-1$ tails. Then by throwing tails we need $X+1$ throws to get a consecutive row of exactly $k$ tails. By throwing heads we come back in start position and from there $X+1+Y$ steps will be needed to get a consecutive row of exactly $k$ tails. This with $mathbb EX=nu_{k-1}$ and $mathbb EY=nu_{k}$ hence giving the equality:$$nu_k=p(1+nu_{k-1})+q(1+nu_{k-1}+nu_k)$$or shorter:$$pnu_k=1+nu_{k-1}$$



    This leads easily to:$$nu_k=sum_{i=1}^kp^{-i}text{ for }k=1,2,dots$$so that: $$nu_n=sum_{i=1}^np^{-i}$$





    Credit for the second solution (definitely the most elegant one) goes to @lulu.



    I was on a path that was nice but not completely okay.



    Someone attended me on that (thank you @saulspatz).



    Then someone said to me: take the original path, but with an adaption (thank you @lulu).






    share|cite|improve this answer



















    • 1




      I did this too, but on reflection, I don't think it's right. If we toss a tail, we can't say we just need $n-1$ tails in a row. If the next toss is heads, we're back to needing $n$ tails in a row.
      – saulspatz
      22 hours ago










    • @saulspatz You are correct. I will delete this within some minutes. Thank you.
      – drhab
      22 hours ago















    up vote
    2
    down vote










    up vote
    2
    down vote









    Let's say that we are in status $k$ if our last $k$ throws ended up in tail and the (eventual) throw before this sequence of tails is not a tail.



    Let $mu_k$ denote the expectation of the number of throws needed to arrive at $n$ tails in a row if we are in status $k$.



    Then $mu_n=0$ and to be found is $mu_0$.



    For $k=0,1,2,dots n-1$ we have:$$mu_{k}=p(1+mu_{k+1})+q(1+mu_0)=1+pmu_{k+1}+qmu_0$$



    So we have the following equalities:





    • $mu_0=1+pmu_1+qmu_0$ so that $mu_0=frac1p+mu_1$


    • $mu_1=1+pmu_2+qmu_0=1+pmu_2+frac{q}p+qmu_1$ so that $mu_1=frac1p+frac q{p^2}+mu_2=frac1{p^2}+mu_2$


    This makes us suspect that $mu_k=sum_{i=k+1}^np^{-i}$ for $k=0,1,dots,n$ and substitution in $(1)$ confirms that conjecture.



    The the outcome is:$$mathbb EX=sum_{i=1}^np^{-i}$$





    addendum:



    Another way to look at it is this:



    Let $nu_k$ denote the expectation of the number of throws needed to achieve exactly $k$ tails in a row.



    Then $nu_0=0$ and to be found is $nu_n$.



    Now let it be that after $X$ steps we have a consecutive row of exactly $k-1$ tails. Then by throwing tails we need $X+1$ throws to get a consecutive row of exactly $k$ tails. By throwing heads we come back in start position and from there $X+1+Y$ steps will be needed to get a consecutive row of exactly $k$ tails. This with $mathbb EX=nu_{k-1}$ and $mathbb EY=nu_{k}$ hence giving the equality:$$nu_k=p(1+nu_{k-1})+q(1+nu_{k-1}+nu_k)$$or shorter:$$pnu_k=1+nu_{k-1}$$



    This leads easily to:$$nu_k=sum_{i=1}^kp^{-i}text{ for }k=1,2,dots$$so that: $$nu_n=sum_{i=1}^np^{-i}$$





    Credit for the second solution (definitely the most elegant one) goes to @lulu.



    I was on a path that was nice but not completely okay.



    Someone attended me on that (thank you @saulspatz).



    Then someone said to me: take the original path, but with an adaption (thank you @lulu).






    share|cite|improve this answer














    Let's say that we are in status $k$ if our last $k$ throws ended up in tail and the (eventual) throw before this sequence of tails is not a tail.



    Let $mu_k$ denote the expectation of the number of throws needed to arrive at $n$ tails in a row if we are in status $k$.



    Then $mu_n=0$ and to be found is $mu_0$.



    For $k=0,1,2,dots n-1$ we have:$$mu_{k}=p(1+mu_{k+1})+q(1+mu_0)=1+pmu_{k+1}+qmu_0$$



    So we have the following equalities:





    • $mu_0=1+pmu_1+qmu_0$ so that $mu_0=frac1p+mu_1$


    • $mu_1=1+pmu_2+qmu_0=1+pmu_2+frac{q}p+qmu_1$ so that $mu_1=frac1p+frac q{p^2}+mu_2=frac1{p^2}+mu_2$


    This makes us suspect that $mu_k=sum_{i=k+1}^np^{-i}$ for $k=0,1,dots,n$ and substitution in $(1)$ confirms that conjecture.



    The the outcome is:$$mathbb EX=sum_{i=1}^np^{-i}$$





    addendum:



    Another way to look at it is this:



    Let $nu_k$ denote the expectation of the number of throws needed to achieve exactly $k$ tails in a row.



    Then $nu_0=0$ and to be found is $nu_n$.



    Now let it be that after $X$ steps we have a consecutive row of exactly $k-1$ tails. Then by throwing tails we need $X+1$ throws to get a consecutive row of exactly $k$ tails. By throwing heads we come back in start position and from there $X+1+Y$ steps will be needed to get a consecutive row of exactly $k$ tails. This with $mathbb EX=nu_{k-1}$ and $mathbb EY=nu_{k}$ hence giving the equality:$$nu_k=p(1+nu_{k-1})+q(1+nu_{k-1}+nu_k)$$or shorter:$$pnu_k=1+nu_{k-1}$$



    This leads easily to:$$nu_k=sum_{i=1}^kp^{-i}text{ for }k=1,2,dots$$so that: $$nu_n=sum_{i=1}^np^{-i}$$





    Credit for the second solution (definitely the most elegant one) goes to @lulu.



    I was on a path that was nice but not completely okay.



    Someone attended me on that (thank you @saulspatz).



    Then someone said to me: take the original path, but with an adaption (thank you @lulu).







    share|cite|improve this answer














    share|cite|improve this answer



    share|cite|improve this answer








    edited 19 hours ago

























    answered 22 hours ago









    drhab

    94.2k543125




    94.2k543125








    • 1




      I did this too, but on reflection, I don't think it's right. If we toss a tail, we can't say we just need $n-1$ tails in a row. If the next toss is heads, we're back to needing $n$ tails in a row.
      – saulspatz
      22 hours ago










    • @saulspatz You are correct. I will delete this within some minutes. Thank you.
      – drhab
      22 hours ago
















    • 1




      I did this too, but on reflection, I don't think it's right. If we toss a tail, we can't say we just need $n-1$ tails in a row. If the next toss is heads, we're back to needing $n$ tails in a row.
      – saulspatz
      22 hours ago










    • @saulspatz You are correct. I will delete this within some minutes. Thank you.
      – drhab
      22 hours ago










    1




    1




    I did this too, but on reflection, I don't think it's right. If we toss a tail, we can't say we just need $n-1$ tails in a row. If the next toss is heads, we're back to needing $n$ tails in a row.
    – saulspatz
    22 hours ago




    I did this too, but on reflection, I don't think it's right. If we toss a tail, we can't say we just need $n-1$ tails in a row. If the next toss is heads, we're back to needing $n$ tails in a row.
    – saulspatz
    22 hours ago












    @saulspatz You are correct. I will delete this within some minutes. Thank you.
    – drhab
    22 hours ago






    @saulspatz You are correct. I will delete this within some minutes. Thank you.
    – drhab
    22 hours ago












    up vote
    0
    down vote













    This is a finite-state absorbing Markov chain. The state is the number of consecutive tails we have tossed so far. We start in state $0$ and the absorbing state is $n$. If we are in state $k<n$ then we transition to state $k+1$ with probability $p$ and we transition to state $0$ with probability $q,$ so that the first column on the matrix $Q$ described in the wiki has $q$ in every position, and the entries on the superdiagonal are all $p.$



    You need to figure out $(I-Q)^{-1}$






    share|cite|improve this answer

























      up vote
      0
      down vote













      This is a finite-state absorbing Markov chain. The state is the number of consecutive tails we have tossed so far. We start in state $0$ and the absorbing state is $n$. If we are in state $k<n$ then we transition to state $k+1$ with probability $p$ and we transition to state $0$ with probability $q,$ so that the first column on the matrix $Q$ described in the wiki has $q$ in every position, and the entries on the superdiagonal are all $p.$



      You need to figure out $(I-Q)^{-1}$






      share|cite|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        This is a finite-state absorbing Markov chain. The state is the number of consecutive tails we have tossed so far. We start in state $0$ and the absorbing state is $n$. If we are in state $k<n$ then we transition to state $k+1$ with probability $p$ and we transition to state $0$ with probability $q,$ so that the first column on the matrix $Q$ described in the wiki has $q$ in every position, and the entries on the superdiagonal are all $p.$



        You need to figure out $(I-Q)^{-1}$






        share|cite|improve this answer












        This is a finite-state absorbing Markov chain. The state is the number of consecutive tails we have tossed so far. We start in state $0$ and the absorbing state is $n$. If we are in state $k<n$ then we transition to state $k+1$ with probability $p$ and we transition to state $0$ with probability $q,$ so that the first column on the matrix $Q$ described in the wiki has $q$ in every position, and the entries on the superdiagonal are all $p.$



        You need to figure out $(I-Q)^{-1}$







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered 21 hours ago









        saulspatz

        12.8k21327




        12.8k21327






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3004813%2fprobability-of-getting-n-tails-in-a-row%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

            Can a sorcerer learn a 5th-level spell early by creating spell slots using the Font of Magic feature?

            Does disintegrating a polymorphed enemy still kill it after the 2018 errata?

            A Topological Invariant for $pi_3(U(n))$