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



Similar documents
Independent t- Test (Comparing Two Means)

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

Odds ratio, Odds ratio test for independence, chi-squared statistic.

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.

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

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

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

One-Way Analysis of Variance

Two-sample hypothesis testing, II /16/2004

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

Chapter 7: Simple linear regression Learning Objectives

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

Simple Linear Regression Inference

Confidence Intervals for the Difference Between Two Means

Mind on Statistics. Chapter 13

Section 13, Part 1 ANOVA. Analysis Of Variance

HYPOTHESIS TESTING: POWER OF THE TEST

Good luck! BUSINESS STATISTICS FINAL EXAM INSTRUCTIONS. Name:

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

2 Precision-based sample size calculations

LAB 4 INSTRUCTIONS CONFIDENCE INTERVALS AND HYPOTHESIS TESTING

Introduction. Hypothesis Testing. Hypothesis Testing. Significance Testing

CHAPTER 14 NONPARAMETRIC TESTS

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

INTERPRETING THE ONE-WAY ANALYSIS OF VARIANCE (ANOVA)

" Y. Notation and Equations for Regression Lecture 11/4. Notation:

Chicago Booth BUSINESS STATISTICS Final Exam Fall 2011

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

3.4 Statistical inference for 2 populations based on two samples

Randomized Block Analysis of Variance

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

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

Statistics Review PSY379

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

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

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

Hypothesis Testing: Two Means, Paired Data, Two Proportions

Part 2: Analysis of Relationship Between Two Variables

Chapter 2 Probability Topics SPSS T tests

Chapter 23 Inferences About Means

7. Comparing Means Using t-tests.

STATISTICS PROJECT: Hypothesis Testing

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

Comparing Means in Two Populations

Calculating P-Values. Parkland College. Isela Guerra Parkland College. Recommended Citation

BA 275 Review Problems - Week 6 (10/30/06-11/3/06) CD Lessons: 53, 54, 55, 56 Textbook: pp , ,

Descriptive Statistics

Two Related Samples t Test

Principles of Hypothesis Testing for Public Health

Hypothesis testing - Steps

Consider a study in which. How many subjects? The importance of sample size calculations. An insignificant effect: two possibilities.

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

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

12: Analysis of Variance. Introduction

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

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

HYPOTHESIS TESTING (ONE SAMPLE) - CHAPTER 7 1. used confidence intervals to answer questions such as...

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

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

BA 275 Review Problems - Week 5 (10/23/06-10/27/06) CD Lessons: 48, 49, 50, 51, 52 Textbook: pp

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

Difference of Means and ANOVA Problems

Lecture Notes Module 1

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

Permutation Tests for Comparing Two Populations

Unit 26 Estimation with Confidence Intervals

Chapter 7. One-way ANOVA

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

SPSS Guide: Regression Analysis

UNDERSTANDING THE DEPENDENT-SAMPLES t TEST

One-Way ANOVA using SPSS SPSS ANOVA procedures found in the Compare Means analyses. Specifically, we demonstrate

Fixed-Effect Versus Random-Effects Models

Unit 31: One-Way ANOVA

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

1.5 Oneway Analysis of Variance

Study Guide for the Final Exam

Unit 26: Small Sample Inference for One Mean

KSTAT MINI-MANUAL. Decision Sciences 434 Kellogg Graduate School of Management

individualdifferences

In the general population of 0 to 4-year-olds, the annual incidence of asthma is 1.4%

Chapter 7. Comparing Means in SPSS (t-tests) Compare Means analyses. Specifically, we demonstrate procedures for running Dependent-Sample (or

Using Stata for Categorical Data Analysis

TIPS FOR DOING STATISTICS IN EXCEL

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

Experimental Designs (revisited)

ANOVA ANOVA. Two-Way ANOVA. One-Way ANOVA. When to use ANOVA ANOVA. Analysis of Variance. Chapter 16. A procedure for comparing more than two groups

STAT 145 (Notes) Al Nosedal Department of Mathematics and Statistics University of New Mexico. Fall 2013

CONTENTS OF DAY 2. II. Why Random Sampling is Important 9 A myth, an urban legend, and the real reason NOTES FOR SUMMER STATISTICS INSTITUTE COURSE

Testing for Lack of Fit

Data Analysis Tools. Tools for Summarizing Data

NCSS Statistical Software

1. The parameters to be estimated in the simple linear regression model Y=α+βx+ε ε~n(0,σ) are: a) α, β, σ b) α, β, ε c) a, b, s d) ε, 0, σ

STATISTICS 8, FINAL EXAM. Last six digits of Student ID#: Circle your Discussion Section:

General Regression Formulae ) (N-2) (1 - r 2 YX

Section Format Day Begin End Building Rm# Instructor. 001 Lecture Tue 6:45 PM 8:40 PM Silver 401 Ballerini

Math 108 Exam 3 Solutions Spring 00

14.2 Do Two Distributions Have the Same Means or Variances?

Transcription:

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

Last time, we used the mean of one sample to test against the hypothesis that the true mean was a particular value. One-sided test: Two-sided test:

We also applied the idea of testing against a specific value to a proportion. After all, a proportion is just a mean of zeros (nos) and ones (yeses).

In every one sample test, we have a given value we re comparing the sample mean against. The question: Is this given value plausible?

But what if we don t have a specific value to compare against? What if, instead, we re comparing the means of two groups against each other? That s a job for two-sample testing.

Two independent samples. The null hypothesis is that the means are the same.

The alternative can be two-sided (not-equal), or one-sided on either side (less than / more than)

Another way to say two means at the same is The difference between these means is zero.

By using the difference of zero mindset, we get a hint on how to handle two sample tests. Make the null hypothesis about the difference between the means, instead of just a single mean. Then our t-score formula works just fine.

Let 1 and 2 be the means of each of the samples. Let 1 and 2 be the true means, (that H 0 says are the same) The t-score looks like:

We never deal with the formula in this form. Since the null assumption is that the true means are the same.

This is the formula we really use for the t-score. (But now you know where it comes from) The standard error is defined by further assumptions.

A hairy topic, to be sure. How about an example?

Example: New textbook vs. old textbook. Say we wanted to test if a new brand of textbook is a better resource as measured by provincial exam scores. (alpha =.05) We ll get two classrooms of the same grade and similar skill level. We ll then flip a coin, if heads: Class A gets the current textbook, Class B get the new one. Otherwise, Class A gets the new one.

At the end of the semester, these are the summary stats: Old text class New text class Mean 64.3 68.8 Std. Dev. 7.1 7.4 s Sample Size 21 23 n

First, identify: We are comparing two mean, a two-sample test is appropriate. We want to know if the new textbook is better so this is a onesided test. But what do we do about the standard error?

There are values for n, and two values for standard deviation. Old text class New text class Mean 64.3 68.8 Std. Dev. 7.1 7.4 s Sample Size n 21 23 We can get a measure that collects ( pools ) the standard deviation of the whole system. It s called the pooled standard deviation.

The pooled standard deviation, S P, works by way of a weighted average of the variances (standard deviation squared) that we already have. It s a weighted average because if one sample is much larger (has more degrees of freedom), it should count for more.

In this case, the samples are roughly the same size, so the pooled standard deviation S P should be near the middle of the two standard deviations (7.1 and 7.4). The degrees of freedom of the pooled standard deviation S P is the total of the df from each sample. (n 1 1) + (n 2 1)

S P =7.26 is used to find the standard error.

This standard error formula is used when there are two samples, hence it has two sample sizes n 1 and n 2.

Both n 1 and n 2 have to be large to make the standard error small. This reflects that added uncertainty of having two unknown means instead of one.

Now we can get the t-score. SE = 2.19 X new = 68.8 X old = 64.3

Sample 1 has 20 df, Sample 2 has 22 df, so the total df is 42. We compare this t-score, 2.054, to the critical value in the t- table, one-sided, 0.05 significance at 40 df (always round down if it s between values). t * = 1.684, t-score = 2.054 > t * Reject H 0 The new book classroom did do better.

Puzzled? Let s try another.

Example 2: Bio-equivalence. When one drug is being tested to replace another, it s important to check that the new drug has the same effects on the body as the old drug. This is typically done with a two-sample t-test. Expenza*, a name-brand drug is being used to lower blood pressure. We ve been hired to test if Thriftubin*, a cheaper generic drug, has the same effect on blood pressure. *Made up drug names

The name-brand drug has been used for a while, so we have lots of data on it, so its sample size is large. Blood pressure (Systolic) Name Brand Generic Mean 130.0 123.5 Std. Dev. 12.6 13.5 s Sample Size 144 16 n

Comparing two means Two-sample t-test. We want to show equal vs. not equal. Two-sided test.

First, get the pooled standard deviation. Use S P = 12.69 to get the standard error.

Finally, use SE = 3.34, XNB = 130.0, XG = 123.5 to find the t- score and compare that to the critical value. t-score = 1.944, t* = 1.984 (using df=100,.05 significance, twosided), so we fail to reject, but just barely.

We can t detect at the 5% level that the generic drug has a different effect on blood pressure than the name-brand drug. But it s close, (t-score was almost as large as t*) so we ll want to mention that to whomever hired us. If we had a larger sample, we d be better able to detect a difference. Which sample size would we increase to do this?

We can t detect at the 5% level that the generic drug has a different effect on blood pressure than the name-brand drug. But it s close, (t-score was almost as large as t*) so we ll want to mention that to whomever hired us. If we had a larger sample, we d be better able to detect a difference. Which sample size would we increase to do this? The generic drug sample (it s smaller, so that s where a lot of our uncertainty is coming from)

I hope you re not feeling in the dark.

Is Syria more dangerous now than two years ago? The WHO (World Health Organization) is interested in knowing if the fighting in Syria is affecting the general health of the population. They give you the death records to two days in the capital, Damascus; one in 2010, and one in the same day in 2012 (to avoid seasonal effects).

*2010 Mean from world factbook. All else made up. Age at Death Syria Then Syria Now Mean 74.1 71.2 Std. Dev. 8.3 22.6 Sample Size 52 45 We take the average age of the deaths on each day to estimate life expectancy. Is life expectancy in 2012 less than in 2010? (alpha =.01) (Two sample, one side test.)

The pooled S P assumes that the true standard deviation of both groups is the same, and that we can use both sample standard deviations together to get a better estimate of that true standard deviation. In this case, the standard deviation (and hence the variance) is much larger in the 2012 death ages. The assumption of equal variance isn t reasonable, so we can t get a pooled estimate.

Instead, we use a standard error formula that includes both standard deviations, but separately.

Just make sure S 1 and n 1 are referring to the same sample.

The rest is getting the t-score and comparing to a critical. t* = 2.414 for a one sided test, alpha = 0.01, and df=44. t-score = -0.81, which is between -2.414 and 2.414, so we fail to reject. We cannot find evidence that life expectancy as a whole has been reduced in Damascus, Syria.

By using two different standard deviations, we lose some degrees of freedom. SPSS computes the degrees of freedom exactly. (formula available on request) However, whenever we re doing this by hand, we ll use the worst case scenario of the lower of (n 1 1) and (n 2 1) So that s why df=45 1 = 44, instead of (45 1) + (52 1) = 95

How do we know if the standard deviations are too different to use the pooled estimate S P? SPSS has a test to see if the pooled standard deviation is reasonable, and will give us both answers. (Levene s test for equal variances) To do it ourselves, we have the F-statistic and F-test, which we ll cover in the ANOVA section near the end of the semester.

Also, if you don t assume equal variance and use the standard error formula with separate standard deviations, you ll get an answer very close the standard error from S P. Textbook SE using S P 2.191 Textbook SE using S 1, S 2 2.187 Drugs using S P 3.34 Drugs using S 1, S 2 3.53

Next day: Paired t-tests Two sample t-tests for proportions SPSS two samples