Template:DropRate/lib/AdjWaldPorM
Adjusted Wald, Part 2[edit]
This is one of two parts to the calculation process, and calculates the size of the interval (Plus or Minus). This uses the Adjusted (or Modified) method as described at http://www.graphpad.com/articles/CIofProportion.htm
Usage: {{Template:DropRate/lib/AdjWaldPorM|hits=1|tries=5|zScore=1.96}}
Used to find the +/- interval in the Adjusted Wald calculation for an estimated binomial rate.
z = z-score to use. 1.960 -> 95% margin
This is one of two parts to the calculation process, and calculates the size of the interval (Plus or Minus).
To get the lower bound:
Take Template:DropRate/lib/AdjWaldP and subtract Template:DropRate/lib/AdjWaldPorM
To get the upper bound:
Take Template:DropRate/lib/AdjWaldP and add Template:DropRate/lib/AdjWaldPorM
Should a value below 0 or above 1 be returned, use 0 or 1 respectively. Such instances should be rare and will probably resolve themselves with more data.
Some samples:
5 tries, 2 drops 95% margin is 32.7465...%, calculates: 0.32746506753359
50 tries, 20 drops 95% margin is 13.1233...%, calculates: 0.13123335110519
1000 tries, 400 drops 95% margin is 3.0311...%, calculates: 0.030310856195997