Equal VariancesTwo-Sample t-test for Independent SamplesEqual VariancesCross-sectional studies with 2 different unrelated samplesGroup 1—X1 ~ N(1, 12)Group 2—X2 ~ N(2, 22)Ho: 1 = 2 or 1 - 2 = 0H1: 1 2 or 1 - 2 0Assume 12 = 22 = 2Sample means: 21X,XSample variances: s12, s22Significant test based on 21XX . Reject H0 if far from 0We will study behavior of 21XX under H0./n),σ(μ~X/n),σ(μ~X22222111NNSince X1, X2 are independent,212212111nn,σμμ~XX NUnder H0, 1 = 2Therefore,21221110nn,σ~XX NBut 2 usually not known and must be estimated from the data.Let s12, s22 be the two sample variances(s12 + s22) / 2 not the best estimateLet s2 (sp2) = pooled estimate of variance211212222112nn)s(n)s(nss2 has (n1 – 1) + (n2 – 1) = n1 + n2 –2 degrees of freedomTest statistic: 2111121222211212121212121nn)s(n)s(nswherennsXXsXXtXXReject H0 (2-tailed) if 222121221/,αnnα/,nntttt orp-value: If t 0, p = 2 * (area to left of t under 221nnt distribution)It t > 0, p = 2 * (area to right of t under 221nnt distribution)Example: A study was performed looking at the effect of mean ozone exposure on change in pulmonary function. 25 hikers were recruited to hike on days withlow ozone exposure. 25 different hikers were recruited to hike on days with high ozone exposure. The data are change in pulmonary function after a 4-hour hike.Group 1 – high ozone daysGroup 2 – low ozone days.Two tailed testH0: 1 = 2H1: 1 2 = 0.05Note: Assume each is a random sample from a population that follows a normal distribution. Population variances are unknown, but we will assume they areequal.Reject H0 if t > t48, 0.975 = 2.01or t < t48, 0.025 = -2.01Group Mean* St. Dev. nHigh 0.101 0.253 25Low 0.042 0.106 25*Change in FEVFirst, calculate s21939650037622503762250488058812252510602425302421122212222112..s..).)(().)((nn)s(n)s(ns 0751054860059025125119396500420101011212121......nnsXXtDecision: Do not reject H0p-value: t40, 0.85 = 1.050t40, 0.90 = 1.303Therefore, 2 * 0.10 < p < 0.15 * 2or 0.20 < p < 0.30Confidence Interval100% (1 - ) confidence limits for the true mean difference between the 2 groups212122111CI110021nn*stXXα)%(α/,nnFor the example, 19600510110300590054860021205902512511939650021204201010CI95.,....*...*...%Example: It is proposed that males have higher TC than females. Use the following data to test the hypothesis at the 5% level of significance.Serum cholesterolMales (X1) Females (X2)220 195198 204245 180250 223188 175206 198210X1 = 1,517, X12 = 332,009, n1 = 7X2 = 1,175, X22 = 231,559, n2 = 6One-tailed, = 0.05H0: 1 2H1: 1 > 2Reject H0 if t > t11,.95 = 1.796 542.23816715170093321211212121,nnXXs 96672985611755992311212222222.,nnXXs6602431119667298523815426211212222112.).().(nn)s(n)s(ns8333195714321621.X.X andNow, 806155630776420881206171660243108333195714321611212121..*.....nnsXXtpReject H0p-value: t11 ,.95 = 1.796 and t11, .975 = 2.2010.025 < p < 0.05Note: It is possible to conduct 1-tailed tests in the other direction as well.H0: 1 ≥ 2H1: 1 <
View Full Document