Inferences About Differences Between Means Edpsy 580



Similar documents
Descriptive Statistics

Lesson 1: Comparison of Population Means Part c: Comparison of Two- Means

LAB 4 INSTRUCTIONS CONFIDENCE INTERVALS AND HYPOTHESIS TESTING

Chapter 9. Two-Sample Tests. Effect Sizes and Power Paired t Test Calculation

Two-sample hypothesis testing, II /16/2004

SCHOOL OF HEALTH AND HUMAN SCIENCES DON T FORGET TO RECODE YOUR MISSING VALUES

Comparing Means in Two Populations

General Method: Difference of Means. 3. Calculate df: either Welch-Satterthwaite formula or simpler df = min(n 1, n 2 ) 1.

Chapter 7 Section 7.1: Inference for the Mean of a Population

1.5 Oneway Analysis of Variance

Statistics Review PSY379

Two-Sample T-Tests Allowing Unequal Variance (Enter Difference)

Nonparametric Two-Sample Tests. Nonparametric Tests. Sign Test

THE FIRST SET OF EXAMPLES USE SUMMARY DATA... EXAMPLE 7.2, PAGE 227 DESCRIBES A PROBLEM AND A HYPOTHESIS TEST IS PERFORMED IN EXAMPLE 7.

Introduction to Analysis of Variance (ANOVA) Limitations of the t-test

Non-Parametric Tests (I)

One-Way Analysis of Variance (ANOVA) Example Problem

Section 13, Part 1 ANOVA. Analysis Of Variance

Outline. Definitions Descriptive vs. Inferential Statistics The t-test - One-sample t-test

How To Compare Birds To Other Birds

2 Sample t-test (unequal sample sizes and unequal variances)

UNDERSTANDING THE INDEPENDENT-SAMPLES t TEST

Linear Models in STATA and ANOVA

Introduction. Hypothesis Testing. Hypothesis Testing. Significance Testing

Chapter 2 Probability Topics SPSS T tests

Class 19: Two Way Tables, Conditional Distributions, Chi-Square (Text: Sections 2.5; 9.1)

Inference for two Population Means

INTERPRETING THE ONE-WAY ANALYSIS OF VARIANCE (ANOVA)

Recall this chart that showed how most of our course would be organized:

Analysis of Data. Organizing Data Files in SPSS. Descriptive Statistics

Data Analysis Tools. Tools for Summarizing Data

Non-Inferiority Tests for Two Means using Differences

EXCEL Analysis TookPak [Statistical Analysis] 1. First of all, check to make sure that the Analysis ToolPak is installed. Here is how you do it:

UNDERSTANDING THE DEPENDENT-SAMPLES t TEST

Two-Sample T-Tests Assuming Equal Variance (Enter Means)

Multivariate Analysis of Variance. The general purpose of multivariate analysis of variance (MANOVA) is to determine

Rank-Based Non-Parametric Tests

Statistiek II. John Nerbonne. October 1, Dept of Information Science

12: Analysis of Variance. Introduction

Nonparametric Statistics

Tutorial 5: Hypothesis Testing

An Introduction to Statistics Course (ECOE 1302) Spring Semester 2011 Chapter 10- TWO-SAMPLE TESTS

Unit 31 A Hypothesis Test about Correlation and Slope in a Simple Linear Regression

Part 3. Comparing Groups. Chapter 7 Comparing Paired Groups 189. Chapter 8 Comparing Two Independent Groups 217

Mind on Statistics. Chapter 13

Testing Group Differences using T-tests, ANOVA, and Nonparametric Measures

3.4 Statistical inference for 2 populations based on two samples

Analysis of Variance ANOVA

II. DISTRIBUTIONS distribution normal distribution. standard scores

Sample Size and Power in Clinical Trials

DDBA 8438: The t Test for Independent Samples Video Podcast Transcript

research/scientific includes the following: statistical hypotheses: you have a null and alternative you accept one and reject the other

Two-sample t-tests. - Independent samples - Pooled standard devation - The equal variance assumption

Chapter 7. One-way ANOVA

Chi-square test Fisher s Exact test

Independent t- Test (Comparing Two Means)

Chapter 8 Hypothesis Testing Chapter 8 Hypothesis Testing 8-1 Overview 8-2 Basics of Hypothesis Testing

Confidence Intervals for the Difference Between Two Means

Chapter 5 Analysis of variance SPSS Analysis of variance

individualdifferences

Chapter 8. Comparing Two Groups

7. Comparing Means Using t-tests.

Name: Date: Use the following to answer questions 3-4:

Study Guide for the Final Exam

Comparing Two Groups. Standard Error of ȳ 1 ȳ 2. Setting. Two Independent Samples

1. What is the critical value for this 95% confidence interval? CV = z.025 = invnorm(0.025) = 1.96

Permutation Tests for Comparing Two Populations

Unit 26: Small Sample Inference for One Mean

Examining Differences (Comparing Groups) using SPSS Inferential statistics (Part I) Dwayne Devonish

Stat 411/511 THE RANDOMIZATION TEST. Charlotte Wickham. stat511.cwick.co.nz. Oct

Permutation & Non-Parametric Tests

SPSS 3: COMPARING MEANS

An Introduction to Statistical Tests for the SAS Programmer Sara Beck, Fred Hutchinson Cancer Research Center, Seattle, WA

NCSS Statistical Software

UNDERSTANDING THE TWO-WAY ANOVA

Guide to Microsoft Excel for calculations, statistics, and plotting data

13: Additional ANOVA Topics. Post hoc Comparisons

Unit 27: Comparing Two Means

Parametric and non-parametric statistical methods for the life sciences - Session I

NCSS Statistical Software

C. The null hypothesis is not rejected when the alternative hypothesis is true. A. population parameters.

t Tests in Excel The Excel Statistical Master By Mark Harmon Copyright 2011 Mark Harmon

Difference of Means and ANOVA Problems

University of Chicago Graduate School of Business. Business 41000: Business Statistics

Chapter 13 Introduction to Linear Regression and Correlation Analysis

SIMPLE LINEAR CORRELATION. r can range from -1 to 1, and is independent of units of measurement. Correlation can be done on two dependent variables.

Two-sample inference: Continuous data

Psychology 60 Fall 2013 Practice Exam Actual Exam: Next Monday. Good luck!

Overview of Non-Parametric Statistics PRESENTER: ELAINE EISENBEISZ OWNER AND PRINCIPAL, OMEGA STATISTICS

COMPARISONS OF CUSTOMER LOYALTY: PUBLIC & PRIVATE INSURANCE COMPANIES.

Introduction to Quantitative Methods

Outline. Topic 4 - Analysis of Variance Approach to Regression. Partitioning Sums of Squares. Total Sum of Squares. Partitioning sums of squares

Statistics. One-two sided test, Parametric and non-parametric test statistics: one group, two groups, and more than two groups samples

Chapter 7 Notes - Inference for Single Samples. You know already for a large sample, you can invoke the CLT so:

Regression Analysis: A Complete Example

Lecture Notes Module 1

NONPARAMETRIC STATISTICS 1. depend on assumptions about the underlying distribution of the data (or on the Central Limit Theorem)

HYPOTHESIS TESTING: CONFIDENCE INTERVALS, T-TESTS, ANOVAS, AND REGRESSION

Transcription:

Inferences About Differences Between Means Edpsy 580 Carolyn J. Anderson Department of Educational Psychology University of Illinois at Urbana-Champaign Inferences About Differences Between Means Slide 1 of 63

Outline General template Two Independent populations Large sample Any size sample Normality Homogeneity of variance Independence of observations SAS and s Power of. Inferences About Differences Between Means Slide 2 of 63

Statistical Hypotheses: null & alternative Statistical Hypotheses Test Statistic Select α level: before you look at data. Assumptions: think critically Test statistic: choose appropriate one Sampling distribution of test statistic: needed for p-values, CI, power Decision: reject, retain or uncertain Interpretation: in context of research question(s) Inferences About Differences Between Means Slide 3 of 63

Statistical Hypotheses Statistical Hypotheses Test Statistic Hypotheses of the form or equivalently, H o : µ 1 = µ 2 H o : µ 1 µ 2 = 0 means are the same no difference between means Different cases: Sample size. Assumptions about the population distribution. Inferences About Differences Between Means Slide 4 of 63

Test Statistic Statistical Hypotheses Test Statistic General form of (many) test statistics: test statistic = (sample statistic) (null hypothesis value) standard deviation of sample statistic t ratio t statistic Inferences About Differences Between Means Slide 5 of 63

Independent or Dependent? Independent vs Dependent Are the mean reading scores of high school seniors attending public schools the same as those students attending private schools? A group of patients suffering from high blood pressure are randomly assigned to either a treatment group or control group. Those assigned to the treatment group get a new drug while those assigned to the control receive the standard drug. Is the mean blood pressure lower with the new drug? Inferences About Differences Between Means Slide 6 of 63

Independent vs Dependent Independent or Dependent? Independent vs Dependent A sample of students are given a pre-test and then receive instruction on using SAS. To assess whether the instruction was effective, after completing the class, students take a second test. Are the test scores after the class better than those before the class. Students are randomly assigned to one of 2 instructional methods (eg, book & exercises or computer/multi-media presentation & practice problems). We want to assess whether the methods differ in terms of how much students learn. All students are given a pre-test and a pos and are interested in whether the mean change scores are different for the two instructional methods. Inferences About Differences Between Means Slide 7 of 63

For both large and small sample cases... Independent vs Dependent Statistical Hypotheses: H o : population 1 mean = population 2 mean H o : µ 1 = µ 2 Or equivalently, H o : there s no difference between means H o : µ 1 µ 2 = 0 Also need to specify the alterative hypotheses. Inferences About Differences Between Means Slide 8 of 63

Assumptions for : Independent vs Dependent Observations are independent Between populations, i.e., Y i1 and Y i2. Within populations, i.e. Y ij and Y kj for i k and both j = 1, 2. Since sizes n 1 and n 2 are both large, by the CLT The sampling distribution of Ȳ 1 N(µ 1, σ 2 1/n 1 ) The sampling distribution of Ȳ 2 N(µ 2, σ 2 2/n 2 ) Inferences About Differences Between Means Slide 9 of 63

Test Statistic: Test Statistic Estimating s ( Ȳ 1 Ȳ2 ) Test Statistic Sampling Distribution of Test Statistic The parameters of interest: (µ 1 µ 2 ). Sample statistic (Ȳ 1 Ȳ 2 ) is an estimate of (µ 1 µ 2 ). If H o is true, then (Ȳ 1 Ȳ 2 ) should be close to 0. Test statistic, t = (Ȳ 1 Ȳ 2 ) 0 s (Ȳ1 Ȳ 2 ) = (Ȳ 1 Ȳ 2 ) s (Ȳ1 Ȳ 2 ) Inferences About Differences Between Means Slide 10 of 63

Test Statistic : What does s (Ȳ1 Ȳ 2 ) equal? Test Statistic Estimating s ( Ȳ 1 Ȳ2 ) Test Statistic Sampling Distribution of Test Statistic FACT: If Ȳ1 and Ȳ2 are independent, then variance of a sum = sum of variances var(ȳ1 Ȳ2) = σ 2 (Ȳ1 Ȳ2) = σ 2 Ȳ 1 + σ 2 Ȳ 2 Unbiased estimators of σ1 2 and σ2, 2 s 2 1 = 1 n 1 1 n 1 i=1 (Y i1 Ȳ1) 2 s 2 2 = 1 n 2 1 n 2 i=1 (Y i2 Ȳ2) 2 Inferences About Differences Between Means Slide 11 of 63

Estimating s (Ȳ1 Ȳ 2 ) : Test Statistic Estimating s ( Ȳ 1 Ȳ2 ) Test Statistic Sampling Distribution of Test Statistic var(ȳ 1 Ȳ 2 ) = σ 2 (Ȳ1 Ȳ2) = σ2 Ȳ 1 + σ 2 Ȳ 2 s 2 1/n 1 is an unbiased estimator of σ 2 1/n 1 = σ 2 Ȳ 1 s 2 2/n 2 is an unbiased estimator of σ 2 2/n 2 = σ 2 Ȳ 2 Unbiased Estimator of σ 2 (Ȳ1 Ȳ2) ( ) s 2 1 + s2 2 = s 2 Ȳ n 1 n. 1 Ȳ2 2 Inferences About Differences Between Means Slide 12 of 63

Test Statistic : Estimator of σ (Ȳ1 Ȳ 2 ) Test Statistic Estimating s ( Ȳ 1 Ȳ2 ) Test Statistic Sampling Distribution of Test Statistic Test statistic s Ȳ1 Ȳ 2 = t = (Ȳ 1 Ȳ 2 ) 0 s Ȳ1 Ȳ 2 = ( ) s 2 1 + s2 2 n 1 n 2 Ȳ 1 Ȳ 2 ( ) s 2 1 n 1 + s2 2 n 2 Inferences About Differences Between Means Slide 13 of 63

Sampling Distribution of Test Statistic : Test Statistic Estimating s ( Ȳ 1 Ȳ2 ) Test Statistic Sampling Distribution of Test Statistic When H o is true, n 1 and n 2 are large, (and our assumptions are valid), then Alternatively by the CLT, Ȳ 1 normal for large n 1 Ȳ 2 normal for large n 2 test statistic: t N(0, 1) (Ȳ 1 Ȳ 2 ) normal for large n 1 and n 2. Inferences About Differences Between Means Slide 14 of 63

Example: 2 Independent. Test Statistic Estimating s ( Ȳ 1 Ȳ2 ) Test Statistic Sampling Distribution of Test Statistic HSB data: Test whether mean Math T-scores of High School seniors attending public and private schools are the same. Public Schools n 1 = 506 n 2 = 94 Private Schools Ȳ 1 = 51.45 Ȳ 2 = 54.01 s 2 1 = 91.74 s 2 2 = 67.16 Inferences About Differences Between Means Slide 15 of 63

Example: 2 Independent Test Statistic Statistical Hypotheses: H o : µ 1 µ 2 = 0 versus H 1 : µ 1 µ 2 0 Estimating s ( Ȳ 1 Ȳ2 ) Test Statistic Sampling Distribution of Test Statistic Assumptions: Public: Y 11, Y 21,...,Y n1 1 are independent and come from a population with mean µ 1 and variance σ 2 1. Private: Y 12, Y 22,...,Y n2 2 are independent and come from a population with mean µ 2 and variance σ 2 2. Y i1 and Y i2 are independent between populations. Inferences About Differences Between Means Slide 16 of 63

Example: 2 Independent Test statistic: t = 51.45 54.01 (91.74/506) + (67.16/94) = 2.56.95 = 2.709 Test Statistic Estimating s ( Ȳ 1 Ȳ2 ) Test Statistic Sampling Distribution of Test Statistic Sampling distribution: If H o is true and since n 1 and n 2 are both large, the test statistic is approximately distributed as a standard normal random variable. Decision: Since z = 1.960 is the critical value for a two-tailed test with α =.05 (or p-value <.05 or p-value =.007), reject H o. Inferences About Differences Between Means Slide 17 of 63

Example: 2 Independent Test Statistic Estimating s ( Ȳ 1 Ȳ2 ) Test Statistic Sampling Distribution of Test Statistic Interpretation/conclusion: The data support the hypothesis that students attending public and private schools differ in terms of mean Math achievement test scores. The 95% confidence interval for the difference, (Ȳ1 Ȳ2) ± z α/2ˆσ (Ȳ1 Ȳ 2 ) 2.56 ± 1.96(.95) ( 4.42,.70) Do public or private schools have higher means on math achievement test scores? Inferences About Differences Between Means Slide 18 of 63

Hypotheses: H o : µ 1 = µ 2 or µ 1 µ 2 = 0 H a : µ 1 µ 2 or µ 1 µ 2 0 (< or >) Two Independent Pooled (Within) Variance Large vs Test Large vs Test Any Size using Large Sample Assumptions: or Independent observations between and within populations. Population distributions of variables are Normal. Equal variances or homogeneous variances. Y i1 N(µ 1, σ 2 ) i.i.d. Y i2 N(µ 2, σ 2 ) i.i.d. Inferences About Differences Between Means Slide 19 of 63

Two Independent Population Statistical Hypotheses: Two Independent Pooled (Within) Variance Large vs Test Large vs Test Any Size using Large Sample H o : µ 1 = µ 2 or µ 1 µ 2 = 0 H a : µ 1 µ 2 or µ 1 µ 2 0 (< or >) Assumptions: Independence between and within populations. Population distributions of variables are Normal. Equal variances or homogeneous variances, i.e., Y i1 N(µ 1, σ 2 ) i.i.d. Y i2 N(µ 2, σ 2 ) i.i.d. Inferences About Differences Between Means Slide 20 of 63

Test Statistic: t = Ȳ1 Ȳ 2 s Ȳ1 Ȳ 2 Two Independent Pooled (Within) Variance Large vs Test Large vs Test Any Size using Large Sample What does s Ȳ1 Ȳ 2 equal? Variance of sum = sum of variances σ 2 Ȳ 1 Ȳ2 = σ2 1 n 1 + σ2 2 n 2 = σ2 n 1 + σ2 n 2 s 2 1 and s 2 2 are both estimators of σ 2 Pool information to get a better estimate. Inferences About Differences Between Means Slide 21 of 63

Pooled (Within) Variance s 2 pool = n1 i=1 (Y i1 Ȳ1) 2 + n 2 i=1 (Y i2 Ȳ2) 2 n 1 + n 2 2 Two Independent Pooled (Within) Variance Large vs Test Large vs Test Any Size using Large Sample = (n 1 1)s 2 1 + (n 2 1)s 2 2 n 1 + n 2 2 = s 2 w within groups Expected value of s 2 pool : E(s2 pool ) = E(s2 w) = σ 2 The estimator of σ 2 Ȳ 1 Ȳ2, s 2 Ȳ 1 Ȳ 2 = s2 w n 1 + s2 w n 2 = s 2 w ( 1 n 1 + 1 n 2 ) Inferences About Differences Between Means Slide 22 of 63

So s Ȳ1 Ȳ 2 = ( s 2 w + s2 w 1 = s w + 1 ) n 1 n 2 n 1 n 2 Two Independent Pooled (Within) Variance Large vs Test Large vs Test Any Size using Large Sample The test statistic, t = Ȳ 1 Ȳ2 ( ) 1 s w n 1 + 1 n 2 If H o is true and assumptions are valid, then the Sampling Distribution of the test statistic Student s t with degrees of freedom ν = (n 1 1) + (n 2 1) = n 1 + n 2 2 Inferences About Differences Between Means Slide 23 of 63

A random sample of n 1 = 10 students from private schools and n 2 = 10 from public schools from HSB data. Two Independent Pooled (Within) Variance Large vs Test Large vs Test Any Size using Large Sample Public Schools Private Schools n 1 = 10 n 2 = 10 Ȳ 1 = 53.99 Ȳ 2 = 55.56 s 2 1 = 119.15 s 2 2 = 120.116 Inferences About Differences Between Means Slide 24 of 63

Example: Small Sample Statistical hypotheses: H o : µ 1 µ 2 = 0 versus H a : µ 1 µ 2 0 Two Independent Pooled (Within) Variance Large vs Test Large vs Test Any Size using Large Sample Assumptions: Observations from public & private schools are independent within school type and between types. Observations come from populations that are normal. The variance of math test scores at public schools equals the variance of scores at private schools. Inferences About Differences Between Means Slide 25 of 63

Example: Small Sample Test statistic: s 2 w = (10 1)(119.15) + (10 1)(120.116) (10 + 10 2) = 119.63 Two Independent Pooled (Within) Variance Large vs Test Large vs Test Any Size using Large Sample t = 53.99 55.56 119.63(1/10 + 1/10) = 1.57 4.89 =.321 Sampling Distribution of t is Students t distribution with degrees of freedom ν = 10 + 10 2 = 18. Decision: Critical t-value for α =.05 and ν = 18 is 2.101 (or p-value =.75); retain H o. Conclusion: The data do not support the conclusion that math scores for students attending public and private schools differ. Inferences About Differences Between Means Slide 26 of 63

Example: Small Sample Two Independent Pooled (Within) Variance Large vs Test Large vs Test Any Size using Large Sample Inferences About Differences Between Means Slide 27 of 63

Large vs Test Assumptions: There are fewer assumptions for large sample test. Two Independent Pooled (Within) Variance Large vs Test Large vs Test Any Size using Large Sample Large Sample Any size (small) sample 1 Independence between and Independence between and within groups within groups 2 Sampling distribution of means Population distributions of variable is approximately normal (by are normal C.L.T.) 3 homogeneous variance (σ1 2 = σ2) 2 Inferences About Differences Between Means Slide 28 of 63

Large vs Test Sampling distribution of the test statistic differs. Two Independent Pooled (Within) Variance Large vs Test Large vs Test Any Size using Large Sample For large sample = standard normal. For any size sample = Students s t distribution. Our example... Inferences About Differences Between Means Slide 29 of 63

Any Size using Large Sample Any size sample size method with the full sample (i.e, n = 600), s 2 w = s 2 pool = 505(91.73719) + 93(67.15709) 506 + 94 2 = 87.9145 Two Independent Pooled (Within) Variance Large vs Test Large vs Test Any Size using Large Sample s Ȳ1 Ȳ 2 = t = 2.56 1.053 87.9145 ( 1 506 + 1 ) 94 = 1.05309 = 2.431 with ν = 600 2 = 598 Large sample method s Ȳ1 Ȳ 2 =.95 and t = 2.709. Inferences About Differences Between Means Slide 30 of 63

SAS/ASSIST: Input data into working memory. SAS/ANALYST SAS COMMANDS One the main toolbar: Solutions ASSIST Data Analysis ANOVA s Compare two group means: Active Data Set (select one). Dependent Variable. Classification (the group or population). RUN Inferences About Differences Between Means Slide 31 of 63

SAS/ANALYST Input data into working memory. SAS/ANALYST SAS COMMANDS One the main toolbar Solutions Analysis Analyst File Open by SAS name & select your data set On (Analyst) toolbar Statistics Hypothesis tests Two-sample for means fill in boxes OK Inferences About Differences Between Means Slide 32 of 63

SAS COMMANDS PROC TTEST data =HSB; CLASS sctyp; VAR math ; RUN; SAS/ANALYST SAS COMMANDS Inferences About Differences Between Means Slide 33 of 63

Mostly a concern with small samples (any size sample method). Effects and how to deal with it. Violations of Normality Homogeneity of Variance Homogeneity of Variance Quasi or Welch s Quasi or Welch s Violation of Independence Assumption The assumptions we ll discuss: Normality of sampling distribution of means Homogeneity of variance Independence within and between groups. Inferences About Differences Between Means Slide 34 of 63

Violations of Normality Effects: Violations of Normality Homogeneity of Variance Homogeneity of Variance Quasi or Welch s Quasi or Welch s Violation of Independence Assumption is robust. The stated or nominal α-level is very similar to the actual α-level, so long as n 1 and n 2 are moderately large. Departure from normality can have more of an effect with 1-tailed test than a 2-tailed test. Remedies: Get larger samples (so you can use any size test). Perform non-parametric test where you don t make the normality assumptions (i.e., Mann-Whitney). Inferences About Differences Between Means Slide 35 of 63

Homogeneity of Variance Effects for three cases where σ 2 1 σ 2 2: When n 1 = n 2 and σ 2 1 > σ 2 2, the is robust. Violations of Normality Homogeneity of Variance Homogeneity of Variance Quasi or Welch s Quasi or Welch s Violation of Independence Assumption When n 1 > n 2 and σ 2 1 > σ 2 2, the is conservative with respect to type I errors. (i.e., you make fewer type I errors than you would expect). When n 1 < n 2 and σ 2 1 > σ 2 2, the is liberal with respect to type I errors. (i.e., you make more type I errors than you would expect). When σ 2 1 σ 2 2: The greater the difference between σ 2 1 and σ 2 2, the further off the α-levels. The greater the difference between n 1 and n 2, the further off the α-levels. Inferences About Differences Between Means Slide 36 of 63

Homogeneity of Variance Remedies Take larger samples (& do large sample test). Violations of Normality Homogeneity of Variance Homogeneity of Variance Quasi or Welch s Quasi or Welch s Violation of Independence Assumption Use a non-parameteric test (i.e, Mann-Whitney). Perform a Quasi or Welch s t test. In SAS, it s called approximate t statistic for unequal variances Inferences About Differences Between Means Slide 37 of 63

Quasi or Welch s Violations of Normality Homogeneity of Variance Homogeneity of Variance Quasi or Welch s Quasi or Welch s Violation of Independence Assumption is same as the (for any size), except When computing the test statistic, use s = Ȳ1 s 2 Ȳ2 Ȳ 1 + s 2 s 2 1 Ȳ 2 = + s2 2 n 1 n 2 Adjust the degrees of freedom ν = s2 Ȳ 1 + s 2 Ȳ 2 (s 2 Ȳ 1 ) 2 ν 1 + (s2 Ȳ 2 ) 2 ν 2 to nearest integer. Inferences About Differences Between Means Slide 38 of 63

Quasi or Welch s In SAS/PROC TTEST, this corresponds to df for Satterthwaite or df and p-value for unequal variances. The test statistic is compared to Student s t distribution with the degrees of freedom give above. Violations of Normality Homogeneity of Variance Homogeneity of Variance Quasi or Welch s Quasi or Welch s Violation of Independence Assumption SAS commands: PROC TTEST data =HSB cochran; CLASS sctyp; VAR math ;... look at output. Inferences About Differences Between Means Slide 39 of 63

Violation of Independence Assumption Within groups = big problem; beyond scope of this course. Between groups = Violations of Normality Homogeneity of Variance Homogeneity of Variance Quasi or Welch s Quasi or Welch s Violation of Independence Assumption Paired comparison or dependent (if appropriate) If paired comparison test not applicable/appropriate, Big problem. Inferences About Differences Between Means Slide 40 of 63

Paired Comparisons Situation: Have pairs of individuals (experimental units, subjects, etc) and you measure a variable on each member of the pair. =1 Population t Test Inferences About Differences Between Means Slide 41 of 63 Husband & wife and measure of marital satisfaction (are they the same?) Mother s & father s scores on a measure of authoritarian parenting style. Pre- and pos scores to assess effectiveness of instruction or an intervention. Twins raised apart and a measure of cognitive ability.

Paired Comparisons Note: by design n 1 = n 2 = n. Statistical Hypotheses: Three equivalent Null hypotheses: H o : µ diff = 0 where µ diff = E(D i ) and D i = Y i1 Y i2 =1 Population t Test Inferences About Differences Between Means Slide 42 of 63 or H o : µ 1 = µ 2 or H o : µ 1 µ 2 = 0 H a can be 1 or 2 tailed. i.e., H a : µ 1 < µ 2 or µ 1 µ 2 < 0 H a : µ 1 > µ 2 or µ 1 µ 2 > 0 H a : µ 1 µ 2 or µ 1 µ 2 0

Paired Comparisons Assumptions: Independence of observations across pairs (within groups). Observations between groups (maybe) dependent. =1 Population t Test Inferences About Differences Between Means Slide 43 of 63 The variable is normally distributed in each population. ie. i = 1, 2,...,n. Y i1 N(µ 1, σ 2 1) i.i.d Y i2 N(µ 2, σ 2 2) i.i.d.

Paired Comparisons Notes regarding the assumptions: σ 2 1 does not have to equal σ 2 2. The correlation between Y i1 and Y i2 is not necessarily 0. =1 Population t Test Inferences About Differences Between Means Slide 44 of 63

Paired Comparisons Test Statistic: The t statistic: t = Ȳ1 Ȳ 2 s Ȳ1 Ȳ 2 = ȲD s ȲD The t statistic on the far right is the same as the one population t ratio/statistic. =1 Population t Test Inferences About Differences Between Means Slide 45 of 63 The standard error of the mean difference is the square root of s 2 Ȳ D = s 2 Ȳ 1 + s 2 Ȳ 2 2cov(Ȳ 1, Ȳ 2 ) = s 2 Ȳ 1 + s 2 Ȳ 2 2r 12 s Ȳ1 s Ȳ2 where r 12 is the correlation between Y 1 and Y 2.

Paired Comparisons Sampling Distribution of test statistic is Student s t distribution with ν = n 1. Decision & Conclusion:... same as other tests. =1 Population t Test Inferences About Differences Between Means Slide 46 of 63

Comments Regarding The paired comparison is equivalent to computing difference scores for each pair and doing a one sample on mean difference scores.... =1 Population t Test Inferences About Differences Between Means Slide 47 of 63 Sample statistics, D = 1 n n (Y i1 Y i2 ) = 1 n i=1 s D = s 2 D n = n i=1 D i n i=1 (D i D) 2 /(n 1) n

= 1 Population t Test Hypotheses: H o : µ D = 0 vs H a : µ D 0. Test statistic, t = D 0 s D = D s D =1 Population t Test Inferences About Differences Between Means Slide 48 of 63 Sampling distribution of test statistic is Student s t distribution with ν = n 1

Example: Paired Comparison The girls in the HSB data set and suppose we re interested in whether the girls mean science score is the same as their math score. There are n = 327 girls and =1 Population t Test Inferences About Differences Between Means Slide 49 of 63 Science Math Difference Scores Ȳ 1 = 50.5388 Ȳ 2 = 51.4346 D = 0.8957 s 1 = 9.2166 s 2 = 9.0685 s D = 7.6335 s Ȳ1 =.5097 s Ȳ2 =.5015 s D =.4221 r =.6516

Example: Paired Comparison For girls, H o : µ sci = µ math vs H a : µ sci µ math Assumptions are... =1 Population t Test Inferences About Differences Between Means Slide 50 of 63 α =.05 Using the writing and math statistics: s 2 Ȳ 1 Ȳ2 = s 2 Ȳ 1 + s 2 Ȳ 2 2r (Y1,Y 2 )s Ȳ1 s Ȳ2 = (.5097) 2 + (.5015) 2 2(.6516)(.5097)(.5015) =.1782 This is the same as s D =.1782 =.4221 given on previous slide.

Example: Paired Comparison Test Statistic using sample statistics for the science and math scores, t = 50.5388 51.4346.1782 =.8958.4221 = 2.12 =1 Population t Test Inferences About Differences Between Means Slide 51 of 63 Test statistic using the difference score sample statistics, t = Ȳ1 Ȳ 2 s Ȳ1 Ȳ 2 =.8957.4221 = 2.12 With ν = 327 1 = 326, p-value P( t 2.12) =.03, or t (326,.975) = 1.97 (Note: z.975 = 1.96).

Example: Paired Comparison Reject H o. 95% confidence interval of plausible differences, =1 Population t Test Inferences About Differences Between Means Slide 52 of 63 Ȳ sci Ȳmath ± t (326,.975) s (Ȳsci Ȳ math ).8957 ± 1.9672(.4221) ( 1.73,.07) The girls mean math scores are significantly (at the.05 level) from their science. The girls mean math scores are larger than their science scores... but is this important? SAS/ANALYST, ASSIST and commands.

Comments Regarding Under what circumstances can we relax the assumption that Y i1 and Y i2 come from normal distributions? =1 Population t Test Inferences About Differences Between Means Slide 53 of 63 If Y 1 and Y 2 are positively correlated, then the standard error (deviation) of (Ȳ 1 Ȳ 2 ) is smaller, which leads to a larger t statistic (more power) relative to the two independent group test. In the dependent groups test, the some variability is removed by the matching variable. Question: What if the correlation is negative?

Comments Regarding If the matching variable is not related to what you re measuring, then the dependent group test is bad... it has less power than independent group test & half the degrees of freedom. =1 Population t Test Inferences About Differences Between Means Slide 54 of 63 e.g. You randomly assign 20 students to one of two study methods. Your measure is a test score on material learned. Match students in pairs based on their height? Match students in pairs based on ability/iq measure?

For large samples (i.e., when use N(0, 1)). Example For any size samples (i.e., when use Student s t distribution). Power of z Test: Null Hypothesis Power of z Test: Alternative Power of z Test Example: Power of z Test Example: Power of z Test Example: Power of z Test Example: The Algebra Power for Small Samples Inferences About Differences Between Means Slide 55 of 63

Power of z Test: Null Hypothesis For large samples when use N(01, ) Power of z Test: Null Hypothesis Power of z Test: Alternative Power of z Test Example: Power of z Test Example: Power of z Test Example: Power of z Test Example: The Algebra Power for Small Samples Inferences About Differences Between Means Slide 56 of 63

Power of z Test: Alternative For large samples when use N(01, ) Power of z Test: Null Hypothesis Power of z Test: Alternative Power of z Test Example: Power of z Test Example: Power of z Test Example: Power of z Test Example: The Algebra Power for Small Samples Inferences About Differences Between Means Slide 57 of 63

Power of z Test For large samples when use N(01, ). Power of z Test: Null Hypothesis Power of z Test: Alternative Power of z Test Example: Power of z Test Example: Power of z Test Example: Power of z Test Example: The Algebra Power for Small Samples Basically, like what we did for 1 sample tests.... for a 2-tailed alternative. Find the rejection region in terms of the original scale. The Critical mean differences D crit = (Ȳ 1 Ȳ 2 ) crit = µ o ± z α/2 s diff = 0 ± z α/2 s diff Find the z-scores of ± D crit using the true mean difference, and find the area. z alternative = ± D crit µ true s differ Inferences About Differences Between Means Slide 58 of 63

Example: Power of z Test Dependent group using female seniors from the HSB data set. Since n girls = 327, we have a large sample so we ll use the standard normal distribution. When performing the test, Power of z Test: Null Hypothesis Power of z Test: Alternative Power of z Test Example: Power of z Test Example: Power of z Test Example: Power of z Test Example: The Algebra Power for Small Samples Inferences About Differences Between Means Slide 59 of 63

Example: Power of z Test Under the alternative hypothesis (µ =.8957) Power of z Test: Null Hypothesis Power of z Test: Alternative Power of z Test Example: Power of z Test Example: Power of z Test Example: Power of z Test Example: The Algebra Power for Small Samples Inferences About Differences Between Means Slide 60 of 63

Example: Power of z Test Under the alternative and null together Power of z Test: Null Hypothesis Power of z Test: Alternative Power of z Test Example: Power of z Test Example: Power of z Test Example: Power of z Test Example: The Algebra Power for Small Samples Inferences About Differences Between Means Slide 61 of 63

Example: The Algebra What does D crit equal? D crit = µ o ± 1.96s d = 0 ± 1.96(.4221) = ±.8273 Assume that the true difference (in the population) equals.8957 (ie, µ diff =.8957). Power of z Test: Null Hypothesis Power of z Test: Alternative Power of z Test Example: Power of z Test Example: Power of z Test Example: Power of z Test Example: The Algebra Power for Small Samples z =.8273 (.8957).4221 =.1620 z = Power = Prob(z.1620) + Prob(z 4.0820).8273 +.8957.4221 Prob(z.1620) =.56 Prob(z 4.0820).0000002 = 4.0820 Inferences About Differences Between Means Slide 62 of 63

Power for Small Samples The logic is the same. Use Student s t-distribution. Power of z Test: Null Hypothesis Power of z Test: Alternative Power of z Test Example: Power of z Test Example: Power of z Test Example: Power of z Test Example: The Algebra Power for Small Samples Possibilities: SAS/Analyst The cumulative density calculator at http://calculators.stat.ucla.edu/cdf/ p value program from course web-site. SAS program functions. Inferences About Differences Between Means Slide 63 of 63