zxysx的个人博客分享 http://blog.sciencenet.cn/u/zxysx

博文

The Hypergeometric Probability Distribution(超几何分布)

已有 6662 次阅读 2012-7-31 16:53 |个人分类:概率论与统计学笔记|系统分类:科研笔记| Distribution, Probability, Hypergeometric, 超几何分布

A hypergeometric experiment possesses the following properties:
  1. A population contains a finite number $N$ of elements that possess one of two characteristics, say, red and black.
  2. $r$ of the elements are red and the others black.
  3. A sample of n elements is randomly selected from the population.
  4. The random variable of interest is Y , the number of red elements in the sample.
Definition:
   A random variable Y is said to have a hypergeometric probability distribution if and only if
$$p(y) = frac{{left( {begin{array}{*{20}{c}} r\ y end{array}} right)left( {begin{array}{*{20}{c}} {N - r}\ {n - y} end{array}} right)}}{{left( {begin{array}{*{20}{c}} N\ n end{array}} right)}}$$
where $y$ is an integer 0, 1, 2, ..., n, subject to the restrictions $y \le r$ and $n-y \le N-r$.
  You can use the following Mathematica command to obtain the probability
  PDF[HypergeometricDistribution[n, r, N], y] // TraditionalForm
Relative Mathematica Function
  HypergeometricDistribution[n, r, N] Gives the distribution of the number of red elements in n draws from a population of size N containing r red elements.
Examples:
  A[n_] := HypergeometricDistribution[n, 50, 100];
  a1 = {Arrowheads[0.02], Arrow[{{10, 0.25}, {5, PDF[A[10], 5]}}]};
  t1 = Text[Style["n=" <> ToString[10] <> ",r=50,N=100", Medium], {10, 0.25}, {-1, 0}];
  a2 = {Arrowheads[0.02], Arrow[{{12, 0.23}, {10, PDF[A[20], 10]}}]};
  t2 = Text[Style["n=" <> ToString[20] <> ",r=50,N=100", Medium], {12, 0.23}, {-1, 0}];
  a3 = {Arrowheads[0.02], Arrow[{{25, 0.20}, {25, PDF[A[50], 25]}}]};
  t3 = Text[Style["n=" <> ToString[50] <> ",r=50,N=100", Medium], {25, 0.20}, {0, -1}];
  epilog = {a1, t1, a2, t2, a3, t3};
  DiscretePlot[Evaluate@Table[PDF[A[n], k], {n, {10, 20, 50}}], {k, 0, 32},
                PlotRange -> All, PlotMarkers -> Automatic, Epilog -> epilog,
                Background -> RGBColor[0.1, 0.45, 0.3, 0.9]]
 

Expection and Variance:
 If Y is a random variable with a hypergeometric distribution,then,
$$E(Y) = frac{{nr}}{N};;;{rm{and}};;;V(Y) = nleft( {frac{r}{N}} right)left( {frac{{N - r}}{N}} right)left( {frac{{N - n}}{{N - 1}}} right).$$
 You can use the following Mathematica command to obtain these results
    Expectation[x, x [Distributed] HypergeometricDistribution[n, r, N]]
 or Mean[HypergeometricDistribution[n, r, N]]
    Variance[HypergeometricDistribution[n, r, N]]
Property:
  For a fixed fraction $p = frac{r}{N}$, the hypergeometric probability function converges to the binomial probability function as $N$ becomes large and $n$ is relatively small.
$$mathop {lim }limits_{N to infty } frac{{left( {begin{array}{*{20}{c}} r\ y end{array}} right)left( {begin{array}{*{20}{c}} {N - r}\ {N - y} end{array}} right)}}{{left( {begin{array}{*{20}{c}} N\ n end{array}} right)}} = left( {begin{array}{*{20}{c}} n\ y end{array}} right){p^y}{left( {1 - p} right)^{n - y}}.$$ 



https://blog.sciencenet.cn/blog-531885-597654.html

上一篇:The Negative Binomial Probability Distribution(负二项分布)
下一篇:Mathematica中的With,Module及Block的用法及区别
收藏 IP: 210.75.252.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-7-23 12:18

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部