PSS-One-Prop-Algorithm
One-sided power:
Two-sided power
n:sample size
p:the true population proportion
p0:hypothesized proportion
F:the cumulative distribution function of the standard normal distribution
Origin uses an iterative algorithm with the power equation. At each iteration,the power for a trial sample size are evaluated and iteration stops when the power evaluated reaches the values which corresponding to an integer sample size, and which is nearest to, yet greater than, the target value.