Expectation problem with geometric random variable?












0














If I have a stream of integers from 0 to 9(each with equal probability and repetition is allowed) that are spewed out until I get the first instance of 4-5 next to each other in this order, how do I find the expected value of the number of integers that will be printed?



I set up a random variable, X, that is the number of integers printed, and an indicator random variable, $X_i$, that is 1 if the $I^{th}$ number does not complete the first instance of 4-5, and 0 otherwise. I think that the probability that $X_i$ = 1 is calculated as 1 - (1/10)^2, so would the expected value of X just be 1/p?










share|cite|improve this question



























    0














    If I have a stream of integers from 0 to 9(each with equal probability and repetition is allowed) that are spewed out until I get the first instance of 4-5 next to each other in this order, how do I find the expected value of the number of integers that will be printed?



    I set up a random variable, X, that is the number of integers printed, and an indicator random variable, $X_i$, that is 1 if the $I^{th}$ number does not complete the first instance of 4-5, and 0 otherwise. I think that the probability that $X_i$ = 1 is calculated as 1 - (1/10)^2, so would the expected value of X just be 1/p?










    share|cite|improve this question

























      0












      0








      0







      If I have a stream of integers from 0 to 9(each with equal probability and repetition is allowed) that are spewed out until I get the first instance of 4-5 next to each other in this order, how do I find the expected value of the number of integers that will be printed?



      I set up a random variable, X, that is the number of integers printed, and an indicator random variable, $X_i$, that is 1 if the $I^{th}$ number does not complete the first instance of 4-5, and 0 otherwise. I think that the probability that $X_i$ = 1 is calculated as 1 - (1/10)^2, so would the expected value of X just be 1/p?










      share|cite|improve this question













      If I have a stream of integers from 0 to 9(each with equal probability and repetition is allowed) that are spewed out until I get the first instance of 4-5 next to each other in this order, how do I find the expected value of the number of integers that will be printed?



      I set up a random variable, X, that is the number of integers printed, and an indicator random variable, $X_i$, that is 1 if the $I^{th}$ number does not complete the first instance of 4-5, and 0 otherwise. I think that the probability that $X_i$ = 1 is calculated as 1 - (1/10)^2, so would the expected value of X just be 1/p?







      probability random-variables expected-value geometric-probability






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked Dec 2 '18 at 19:45









      Justin Dee

      615




      615






















          1 Answer
          1






          active

          oldest

          votes


















          0














          I don't understand your computation. It would appear that the expected value of the $i^{th}$ term would be a function of $i$, since you would need to ensure that the game wasn't over before the $i^{th}$ move. Anyway, here is another approach:



          There are three states here...$emptyset,4,{4,5}$ according to how much of the $4,5$ block occurs at the end of the running string. Letting $E_S$ deonte the expected number it will take to finish assuming you are starting in state $S$, we note that the answer we want is $E=E_{emptyset}$. Of course $E_{{4,5}}=0$.



          Noting that $emptyset$ can only transition to $emptyset$ (probability .9) or $4$ (probability .1) we compute $$E_{emptyset}=frac 9{10}times (E_{emptyset}+1)+frac 1{10}times (E_4+1)implies E_{emptyset}=E_4+10$$



          Similarly $$E_4=frac 1{10}times 1+frac 1{10}(E_4+1)+frac 8{10}times (E_{emptyset}+1)implies 9E_4=8E_{emptyset}+10$$



          This system is easy to solve and we get $$boxed {E_{emptyset}=100}quad &quad boxed {E_4=90}$$






          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',
            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%2f3023098%2fexpectation-problem-with-geometric-random-variable%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            I don't understand your computation. It would appear that the expected value of the $i^{th}$ term would be a function of $i$, since you would need to ensure that the game wasn't over before the $i^{th}$ move. Anyway, here is another approach:



            There are three states here...$emptyset,4,{4,5}$ according to how much of the $4,5$ block occurs at the end of the running string. Letting $E_S$ deonte the expected number it will take to finish assuming you are starting in state $S$, we note that the answer we want is $E=E_{emptyset}$. Of course $E_{{4,5}}=0$.



            Noting that $emptyset$ can only transition to $emptyset$ (probability .9) or $4$ (probability .1) we compute $$E_{emptyset}=frac 9{10}times (E_{emptyset}+1)+frac 1{10}times (E_4+1)implies E_{emptyset}=E_4+10$$



            Similarly $$E_4=frac 1{10}times 1+frac 1{10}(E_4+1)+frac 8{10}times (E_{emptyset}+1)implies 9E_4=8E_{emptyset}+10$$



            This system is easy to solve and we get $$boxed {E_{emptyset}=100}quad &quad boxed {E_4=90}$$






            share|cite|improve this answer


























              0














              I don't understand your computation. It would appear that the expected value of the $i^{th}$ term would be a function of $i$, since you would need to ensure that the game wasn't over before the $i^{th}$ move. Anyway, here is another approach:



              There are three states here...$emptyset,4,{4,5}$ according to how much of the $4,5$ block occurs at the end of the running string. Letting $E_S$ deonte the expected number it will take to finish assuming you are starting in state $S$, we note that the answer we want is $E=E_{emptyset}$. Of course $E_{{4,5}}=0$.



              Noting that $emptyset$ can only transition to $emptyset$ (probability .9) or $4$ (probability .1) we compute $$E_{emptyset}=frac 9{10}times (E_{emptyset}+1)+frac 1{10}times (E_4+1)implies E_{emptyset}=E_4+10$$



              Similarly $$E_4=frac 1{10}times 1+frac 1{10}(E_4+1)+frac 8{10}times (E_{emptyset}+1)implies 9E_4=8E_{emptyset}+10$$



              This system is easy to solve and we get $$boxed {E_{emptyset}=100}quad &quad boxed {E_4=90}$$






              share|cite|improve this answer
























                0












                0








                0






                I don't understand your computation. It would appear that the expected value of the $i^{th}$ term would be a function of $i$, since you would need to ensure that the game wasn't over before the $i^{th}$ move. Anyway, here is another approach:



                There are three states here...$emptyset,4,{4,5}$ according to how much of the $4,5$ block occurs at the end of the running string. Letting $E_S$ deonte the expected number it will take to finish assuming you are starting in state $S$, we note that the answer we want is $E=E_{emptyset}$. Of course $E_{{4,5}}=0$.



                Noting that $emptyset$ can only transition to $emptyset$ (probability .9) or $4$ (probability .1) we compute $$E_{emptyset}=frac 9{10}times (E_{emptyset}+1)+frac 1{10}times (E_4+1)implies E_{emptyset}=E_4+10$$



                Similarly $$E_4=frac 1{10}times 1+frac 1{10}(E_4+1)+frac 8{10}times (E_{emptyset}+1)implies 9E_4=8E_{emptyset}+10$$



                This system is easy to solve and we get $$boxed {E_{emptyset}=100}quad &quad boxed {E_4=90}$$






                share|cite|improve this answer












                I don't understand your computation. It would appear that the expected value of the $i^{th}$ term would be a function of $i$, since you would need to ensure that the game wasn't over before the $i^{th}$ move. Anyway, here is another approach:



                There are three states here...$emptyset,4,{4,5}$ according to how much of the $4,5$ block occurs at the end of the running string. Letting $E_S$ deonte the expected number it will take to finish assuming you are starting in state $S$, we note that the answer we want is $E=E_{emptyset}$. Of course $E_{{4,5}}=0$.



                Noting that $emptyset$ can only transition to $emptyset$ (probability .9) or $4$ (probability .1) we compute $$E_{emptyset}=frac 9{10}times (E_{emptyset}+1)+frac 1{10}times (E_4+1)implies E_{emptyset}=E_4+10$$



                Similarly $$E_4=frac 1{10}times 1+frac 1{10}(E_4+1)+frac 8{10}times (E_{emptyset}+1)implies 9E_4=8E_{emptyset}+10$$



                This system is easy to solve and we get $$boxed {E_{emptyset}=100}quad &quad boxed {E_4=90}$$







                share|cite|improve this answer












                share|cite|improve this answer



                share|cite|improve this answer










                answered Dec 2 '18 at 19:59









                lulu

                39.2k24677




                39.2k24677






























                    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.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • 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.


                    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%2f3023098%2fexpectation-problem-with-geometric-random-variable%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

                    Wiesbaden

                    Marschland

                    Dieringhausen