Consider two populations whose proportions of properties A are `pi_1` and `pi_2`. Drawing two sample with size `n_1` and `n_2` (`n_1,\ n_2>30`), and proportions of properties A are `p_1` and `p_2`.
In general, we would like to compare the proportions of properties A of these populations with confidence level (`1-alpha`) or significance level `alpha`. So the null hypothesis is:
Ho : `pi_1=pi_2`(16)
Alternative hypothesis can be `pi_1!=pi_2` ; or `pi_1< pi_2` ; or `pi_1>pi_2` depend on cases.
To compare two proportions, put :
`p_c=(n_1p_1+n_2p_2)/(n_1+n_2)`(17)
`q_c=1-p_c`(18)
`sigma_c=sqrt(p_cq_c(1/n_1+1/n_2))`(19)
(`c` is the acronym of "common")
And test statistic is determined by :
`z=(p_1-p_2)/sigma_c`(20)
Because large samples are used, so test statistic conforms to standard normal distribution.
Example
To compare product quality, 30 products of company X and 40 products of company Y are controlled. The result shows that 12 products of company X and 14 products of company Y are classified as class A (the best class). Compare the proportions of class A products of these companies with confidence level of 95%.
From these data :
To compare the proportions of class A products of these companies `pi_X` and `pi_Y`, hypothesis testing is realized as follows:
`p_c=(n_Xp_X+n_Yp_Y)/(n_X+n_Y)=(12+14)/(30+40)=0,3714`
`q_c=1-p_c=1-0,3714=0,6286`
`sigma_c=sqrt(p_cq_c(1/n_X+1/n_Y))=sqrt(0,3714xx0,6286xx(1/30+1/40))=0,1167`
`z=(p_X-p_Y)/sigma_c`
`z_o=(p_X-p_Y)/sigma_c=(0,40-0,35)/(0,1167)=0,428`
This web page was last updated on 03 December 2018.