Download presentation
Presentation is loading. Please wait.
Published byJoanna Shelton Modified over 6 years ago
1
STAT 312 Introduction 9.1 - Z-Tests and Confidence Intervals for a
Chapter 9 - Inferences Based on Two Samples Introduction 9.1 - Z-Tests and Confidence Intervals for a Difference Between Two Population Means 9.2 - The Two-Sample T-Test and Confidence Interval 9.3 - Analysis of Paired Data 9.4 - Inferences Concerning a Difference Between Population Proportions 9.5 - Inferences Concerning Two Population Variances
2
SMOKERS NONSMOKERS Sample 1, size n1 Sample 2, size n2
Imagine the following “observational” study… X = Survival Time (“Time to Death”) in two independent normally-distributed populations SMOKERS NONSMOKERS X1 ~ N(μ1, σ1) 1 σ1 X2 ~ N(μ2, σ2) Null Hypothesis H0: μ1 = μ2, i.e., μ1 – μ2 = 0 (“No mean difference") Test at signif level α 2 σ2 “The reason for the significance was that the smokers started out older than the nonsmokers.” Sample 1, size n1 Sample 2, size n2 Suppose a statistically significant difference exists, with evidence that μ1 < μ2. How do we prevent this criticism???
3
POPULATION 1 POPULATION 2 X ~ N(μ1, σ1) 1 σ1
Now consider two dependent (“matched,” “paired”) populations… X and Y normally distributed. POPULATION 1 POPULATION 2 X ~ N(μ1, σ1) 1 σ1 Y ~ N(μ2, σ2) Null Hypothesis H0: μ1 = μ2, i.e., μ1 – μ2 = 0 (“No mean difference") Test at signif level α 2 σ2 Classic Examples: Twin studies, Left vs. Right, Pre-Tx (Baseline) vs. Post-Tx, etc. Common in human trials to match on Age, Sex, Race,… By design, every individual in Sample 1 is “paired” or “matched” with an individual in Sample 2, on potential confounding variables. … etc…. … etc….
4
POPULATION 1 POPULATION 2 X ~ N(μ1, σ1) 1 σ1 Y ~ N(μ2, σ2)
Now consider two dependent (“matched,” “paired”) populations… X, and Y normally distributed. POPULATION 1 POPULATION 2 X ~ N(μ1, σ1) 1 σ1 Y ~ N(μ2, σ2) Null Hypothesis H0: μ1 = μ2, i.e., μ1 – μ2 = 0 (“No mean difference") Test at signif level α 2 σ2 D = Classic Examples: Twin studies, Left vs. Right, Pre-Tx (Baseline) vs. Post Tx, etc. Common in human trials to match on Age, Sex, Race,… … etc…. Sample 1, size n Sample 2, size n NOTE: Sample sizes are equal! Since they are paired, subtract! Treat as one sample of the normally distributed variable D = X – Y.
5
Example: > x = rnorm(100, 10, 2) > qqnorm(x, pch=19) > qqline(x) > y = rnorm(100, 10, 2) > qqnorm(y, pch=19) > qqline(y) > d = x – y > qqnorm(d, pch=19) > qqline(d)
6
Example: > x = rnorm(100, 10, 2) > qqnorm(x, pch=19) > qqline(x) > t.test(x, y, paired = T) Paired t-test data: x and y t = , df = 99, p-value = alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: sample estimates: mean of the differences Cannot reject null > y = rnorm(100, 10, 2) > qqnorm(y, pch=19) > qqline(y) > d = x – y > qqnorm(d, pch=19) > qqline(d) There is no statistically significant difference shown between the population means of X and Y.
7
Example: > x = rnorm(100, 10, 2) > qqnorm(x, pch=19) > qqline(x) > x = rnorm(100, 11, 2) > qqnorm(x, pch=19) > qqline(x) > t.test(x, y, paired = T) Paired t-test data: x and y t = , df = 99, p-value = alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: sample estimates: mean of the differences > t.test(x, y, paired = T) Paired t-test data: x and y t = , df = 99, p-value = alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: sample estimates: mean of the differences Can reject null at = .05 > y = rnorm(100, 10, 2) > qqnorm(y, pch=19) > qqline(y) > d = x – y > qqnorm(d, pch=19) > qqline(d) There is a statistically significant difference shown between the population means of X and Y.
8
http://pages. stat. wisc
9
http://pages. stat. wisc
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.