powered by
Computes a continuity-corrected z-test for a population proportion in a 1-group design. A confidence interval for a population proportion is a recommended supplement to the z-test (see ci.prop).
test.prop(f, n, h)
Returns a 1-row matrix. The columns are:
Estimate - ML estimate of proportion
z - z test statistic
p - two-sided p-value
number of participants who have the attribute
sample size
null hypothesis value of proportion
Snedecor1980statpsych
test.prop(9, 20, .2) # Should return: # Estimate z p # 0.45 2.515576 0.01188379
Run the code above in your browser using DataLab