17.3.8.2 Algorithms (Two sample proportion test)
Let be the size of sample 1 and be the number of event or success ,then the sample proportion can be expressed:.
Similarly,for another sample , sample size is and is the number of event,then sample proportion
Hypotheses
Let and be the true population proportion for sample 1 and 2. and the is the hypothesized difference between the population proportions.
for two tailed test
for One-tailed test
for One-tailed test
Normal Approximation
P Value
we can perform normal approximation test with assumptions :
and ,
and .
To perform the test, calculates the and value :
.
A special case is that when is zero, Origin can use a pooled estimate of p for the test if you check the "pooled" box to do this:
, where
The p-values for each hypotheses are given by:
,,for two tailed test
,,for upper tailed test
,for lower tailed test
Confidence Interval
For a given confidence level,the confidence interval for the sample proportion can be generated by:
Null Hypothesis
|
Confidence Interval
|
|
|
|
|
|
|
Fisher's Exact Test
Exact P_value
Fisher's exact test can be used for all sample sizes when is zero.
Let p(x) denote the probility of hypergeometric distribution when X=x.
Let M denote hypergeometric distribution mode:
The p-values for each hypothesis are given below:
,
,
When :
:
where y is the smallest integer such that .
where y is the largest integer such that .
|