Statistical Inference-伯努利分布(Bernoulli Distribution)以及例子说明

Statistical Inference-伯努利分布(Bernoulli Distribution)以及例子说明_第1张图片


Example:

扔硬币8次,7次为头(1)的概率?

 ······································································(1.1) 

···························································································(1.2)

所以由(1.1),(1.2) 得  其    p=

那在R怎么算呢??

可以直接自己输入计算

> choose(8,7)*0.5^8+choose(8,8)*0.5^8
[1] 0.03515625

又或者利用pbinomm来实现:

> pbinom(6,size=8,prob = 0.5,lower.tail = F)
[1] 0.03515625

 

你可能感兴趣的:(R语言,Statistical,Inference,Bernoulli,Distribution,R)