Probability Mass Function: Geometric Distribution over an interval












0












$begingroup$


Equation: Given a random variable $Z$, let $Z ~ Geometric(theta)$, Find $P(5 leq Z leq 9)$.



Attempt 1:



Try something like $P(5 leq Z leq 9) = P(Z = 9) - P(Z = 5) = theta[(1-theta)^9-(1-theta)^5]$



I know this is a valid method for continuous distributions, but I wasn't sure if it would work the same way for a discrete function, like geometric. So I tried to compute it manually in attempt #2.



Attempt 2:



$P(5 leq Z leq 9) = P(Z = 5) + P(Z = 6) + P(Z = 7) + P(Z = 8) + P(Z= 9) = $Some answer



I know this one works, but I feel it's a bit too much in terms of computation. Like, if I was given an equation that asked for an interval from $3$ to $1000$, then there's no way I could manually compute that by hand.



Which is why I was wondering if there was a more efficient method to calculate the geometric distribution over a given interval? I tried to put everything into a summation and derive an equation, but I get stuck after pulling the theta out of the equation such that it's



$sumlimits_{i=0}^n (1- theta)^itheta = $ $theta sumlimits_{i=0}^n (1- theta)^i $



Anybody have a better solution?










share|cite|improve this question











$endgroup$

















    0












    $begingroup$


    Equation: Given a random variable $Z$, let $Z ~ Geometric(theta)$, Find $P(5 leq Z leq 9)$.



    Attempt 1:



    Try something like $P(5 leq Z leq 9) = P(Z = 9) - P(Z = 5) = theta[(1-theta)^9-(1-theta)^5]$



    I know this is a valid method for continuous distributions, but I wasn't sure if it would work the same way for a discrete function, like geometric. So I tried to compute it manually in attempt #2.



    Attempt 2:



    $P(5 leq Z leq 9) = P(Z = 5) + P(Z = 6) + P(Z = 7) + P(Z = 8) + P(Z= 9) = $Some answer



    I know this one works, but I feel it's a bit too much in terms of computation. Like, if I was given an equation that asked for an interval from $3$ to $1000$, then there's no way I could manually compute that by hand.



    Which is why I was wondering if there was a more efficient method to calculate the geometric distribution over a given interval? I tried to put everything into a summation and derive an equation, but I get stuck after pulling the theta out of the equation such that it's



    $sumlimits_{i=0}^n (1- theta)^itheta = $ $theta sumlimits_{i=0}^n (1- theta)^i $



    Anybody have a better solution?










    share|cite|improve this question











    $endgroup$















      0












      0








      0





      $begingroup$


      Equation: Given a random variable $Z$, let $Z ~ Geometric(theta)$, Find $P(5 leq Z leq 9)$.



      Attempt 1:



      Try something like $P(5 leq Z leq 9) = P(Z = 9) - P(Z = 5) = theta[(1-theta)^9-(1-theta)^5]$



      I know this is a valid method for continuous distributions, but I wasn't sure if it would work the same way for a discrete function, like geometric. So I tried to compute it manually in attempt #2.



      Attempt 2:



      $P(5 leq Z leq 9) = P(Z = 5) + P(Z = 6) + P(Z = 7) + P(Z = 8) + P(Z= 9) = $Some answer



      I know this one works, but I feel it's a bit too much in terms of computation. Like, if I was given an equation that asked for an interval from $3$ to $1000$, then there's no way I could manually compute that by hand.



      Which is why I was wondering if there was a more efficient method to calculate the geometric distribution over a given interval? I tried to put everything into a summation and derive an equation, but I get stuck after pulling the theta out of the equation such that it's



      $sumlimits_{i=0}^n (1- theta)^itheta = $ $theta sumlimits_{i=0}^n (1- theta)^i $



      Anybody have a better solution?










      share|cite|improve this question











      $endgroup$




      Equation: Given a random variable $Z$, let $Z ~ Geometric(theta)$, Find $P(5 leq Z leq 9)$.



      Attempt 1:



      Try something like $P(5 leq Z leq 9) = P(Z = 9) - P(Z = 5) = theta[(1-theta)^9-(1-theta)^5]$



      I know this is a valid method for continuous distributions, but I wasn't sure if it would work the same way for a discrete function, like geometric. So I tried to compute it manually in attempt #2.



      Attempt 2:



      $P(5 leq Z leq 9) = P(Z = 5) + P(Z = 6) + P(Z = 7) + P(Z = 8) + P(Z= 9) = $Some answer



      I know this one works, but I feel it's a bit too much in terms of computation. Like, if I was given an equation that asked for an interval from $3$ to $1000$, then there's no way I could manually compute that by hand.



      Which is why I was wondering if there was a more efficient method to calculate the geometric distribution over a given interval? I tried to put everything into a summation and derive an equation, but I get stuck after pulling the theta out of the equation such that it's



      $sumlimits_{i=0}^n (1- theta)^itheta = $ $theta sumlimits_{i=0}^n (1- theta)^i $



      Anybody have a better solution?







      discrete-mathematics probability-distributions summation






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Dec 12 '18 at 22:59









      platty

      3,350320




      3,350320










      asked Dec 12 '18 at 22:08









      Donald MayerDonald Mayer

      336




      336






















          1 Answer
          1






          active

          oldest

          votes


















          0












          $begingroup$

          Your original solution (first attempt) is not quite correct as written. Instead, you should be calculating $P(Z geq 5) - P(Z > 9)$. Intuitively, this is "the chance that $Z$ is at least $5$, but not more than $9$." For a geometric distribution, you could write this as $P(Z > 4) - P(Z > 9)$. But it is actually not too difficult to compute $P(Z > x)$ for any geometric distribution; this holds iff the first $x$ trials are failures, so it happens with probability $P(Z > x) = (1 - theta)^x$ (assuming $theta$ is the probability of success in a single trial). In general, this means that, for geometric $Z$, we have:
          $$
          begin{align*}
          P(a leq Z leq b) &= P(Z geq a) - P(Z > b) \
          &= P(Z > a-1) - P(Z > b) \
          &= (1-theta)^{a-1} - (1 - theta)^b
          end{align*}
          $$



          Also note that your summation (from the second attempt) works as well, once simplified. To find $P(a leq Z leq b)$, we note that, from the geometric distribution, this is exactly equal to
          $$sum_{k=a}^b theta (1 - theta)^{k-1}$$
          But this is a geometric series with initial term $theta(1 - theta)^{a-1}$ and common ratio $1 - theta$. The sum of such a finite geometric series with $b-a + 1$ terms is:



          $$
          begin{align*}
          frac{theta(1-theta)^{a-1} cdot left( 1 - (1 - theta)^{b-a + 1}right)}{1 - (1 - theta)} &= (1-theta)^{a-1} cdot left( 1 - (1 - theta)^{b-a + 1}right) \
          &= (1-theta)^{a-1} - (1 - theta)^b
          end{align*}
          $$

          So the two methods agree.






          share|cite|improve this answer











          $endgroup$













          • $begingroup$
            Yes, thank you. I wasn't thinking straight. The first solution you provided is what i'm looking for.The second solution you provided is the same as the textbook answer, so thanks for explaining that as well.
            $endgroup$
            – Donald Mayer
            Dec 13 '18 at 15:06














          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%2f3037285%2fprobability-mass-function-geometric-distribution-over-an-interval%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












          $begingroup$

          Your original solution (first attempt) is not quite correct as written. Instead, you should be calculating $P(Z geq 5) - P(Z > 9)$. Intuitively, this is "the chance that $Z$ is at least $5$, but not more than $9$." For a geometric distribution, you could write this as $P(Z > 4) - P(Z > 9)$. But it is actually not too difficult to compute $P(Z > x)$ for any geometric distribution; this holds iff the first $x$ trials are failures, so it happens with probability $P(Z > x) = (1 - theta)^x$ (assuming $theta$ is the probability of success in a single trial). In general, this means that, for geometric $Z$, we have:
          $$
          begin{align*}
          P(a leq Z leq b) &= P(Z geq a) - P(Z > b) \
          &= P(Z > a-1) - P(Z > b) \
          &= (1-theta)^{a-1} - (1 - theta)^b
          end{align*}
          $$



          Also note that your summation (from the second attempt) works as well, once simplified. To find $P(a leq Z leq b)$, we note that, from the geometric distribution, this is exactly equal to
          $$sum_{k=a}^b theta (1 - theta)^{k-1}$$
          But this is a geometric series with initial term $theta(1 - theta)^{a-1}$ and common ratio $1 - theta$. The sum of such a finite geometric series with $b-a + 1$ terms is:



          $$
          begin{align*}
          frac{theta(1-theta)^{a-1} cdot left( 1 - (1 - theta)^{b-a + 1}right)}{1 - (1 - theta)} &= (1-theta)^{a-1} cdot left( 1 - (1 - theta)^{b-a + 1}right) \
          &= (1-theta)^{a-1} - (1 - theta)^b
          end{align*}
          $$

          So the two methods agree.






          share|cite|improve this answer











          $endgroup$













          • $begingroup$
            Yes, thank you. I wasn't thinking straight. The first solution you provided is what i'm looking for.The second solution you provided is the same as the textbook answer, so thanks for explaining that as well.
            $endgroup$
            – Donald Mayer
            Dec 13 '18 at 15:06


















          0












          $begingroup$

          Your original solution (first attempt) is not quite correct as written. Instead, you should be calculating $P(Z geq 5) - P(Z > 9)$. Intuitively, this is "the chance that $Z$ is at least $5$, but not more than $9$." For a geometric distribution, you could write this as $P(Z > 4) - P(Z > 9)$. But it is actually not too difficult to compute $P(Z > x)$ for any geometric distribution; this holds iff the first $x$ trials are failures, so it happens with probability $P(Z > x) = (1 - theta)^x$ (assuming $theta$ is the probability of success in a single trial). In general, this means that, for geometric $Z$, we have:
          $$
          begin{align*}
          P(a leq Z leq b) &= P(Z geq a) - P(Z > b) \
          &= P(Z > a-1) - P(Z > b) \
          &= (1-theta)^{a-1} - (1 - theta)^b
          end{align*}
          $$



          Also note that your summation (from the second attempt) works as well, once simplified. To find $P(a leq Z leq b)$, we note that, from the geometric distribution, this is exactly equal to
          $$sum_{k=a}^b theta (1 - theta)^{k-1}$$
          But this is a geometric series with initial term $theta(1 - theta)^{a-1}$ and common ratio $1 - theta$. The sum of such a finite geometric series with $b-a + 1$ terms is:



          $$
          begin{align*}
          frac{theta(1-theta)^{a-1} cdot left( 1 - (1 - theta)^{b-a + 1}right)}{1 - (1 - theta)} &= (1-theta)^{a-1} cdot left( 1 - (1 - theta)^{b-a + 1}right) \
          &= (1-theta)^{a-1} - (1 - theta)^b
          end{align*}
          $$

          So the two methods agree.






          share|cite|improve this answer











          $endgroup$













          • $begingroup$
            Yes, thank you. I wasn't thinking straight. The first solution you provided is what i'm looking for.The second solution you provided is the same as the textbook answer, so thanks for explaining that as well.
            $endgroup$
            – Donald Mayer
            Dec 13 '18 at 15:06
















          0












          0








          0





          $begingroup$

          Your original solution (first attempt) is not quite correct as written. Instead, you should be calculating $P(Z geq 5) - P(Z > 9)$. Intuitively, this is "the chance that $Z$ is at least $5$, but not more than $9$." For a geometric distribution, you could write this as $P(Z > 4) - P(Z > 9)$. But it is actually not too difficult to compute $P(Z > x)$ for any geometric distribution; this holds iff the first $x$ trials are failures, so it happens with probability $P(Z > x) = (1 - theta)^x$ (assuming $theta$ is the probability of success in a single trial). In general, this means that, for geometric $Z$, we have:
          $$
          begin{align*}
          P(a leq Z leq b) &= P(Z geq a) - P(Z > b) \
          &= P(Z > a-1) - P(Z > b) \
          &= (1-theta)^{a-1} - (1 - theta)^b
          end{align*}
          $$



          Also note that your summation (from the second attempt) works as well, once simplified. To find $P(a leq Z leq b)$, we note that, from the geometric distribution, this is exactly equal to
          $$sum_{k=a}^b theta (1 - theta)^{k-1}$$
          But this is a geometric series with initial term $theta(1 - theta)^{a-1}$ and common ratio $1 - theta$. The sum of such a finite geometric series with $b-a + 1$ terms is:



          $$
          begin{align*}
          frac{theta(1-theta)^{a-1} cdot left( 1 - (1 - theta)^{b-a + 1}right)}{1 - (1 - theta)} &= (1-theta)^{a-1} cdot left( 1 - (1 - theta)^{b-a + 1}right) \
          &= (1-theta)^{a-1} - (1 - theta)^b
          end{align*}
          $$

          So the two methods agree.






          share|cite|improve this answer











          $endgroup$



          Your original solution (first attempt) is not quite correct as written. Instead, you should be calculating $P(Z geq 5) - P(Z > 9)$. Intuitively, this is "the chance that $Z$ is at least $5$, but not more than $9$." For a geometric distribution, you could write this as $P(Z > 4) - P(Z > 9)$. But it is actually not too difficult to compute $P(Z > x)$ for any geometric distribution; this holds iff the first $x$ trials are failures, so it happens with probability $P(Z > x) = (1 - theta)^x$ (assuming $theta$ is the probability of success in a single trial). In general, this means that, for geometric $Z$, we have:
          $$
          begin{align*}
          P(a leq Z leq b) &= P(Z geq a) - P(Z > b) \
          &= P(Z > a-1) - P(Z > b) \
          &= (1-theta)^{a-1} - (1 - theta)^b
          end{align*}
          $$



          Also note that your summation (from the second attempt) works as well, once simplified. To find $P(a leq Z leq b)$, we note that, from the geometric distribution, this is exactly equal to
          $$sum_{k=a}^b theta (1 - theta)^{k-1}$$
          But this is a geometric series with initial term $theta(1 - theta)^{a-1}$ and common ratio $1 - theta$. The sum of such a finite geometric series with $b-a + 1$ terms is:



          $$
          begin{align*}
          frac{theta(1-theta)^{a-1} cdot left( 1 - (1 - theta)^{b-a + 1}right)}{1 - (1 - theta)} &= (1-theta)^{a-1} cdot left( 1 - (1 - theta)^{b-a + 1}right) \
          &= (1-theta)^{a-1} - (1 - theta)^b
          end{align*}
          $$

          So the two methods agree.







          share|cite|improve this answer














          share|cite|improve this answer



          share|cite|improve this answer








          edited Dec 12 '18 at 22:27

























          answered Dec 12 '18 at 22:15









          plattyplatty

          3,350320




          3,350320












          • $begingroup$
            Yes, thank you. I wasn't thinking straight. The first solution you provided is what i'm looking for.The second solution you provided is the same as the textbook answer, so thanks for explaining that as well.
            $endgroup$
            – Donald Mayer
            Dec 13 '18 at 15:06




















          • $begingroup$
            Yes, thank you. I wasn't thinking straight. The first solution you provided is what i'm looking for.The second solution you provided is the same as the textbook answer, so thanks for explaining that as well.
            $endgroup$
            – Donald Mayer
            Dec 13 '18 at 15:06


















          $begingroup$
          Yes, thank you. I wasn't thinking straight. The first solution you provided is what i'm looking for.The second solution you provided is the same as the textbook answer, so thanks for explaining that as well.
          $endgroup$
          – Donald Mayer
          Dec 13 '18 at 15:06






          $begingroup$
          Yes, thank you. I wasn't thinking straight. The first solution you provided is what i'm looking for.The second solution you provided is the same as the textbook answer, so thanks for explaining that as well.
          $endgroup$
          – Donald Mayer
          Dec 13 '18 at 15:06




















          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%2f3037285%2fprobability-mass-function-geometric-distribution-over-an-interval%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

          How to send String Array data to Server using php in android

          Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

          Is anime1.com a legal site for watching anime?