**Program Code**

The program is written in JavaScript.

**Source**

Fleiss, J.L. *Statistical Methods for Rates and Proportions* (1981), pp. 13-15.

* The formula uses the arcsin transformation to achieve better small sample properties.

**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)
- p
_{0}, the proportion for the null hypothesis - p
_{a}, the proportion for the alternative hypothesis - 1- b, the desired power for sample size estimation, or n, the total sample size for power estimation