Basic probability distribution basic Concept of probability distributions 3:geometric distribution

Source: Internet
Author: User

PDF version

PMF

Suppose that independent trials, each having a probability $p $, $ < P < 1$, of being a success, is performed until A success occurs. If we let $X $ equal the number of failures required and then the geometric distribution mass function is $ $f (X; p) =\pr (X=X) = (1-p) ^{x}p$$ for $x =0, 1, 2, \cdots$.

Proof:

$$ \begin{align*} \sum_{x=0}^{\infty}f (x; p) &= \sum_{x=0}^{\infty} (1-p) ^{x}p\\ &= p\sum_{x=0}^{\infty} (1-p) ^ {X}\\ & = P\cdot {1\over (1-p)}\\ & = 1 \end{align*} $$

Mean

The expected value is $$\mu = e[x] = {1-p\over p}$$

Proof:

Firstly, we know that $$\sum_{x=0}^{\infty}p^x = {1\over 1-p}$$ where < P < 1$. Thus $$ \begin{align*} {d\over dp}\sum_{x=0}^{\infty}p^x &= \sum_{x=1}^{\infty}xp^{x-1}\\ &= {1\over (1-p) ^2} \ end{align*} $$ The expected value is $$ \begin{align*} e[x] &= \sum_{x=0}^{\infty}x (1-p) ^{x}p\\ &=p (1-p) \sum_{x=1 }^{\infty}x (1-p) ^{x-1}\\ &= p (1-p) {1\over (n (1-p)) ^2}\\ &= {1-p\over p} \end{align*} $$

Variance

The variance is $$\sigma^2 = \mbox{var} (X) = {1-p\over p^2}$$

Proof:

$$ \begin{align*} E\left[x^2\right] &=\sum_{x=0}^{\infty}x^2 (1-p) ^{x}p\\ &= (1-p) \sum_{x=1}^{\infty}x^2 (1-p ) ^{x-1}p \end{align*} $$ Rewrite the right hand summation as $$ \begin{align*} \sum_{x=1}^{\infty} x^2 (1-p) ^{x-1}p&= \ Sum_{x=1}^{\infty} (x-1+1) ^2 (1-p) ^{x-1}p\\ &= \sum_{x=1}^{\infty} (x-1) ^2 (1-p) ^{x-1}p + \sum_{x=1}^{\infty} 2 (x-1 ) (1-p) ^{x-1}p + \sum_{x=1}^{\infty} (1-p) ^{x-1}p\\ &= E\left[x^2\right] + 2e[x] + 1\\ &= E\left[X^2\right] + {2-p\ Over P} \end{align*} $$ Thus $ $E \left[x^2\right] = (1-p) E\left[x^2\right] + {(1-p) (2-p) \over p}$$ This is $ $E \left[x^2\ri ght]= {(1-p) (2-p) \over p^2}$$ so the variance is $$ \begin{align*} \mbox{var} (X) &= E\left[x^2\right]-e[x]^2\\ & = {(1-p) (2-p) \over p^2}-{(1-p) ^2\over p^2}\\ &= {1-p\over p^2} \end{align*} $$

Examples

1. Let $X $ is geometrically distributed with probability parameter $p ={1\over2}$. Determine the expected value $\mu$, the standard deviation $\sigma$, and the probability $P \left (| x-\mu| \geq 2\sigma\right) $. Compare with Chebyshev ' s inequality.

Solution:

The geometric distribution mass function is $ $f (x; p) = (1-p) ^{x}p,\ x=0, 1, 2, \cdots$$ the expected value is $$\mu = {1- P\over P} = 1$$ the standard deviation are $$\sigma = \sqrt{1-p\over p^2} = 1.414214$$ the probability that $X $ takes a Val UE more than-deviations from $\mu$ is $ $P \left (| x-1| \geq 2.828428\right) = P (x\geq 4) = 0.0625$$ R code:

Chebyshev ' s inequality gives the weaker estimation $ $P \left (| X-\mu| \geq 2\sigma\right) \leq {1\over4} = 0.25$$

2. A die is thrown until one gets a 6. Let $V $ is the number of throws used. What is the expected value of $V $? What is the variance of $V $?

Solution:

The PMF of geometric distribution is $ $f (x; p) = (1-p) ^xp,\ = 0, 1, 2, \cdots$$ where $p = {1\over 6}$. Let $X = v-1$, so the expected value of $V $ is $$ \begin{align*} e[v] &= e[x+1]\\ &= e[x] + 1\\ &= {1-p\over p } + 1\\ &= {1-{1\over6} \over {1\OVER6}} + 1\\ &= 6 \end{align*} $$ the variance of $V $ is $$ \begin{align*} \mbox {Var} (V) &= \mbox{var} (x+1) \ &= \mbox{var} (X) \ &= {1-p\over p^2}\\ &= {1-{1\over 6} \over \left ({1\over6}\rig HT) ^2}\\ &= \end{align*} $$ Note that this is another form of the geometric distribution which is so-called the Shi fted geometric distribution (i.e. $X $ equals to the number of trials required). By the above process we can see the expected value of the shifted geometric distribution are $$\mu = {1\over p}$$ and The variance of the shifted geometric distribution is $$\sigma^2 = {1-p\over p^2}$$

3. Assume $W $ is geometrically distributed with probability parameter $p $. What is $P (W < n) $?

Solution:

$$ \begin{align*} P (W < N) &= 1-p (w \geq n) \ &= (1-p) ^n \end{align*} $$

4. In order to test whether a given die is fair, it's thrown until a 6 appears, and the number $n $ of throws is counted. How great should $n $ being before we can reject the null hypothesis $ $H _0: \mbox{the die is fair}$$ against the alternative H Ypothesis $ $H _1: \mbox{the probability of having a 6 are less than 1/6}$$ at significance level $5\%$?  

Solution:

The probability of have to use at least $n $ throws given $H _0$ (i.e. the significance probability) is $ $P = \left (1-{1 \over 6}\right) ^n$$ We'll reject $H _0$ if $P < 0.05$. R Code:

n = 1while (n > 0) {+   p = (5/6) ^ n+   if (P < 0.05) break+   

That's, we have the to reject $H _0$ if $n $ are at least 17.

Reference

    1. Ross, S. (2010). A first Course in probability (8th Edition). Chapter 4. Pearson. Isbn:978-0-13-603313-4.
    2. Brink, D. (2010). Essentials of Statistics:exercises. Chapter 5 & 10. isbn:978-87-7681-409-0.

Basic probability distribution basic Concept of probability distributions 3:geometric distribution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.