I just wanted to perform a quick binomial test for an experiment (Bernoulli trial) with 185 successes out of 459 trials and a (hypothesized) success probability of 0.2. I do not have any mathematical software installed right now and would like to get the result without much effort, i.e., without installing a huge software suite just to perform this one calculation.
I tried a lot of online calculators as well as Excel (which happens to be installed on the PC I am currently working on), but the results I get are either invalid (larger than 1, smaller than zero) or "NaN". I suspect that this is due to floating point errors and/or the limited precision of the underlying floating point calculations. After all, the intermediate values for the CDF calculation will be quite large for my values described above.
WolframAlpha outputs 1 for the following expression
CDF[BinomialDistribution[459, 0.2], 185]
and 0 for the complement:
1-CDF[BinomialDistribution[459, 0.2], 185]
(http://www.wolframalpha.com/input/?i=1-CDF%5BBinomialDistribution%5B459%2C+0.2%5D%2C+185%5D)
Similarly, Excel 2010 outputs 1 for the following formula
=BINOMDIST(185;459;0.2;TRUE)
and a very small negative value (around -2.6E-14) for the complement:
=1-BINOMDIST(185;459;0.2;TRUE)
Is there any way to get a better approximation for this? I think that the values I am looking for are very close to 1 and 0, respectively, but I would like to know whether they are close enough for practical purposes, i.e., whether they are significant (say, at a significance level of 1 or 5%).
Best regards Andreas
The sample size is big enough that we can approximate the binomial distribution with a normal distribution that under the null hypothesis has mean $0.2 \times 459=91.8$ and variance $0.2\times 0.8\times 459=73.44$. Then $$ Pr(X \geq 185)=Pr(Z\geq (185-91.8)/8.57) =Pr(Z\geq 10.88) $$ The probability that the success probability is $0.2$ is very small.