## Comparison of Two Proportions

We are interested in whether there is discrepancy in occurrence of a particular type between two groups, say group 1 and 2. In terms of hypothesis testing it becomes

where and are the respective population proportions from group 1 and 2.

The categorical data are summarized in
the count of the specific type (`Observed`) and the total sample size (`Size`)
in the first row (Group 1) and the second row (Group 2) as follows.

The test statistic is calculated as

where
and
are the point estimates of and as they appear in the column `Probability` in the above table.

is called a pooled estimate of the common population proportion. Having constructed the hypothesis testing problems `` '', `` '', or `` '', we can make our decision via p-value = . Also, we may want to see the confidence interval for the difference . The confidence interval for can be calculated by

= ( , )