**Program Code**

The program is written in JavaScript.

**Source**

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

The formulas are the classic two 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
_{1}, the mean in Group 1

- m
_{2}, the mean in Group 2

- s, the square root of variance

- n
_{2}/n_{1}, the sample size ratio of Group 2 to Group 1 (1)

- 1-b, the desired power for sample size estimation, or n, the total sample size for power estimation