In order to consider what you asked, without additional material, consider the $2\times 2$ table TAB
as follows:
TAB = rbind(c(80,90), c(20,15))
TAB
[,1] [,2]
[1,] 80 90
[2,] 20 15
A chi-squared test of independence with the Yates
correction is as follows:
chisq.test(TAB)
Pearson's Chi-squared test
with Yates' continuity correction
data: TAB
X-squared = 0.81215, df = 1, p-value = 0.3675
In R, prop.test
compares proportions $80/100$ and
$90/105.$ A two-sided test is equivalent to the
chi-squared test above--if the 'continuity correction'
is used. Notice that the chi-squared statistic and the P-value are exactly the same. [The procedure prop.test
gives more
detail.]
prop.test(c(80,90), c(100,105), cor=T)
2-sample test for equality of proportions
with continuity correction
data: c(80, 90) out of c(100, 105)
X-squared = 0.81215, df = 1, p-value = 0.3675
alternative hypothesis: two.sided
95 percent confidence interval:
-0.16998808 0.05570236
sample estimates:
prop 1 prop 2
0.8000000 0.8571429
For sufficiently large counts, Yates' correction is not
needed. (And in my opinion too conservative.) If parameter
cor=F
is used to disable the correction, the chi-squared
test is as follows:
chisq.test(TAB, cor=F)
Pearson's Chi-squared test
data: TAB
X-squared = 1.1813, df = 1, p-value = 0.2771
Similarly, if cor=F
is used, prop.test
gives
the same test statistic and P-value as just above.
prop.test(c(80,90), c(100,105), cor=F)
2-sample test for equality of proportions
without continuity correction
data: c(80, 90) out of c(100, 105)
X-squared = 1.1813, df = 1, p-value = 0.2771
alternative hypothesis: two.sided
95 percent confidence interval:
-0.16022617 0.04594046
sample estimates:
prop 1 prop 2
0.8000000 0.8571429
Note: Simulated test statistics in case of expected counts
below 5, and the use of Fisher's exact test are interesting
topics, but have no direct connection with use or non-use of
the Yates correction.