How to solve the probability of the binomial distribution sequence below?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite













Let $x_0$, $x_1$...$x_n$ be a sequence of independent random variables. $x_i = 1$ has probability $p$ and $x_i = 0$ has probability $1-p$. Let $k$ be the smallest integer such that $x_k = x_k+1$. Find probability that $x_k = 1$.




Example: $1,0,0,1,1,cdotsquad k = 1$ and $x_k = 0$.



My idea is that the probability of $x_k = 1$ is equal to the probability that no consecutive zero occurs before, which is $1-x_k = 0$ and then this question becomes the same question.







share|cite|improve this question





















  • Welcome to MSE. It will be more likely that you will get an answer if you show us that you made an effort. This should be added to the question rather than in the comments.
    – José Carlos Santos
    Aug 6 at 8:01














up vote
0
down vote

favorite













Let $x_0$, $x_1$...$x_n$ be a sequence of independent random variables. $x_i = 1$ has probability $p$ and $x_i = 0$ has probability $1-p$. Let $k$ be the smallest integer such that $x_k = x_k+1$. Find probability that $x_k = 1$.




Example: $1,0,0,1,1,cdotsquad k = 1$ and $x_k = 0$.



My idea is that the probability of $x_k = 1$ is equal to the probability that no consecutive zero occurs before, which is $1-x_k = 0$ and then this question becomes the same question.







share|cite|improve this question





















  • Welcome to MSE. It will be more likely that you will get an answer if you show us that you made an effort. This should be added to the question rather than in the comments.
    – José Carlos Santos
    Aug 6 at 8:01












up vote
0
down vote

favorite









up vote
0
down vote

favorite












Let $x_0$, $x_1$...$x_n$ be a sequence of independent random variables. $x_i = 1$ has probability $p$ and $x_i = 0$ has probability $1-p$. Let $k$ be the smallest integer such that $x_k = x_k+1$. Find probability that $x_k = 1$.




Example: $1,0,0,1,1,cdotsquad k = 1$ and $x_k = 0$.



My idea is that the probability of $x_k = 1$ is equal to the probability that no consecutive zero occurs before, which is $1-x_k = 0$ and then this question becomes the same question.







share|cite|improve this question














Let $x_0$, $x_1$...$x_n$ be a sequence of independent random variables. $x_i = 1$ has probability $p$ and $x_i = 0$ has probability $1-p$. Let $k$ be the smallest integer such that $x_k = x_k+1$. Find probability that $x_k = 1$.




Example: $1,0,0,1,1,cdotsquad k = 1$ and $x_k = 0$.



My idea is that the probability of $x_k = 1$ is equal to the probability that no consecutive zero occurs before, which is $1-x_k = 0$ and then this question becomes the same question.









share|cite|improve this question












share|cite|improve this question




share|cite|improve this question








edited Aug 6 at 8:08









TheSimpliFire

9,69261952




9,69261952









asked Aug 6 at 7:59









neverflow

12




12











  • Welcome to MSE. It will be more likely that you will get an answer if you show us that you made an effort. This should be added to the question rather than in the comments.
    – José Carlos Santos
    Aug 6 at 8:01
















  • Welcome to MSE. It will be more likely that you will get an answer if you show us that you made an effort. This should be added to the question rather than in the comments.
    – José Carlos Santos
    Aug 6 at 8:01















Welcome to MSE. It will be more likely that you will get an answer if you show us that you made an effort. This should be added to the question rather than in the comments.
– José Carlos Santos
Aug 6 at 8:01




Welcome to MSE. It will be more likely that you will get an answer if you show us that you made an effort. This should be added to the question rather than in the comments.
– José Carlos Santos
Aug 6 at 8:01










2 Answers
2






active

oldest

votes

















up vote
2
down vote













Denote $r:=P(x_k=1)$ and $r_0:=P(x_k=1mid x_0=0)$ and $r_1:=P(x_k=1mid x_0=1)$.



Then we have the equalities:



  • $r=pr_1+(1-p)r_0$

  • $r_0=pr_1$

  • $r_1=p+(1-p)r_0$

Do you see why, and can you take it from here?




edit



$beginarrayccccc
& & 0\
& 1-pnearrow & & nwarrow\
textstart & & pdownarrow & & uparrow1-p\
& psearrow & & nearrow\
& & 1\
& & & psearrow\
& & & & x_k=1
endarray$






share|cite|improve this answer























  • Thank you! I have questions on the equalities, I think r = r1+r0 and I couldn't see why r0=pr1, could you explain it more? Thank you in advance.
    – neverflow
    Aug 6 at 8:33











  • I added a (clumsy) picture of the situation in the hope that things become more clear. If $x_0$ has taken its value then we land in "status" $0$ or "status"1. If we are in status $0$ then we can only end up with $x_k=1$ if the next $x_i$ gives a $1$ and secondly from status $1$ we go on to status $x_k=1$. That gives $r_0=pr_1$.
    – drhab
    Aug 6 at 8:57











  • $rneq r_1+r_0$ (as you think) but $r=r_1p_1+r_0(1-p)$. In general we do not have $P(A)=P(Amid B)+P(Amid B^complement)$ but $P(A)=P(Amid B)P(B)+P(Amid B^complement)P(B^complement)$
    – drhab
    Aug 6 at 9:13










  • Thanks for the picture and explanation! I think I get it!
    – neverflow
    Aug 6 at 12:28

















up vote
1
down vote













For $x_k=1$, the first $k-1$ samples must either be: an alternating sequence of $1,0$ (and $k$ is odd) or $0$ followed by an alternating sequence of $1,0$ (and $k$ is even); and of course samples $x_k, x_k+1$ must then be both $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: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    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%2f2873681%2fhow-to-solve-the-probability-of-the-binomial-distribution-sequence-below%23new-answer', 'question_page');

    );

    Post as a guest






























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote













    Denote $r:=P(x_k=1)$ and $r_0:=P(x_k=1mid x_0=0)$ and $r_1:=P(x_k=1mid x_0=1)$.



    Then we have the equalities:



    • $r=pr_1+(1-p)r_0$

    • $r_0=pr_1$

    • $r_1=p+(1-p)r_0$

    Do you see why, and can you take it from here?




    edit



    $beginarrayccccc
    & & 0\
    & 1-pnearrow & & nwarrow\
    textstart & & pdownarrow & & uparrow1-p\
    & psearrow & & nearrow\
    & & 1\
    & & & psearrow\
    & & & & x_k=1
    endarray$






    share|cite|improve this answer























    • Thank you! I have questions on the equalities, I think r = r1+r0 and I couldn't see why r0=pr1, could you explain it more? Thank you in advance.
      – neverflow
      Aug 6 at 8:33











    • I added a (clumsy) picture of the situation in the hope that things become more clear. If $x_0$ has taken its value then we land in "status" $0$ or "status"1. If we are in status $0$ then we can only end up with $x_k=1$ if the next $x_i$ gives a $1$ and secondly from status $1$ we go on to status $x_k=1$. That gives $r_0=pr_1$.
      – drhab
      Aug 6 at 8:57











    • $rneq r_1+r_0$ (as you think) but $r=r_1p_1+r_0(1-p)$. In general we do not have $P(A)=P(Amid B)+P(Amid B^complement)$ but $P(A)=P(Amid B)P(B)+P(Amid B^complement)P(B^complement)$
      – drhab
      Aug 6 at 9:13










    • Thanks for the picture and explanation! I think I get it!
      – neverflow
      Aug 6 at 12:28














    up vote
    2
    down vote













    Denote $r:=P(x_k=1)$ and $r_0:=P(x_k=1mid x_0=0)$ and $r_1:=P(x_k=1mid x_0=1)$.



    Then we have the equalities:



    • $r=pr_1+(1-p)r_0$

    • $r_0=pr_1$

    • $r_1=p+(1-p)r_0$

    Do you see why, and can you take it from here?




    edit



    $beginarrayccccc
    & & 0\
    & 1-pnearrow & & nwarrow\
    textstart & & pdownarrow & & uparrow1-p\
    & psearrow & & nearrow\
    & & 1\
    & & & psearrow\
    & & & & x_k=1
    endarray$






    share|cite|improve this answer























    • Thank you! I have questions on the equalities, I think r = r1+r0 and I couldn't see why r0=pr1, could you explain it more? Thank you in advance.
      – neverflow
      Aug 6 at 8:33











    • I added a (clumsy) picture of the situation in the hope that things become more clear. If $x_0$ has taken its value then we land in "status" $0$ or "status"1. If we are in status $0$ then we can only end up with $x_k=1$ if the next $x_i$ gives a $1$ and secondly from status $1$ we go on to status $x_k=1$. That gives $r_0=pr_1$.
      – drhab
      Aug 6 at 8:57











    • $rneq r_1+r_0$ (as you think) but $r=r_1p_1+r_0(1-p)$. In general we do not have $P(A)=P(Amid B)+P(Amid B^complement)$ but $P(A)=P(Amid B)P(B)+P(Amid B^complement)P(B^complement)$
      – drhab
      Aug 6 at 9:13










    • Thanks for the picture and explanation! I think I get it!
      – neverflow
      Aug 6 at 12:28












    up vote
    2
    down vote










    up vote
    2
    down vote









    Denote $r:=P(x_k=1)$ and $r_0:=P(x_k=1mid x_0=0)$ and $r_1:=P(x_k=1mid x_0=1)$.



    Then we have the equalities:



    • $r=pr_1+(1-p)r_0$

    • $r_0=pr_1$

    • $r_1=p+(1-p)r_0$

    Do you see why, and can you take it from here?




    edit



    $beginarrayccccc
    & & 0\
    & 1-pnearrow & & nwarrow\
    textstart & & pdownarrow & & uparrow1-p\
    & psearrow & & nearrow\
    & & 1\
    & & & psearrow\
    & & & & x_k=1
    endarray$






    share|cite|improve this answer















    Denote $r:=P(x_k=1)$ and $r_0:=P(x_k=1mid x_0=0)$ and $r_1:=P(x_k=1mid x_0=1)$.



    Then we have the equalities:



    • $r=pr_1+(1-p)r_0$

    • $r_0=pr_1$

    • $r_1=p+(1-p)r_0$

    Do you see why, and can you take it from here?




    edit



    $beginarrayccccc
    & & 0\
    & 1-pnearrow & & nwarrow\
    textstart & & pdownarrow & & uparrow1-p\
    & psearrow & & nearrow\
    & & 1\
    & & & psearrow\
    & & & & x_k=1
    endarray$







    share|cite|improve this answer















    share|cite|improve this answer



    share|cite|improve this answer








    edited Aug 6 at 8:58


























    answered Aug 6 at 8:14









    drhab

    86.8k541118




    86.8k541118











    • Thank you! I have questions on the equalities, I think r = r1+r0 and I couldn't see why r0=pr1, could you explain it more? Thank you in advance.
      – neverflow
      Aug 6 at 8:33











    • I added a (clumsy) picture of the situation in the hope that things become more clear. If $x_0$ has taken its value then we land in "status" $0$ or "status"1. If we are in status $0$ then we can only end up with $x_k=1$ if the next $x_i$ gives a $1$ and secondly from status $1$ we go on to status $x_k=1$. That gives $r_0=pr_1$.
      – drhab
      Aug 6 at 8:57











    • $rneq r_1+r_0$ (as you think) but $r=r_1p_1+r_0(1-p)$. In general we do not have $P(A)=P(Amid B)+P(Amid B^complement)$ but $P(A)=P(Amid B)P(B)+P(Amid B^complement)P(B^complement)$
      – drhab
      Aug 6 at 9:13










    • Thanks for the picture and explanation! I think I get it!
      – neverflow
      Aug 6 at 12:28
















    • Thank you! I have questions on the equalities, I think r = r1+r0 and I couldn't see why r0=pr1, could you explain it more? Thank you in advance.
      – neverflow
      Aug 6 at 8:33











    • I added a (clumsy) picture of the situation in the hope that things become more clear. If $x_0$ has taken its value then we land in "status" $0$ or "status"1. If we are in status $0$ then we can only end up with $x_k=1$ if the next $x_i$ gives a $1$ and secondly from status $1$ we go on to status $x_k=1$. That gives $r_0=pr_1$.
      – drhab
      Aug 6 at 8:57











    • $rneq r_1+r_0$ (as you think) but $r=r_1p_1+r_0(1-p)$. In general we do not have $P(A)=P(Amid B)+P(Amid B^complement)$ but $P(A)=P(Amid B)P(B)+P(Amid B^complement)P(B^complement)$
      – drhab
      Aug 6 at 9:13










    • Thanks for the picture and explanation! I think I get it!
      – neverflow
      Aug 6 at 12:28















    Thank you! I have questions on the equalities, I think r = r1+r0 and I couldn't see why r0=pr1, could you explain it more? Thank you in advance.
    – neverflow
    Aug 6 at 8:33





    Thank you! I have questions on the equalities, I think r = r1+r0 and I couldn't see why r0=pr1, could you explain it more? Thank you in advance.
    – neverflow
    Aug 6 at 8:33













    I added a (clumsy) picture of the situation in the hope that things become more clear. If $x_0$ has taken its value then we land in "status" $0$ or "status"1. If we are in status $0$ then we can only end up with $x_k=1$ if the next $x_i$ gives a $1$ and secondly from status $1$ we go on to status $x_k=1$. That gives $r_0=pr_1$.
    – drhab
    Aug 6 at 8:57





    I added a (clumsy) picture of the situation in the hope that things become more clear. If $x_0$ has taken its value then we land in "status" $0$ or "status"1. If we are in status $0$ then we can only end up with $x_k=1$ if the next $x_i$ gives a $1$ and secondly from status $1$ we go on to status $x_k=1$. That gives $r_0=pr_1$.
    – drhab
    Aug 6 at 8:57













    $rneq r_1+r_0$ (as you think) but $r=r_1p_1+r_0(1-p)$. In general we do not have $P(A)=P(Amid B)+P(Amid B^complement)$ but $P(A)=P(Amid B)P(B)+P(Amid B^complement)P(B^complement)$
    – drhab
    Aug 6 at 9:13




    $rneq r_1+r_0$ (as you think) but $r=r_1p_1+r_0(1-p)$. In general we do not have $P(A)=P(Amid B)+P(Amid B^complement)$ but $P(A)=P(Amid B)P(B)+P(Amid B^complement)P(B^complement)$
    – drhab
    Aug 6 at 9:13












    Thanks for the picture and explanation! I think I get it!
    – neverflow
    Aug 6 at 12:28




    Thanks for the picture and explanation! I think I get it!
    – neverflow
    Aug 6 at 12:28










    up vote
    1
    down vote













    For $x_k=1$, the first $k-1$ samples must either be: an alternating sequence of $1,0$ (and $k$ is odd) or $0$ followed by an alternating sequence of $1,0$ (and $k$ is even); and of course samples $x_k, x_k+1$ must then be both $1$.






    share|cite|improve this answer



























      up vote
      1
      down vote













      For $x_k=1$, the first $k-1$ samples must either be: an alternating sequence of $1,0$ (and $k$ is odd) or $0$ followed by an alternating sequence of $1,0$ (and $k$ is even); and of course samples $x_k, x_k+1$ must then be both $1$.






      share|cite|improve this answer

























        up vote
        1
        down vote










        up vote
        1
        down vote









        For $x_k=1$, the first $k-1$ samples must either be: an alternating sequence of $1,0$ (and $k$ is odd) or $0$ followed by an alternating sequence of $1,0$ (and $k$ is even); and of course samples $x_k, x_k+1$ must then be both $1$.






        share|cite|improve this answer















        For $x_k=1$, the first $k-1$ samples must either be: an alternating sequence of $1,0$ (and $k$ is odd) or $0$ followed by an alternating sequence of $1,0$ (and $k$ is even); and of course samples $x_k, x_k+1$ must then be both $1$.







        share|cite|improve this answer















        share|cite|improve this answer



        share|cite|improve this answer








        answered Aug 6 at 8:17



























        community wiki





        Graham Kemp























             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2873681%2fhow-to-solve-the-probability-of-the-binomial-distribution-sequence-below%23new-answer', 'question_page');

            );

            Post as a guest













































































            Comments

            Popular posts from this blog

            What is the equation of a 3D cone with generalised tilt?

            Color the edges and diagonals of a regular polygon

            Relationship between determinant of matrix and determinant of adjoint?