Testing means, part II The paired t-test. Outline of lecture Options in statistics –sometimes there is more than one option One-sample t-test: review.

Slides:



Advertisements
Similar presentations
Topics Today: Case I: t-test single mean: Does a particular sample belong to a hypothesized population? Thursday: Case II: t-test independent means: Are.
Advertisements

Inferential Statistics & Hypothesis Testing
INTRODUCTION TO NON-PARAMETRIC ANALYSES CHI SQUARE ANALYSIS.
Confidence Interval and Hypothesis Testing for:
Comparing Two Population Means The Two-Sample T-Test and T-Interval.
Nonparametric tests and ANOVAs: What you need to know.
Midterm Review Session
Testing means, part III The two-sample t-test. Sample Null hypothesis The population mean is equal to  o One-sample t-test Test statistic Null distribution.
Classical Regression III
PSY 307 – Statistics for the Behavioral Sciences
The Normal Distribution. n = 20,290  =  = Population.
Chap 11-1 Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chapter 11 Hypothesis Testing II Statistics for Business and Economics.
Independent Samples and Paired Samples t-tests PSY440 June 24, 2008.
Homework Chapter 11: 13 Chapter 12: 1, 2, 14, 16.
Final Review Session.
1/45 Chapter 11 Hypothesis Testing II EF 507 QUANTITATIVE METHODS FOR ECONOMICS AND FINANCE FALL 2008.
Inference about a Mean Part II
Statistics 101 Class 9. Overview Last class Last class Our FAVORATE 3 distributions Our FAVORATE 3 distributions The one sample Z-test The one sample.
T-Tests Lecture: Nov. 6, 2002.
Copyright © 2014 by McGraw-Hill Higher Education. All rights reserved.
Chapter 11: Inference for Distributions
8-5 Testing a Claim About a Standard Deviation or Variance This section introduces methods for testing a claim made about a population standard deviation.
Chapter 9 Hypothesis Testing.
Statistical Methods in Computer Science Hypothesis Testing I: Treatment experiment designs Ido Dagan.
PSY 307 – Statistics for the Behavioral Sciences
5-3 Inference on the Means of Two Populations, Variances Unknown
Hypothesis Testing Using The One-Sample t-Test
PSY 307 – Statistics for the Behavioral Sciences
The t-test Inferences about Population Means when population SD is unknown.
Hypothesis Testing and T-Tests. Hypothesis Tests Related to Differences Copyright © 2009 Pearson Education, Inc. Chapter Tests of Differences One.
Review As sample size increases, the distribution of sample means A.Becomes wider and more normally shaped B.Becomes narrower and more normally shaped.
Two Sample Tests Ho Ho Ha Ha TEST FOR EQUAL VARIANCES
1/2555 สมศักดิ์ ศิวดำรงพงศ์
Comparing means Norhafizah Ab Manan. After class, you should Understand independent t test, paired t test and ANOVA Know how to calculate the t statistics.
Education 793 Class Notes T-tests 29 October 2003.
Sullivan – Fundamentals of Statistics – 2 nd Edition – Chapter 11 Section 2 – Slide 1 of 25 Chapter 11 Section 2 Inference about Two Means: Independent.
T-distribution & comparison of means Z as test statistic Use a Z-statistic only if you know the population standard deviation (σ). Z-statistic converts.
The paired sample experiment The paired t test. Frequently one is interested in comparing the effects of two treatments (drugs, etc…) on a response variable.
More About Significance Tests
Chapter 9 Hypothesis Testing and Estimation for Two Population Parameters.
Introduction to Statistics for the Social Sciences SBS200, COMM200, GEOG200, PA200, POL200, or SOC200 Lecture Section 001, Spring 2015 Room 150 Harvill.
Mid-Term Review Final Review Statistical for Business (1)(2)
Hypothesis Testing for Variance and Standard Deviation
Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Testing a Claim about a Proportion Section 7-5 M A R I O F. T R I O L A Copyright.
Warsaw Summer School 2011, OSU Study Abroad Program Difference Between Means.
Fitting probability models to frequency data. Review - proportions Data: discrete nominal variable with two states (“success” and “failure”) You can do.
Physics 270 – Experimental Physics. Let say we are given a functional relationship between several measured variables Q(x, y, …) x ±  x and x ±  y What.
Week111 The t distribution Suppose that a SRS of size n is drawn from a N(μ, σ) population. Then the one sample t statistic has a t distribution with n.
Inferential Statistics. Coin Flip How many heads in a row would it take to convince you the coin is unfair? 1? 10?
Statistics for Business and Economics 8 th Edition Chapter 7 Estimation: Single Population Copyright © 2013 Pearson Education, Inc. Publishing as Prentice.
© Copyright McGraw-Hill 2004
Inferences Concerning Variances
Statistical Inference Drawing conclusions (“to infer”) about a population based upon data from a sample. Drawing conclusions (“to infer”) about a population.
Statistical Inference Statistical inference is concerned with the use of sample data to make inferences about unknown population parameters. For example,
366_7. T-distribution T-test vs. Z-test Z assumes we know, or can calculate the standard error of the distribution of something in a population We never.
Lecture 8 Estimation and Hypothesis Testing for Two Population Parameters.
Objectives (BPS chapter 12) General rules of probability 1. Independence : Two events A and B are independent if the probability that one event occurs.
Chapter 11: Categorical Data n Chi-square goodness of fit test allows us to examine a single distribution of a categorical variable in a population. n.
Chapter 9 Introduction to the t Statistic
The Single-Sample t Test Chapter 9. t distributions >Sometimes, we do not have the population standard deviation, σ. Very common! >So what can we do?
Section Copyright © 2014, 2012, 2010 Pearson Education, Inc. Lecture Slides Elementary Statistics Twelfth Edition and the Triola Statistics Series.
Two-Sample Hypothesis Testing
STAT 312 Chapter 7 - Statistical Intervals Based on a Single Sample
Math 4030 – 10b Inferences Concerning Variances: Hypothesis Testing
Lecture Slides Elementary Statistics Twelfth Edition
Hypothesis Tests for a Population Mean in Practice
Elementary Statistics
Comparing Two Populations
Lecture Slides Elementary Statistics Twelfth Edition
Inferences from Matched Pairs
Presentation transcript:

Testing means, part II The paired t-test

Outline of lecture Options in statistics –sometimes there is more than one option One-sample t-test: review –testing the sample mean The paired t-test –testing the mean difference

A digression: Options in statistics

Example A student wants to check the fairness of the loonie She flips the coin 1,000,000 times, and gets heads 501,823 times. Is this a fair coin?

H o : The coin is fair (p heads = 0.5). H a : The coin is not fair (p heads ≠ 0.5). n = 1,000,000 trials x = 501,823 successes Under the null hypothesis, the number of successes should follow a binomial distribution with n=1,000,000 and p=0.5

Test statistic

Binomial test P = 2*Pr[X ≥ 501,823] P = 2*(Pr[X = 501,823] + Pr[X = 501,824] + Pr[X = 501,825] + Pr[X = 501,826] Pr[X = 999,999] + Pr[X = 1,000,000]

Central limit theorem The sum or mean of a large number of measurements randomly sampled from any population is approximately normally distributed

Binomial Distribution

Normal approximation to the binomial distribution

Example A student wants to check the fairness of the loonie She flips the coin 1,000,000 times, and gets heads 501,823 times. Is this a fair coin?

Normal approximation Under the null hypothesis, data are approximately normally distributed Mean: np = 1,000,000 * 0.5 = 500,000 Standard deviation: s = 500

Normal distributions Any normal distribution can be converted to a standard normal distribution, by Z-score

From standard normal table: P =

Conclusion P = , so we reject the null hypothesis This is much easier than the binomial test Can use as long as p is not close to 0 or 1 and n is large

Example A student wants to check the fairness of the loonie She flips the coin 1,000,000 times, and gets heads 500,823 times. Is this a fair coin?

A Third Option! Chi-squared goodness of fit test Null expectation: equal number of successes and failures Compare to chi-squared distribution with 1 d.f.

Test statistic: 13.3 Critical value: 3.84

Coin toss example Binomial test Normal approximation Chi-squared goodness of fit test Most accurate Hard to calculate Assumes: Random sample Approximate Easier to calculate Assumes: Random sample Large n p far from 0, 1 Approximate Easier to calculate Assumes: Random sample No expected <1 Not more than 20% less than 5

Coin toss example Binomial test Normal approximation Chi-squared goodness of fit test in this case, n very large (1,000,000) all P < 0.05, reject null hypothesis

Normal distributions Any normal distribution can be converted to a standard normal distribution, by Z-score

t distribution We carry out a similar transformation on the sample mean mean under H o estimated standard error

How do we use this? t has a Student's t distribution Find confidence limits for the mean Carry out one-sample t-test

t has a Student’s t distribution*

* Under the null hypothesis Uncertainty makes the null distribution FATTER

Confidence interval for a mean  (2) = 2-tailed significance level df = degrees of freedom, n-1 SE Y = standard error of the mean

Confidence interval for a mean 95 % Confidence interval: Use α(2) = 0.05

Confidence interval for a mean c % Confidence interval: Use α(2) = 1-c/100

Sample Null hypothesis The population mean is equal to  o One-sample t-test Test statistic Null distribution t with n-1 df compare How unusual is this test statistic? P < 0.05 P > 0.05 Reject H o Fail to reject H o

The following are equivalent: Test statistic > critical value P < alpha Reject the null hypothesis Statistically significant

Quick reference summary: One-sample t-test What is it for? Compares the mean of a numerical variable to a hypothesized value, μ o What does it assume? Individuals are randomly sampled from a population that is normally distributed Test statistic: t Distribution under H o : t-distribution with n-1 degrees of freedom Formulae:Y = sample mean, s = sample standard deviation

32 Comparing means Goal: to compare the mean of a numerical variable for different groups. Tests one categorical vs. one numerical variable Example: gender (M, F) vs. height

33 Paired vs. 2 sample comparisons

34 Paired designs Data from the two groups are paired There is a one-to-one correspondence between the individuals in the two groups

35 More on pairs Each member of the pair shares much in common with the other, except for the tested categorical variable Example: identical twins raised in different environments Can use the same individual at different points in time Example: before, after medical treatment

36 Paired design: Examples Same river, upstream and downstream of a power plant Tattoos on both arms: how to get them off? Compare lasers to dermabrasion

37 Paired comparisons - setup We have many pairs In each pair, there is one member that has one treatment and another who has another treatment “Treatment” can mean “group”

38 Paired comparisons To compare two groups, we use the mean of the difference between the two members of each pair

39 Example: National No Smoking Day Data compares injuries at work on National No Smoking Day (in Britain) to the same day the week before Each data point is a year

40 data

41 Calculate differences

42 Paired t test Compares the mean of the differences to a value given in the null hypothesis For each pair, calculate the difference. The paired t-test is a one-sample t-test on the differences.

43 Hypotheses Ho: Work related injuries do not change during No Smoking Days ( μ =0) Ha: Work related injuries change during No Smoking Days ( μ≠ 0)

44 Calculate differences

45 Calculate t using d’s

46 Caution! The number of data points in a paired t test is the number of pairs. -- Not the number of individuals Degrees of freedom = Number of pairs - 1 Here, df = 10-1 = 9

47 Critical value of t So we can reject the null hypothesis: Stopping smoking increases job-related accidents in the short term. Test statistic: t = 2.45

48 Assumptions of paired t test Pairs are chosen at random The differences have a normal distribution It does not assume that the individual values are normally distributed, only the differences.

Quick reference summary: Paired t-test What is it for? To test whether the mean difference in a population equals a null hypothesized value, μ do What does it assume? Pairs are randomly sampled from a population. The differences are normally distributed Test statistic: t Distribution under H o : t-distribution with n-1 degrees of freedom, where n is the number of pairs Formula: