But going back to the 28-trial case, I still get 0.0491. So there was something wrong with my random numbers, but there must still be something wrong with your calculation (could still be roundoff errors).
There are definitely no rounding errors. I executed the LookPVal algorithm in Maple and got the exact result:
>LookPVal(28, array([0.95, 0.95, 0.98, 0.98,0.98]), array([6, 12, 18, 23,28]));
> evalf[40](%);
1704631
--------
33554432
.05080196261405944824218750000000000000000
(Excel was
at least 6 of 6
at least 10 of 12
at least 14 of 18
at least 17 of 23
at least 20 of 28
5,08019626140594E-02
)
Still, there could be a logical flaw somewhere. (Then again, I would be surprised by the close results.)
1. No looks allowed for trials 1 through 5
Why not? Statistically, they are irrelevant, but they are helpful for people like me (see my previous post).