Biostatistics(7)概率与概率分布

3.3 概率分布

3.3.1 离散型随机变量

若随机变量的取值为有限个或可列个,则称此随机变量为离散型(discrete)随机变量,简称离散量
比如你抛掷一枚硬币两次,那么结果只有4种可能性:
HH,HT,TH和TT(H:正面;T:反面)
如果用一个随机变量X表示该试验中出现H结果的次数,那么X只有0,1,2三种可能。因此,X为离散型随机变量。具体地:
P(X=0)=0.25
P(X=1)=0.5
P(X=2)=0.25
P(X):Probability Distribution Function(PDF) of variable X 为X的概率分布律,满足下列性质:

P(X).png
3.3.2 连续型随机变量

对于随机变量X,若存在一个非负的实函数f(x),使X落在任意区域D上的概率
则称为X的连续型随机变量,简称连续量,称f(x)为X的概率密度函数,简称密度。
由定义知,密度函数具有以下性质:
(1)f(x)≥0
(2)

连续变量.png

(3)

连续变量.png

离散型变量和连续型变量的总结:

Summary.png

Mean and variance for discrete variable with a given PDF

PDF.png
Mean.png
Variance.png
3.3.3 0-1(p)分布
0-1分布.png

E(X)=1×p+0×(1-p)=p
Var(X)=E(X2)-(E(X))2=(12×p+02×(1-p))-p2=p-p2=p(1-p)

3.3.4 贝努里分布 Bernoulli distribution

定义:在n次独立重复的试验中,每次试验都只有两个结果:A,A‘,且每次试验中A发生的概率不变,记P(A)=p,0<p<1,称这一系列试验为n重贝努里(Bernoulli)试验。
在n重贝努里试验中,若记事件A发生的概率为P(A)=p,0<p<1,设X为在n次试验中A发生的次数,则:

PDF of Bernoulli distribution.png

E(x)=E(x1+x2+...+xn)=E(x1)+E(x2)+...+E(xn)=p+p+...+p=np
Var(x)=Var(x1+x2+...+xn)=Var(x1)+Var(x2)+...+Var(xn)=p(1-p)+p(1-p)+...+p(1-p)=np(1-p)

Example of a Binomial distribution
When a fair coin is flipped, the probability of it being Head or Tail is the same, i.e.,p=0.5.
If we flip the coin 5 times, what is the probability of having 5 Head?

Answer.png

Example of a Binomial distribution
After a genome wide Chip-seq experiment, a transcription factor was found to bind to the promoter region of 100 genes(out of 26,000). Now, if we do another experiment with a second TF and identify also 100 genes, what is the probability of finding at least 5 of them with the first TF binding site?
Suppose the first TF binds to gene without any preference, then the probability of a gene randomly selected from the genome that is bound by the first TF is 100/26000=0.039
For a given gene, it is either bound by the first TF('success') or not ('failure'),i.e.,a Bernoulli trail.
If the second TF is independent of the first TF, then the number of genes bound by the second TF that are also bound by the first TF follows a binomial distribution.
Binomial distribution:n=100,p=0.0039
P(k=0)=0.6765408
P(k=1)=0.2648840
P(k=2)=0.05133606
P(k=3)=0.006565821
P(k=4)=0.0006233937
P(k>=5)=1-P(k=0)-P(k=1)-P(k=2)-P(k=3)-P(k=4)=4.992756e-05

3.3.5 负贝努里分布 Negative Binomial distribution

定义:实验包含一系列独立的试验,每个试验都有成功、失败两种结果,成功的概率p是恒定的,实现持续到r次成功,r为正整数。满足上述条件的称为负贝努里分布。

PDF of Negative Binomial Distribution.png

Mean and Variance of Negative Binomial Distribution

Negative Binomial Distribution.png
Mean and Variance.png

Alternative formulation of Negative Binomial distribution

Negative Binomial distribution.png

Example of negative binomial distribution
If a predator must capture 10 prey before it can grow large enough to reproduce, what would the mean age of onset of reproduction be if the probability of capturing a prey on any given day is 0.1?

Answer.png

The expected time is 100 days. However, the variance is quite high (900) and that the distribution looks quite skewed. Some predators will reach reproductive age much sooner and some much later than the average.

3.3.6 几何分布 Geometric distribution

定义:在n次贝努里试验中,试验k次才得到第一次成功的机率。即,前k-1次皆失败,第k次成功的概率。

Geometric distribution.png

Example of geometric distribution
If the probability of extinction of an endangered population is estimated to be 0.1 every year, what is the expected time until extinction?

Answer.png

The expected time is 10 year. However, because of large variance, it will be difficult to predict the actual year in which the population go to extinct accurately.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 194,670评论 5 460
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 81,928评论 2 371
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 141,926评论 0 320
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 52,238评论 1 263
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 61,112评论 4 356
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 46,138评论 1 272
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 36,545评论 3 381
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 35,232评论 0 253
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 39,496评论 1 290
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 34,596评论 2 310
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 36,369评论 1 326
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 32,226评论 3 313
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 37,600评论 3 299
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 28,906评论 0 17
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 30,185评论 1 250
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 41,516评论 2 341
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 40,721评论 2 335