
6 May
2008
6 May
'08
9:56 a.m.
John Maddock wrote:
This is true of all asymmetric distributions of course, you need to add the two tails calculated separately:
cdf(hypergeometric(), n) + cdf(hypergeometric(), total - n)
Ah... wait, because it's discrete, that misses out one value from the right tail? So should be:
cdf(hypergeometric(), n) + cdf(hypergeometric(), total - n - 1) ???
If the distribution is asymmetric you may want neither total - n nor total - n - 1. What you want is sum/integral of pdf(dist,y) over all y such that pdf(dist,y) <= pdf(dist,x). You actually have to do a bit of work to find out what the right cut-off is for the other tail. --Johan