pnbinom
3 回表が出るまでに 9 回以上裏が出る確率
> 1 - pnbinom(8, size=3, prob = .5) [1] 0.03271484 > pnbinom(8, siz = 3, pro = .5, low = F) [1] 0.03271484
> sum(dnbinom(9:100, size=3, prob = .5)) [1] 0.03271484
上側の確率が、そのつど重複して加算されている。
> sum(pnbinom(8:10, size=3, prob = .5, lower = F)) [1] 0.06323242
> pnbinom(9, size=3, prob = .5) [1] 0.9807129 > pnbinom(10, size=3, prob = .5) [1] 0.9887695
> dnbinom(10, size=3, prob = .5) [1] 0.00805664
> pnbinom(9, size=3, prob = .5, low =T ) + dnbinom(10, si = 3, pro = .5) [1] 0.9887695
Link: Rの備忘録(3944d)
Last-modified: 2010-01-09 (土) 14:31:46 (5383d)