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

博文

The Negative Binomial Probability Distribution(负二项分布)

已有 5760 次阅读 2012-7-31 15:42 |个人分类:概率论与统计学笔记|系统分类:科研笔记| Distribution, Probability, Binomial, negative, 负二项分布

A Negative Binomial experiment possesses the following properties:
  1. The experiment consists of a series of identical trials.
  2. Each trial results in one of two outcomes: success, S, or failure, F.
  3. The probability of success on a single trial is equal to some value p and remains the same from trial
     to trial. The probability of a failure is equal to q = (1 − p).
  4. The trials are independent.
  5. The random variable of interest is Y , the number of failures before n successes occur.
Definition:
   A random variable Y is said to have a negative binomial probability distribution if and only if
$$p(y) = left( {begin{array}{*{20}{c}} {n + y - 1}\ {n - 1} end{array}} right){p^n}{(1 - p)^y},;;;;y = 0,;1,;...,;;;0 le p le 1.$$
  You can use the following Mathematica command to obtain the probability
    PDF[NegativeBinomialDistribution[n, p], Y]
Relative Mathematica Functions
   NegativeBinomialDistribution[n, p] represents a negative binomial distribution with parameters n and p.
Examples:
  A[p_] := NegativeBinomialDistribution[2, p];
  a1 = {Arrowheads[0.02], Arrow[{{10, 0.06}, {2, PDF[A[0.1], 2]}}]};
  t1 = Text[Style["n=2,p=" <> ToString[0.1], Medium], {10, 0.06}, {-1, 0}];
  a2 = {Arrowheads[0.02], Arrow[{{10, 0.08}, {2, PDF[A[0.2], 2]}}]};
  t2 = Text[Style["n=2,p=" <> ToString[0.2], Medium], {10, 0.08}, {-1, 0}];
  a3 = {Arrowheads[0.02], Arrow[{{10, 0.10}, {2, PDF[A[0.3], 2]}}]};
  t3 = Text[Style["n=2,p=" <> ToString[0.3], Medium], {10, 0.10}, {-1, 0}];
  epilog = {a1, t1, a2, t2, a3, t3};
  DiscretePlot[Evaluate@Table[PDF[A[p], k], {p, {0.1, 0.2, 0.3}}], {k, 0, 15},
               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 negative binomial distribution,then
$$E(Y) = \frac{{n(1 - p)}}{p}\;\;\;{\rm{and}}\;\;\;V(Y) = \frac{{n(1 - p)}}{{{p^2}}}.$$
You can use the following Mathematica command to obtain these results
    Expectation[x, x [Distributed] NegativeBinomialDistribution[n, p]]
 or Mean[NegativeBinomialDistribution[n, p]]
    Variance[NegativeBinomialDistribution[n, p]]



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

上一篇:The Geometric Probability Distribution(几何分布)
下一篇:The Hypergeometric Probability Distribution(超几何分布)
收藏 IP: 210.75.252.*| 热度|

0

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

数据加载中...
扫一扫,分享此博文

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

GMT+8, 2024-11-24 12:43

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部