**Program Code**

The program is written in JavaScript.

**Source**

Rosner, B., *Fundamentals of Biostatistics*, Prindle, Weber and Schmidt, 1982.

The formulas are the classic one sample formulas for sample size and power for two sample normal problem with constant variance.

**Input Items**

The user is prompted for values to the following items. For items that have initial default values set, the values are given in parentheses.

- One-sided or two-sided test
- a, the significance level (.05)
- m
_{0}, the mean for the null hypothesis - m
_{a}, the mean for the alternative hypothesis - s, the square root of variance
- 1-b, the desired power for sample size estimation, or n, the total sample size for power estimation