PDF version

PMF

Suppose that independent trials, each having a probability $p$, $0 < p < 1$, of being a success, are performed until a success occurs. If we let $X$ equal the number of failures required, 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-(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 $0 < 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(1-(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}$$ That is $$E\left[X^2\right]= {(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$ be 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 is $$\sigma = \sqrt{1-p\over p^2} = 1.414214$$ The probability that $X$ takes a value more than two standard deviations from $\mu$ is $$P\left(|X-1| \geq 2.828428\right) = P(X\geq 4) = 0.0625$$ R code:

1 - sum(dgeom(c(0:3), 1/2))
# [1] 0.0625

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$ be 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}\right)^2}\\ &= 30 \end{align*} $$ Note that this is another form of the geometric distribution which is so-called the shifted geometric distribution (i.e. $X$ equals to the number of trials required). By the above process we can see that the expected value of the shifted geometric distribution is $$\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-(1-p)^n \end{align*} $$

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

Solution:

The probability of having to use at least $n$ throws given $H_0$ (i.e. the significance probability) is $$P = \left(1 - {1\over 6}\right) ^n$$ We will reject $H_0$ if $P < 0.05$. R code:

n = 1
while (n > 0){
+ p = (5/6) ^ n
+ if (p < 0.05) break
+ n = n + 1
+ }
n
# [1] 17

That is, we have to reject $H_0$ if $n$ is 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 Concept of Probability Distributions 3: Geometric Distribution的更多相关文章

  1. 基本概率分布Basic Concept of Probability Distributions 8: Normal Distribution

    PDF version PDF & CDF The probability density function is $$f(x; \mu, \sigma) = {1\over\sqrt{2\p ...

  2. 基本概率分布Basic Concept of Probability Distributions 7: Uniform Distribution

    PDF version PDF & CDF The probability density function of the uniform distribution is $$f(x; \al ...

  3. 基本概率分布Basic Concept of Probability Distributions 6: Exponential Distribution

    PDF version PDF & CDF The exponential probability density function (PDF) is $$f(x; \lambda) = \b ...

  4. 基本概率分布Basic Concept of Probability Distributions 5: Hypergemometric Distribution

    PDF version PMF Suppose that a sample of size $n$ is to be chosen randomly (without replacement) fro ...

  5. 基本概率分布Basic Concept of Probability Distributions 2: Poisson Distribution

    PDF version PMF A discrete random variable $X$ is said to have a Poisson distribution with parameter ...

  6. 基本概率分布Basic Concept of Probability Distributions 1: Binomial Distribution

    PDF下载链接 PMF If the random variable $X$ follows the binomial distribution with parameters $n$ and $p$ ...

  7. 基本概率分布Basic Concept of Probability Distributions 4: Negative Binomial Distribution

    PDF version PMF Suppose there is a sequence of independent Bernoulli trials, each trial having two p ...

  8. PRML Chapter 2. Probability Distributions

    PRML Chapter 2. Probability Distributions P68 conjugate priors In Bayesian probability theory, if th ...

  9. Common Probability Distributions

    Common Probability Distributions Probability Distribution A probability distribution describes the p ...

随机推荐

  1. SQLServer 分布式查询MySQL

    这学期开了分布式数据库这门课,开始编程实现,今天调试了一早上,写下此配置文件方便查询. 本文实现的是SQLServer2008 Express 链式添加MySql-5.6.10数据库,进行远程操作. ...

  2. logstash搭建日志追踪系统

    前言 开始博客之前,首先说下10月份没写博客的原因 = =. 10月份赶上国庆,回了趟老家休息了下,回来后自己工作内容发生了点改变,开始搞一些小架构的东西以及研究一些新鲜东西,当时我听到这个消息真的是 ...

  3. 大学回顾和C与PHP之路

    我去年毕业,从事PHP学习和开发一年多. background:medical muti-media electric web; 先讲一下我的背景吧,我大学的学校是一个医科学校,然而专业是计算机动漫设 ...

  4. js的this什么时候会出现报错

    var aa ={ name:"boy", age:, like: function(){ console.log(this.name); } } //aa.like();//这样 ...

  5. XSS attack

    <html> <form action="" method="post"> <input type="text" ...

  6. MVC 中的 ispostback

    总之呢就是在MVC中试下 ispostback那种效果, 环境就是:登录验证loinger, if (Request.HttpMethod == "POST"){} 没理解透彻 源 ...

  7. 12-rm 命令总结

    rm remove files or directories 删除目录或文件 [语法]: rm [选项] [参数] [功能介绍] rm命令可以删除一个目录中的一个或多个文件或目录,也可以将某个目录及其 ...

  8. RabbitMQ官方中文入门教程(PHP版) 第二部分:工作队列(Work queues)

    工作队列 在第一篇教程中,我们已经写了一个从已知队列中发送和获取消息的程序.在这篇教程中,我们将创建一个工作队列(Work Queue),它会发送一些耗时的任务给多个工作者(Works ). 工作队列 ...

  9. 使用delegate实现简单的查询功能

    protected void imgbtnSearch_Click(object sender, System.Web.UI.ImageClickEventArgs e) { string keyWo ...

  10. 软件工程(QLGY2015)第三次作业点评(含成绩)

    相关博文目录: 第一次作业点评 第二次作业点评 第三次作业点评 团队信息 本页点评团队1-22,其他组见:http://www.cnblogs.com/xiaozhi_5638/p/4490764.h ...