关于对Fisher Exact Test 的理解

http://en.wikipedia.org/wiki/Fisher's_exact_test

 

超几何分布:

 

 drawnnot drawntotal
whitekm-km
blackn-kN+k-m-nN-m
totalsnN-n

N


N个里有m个white,事件A={N里取n次,刚好取到k个white},事件A发生的概率:

 P(X=k) = {​{​{m /choose k} {​{N-m} /choose {n-k}}}/over {N /choose n}},

分母:N里取n个的状态个数,

分子:n里有k个是whiet,n-k个black的状态个数

P(X=k1)+P(X=k2)+...=1    k1,k2... all possible k values

 

 

Fisher Exact Test:

n个里有a+b个dieting的,事件A={n里取a+c个,其中刚好有a个dieting的},事件A发生的概率:

 

 menwomentotal
dietingaba + b
not dietingcdc + d
totalsa + cb + d

n


p = {​{​{a+b}/choose{a}}{​{c+d}/choose{c}}}/left/{​{​{n}/choose{a+c}}}/right.

 

自己理解:认为总数是n, a+c为样本大小,从总体拿出这么多样本,共有choose(n,a+c)种情况。

样本里有a个dieting的,有choose(a+b,a)种情况 ,有c个非dieting的有choose(c+d,c)种情况。

分母:n里取a+c个的状态个数,

分子:a+c里有a个是dieting,a+c-a个not dieting的状态个数

 

 

 2.

Exact Tests

The Hypergeometric Distribution

To understand Fisher Exact test, a review of the hypergeometric
distribution is first helpful.  Here is a typical example. A box of
chocolates contains 20 (N=20) pieces. Eight of them are known to be
caramels (M=8), and the remaining 12 pieces are nuts (N-M=12). If a person
selects 4 pieces (sample size n=4) at random, what is the distribution of
the number of caramels in the sample?

n=4  - sample size
M=8  - total number of caramels
N=20 - total number of chocolates

The distribution for the number of caramels in the sample of 4 can range
from 0 to 4 and the probability of 0, 1, 2, 3, or 4 caramels will occur
is:

No. in
Sample, Probability
   0    0.1022  = choose(8,0)*choose(12,4)/choose(20,4)
   1    0.3633  = choose(8,1)*choose(12,3)/choose(20,4)
   2    0.3814  = choose(8,2)*choose(12,2)/choose(20,4)
   3    0.1387  = choose(8,3)*choose(12,1)/choose(20,4)
   4    0.0144  = choose(8,4)*choose(12,0)/choose(20,4)
 Total  1.0000

The probabilities must sum to 1 as the total shows.

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值