Expected value of first success in Bernoulli trials












0












$begingroup$


I have a sequence of $n$ Bernoulli experiments each succeeding with probability $p$.
In general, the number of successes $X$ follows the well-known binomial distribution:



$$P(X = k) = begin{pmatrix} n\ k end{pmatrix} p^k(1-p)^{n-k}$$



However, I'm interested in the expected value of the number of experiments until the first success, assuming a maximum number of $n$ trials (if the experiment never succeeds, there will have been $n$ experiments attempted).



My reasoning is the following: if $n = 4$, the expected value will be (?):



$$ 1cdot p + 2cdot(1-p)p + 3cdot(1-p)^2p + 4cdot(1-p)^3p + 5(1-p)^5$$



Generalizing:



$$E = sum_{i=1}^n icdot p(1-p)^{i-1}$$



However, the sum of these weights is not one, as it should be:



$$sum_{i=1}^n p(1-p)^{i-1} neq 1$$



Clearly I'm off somewhere. What am I missing?










share|cite|improve this question











$endgroup$












  • $begingroup$
    Could you please elaborate on why exactly it should be $1$? Keep in mind that you are calculating expected value of the random variable, not probability distribution.
    $endgroup$
    – Sauhard Sharma
    Dec 13 '18 at 14:15










  • $begingroup$
    The expected value shouldn't be one, but the sum of the coefficients should
    $endgroup$
    – Sean Bone
    Dec 13 '18 at 14:21










  • $begingroup$
    If I understand well then to be found is the expected value of a random variable $Z$. It will take a value in ${1,dots,n}$ if a success appears in the first $n$ trials. Could you tell us what value $Z$ will take if that does not happen?
    $endgroup$
    – drhab
    Dec 13 '18 at 14:28












  • $begingroup$
    That is correct. If none of the $n$ trials is successful, $Z$ will be $n$.
    $endgroup$
    – Sean Bone
    Dec 13 '18 at 14:31










  • $begingroup$
    Your probability distribution is based on the assumption that it will succeed ultimately. If you add in the probability that it doesn't succeed at all, your weights will add up to $1$.
    $endgroup$
    – Sauhard Sharma
    Dec 13 '18 at 14:31


















0












$begingroup$


I have a sequence of $n$ Bernoulli experiments each succeeding with probability $p$.
In general, the number of successes $X$ follows the well-known binomial distribution:



$$P(X = k) = begin{pmatrix} n\ k end{pmatrix} p^k(1-p)^{n-k}$$



However, I'm interested in the expected value of the number of experiments until the first success, assuming a maximum number of $n$ trials (if the experiment never succeeds, there will have been $n$ experiments attempted).



My reasoning is the following: if $n = 4$, the expected value will be (?):



$$ 1cdot p + 2cdot(1-p)p + 3cdot(1-p)^2p + 4cdot(1-p)^3p + 5(1-p)^5$$



Generalizing:



$$E = sum_{i=1}^n icdot p(1-p)^{i-1}$$



However, the sum of these weights is not one, as it should be:



$$sum_{i=1}^n p(1-p)^{i-1} neq 1$$



Clearly I'm off somewhere. What am I missing?










share|cite|improve this question











$endgroup$












  • $begingroup$
    Could you please elaborate on why exactly it should be $1$? Keep in mind that you are calculating expected value of the random variable, not probability distribution.
    $endgroup$
    – Sauhard Sharma
    Dec 13 '18 at 14:15










  • $begingroup$
    The expected value shouldn't be one, but the sum of the coefficients should
    $endgroup$
    – Sean Bone
    Dec 13 '18 at 14:21










  • $begingroup$
    If I understand well then to be found is the expected value of a random variable $Z$. It will take a value in ${1,dots,n}$ if a success appears in the first $n$ trials. Could you tell us what value $Z$ will take if that does not happen?
    $endgroup$
    – drhab
    Dec 13 '18 at 14:28












  • $begingroup$
    That is correct. If none of the $n$ trials is successful, $Z$ will be $n$.
    $endgroup$
    – Sean Bone
    Dec 13 '18 at 14:31










  • $begingroup$
    Your probability distribution is based on the assumption that it will succeed ultimately. If you add in the probability that it doesn't succeed at all, your weights will add up to $1$.
    $endgroup$
    – Sauhard Sharma
    Dec 13 '18 at 14:31
















0












0








0





$begingroup$


I have a sequence of $n$ Bernoulli experiments each succeeding with probability $p$.
In general, the number of successes $X$ follows the well-known binomial distribution:



$$P(X = k) = begin{pmatrix} n\ k end{pmatrix} p^k(1-p)^{n-k}$$



However, I'm interested in the expected value of the number of experiments until the first success, assuming a maximum number of $n$ trials (if the experiment never succeeds, there will have been $n$ experiments attempted).



My reasoning is the following: if $n = 4$, the expected value will be (?):



$$ 1cdot p + 2cdot(1-p)p + 3cdot(1-p)^2p + 4cdot(1-p)^3p + 5(1-p)^5$$



Generalizing:



$$E = sum_{i=1}^n icdot p(1-p)^{i-1}$$



However, the sum of these weights is not one, as it should be:



$$sum_{i=1}^n p(1-p)^{i-1} neq 1$$



Clearly I'm off somewhere. What am I missing?










share|cite|improve this question











$endgroup$




I have a sequence of $n$ Bernoulli experiments each succeeding with probability $p$.
In general, the number of successes $X$ follows the well-known binomial distribution:



$$P(X = k) = begin{pmatrix} n\ k end{pmatrix} p^k(1-p)^{n-k}$$



However, I'm interested in the expected value of the number of experiments until the first success, assuming a maximum number of $n$ trials (if the experiment never succeeds, there will have been $n$ experiments attempted).



My reasoning is the following: if $n = 4$, the expected value will be (?):



$$ 1cdot p + 2cdot(1-p)p + 3cdot(1-p)^2p + 4cdot(1-p)^3p + 5(1-p)^5$$



Generalizing:



$$E = sum_{i=1}^n icdot p(1-p)^{i-1}$$



However, the sum of these weights is not one, as it should be:



$$sum_{i=1}^n p(1-p)^{i-1} neq 1$$



Clearly I'm off somewhere. What am I missing?







probability-distributions binomial-distribution expected-value






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Dec 13 '18 at 14:21







Sean Bone

















asked Dec 13 '18 at 14:11









Sean BoneSean Bone

1345




1345












  • $begingroup$
    Could you please elaborate on why exactly it should be $1$? Keep in mind that you are calculating expected value of the random variable, not probability distribution.
    $endgroup$
    – Sauhard Sharma
    Dec 13 '18 at 14:15










  • $begingroup$
    The expected value shouldn't be one, but the sum of the coefficients should
    $endgroup$
    – Sean Bone
    Dec 13 '18 at 14:21










  • $begingroup$
    If I understand well then to be found is the expected value of a random variable $Z$. It will take a value in ${1,dots,n}$ if a success appears in the first $n$ trials. Could you tell us what value $Z$ will take if that does not happen?
    $endgroup$
    – drhab
    Dec 13 '18 at 14:28












  • $begingroup$
    That is correct. If none of the $n$ trials is successful, $Z$ will be $n$.
    $endgroup$
    – Sean Bone
    Dec 13 '18 at 14:31










  • $begingroup$
    Your probability distribution is based on the assumption that it will succeed ultimately. If you add in the probability that it doesn't succeed at all, your weights will add up to $1$.
    $endgroup$
    – Sauhard Sharma
    Dec 13 '18 at 14:31




















  • $begingroup$
    Could you please elaborate on why exactly it should be $1$? Keep in mind that you are calculating expected value of the random variable, not probability distribution.
    $endgroup$
    – Sauhard Sharma
    Dec 13 '18 at 14:15










  • $begingroup$
    The expected value shouldn't be one, but the sum of the coefficients should
    $endgroup$
    – Sean Bone
    Dec 13 '18 at 14:21










  • $begingroup$
    If I understand well then to be found is the expected value of a random variable $Z$. It will take a value in ${1,dots,n}$ if a success appears in the first $n$ trials. Could you tell us what value $Z$ will take if that does not happen?
    $endgroup$
    – drhab
    Dec 13 '18 at 14:28












  • $begingroup$
    That is correct. If none of the $n$ trials is successful, $Z$ will be $n$.
    $endgroup$
    – Sean Bone
    Dec 13 '18 at 14:31










  • $begingroup$
    Your probability distribution is based on the assumption that it will succeed ultimately. If you add in the probability that it doesn't succeed at all, your weights will add up to $1$.
    $endgroup$
    – Sauhard Sharma
    Dec 13 '18 at 14:31


















$begingroup$
Could you please elaborate on why exactly it should be $1$? Keep in mind that you are calculating expected value of the random variable, not probability distribution.
$endgroup$
– Sauhard Sharma
Dec 13 '18 at 14:15




$begingroup$
Could you please elaborate on why exactly it should be $1$? Keep in mind that you are calculating expected value of the random variable, not probability distribution.
$endgroup$
– Sauhard Sharma
Dec 13 '18 at 14:15












$begingroup$
The expected value shouldn't be one, but the sum of the coefficients should
$endgroup$
– Sean Bone
Dec 13 '18 at 14:21




$begingroup$
The expected value shouldn't be one, but the sum of the coefficients should
$endgroup$
– Sean Bone
Dec 13 '18 at 14:21












$begingroup$
If I understand well then to be found is the expected value of a random variable $Z$. It will take a value in ${1,dots,n}$ if a success appears in the first $n$ trials. Could you tell us what value $Z$ will take if that does not happen?
$endgroup$
– drhab
Dec 13 '18 at 14:28






$begingroup$
If I understand well then to be found is the expected value of a random variable $Z$. It will take a value in ${1,dots,n}$ if a success appears in the first $n$ trials. Could you tell us what value $Z$ will take if that does not happen?
$endgroup$
– drhab
Dec 13 '18 at 14:28














$begingroup$
That is correct. If none of the $n$ trials is successful, $Z$ will be $n$.
$endgroup$
– Sean Bone
Dec 13 '18 at 14:31




$begingroup$
That is correct. If none of the $n$ trials is successful, $Z$ will be $n$.
$endgroup$
– Sean Bone
Dec 13 '18 at 14:31












$begingroup$
Your probability distribution is based on the assumption that it will succeed ultimately. If you add in the probability that it doesn't succeed at all, your weights will add up to $1$.
$endgroup$
– Sauhard Sharma
Dec 13 '18 at 14:31






$begingroup$
Your probability distribution is based on the assumption that it will succeed ultimately. If you add in the probability that it doesn't succeed at all, your weights will add up to $1$.
$endgroup$
– Sauhard Sharma
Dec 13 '18 at 14:31












2 Answers
2






active

oldest

votes


















0












$begingroup$

Expected value:



$$E = ncdot(1 - sum_{i=1}^N p(1-p)^{i-1}) + sum_{i=1}^N icdot p(1-p)^{i-1}$$






share|cite|improve this answer









$endgroup$













  • $begingroup$
    As it hasn't been mentioned yet in comments, in case you don't know, your scenario is similar to a Geometric distribution.
    $endgroup$
    – Sambo
    Dec 13 '18 at 14:39










  • $begingroup$
    I think $N$ should be changed into $n-1$
    $endgroup$
    – drhab
    Dec 13 '18 at 15:20



















0












$begingroup$

Denoting $q:=1-p$ for $n=4$ we find:



$$pcdot1+qpcdot2+q^2pcdot3+(1-p-qp-q^2p)cdot4$$






share|cite|improve this answer









$endgroup$













    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%2f3038051%2fexpected-value-of-first-success-in-bernoulli-trials%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









    0












    $begingroup$

    Expected value:



    $$E = ncdot(1 - sum_{i=1}^N p(1-p)^{i-1}) + sum_{i=1}^N icdot p(1-p)^{i-1}$$






    share|cite|improve this answer









    $endgroup$













    • $begingroup$
      As it hasn't been mentioned yet in comments, in case you don't know, your scenario is similar to a Geometric distribution.
      $endgroup$
      – Sambo
      Dec 13 '18 at 14:39










    • $begingroup$
      I think $N$ should be changed into $n-1$
      $endgroup$
      – drhab
      Dec 13 '18 at 15:20
















    0












    $begingroup$

    Expected value:



    $$E = ncdot(1 - sum_{i=1}^N p(1-p)^{i-1}) + sum_{i=1}^N icdot p(1-p)^{i-1}$$






    share|cite|improve this answer









    $endgroup$













    • $begingroup$
      As it hasn't been mentioned yet in comments, in case you don't know, your scenario is similar to a Geometric distribution.
      $endgroup$
      – Sambo
      Dec 13 '18 at 14:39










    • $begingroup$
      I think $N$ should be changed into $n-1$
      $endgroup$
      – drhab
      Dec 13 '18 at 15:20














    0












    0








    0





    $begingroup$

    Expected value:



    $$E = ncdot(1 - sum_{i=1}^N p(1-p)^{i-1}) + sum_{i=1}^N icdot p(1-p)^{i-1}$$






    share|cite|improve this answer









    $endgroup$



    Expected value:



    $$E = ncdot(1 - sum_{i=1}^N p(1-p)^{i-1}) + sum_{i=1}^N icdot p(1-p)^{i-1}$$







    share|cite|improve this answer












    share|cite|improve this answer



    share|cite|improve this answer










    answered Dec 13 '18 at 14:34









    Sean BoneSean Bone

    1345




    1345












    • $begingroup$
      As it hasn't been mentioned yet in comments, in case you don't know, your scenario is similar to a Geometric distribution.
      $endgroup$
      – Sambo
      Dec 13 '18 at 14:39










    • $begingroup$
      I think $N$ should be changed into $n-1$
      $endgroup$
      – drhab
      Dec 13 '18 at 15:20


















    • $begingroup$
      As it hasn't been mentioned yet in comments, in case you don't know, your scenario is similar to a Geometric distribution.
      $endgroup$
      – Sambo
      Dec 13 '18 at 14:39










    • $begingroup$
      I think $N$ should be changed into $n-1$
      $endgroup$
      – drhab
      Dec 13 '18 at 15:20
















    $begingroup$
    As it hasn't been mentioned yet in comments, in case you don't know, your scenario is similar to a Geometric distribution.
    $endgroup$
    – Sambo
    Dec 13 '18 at 14:39




    $begingroup$
    As it hasn't been mentioned yet in comments, in case you don't know, your scenario is similar to a Geometric distribution.
    $endgroup$
    – Sambo
    Dec 13 '18 at 14:39












    $begingroup$
    I think $N$ should be changed into $n-1$
    $endgroup$
    – drhab
    Dec 13 '18 at 15:20




    $begingroup$
    I think $N$ should be changed into $n-1$
    $endgroup$
    – drhab
    Dec 13 '18 at 15:20











    0












    $begingroup$

    Denoting $q:=1-p$ for $n=4$ we find:



    $$pcdot1+qpcdot2+q^2pcdot3+(1-p-qp-q^2p)cdot4$$






    share|cite|improve this answer









    $endgroup$


















      0












      $begingroup$

      Denoting $q:=1-p$ for $n=4$ we find:



      $$pcdot1+qpcdot2+q^2pcdot3+(1-p-qp-q^2p)cdot4$$






      share|cite|improve this answer









      $endgroup$
















        0












        0








        0





        $begingroup$

        Denoting $q:=1-p$ for $n=4$ we find:



        $$pcdot1+qpcdot2+q^2pcdot3+(1-p-qp-q^2p)cdot4$$






        share|cite|improve this answer









        $endgroup$



        Denoting $q:=1-p$ for $n=4$ we find:



        $$pcdot1+qpcdot2+q^2pcdot3+(1-p-qp-q^2p)cdot4$$







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Dec 13 '18 at 15:17









        drhabdrhab

        101k544130




        101k544130






























            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%2f3038051%2fexpected-value-of-first-success-in-bernoulli-trials%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

            Quarter-circle Tiles

            build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

            Mont Emei