Chapter 10: CI and HT Based on Two Samples or Treatments https://www.cartoonstock.com/directory/s/statistics.asp 1 Notation Population Mean Variance SD Population 1 μ1 ο³1 π12 Population 2 μ2 ο³2 π22 Sample from Population 1 Sample from Population 2 Sample Statistics Sample size Mean Variance SD n1 x1Μ s1 π 12 n2 x2Μ π 22 s2 2 Independent and Paired Samples 1. Two samples are independent if the process of selecting individuals or objects in sample 1 has no effect on, or no relation to, the selection of individuals or objects in sample 2. We call this 2 – sample independent. 2. A paired data set is the result of matching each individual or object in sample 1 with a similar individual or object in sample 2. We call this 2 – sample paired. 3 10.1/10.2: Comparing Two Population Means Using Independent Samples - Goals • Be able to determine when you can perform 2-sample independent analyses. • Perform a two-sample hypothesis test and summarize the results when the two samples are independent. • Be able to construct a level C confidence interval for the difference between two means and interpret the results when the two samples are independent. 4 Conditions for Inference: 2 – sample independent 1. Each group is considered to be a sample from a distinct population. • We have an SRS from the population of interest for each variable. 2. The responses in each group are independent of those in the other group. 3. The statistic that we measure has a Normal distribution. 5 Two-sample independent (Z): Hypothesis Test • Step 1 • Step 2 H0: µ1 - µ2 = Δ0 • Step 3 ππ π‘ππππ‘ππ − ππ’ππ π£πππ’π π§π‘π = ππ‘ππππππ πππ£πππ‘πππ ππ π‘βπ ππ π‘ππππ‘ππ π₯1 − π₯2 − Δ0 = π12 π22 + π1 π2 • Step 4 6 Two-sample independent (Z): Confidence Interval The 100 (1 – α)% confidence interval for µ1 - µ2 is estimator ± (critical value)(standard deviation of the estimator) = π₯1 − π₯2 ± π§πΌ 2 π12 π22 + π1 π2 7 Satterthwaite Approximation ο¦ο s s οΆο ο§ο ο« ο·ο ο¨ο n1 n 2 οΈο df ο½ 2 2 2 2 1 ο¦ο s1 οΆο 1 ο¦ο s2 οΆο ο§ο ο·ο ο« ο§ο ο·ο n1 ο1 ο¨ο n1 οΈο n 2 ο1 ο¨ο n 2 οΈο 2 1 2 2 2 ο ο 8 Two-sample Test (independent): Summary Null hypothesis: H0: μ1 – μ2 = Δ0 πππ π‘ π π‘ππ‘ππ π‘ππ: ′ ππ‘π = π₯1 − π₯2 − Δ0 π 12 π 22 + π1 π2 Upper-tailed Lower-tailed two-sided Alternative Hypothesis Ha: μ1 – μ2 > Δ Ha: μ1 – μ2 < Δ Ha: μ1 – μ2 ≠ Δ P-Value P(T ≥ tts) P(T ≤ tts) 2P(T ≥ |tts|) Note: If we are determining if the two populations are equal, 9 then Δ0 = 0 Two-sample independent (t): • Hypothesis test π′π‘π = π₯1 − π₯2 − Δ0 π 12 π 22 + π1 π2 • Confidence interval π₯1 − π₯2 ± π‘πΌ 2,π π 12 π 22 + π1 π2 10 Robustness of the 2 sample tprocedure • The t-procedure is very robust against normality. Let n = n1 + n2 – n < 15 : population distribution should be close to normal. – 15 < n < 40: mild skewedness is acceptable – n > 40: procedure is usually valid. • Best when n1 ο» n2 • Best when distributions are similar. 11 10.3: Paired Data - Goals • Be able to determine when you should use 2-sample paired analyses. • Be able to construct a level C confidence interval for a matched pair and interpret the results. • Perform a matched pair t hypothesis test and summarize the results. 12 Conditions for Inference: 2 – sample paired 1. Each pair is considered to be a sample from a population of pairs. • We have an SRS from the population of pairs. 2. Each pair is independent of the other pairs. 3. The difference of the each pair that we measure has a Normal distribution with mean οD and standard deviation σD. 13 Two-sample Matched Pair ππ· ππΈ = π ππ· π ± π‘πΌ 2,π−1 π 14 Two-sample matched pair Test: Summary Null hypothesis: H0: μD = ο0 π· − Δ0 πππ π‘ π π‘ππ‘ππ π‘ππ: ππ‘π = ππ· π Alternative Hypothesis One-sided: upper-tailed Ha: μD > ο0 One-sided: lower-tailed Ha: μD < ο0 two-sided Ha: μD ≠ ο0 P-Value P(T ≥ tts) P(T ≤ tts) 2P(T ≥ |tts|) Note: If we are determining if the two populations are equal, then Δ0 = 0 15 Independent vs. Paired 1. If there is great heterogeneity between experimental units and a large correlation within experimental units then a paired experiment is preferable. 2. If the experimental units are relatively homogeneous and the correlation within pairs is not large, then unpaired experiments should be used 16