T-Tests.

Slides:



Advertisements
Similar presentations
Lecture 2 ANALYSIS OF VARIANCE: AN INTRODUCTION
Advertisements

Hypothesis Testing with t Tests
Hypothesis Tests: Two Independent Samples
Inference about Means/Averages Chapter 23 Looking at means rather than percentages.
Hours Listening To Music In A Week! David Burgueño, Nestor Garcia, Rodrigo Martinez.
“Students” t-test.
The Normal Distribution PSYC 6130, PROF. J. ELDER 2 is the mean is the standard deviation The height of a normal density curve at any point x is given.
McGraw-Hill, Bluman, 7th ed., Chapter 9
Please enter data on page 477 in your calculator.
Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests.
Chi-square and F Distributions
Inferential Statistics
Statistical Inferences Based on Two Samples
Dr Richard Bußmann CHAPTER 12 Confidence intervals for means.
Chapter Thirteen The One-Way Analysis of Variance.
One Sample and Two Sample T-tests
Estimating a Population Variance
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.
Confidence Interval Estimation of Population Mean, μ, when σ is Unknown Chapter 9 Section 2.
Beyond Null Hypothesis Testing Supplementary Statistical Techniques.
Single Sample t-test Purpose: Compare a sample mean to a hypothesized population mean. Design: One group.
PSY 307 – Statistics for the Behavioral Sciences
The Normal Distribution. n = 20,290  =  = Population.
Comparing Means: Independent-samples t-test Lesson 14 Population APopulation B Sample 1Sample 2 OR.
Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc. Chap 9-1 Introduction to Statistics Chapter 10 Estimation and Hypothesis.
Inferences about two proportions Assumptions 1.We have proportions from two simple random samples that are independent (not paired) 2.For both samples,
Business Statistics: A Decision-Making Approach, 7e © 2008 Prentice-Hall, Inc. Chap 10-1 Business Statistics: A Decision-Making Approach 7 th Edition Chapter.
T-Tests Lecture: Nov. 6, 2002.
CONFIDENCE INTERVALS What is the Purpose of a Confidence Interval?
PSY 307 – Statistics for the Behavioral Sciences
Inference on averages Data are collected to learn about certain numerical characteristics of a process or phenomenon that in most cases are unknown. Example:
Chapter 9: Introduction to the t statistic
Confidence Intervals W&W, Chapter 8. Confidence Intervals Although on average, M (the sample mean) is on target (or unbiased), the specific sample mean.
1 Level of Significance α is a predetermined value by convention usually 0.05 α = 0.05 corresponds to the 95% confidence level We are accepting the risk.
Section 8.2 Estimating  When  is Unknown
Lecture 3: Review Review of Point and Interval Estimators
Chapter 9 Hypothesis Testing and Estimation for Two Population Parameters.
381 Hypothesis Testing (Testing with Two Samples-III) QSCI 381 – Lecture 32 (Larson and Farber, Sects 8.3 – 8.4)
H1H1 H1H1 HoHo Z = 0 Two Tailed test. Z score where 2.5% of the distribution lies in the tail: Z = Critical value for a two tailed test.
Confidence Intervals. Examples: Confidence Intervals 1. Among various ethnic groups, the standard deviation of heights is known to be approximately.
Normal Distribution.
Section 8-5 Testing a Claim about a Mean: σ Not Known.
© Copyright McGraw-Hill 2000
Chapter Twelve The Two-Sample t-Test. Copyright © Houghton Mifflin Company. All rights reserved.Chapter is the mean of the first sample is the.
Section 7-3 Estimating a Population Mean: σ Known.
Statistics for Business and Economics 8 th Edition Chapter 7 Estimation: Single Population Copyright © 2013 Pearson Education, Inc. Publishing as Prentice.
Inferences Concerning Variances
Estimating a Population Mean. Student’s t-Distribution.
Confidence Intervals for a Population Mean, Standard Deviation Unknown.
Confidence Interval Estimation of Population Mean, μ, when σ is Unknown Chapter 9 Section 2.
AP Statistics. Chap 13-1 Chapter 13 Estimation and Hypothesis Testing for Two Population Parameters.
Lecture 8 Estimation and Hypothesis Testing for Two Population Parameters.
Chapter 9: Introduction to the t statistic. The t Statistic The t statistic allows researchers to use sample data to test hypotheses about an unknown.
Two Sample Problems  Compare the responses of two treatments or compare the characteristics of 2 populations  Separate samples from each population.
Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved.Copyright © 2010 Pearson Education Section 9-3 Inferences About Two Means:
Chapter 9 Introduction to the t Statistic
Introduction to Hypothesis Test – Part 2
Testing the Difference Between Two Means
Math 4030 – 10b Inferences Concerning Variances: Hypothesis Testing
Comparing Two Populations or Treatments
Math 4030 – 10a Tests for Population Mean(s)
Hypothesis Tests for a Population Mean in Practice
Hypothesis tests for the difference between two means: Independent samples Section 11.1.
Elementary Statistics
Inference about Two Means: Independent Samples
Statistics for the Social Sciences
Doing t-tests by hand.
Testing and Estimating a Single Variance or Standard Deviation
Chapter Outline Inferences About the Difference Between Two Population Means: s 1 and s 2 Known.
Inferences from Matched Pairs
Presentation transcript:

t-Tests

Interval Estimation and the t Distribution

Large Sample z-Test Sometimes we have reason to test hypotheses involving specific values for the mean. Example 1. Claim: On average, people sleep less than the often recommended eight hours per night. Example 2. Claim: On average, people drink more than the recommended 2 drinks per day. Example 3. Claim: On average, women take more than 4 hours to run the marathon. However, it is rare that we have a specific hypothesis about the standard deviation of the population under study. For these situations, we can use the sample standard deviation s as an estimator for the population standard deviation s. If the sample size is pretty big (e.g., >100), then this estimate is pretty good, and we can just use the standard z test. PSYC 6130, PROF. J. ELDER

Example: Canadian General Social Survey, Cycle 6 (1991) PSYC 6130, PROF. J. ELDER

But what if we don’t have such a large sample? PSYC 6130, PROF. J. ELDER

Student’s t Distribution Problem: for small n, s is not a very accurate estimator of s. The result is that the computed z-score will not follow a standard normal distribution. Instead, the standardized score will follow what has become known as the Student’s t distribution. PSYC 6130, PROF. J. ELDER

Student’s t Distribution Normal distribution t distribution, n=2, df=1 t distribution, n=10, df=9 t distribution, n=30, df=29 How would you describe the difference between the normal and t distributions? PSYC 6130, PROF. J. ELDER

Student’s t distribution Student’s t distribution is leptokurtic More peaked Fatter tails What would happen if we were to ignore this difference, and use the standard normal table for small samples? PSYC 6130, PROF. J. ELDER

Student’s t Distribution Critical t values decrease as df increases As df  infinity, critical t values  critical z values Using the standard normal table for small samples would result in an inflated rate of Type I errors. PSYC 6130, PROF. J. ELDER

One-Sample t Test: Example PSYC 6130, PROF. J. ELDER

PSYC 6130, PROF. J. ELDER

Reporting Results Respondents who report being very forgetful sleep, on average, 7.11 hours/night, significantly less than the recommended 8 hours/night, t(37)=2.25, p<.05, two-tailed. PSYC 6130, PROF. J. ELDER

Confidence Intervals NHT allows us to test specific hypotheses about the mean. e.g., is m < 8 hours? Sometimes it is just as valuable, or more valuable, to know the range of plausible values. This range of plausible values is called a confidence interval. PSYC 6130, PROF. J. ELDER

Confidence Intervals The confidence interval (CI) of the mean is the interval of values, centred on the sample mean, that contains the population mean with specified probability. e.g., there is a 95% chance that the 95% confidence interval contains the population mean. NB: This assumes a flat prior on the population mean (non-Bayesian). Confidence Interval PSYC 6130, PROF. J. ELDER

Confidence Intervals 95% Confidence Interval PSYC 6130, PROF. J. ELDER

Basic Procedure for Confidence Interval Estimation Select the sample size (e.g., n = 38) Select the level of confidence (e.g., 95%) Select the sample and collect the data (Random sampling!) Calculate the limits of the interval PSYC 6130, PROF. J. ELDER

End of Lecture 4 Oct 8, 2008

Selecting Sample Size Suppose that You have a rough estimate s of the standard deviation of the population, and You want to do an experiment to estimate the mean within some 95% confidence interval of size W. PSYC 6130, PROF. J. ELDER

Assumptions Underlying Use of the t Distribution for NHT and Interval Estimation Same as for z test: Random sampling Variable is normal CLT: Deviations from normality ok as long as sample is large. Dispersion of sampled population is the same as for the comparison population PSYC 6130, PROF. J. ELDER

Sampling Distribution of the Variance

Sampling Distribution of the Variance We are sometimes interested in testing a hypothesis about the variance of a population. e.g., is IQ more diverse in university students than in the general population? PSYC 6130, PROF. J. ELDER

Sampling Distribution of the Variance What form does the sampling distribution of the variance assume? If the variable of interest (e.g., IQ) is normal, the sampling distribution of the variance takes the shape of a c-squared distribution: p(s2) s2 PSYC 6130, PROF. J. ELDER

Sample Variances and the c-Square Distribution 50 100 150 n=9 n=29 n=99 p(c2) c2 PSYC 6130, PROF. J. ELDER

Sample Variances and the c-Square Distribution The c-square distribution is: strictly positive. positively skewed. Since the sample variance is an unbiased estimator of the population variance: E(s2) = s 2 Due to the positive skew, the mean of the distribution E(s2) is greater than the mode. As the sample size increases, the distribution approaches a normal distribution. If the original distribution is not normal and the sample size is not large, the sampling distribution of the variance may be far from c-square, and tests based on this assumption may be flawed. PSYC 6130, PROF. J. ELDER

Example: Height of Female Psychology Graduate Students 2005 PSYC 6130A Students (Female) Source: Canadian Community Health Survey Cycle 3.1 (2005) Caution: self report! PSYC 6130, PROF. J. ELDER

Properties of Estimators We have now met two statistical estimators: PSYC 6130, PROF. J. ELDER

NHT for Two Independent Sample Means

Conditions of Applicability Comparing two samples (treated differently) Don’t know means of either population Don’t know variances of either population Samples are independent of each other PSYC 6130, PROF. J. ELDER

Example: Height of Canadian Males by Income Category (Canadian Community Health Survey, 2004) PSYC 6130, PROF. J. ELDER

Sampling Distribution PSYC 6130, PROF. J. ELDER

Sampling Distribution (cntd…) PSYC 6130, PROF. J. ELDER

NHT for Two Large Samples PSYC 6130, PROF. J. ELDER

Height of Canadian Males by Income Category (Canadian Community Health Survey, 2004) PSYC 6130, PROF. J. ELDER

NHT for Two Small Samples

Example: Social Factors in Psychological Well-Being Canadian Community Health Survey, 2004 PSYC 6130, PROF. J. ELDER

Social Factors in Psychological Well-Being (cntd…) Canadian Community Health Survey, 2004 PSYC 6130, PROF. J. ELDER

Social Factors in Psychological Well-Being (cntd…) Canadian Community Health Survey, 2004: Respondents who report never getting along with others PSYC 6130, PROF. J. ELDER

NHT for Two Small Independent Samples PSYC 6130, PROF. J. ELDER

NHT for Two Small Independent Samples (cntd…) PSYC 6130, PROF. J. ELDER

Pooled Variance PSYC 6130, PROF. J. ELDER

Social Factors in Psychological Well-Being (cntd…) Canadian Community Health Survey, 2004: Respondents who report never getting along with others PSYC 6130, PROF. J. ELDER

Reporting the Result PSYC 6130, PROF. J. ELDER

Confidence Intervals for the Difference Between Two Means PSYC 6130, PROF. J. ELDER

Underlying Assumptions Dependent variable measured on interval or ratio scale. Independent random sampling (independence within and between samples) In experimental work, often make do with random assignment. Normal distributions Moderate deviations ok due to CLT. Homogeneity of Variance Only critical when sample sizes are small and different. PSYC 6130, PROF. J. ELDER

End of Lecture 5 Oct 15, 2008

Social Factors in Psychological Well-Being (cntd…) Canadian Community Health Survey, 2004: Respondents who report never getting along with others PSYC 6130, PROF. J. ELDER

Separate Variances t Test If Population variances are different (suggested by substantially different sample variances) AND Samples are small Sample sizes are substantially different Then Pooled variance t statistic will not be correct. In this case, use separate variances t test PSYC 6130, PROF. J. ELDER

Separate Variances t Test This statistic is well-approximated by a t distribution. Unfortunately, calculating the appropriate df is difficult. SPSS will calculate the Welch-Satterthwaite approximation for df as part of a 2-sample t test: PSYC 6130, PROF. J. ELDER

Social Factors in Psychological Well-Being (cntd…) Canadian Community Health Survey, 2004: Respondents who report never getting along with others PSYC 6130, PROF. J. ELDER

Summary: t-Tests for 2 Independent Sample Means PSYC 6130, PROF. J. ELDER

More on Homogeneity of Variance How do we decide if two sample variances are different enough to suggest different population variances? Need NHT for homogeneity of variance. F-test Straightforward Sensitive to deviations from normality Levene’s test More robust to deviations from normality Computed by SPSS PSYC 6130, PROF. J. ELDER

Levene’s Test: Basic Idea SPSS reports an F-statistic for Levene’s test Allows the homogeneity of variance for two or more variables to be tested. We will introduce the F distribution later in the term. PSYC 6130, PROF. J. ELDER

The Matched t Test

Independent or Matched? Application of the Independent-Groups t test depended on independence both within and between groups. There are many cases where it is wise, convenient or necessary to use a matched design, in which there is a 1:1 correspondence between scores in the two samples. In this case, you cannot assume independence between samples! Examples: Repeated-subject designs (same subjects in both samples). Matched-pairs designs (attempt to match possibly important attributes of subjects in two samples) PSYC 6130, PROF. J. ELDER

Example: Assignment Marks These scores are not independent! PSYC 6130, PROF. J. ELDER

Better alternative: The matched t-test using the direct difference method PSYC 6130, PROF. J. ELDER

Matched vs Independent t-test Why does a matched t-test yield a higher t-score than an independent t-test in this example? The t-score is determined by the ratio of the difference between the groups and the variance within the groups. The matched t-test factors out the portion of the within-group variance due to differences between individuals. PSYC 6130, PROF. J. ELDER

The Matched t Test and Linear Correlation The degree to which the matched t value exceeds the independent-groups t value depends on how highly correlated the two samples are. Alternate formula for matched standard error: PSYC 6130, PROF. J. ELDER

Case 1: r = 0 Independent t-test Matched t-test Thus the t-score will be the same. But note that Thus the critical t-values will be larger for the matched test. PSYC 6130, PROF. J. ELDER

Case 2: r > 0 Independent t-test Matched t-test Now the t-score will be larger for the matched test. Although the critical t-values are larger, the net result is that the matched test will often be more powerful. PSYC 6130, PROF. J. ELDER

Confidence Intervals Just as for one-sample t test: PSYC 6130, PROF. J. ELDER

Repeated Measures Designs Many matched sample designs involve repeated measures of the same individuals. This can result in carry-over effects, including learning and fatigue. These effects can be minimized by counter-balancing the ordering of conditions across participants. PSYC 6130, PROF. J. ELDER

Assumptions of the Matched t Test Normality Independent random sampling (within samples) PSYC 6130, PROF. J. ELDER