ht_twosample_pro(x1, n1, x2, n2, alpha, type)

Hypothesis test for two population proportions. x1 and x2 are frequencies, n1 and n2 are sample sizes and alpha is the significance level. Parameter type can be 0 (left tail), 1 (right tail), or 2 (both tails).
Assumes samples are independent and that x1, n1-x1, x2 and n2-x2 are bigger than or equal to 5.


See also ht_twosample_std ht_twosample_tpaired ht_twosample_tpooled 


Example


(See NOTE below)


ht_twosample_pro(276, 747, 195, 434, .05, 0)


Z Test for a Population Proportion.

Hypothesis test for population proportion.

Ho : p1==p2

Ha : p1

Significance level : 0.05 (5.0%)

Results:

Test statistics Z : -2.7012277832877234

Critical left value found is -1.6448536056633434

P value is : 0.0034542003404518518

Reject the null hypothesis.





NOTE: The data used in this example was taken from the textbook Introductory Statistics 6th Ed. by Neil A. Weiss with kind permission of Addison Wesly Longman, Inc. (AWL). AWL does not endorse nor it supports the Calcugator.