11/30/2015HK 396 - Dr. Sasho MacKenzie1 Comparing Means from Two Data Sets The t-test.

Slides:



Advertisements
Similar presentations
Chapter 12: Testing hypotheses about single means (z and t) Example: Suppose you have the hypothesis that UW undergrads have higher than the average IQ.
Advertisements

PTP 560 Research Methods Week 9 Thomas Ruediger, PT.
Statistical Decision Making
Significance Testing Chapter 13 Victor Katch Kinesiology.
Review: What influences confidence intervals?
Using Statistics in Research Psych 231: Research Methods in Psychology.
Using Statistics in Research Psych 231: Research Methods in Psychology.
PSY 307 – Statistics for the Behavioral Sciences
Fundamentals of Hypothesis Testing. Identify the Population Assume the population mean TV sets is 3. (Null Hypothesis) REJECT Compute the Sample Mean.
Using Statistics in Research Psych 231: Research Methods in Psychology.
Evaluating Hypotheses Chapter 9. Descriptive vs. Inferential Statistics n Descriptive l quantitative descriptions of characteristics.
10 Hypothesis Testing. 10 Hypothesis Testing Statistical hypothesis testing The expression level of a gene in a given condition is measured several.
The t-test:. Answers the question: is the difference between the two conditions in my experiment "real" or due to chance? Two versions: (a) “Dependent-means.
Cal State Northridge  320 Ainsworth Sampling Distributions and Hypothesis Testing.
Inferential Stats for Two-Group Designs. Inferential Statistics Used to infer conclusions about the population based on data collected from sample Do.
Independent Samples and Paired Samples t-tests PSY440 June 24, 2008.
Evaluating Hypotheses Chapter 9 Homework: 1-9. Descriptive vs. Inferential Statistics n Descriptive l quantitative descriptions of characteristics ~
BCOR 1020 Business Statistics
Analysis of Differential Expression T-test ANOVA Non-parametric methods Correlation Regression.
T-Tests Lecture: Nov. 6, 2002.
UNDERSTANDING RESEARCH RESULTS: STATISTICAL INFERENCE © 2012 The McGraw-Hill Companies, Inc.
Chapter 11: Inference for Distributions
Today Concepts underlying inferential statistics
Using Statistics in Research Psych 231: Research Methods in Psychology.
Hypothesis Testing Using The One-Sample t-Test
Definitions In statistics, a hypothesis is a claim or statement about a property of a population. A hypothesis test is a standard procedure for testing.
Hypothesis Testing: Two Sample Test for Means and Proportions
Getting Started with Hypothesis Testing The Single Sample.
Week 9 October Four Mini-Lectures QMM 510 Fall 2014.
PSY 307 – Statistics for the Behavioral Sciences
Chapter 9 Comparing Means
AM Recitation 2/10/11.
Hypothesis Testing:.
Probability Distributions and Test of Hypothesis Ka-Lok Ng Dept. of Bioinformatics Asia University.
Overview Definition Hypothesis
Hypothesis Testing II The Two-Sample Case.
Comparing Means From Two Sets of Data
Section 10.1 ~ t Distribution for Inferences about a Mean Introduction to Probability and Statistics Ms. Young.
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.
Statistical Power The ability to find a difference when one really exists.
Comparing Two Population Means
T tests comparing two means t tests comparing two means.
Hypothesis Testing CSCE 587.
1 Objective Compare of two matched-paired means using two samples from each population. Hypothesis Tests and Confidence Intervals of two dependent means.
One-sample In the previous cases we had one sample and were comparing its mean to a hypothesized population mean However in many situations we will use.
ANOVA (Analysis of Variance) by Aziza Munir
Statistics (cont.) Psych 231: Research Methods in Psychology.
DIRECTIONAL HYPOTHESIS The 1-tailed test: –Instead of dividing alpha by 2, you are looking for unlikely outcomes on only 1 side of the distribution –No.
Statistical Inference for the Mean Objectives: (Chapter 9, DeCoursey) -To understand the terms: Null Hypothesis, Rejection Region, and Type I and II errors.
1 Objective Compare of two population variances using two samples from each population. Hypothesis Tests and Confidence Intervals of two variances use.
Chapter 8 Parameter Estimates and Hypothesis Testing.
Example 10.2 Measuring Student Reaction to a New Textbook Hypothesis Tests for a Population Mean.
Welcome to MM570 Psychological Statistics
Inferential Statistics Introduction. If both variables are categorical, build tables... Convention: Each value of the independent (causal) variable has.
Other Types of t-tests Recapitulation Recapitulation 1. Still dealing with random samples. 2. However, they are partitioned into two subsamples. 3. Interest.
Statistical Inference Statistical inference is concerned with the use of sample data to make inferences about unknown population parameters. For example,
T tests comparing two means t tests comparing two means.
Statistics (cont.) Psych 231: Research Methods in Psychology.
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.
Populations and Samples Hypothesis Testing Example.
Statistics (cont.) Psych 231: Research Methods in Psychology.
©2013, The McGraw-Hill Companies, Inc. All Rights Reserved Chapter 4 Investigating the Difference in Scores.
Statistical Inference for the Mean Objectives: (Chapter 8&9, DeCoursey) -To understand the terms variance and standard error of a sample mean, Null Hypothesis,
Inferential Statistics Psych 231: Research Methods in Psychology.
Chapter 9 Introduction to the t Statistic
When the means of two groups are to be compared (where each group consists of subjects that are not related) then the excel two-sample t-test procedure.
Review: What influences confidence intervals?
Estimating Population Parameters Based on a Sample
Comparing Means from Two Data Sets
Presentation transcript:

11/30/2015HK Dr. Sasho MacKenzie1 Comparing Means from Two Data Sets The t-test

11/30/2015HK Dr. Sasho MacKenzie2 Research Questions To improve muscular power, should an athlete perform heavy resistance exercises, or light plyometric exercises?To improve muscular power, should an athlete perform heavy resistance exercises, or light plyometric exercises? Is it better to imagine the flight of the ball or the actions of your swing prior to striking a golf ball?Is it better to imagine the flight of the ball or the actions of your swing prior to striking a golf ball? Is running 5 km or walking 5 km better for burning calories?Is running 5 km or walking 5 km better for burning calories? Do golfers sink more putts if they focus on the hole or on the ball during a putt?Do golfers sink more putts if they focus on the hole or on the ball during a putt? Will squatting to a lower depth during a vertical jump improve performance?Will squatting to a lower depth during a vertical jump improve performance?

11/30/2015HK Dr. Sasho MacKenzie3 The t-test All of the questions posed on the previous slide can be statistically addressed using the t-test.All of the questions posed on the previous slide can be statistically addressed using the t-test.t-test. A t-test determines if two groups of data are significantly different (not meaningfully different).A t-test determines if two groups of data are significantly different (not meaningfully different). A t-test is the ratio of the actual difference between two means to the difference that is expected due to chance alone.A t-test is the ratio of the actual difference between two means to the difference that is expected due to chance alone. The bigger the actual difference is compared to the expected difference due to chance, the more statistically significant the t-test.The bigger the actual difference is compared to the expected difference due to chance, the more statistically significant the t-test.

11/30/2015HK Dr. Sasho MacKenzie4 The t-test A t-test calculation produces a value (t-statistic) that is similar to a z-score.A t-test calculation produces a value (t-statistic) that is similar to a z-score.z-score The t-distributions, are also very similar to the z-score distribution (normal distribution).The t-distributions, are also very similar to the z-score distribution (normal distribution).t-distributions The t-distribution changes depending on the sample size.The t-distribution changes depending on the sample size.

11/30/2015HK Dr. Sasho MacKenzie5 The t Distributions (3 examples) t N = 60 (same as normal curve) N = 10 N = 3 E.g., Area beyond t=3 increases as N decreases

11/30/2015HK Dr. Sasho MacKenzie6 Let’s use an Example Question: Do HK students drink more or less alcohol than the average St.FX student?Question: Do HK students drink more or less alcohol than the average St.FX student? Assumptions:Assumptions: –Every student on campus honestly completed a form and the average drinks/week is known. –Therefore, we know the mean of the population. Methods:Methods: –Determine the drinks/week for a sample of HK students. –Determine if the sample mean is “different” than the population mean (perform a t-test).

11/30/2015HK Dr. Sasho MacKenzie7 What is “different”? Before the t-test, we must set a standard for statistical significance.Before the t-test, we must set a standard for statistical significance. This means determining the chance of error we are willing to have in our final decision.This means determining the chance of error we are willing to have in our final decision. I.e., How confident do we want to be in our decision that HK students drink a different amount?I.e., How confident do we want to be in our decision that HK students drink a different amount? This decision is represented by alpha (  ), which is typically set at.05 (5%). This value is arbitrary.This decision is represented by alpha (  ), which is typically set at.05 (5%). This value is arbitrary. Assume no difference and that the study is repeated 100 times. On 5 occasions, due to chance, we would incorrectly find that HK students drink more.Assume no difference and that the study is repeated 100 times. On 5 occasions, due to chance, we would incorrectly find that HK students drink more.

11/30/2015HK Dr. Sasho MacKenzie8 One-sample t-test We will use what’s called a one-sample t-test.We will use what’s called a one-sample t-test. This compares the mean of a sample to the mean of a population.This compares the mean of a sample to the mean of a population.  X= sample mean  X= sample mean  = population mean  = population mean SEM= standard error of the meanSEM= standard error of the mean Actual difference Expected difference due to chance

11/30/2015HK Dr. Sasho MacKenzie9 The Hypothesis In statistics you must clearly state a testable hypothesis.In statistics you must clearly state a testable hypothesis. Typically the hypothesis tested is opposite to what you expect and is referred to as the null hypothesis.Typically the hypothesis tested is opposite to what you expect and is referred to as the null hypothesis.null hypothesisnull hypothesis Our null hypothesis is that HK students do not drink a different amount than the average university student.Our null hypothesis is that HK students do not drink a different amount than the average university student.  X =  or  X -  = 0  X =  or  X -  = 0

11/30/2015HK Dr. Sasho MacKenzie10 The Calculation University PopulationUniversity Population –Average drinks per week = 10 HK Sample of studentsHK Sample of students –Mean = 12, SD = 5, N = 30 The odds of getting a t stat this big, or bigger, due to chance would then be determined by calculating a p-value.The odds of getting a t stat this big, or bigger, due to chance would then be determined by calculating a p-value.

11/30/2015HK Dr. Sasho MacKenzie11 The P-value In Excel, the function TDIST() can be used to calculate the p-value.In Excel, the function TDIST() can be used to calculate the p-value. The degrees of freedom are N-1.The degrees of freedom are N-1. Our example is a two-tailed test because HK students may drink more, or less, than the average. I.e., the sample mean could be either more or less than the population.Our example is a two-tailed test because HK students may drink more, or less, than the average. I.e., the sample mean could be either more or less than the population. Since we set alpha =.05, if the p-value is less than.05, we will state HK students are statistically different.Since we set alpha =.05, if the p-value is less than.05, we will state HK students are statistically different.

11/30/2015HK Dr. Sasho MacKenzie12 Graphic of two-tailed one sample t-test t t distribution for N = 30 Combined area beyond t=2.19 and t = is.037 From TDIST, p =.037

11/30/2015HK Dr. Sasho MacKenzie13 Conclusion Since p=.037 is less than alpha =.05, we reject the null hypothesis and conclude that HK students consume significantly more drinks per week.Since p=.037 is less than alpha =.05, we reject the null hypothesis and conclude that HK students consume significantly more drinks per week. The following shows how this would be explained in a study.The following shows how this would be explained in a study. It was determined that the average number of alcoholic drinks consumed by HK students (12 drinks), per week, was significantly more than the typical university student (10 drinks), t(29) = 2.19, p =.037.It was determined that the average number of alcoholic drinks consumed by HK students (12 drinks), per week, was significantly more than the typical university student (10 drinks), t(29) = 2.19, p =.037.

11/30/2015HK Dr. Sasho MacKenzie14 Independent t-test Determines if two sample means are statistically different.Determines if two sample means are statistically different. The null hypothesis is that the means come from the same population,  X 1 -  X 2 = 0.The null hypothesis is that the means come from the same population,  X 1 -  X 2 = 0. The bottom part of the t-stat now reflects the SEM for both samples, but is still a measure of how much you could expect the means of two samples from the same population to differ due to chance.The bottom part of the t-stat now reflects the SEM for both samples, but is still a measure of how much you could expect the means of two samples from the same population to differ due to chance.

11/30/2015HK Dr. Sasho MacKenzie15 The Equation The stuff on the bottom of the equation is called the standard error of the difference.The stuff on the bottom of the equation is called the standard error of the difference.

11/30/2015HK Dr. Sasho MacKenzie16 Independent t-test example Do HK students drink more or less than Chemistry students?Do HK students drink more or less than Chemistry students? Null Hypothesis: HK students and Chemistry students drink the same amount of alcohol per week.Null Hypothesis: HK students and Chemistry students drink the same amount of alcohol per week.

11/30/2015HK Dr. Sasho MacKenzie17 The Calculation HK sample of studentsHK sample of students –Mean = 12, SD = 5, N = 30 Chemistry sample of studentsChemistry sample of students –Mean = 10, SD = 3, N = 30 The odds of getting a t stat this big, or bigger, due to chance would then be determined by calculating a p-value.The odds of getting a t stat this big, or bigger, due to chance would then be determined by calculating a p-value.

11/30/2015HK Dr. Sasho MacKenzie18 Graphic of two-tailed independent sample t-test t t distribution for N = 60 From TDIST, p =.065 Combined area beyond t=1.88 and t = is.065

11/30/2015HK Dr. Sasho MacKenzie19 Conclusion Since p=.065 is greater than alpha =.05, we cannot reject the null hypothesis. There is not enough evidence to suggest HK students drink more or less than Chemistry studentsSince p=.065 is greater than alpha =.05, we cannot reject the null hypothesis. There is not enough evidence to suggest HK students drink more or less than Chemistry students In a study it would be written as:In a study it would be written as: It was determined that the average number of alcoholic drinks consumed by HK students (12 drinks), per week, was not significantly different than the Chemistry students (10 drinks), t(58) = 1.88, p =.065.It was determined that the average number of alcoholic drinks consumed by HK students (12 drinks), per week, was not significantly different than the Chemistry students (10 drinks), t(58) = 1.88, p =.065.

11/30/2015HK Dr. Sasho MacKenzie20 Dependent (Paired) t-test Determines if two correlated sample means are statistically different.Determines if two correlated sample means are statistically different. Required when the same subjects are measured twice. E.g., Pre-test, Post-test study.Required when the same subjects are measured twice. E.g., Pre-test, Post-test study. Adjustments are made in how the variability (SD) in the sample data is calculated. This reduces the denominator in the t-statistic and therefore increases the t-statistic.Adjustments are made in how the variability (SD) in the sample data is calculated. This reduces the denominator in the t-statistic and therefore increases the t-statistic. This accounts for reduction in the t-statistic due to the fact that the same subjects measured twice will show a smaller mean difference than two completely separate groups.This accounts for reduction in the t-statistic due to the fact that the same subjects measured twice will show a smaller mean difference than two completely separate groups.

11/30/2015HK Dr. Sasho MacKenzie21 The Difference Before any group means or standard deviations are calculated, the difference scores between the two measurement times is determined.Before any group means or standard deviations are calculated, the difference scores between the two measurement times is determined. For example, if you have a column of pre-test scores and a column of post-test scores, then generate a third column of post minus pre scores.For example, if you have a column of pre-test scores and a column of post-test scores, then generate a third column of post minus pre scores. The t-statistic is then calculated using information from the column of difference scores.The t-statistic is then calculated using information from the column of difference scores.

11/30/2015HK Dr. Sasho MacKenzie22 The Equation The variables in this equations come from a single column of difference scores.The variables in this equations come from a single column of difference scores.

11/30/2015HK Dr. Sasho MacKenzie23 Dependent t-test example Do HK students drink more alcohol on the Saturday prior to a Biomechanics midterm, or on the following Saturday?Do HK students drink more alcohol on the Saturday prior to a Biomechanics midterm, or on the following Saturday? Null Hypothesis: HK students drink the same amount or less on the following Saturday, compared to the Saturday preceding a Biomechanics midterm.Null Hypothesis: HK students drink the same amount or less on the following Saturday, compared to the Saturday preceding a Biomechanics midterm.

11/30/2015HK Dr. Sasho MacKenzie24 The Data: Number of Drinks Subject Sat. Before Sat. After Diff

11/30/2015HK Dr. Sasho MacKenzie25 The Calculation Difference Scores (Before – After)Difference Scores (Before – After) –Mean = 2.1, SD = 3.0, N = 10 The odds of getting a t stat this big, or bigger, due to chance would then be determined by calculating a p-value.The odds of getting a t stat this big, or bigger, due to chance would then be determined by calculating a p-value.

11/30/2015HK Dr. Sasho MacKenzie26 The P-value In Excel, the function TDIST() can be used to calculate the p-value.In Excel, the function TDIST() can be used to calculate the p-value. The degrees of freedom are (N pairs - 1).The degrees of freedom are (N pairs - 1). Our example is a one-tailed test because we are assuming HK students drink more following a midterm. This may not be a good assumption, but I needed a one-tailed example.Our example is a one-tailed test because we are assuming HK students drink more following a midterm. This may not be a good assumption, but I needed a one-tailed example. Set alpha =.05, if the p-value is less than.05, we will state HK students drink significantly more following a biomechanics midterm.Set alpha =.05, if the p-value is less than.05, we will state HK students drink significantly more following a biomechanics midterm.

11/30/2015HK Dr. Sasho MacKenzie27 Graphic of one-tailed dependent sample t-test t t distribution for N = 10 From TDIST, p =.0258 The area beyond t = 2.24 is.0258

11/30/2015HK Dr. Sasho MacKenzie28 Conclusion Since p=.0258 is less than alpha =.05, we reject the null hypothesis and conclude that HK students consume significantly more drinks on the Saturday following a midterm.Since p=.0258 is less than alpha =.05, we reject the null hypothesis and conclude that HK students consume significantly more drinks on the Saturday following a midterm. The following shows how this would be explained in a study.The following shows how this would be explained in a study. It was determined that HK students consume significantly more alcoholic drinks (2.1 more) on a Saturday after a midterm than on a Saturday before a midterm, t(9) = 2.24, p =.0258.It was determined that HK students consume significantly more alcoholic drinks (2.1 more) on a Saturday after a midterm than on a Saturday before a midterm, t(9) = 2.24, p =.0258.

11/30/2015HK Dr. Sasho MacKenzie29 What if the t-test was two-tailed? The null hypothesis would not be: HK students drink the same amount or less on the following Saturday, compared to the Saturday preceding a Biomechanics midterm.The null hypothesis would not be: HK students drink the same amount or less on the following Saturday, compared to the Saturday preceding a Biomechanics midterm. But rather it would be: HK students drink the same amount on the following Saturday, compared to the Saturday preceding a Biomechanics midterm.But rather it would be: HK students drink the same amount on the following Saturday, compared to the Saturday preceding a Biomechanics midterm.

11/30/2015HK Dr. Sasho MacKenzie30 Graphic of two-tailed dependent sample t-test t t distribution for N = 10 From TDIST, p =.0516 Combined area beyond t=2.24 and t = is.0516 Whoa! We no longer have significance at  =.05

11/30/2015HK Dr. Sasho MacKenzie31 Interpreting the P-value In an experiment of this size, if the populations really have the same mean, what is the probability of observing at least as large a difference between sample means as was, in fact, observed? There is a p% chance of observing a difference as large as you observed even if the two population means are identical (the null hypothesis is true). Random sampling from identical populations would lead to a difference smaller than you observed in 1-p% of experiments, and larger than you observed in p% of experiments.