Download presentation
Presentation is loading. Please wait.
Published byLászló Borbély Modified over 5 years ago
1
Statistics t-Test
2
Hypothesis Tests So far, we have tested: Does µ = a value (Confidence Intervals)
3
Hypothesis Tests Today we test whether means from different samples are different
4
No Difference?
5
Difference Between Means
Remember the guy who drew the “leptokutic/platykurtic” pics?
6
Difference Between Means
William Sealy Gosset
7
Difference Between Means
Comparisons of means of two groups are called “t-Tests”
8
Difference Between Means
There are a variety of t-Tests Tests between two unrelated groups, each with its own treatment Tests between two related (paired) groups, each with its own treatment
9
t-Test PROJECT QUESTION Suppose you have two stat classes (A and B) taught by different teachers You want to know if grades on a standardized test are the same for the two groups
10
t-Test PROJECT QUESTION What’s first?
11
t-Test PROJECT QUESTION Step 1: Set the α-level
12
t-Test PROJECT QUESTION Step 1: α-level = 0.05 Step 2:
13
Step 1: α-level = 0.05 Step 2: Set Ha
t-Test PROJECT QUESTION Step 1: α-level = 0.05 Step 2: Set Ha
14
Step 1: α-level = 0.05 Step 2: Set Ha (they are different) Ha: μA ≠ μB
t-Test PROJECT QUESTION Step 1: α-level = 0.05 Step 2: Set Ha (they are different) Ha: μA ≠ μB
15
Step 1: α-level = 0.05 Step 2: Ha: μA ≠ μB Step 3: Set H0
t-Test PROJECT QUESTION Step 1: α-level = 0.05 Step 2: Ha: μA ≠ μB Step 3: Set H0
16
t-Test PROJECT QUESTION Step 1: α-level = 0.05 Step 2: Ha: μA ≠ μB Step 3: Set H0 (they are the same) H0: μA = μB
17
Step 1: α-level = 0.05 Step 2: Ha: μA ≠ μB Step 3: H0: μA = μB
t-Test PROJECT QUESTION Step 1: α-level = 0.05 Step 2: Ha: μA ≠ μB Step 3: H0: μA = μB
18
Is this a one-tail or two tail t-Test?
PROJECT QUESTION Is this a one-tail or two tail t-Test?
19
Is this a one-tail or two tail t-Test? two-tail
PROJECT QUESTION Is this a one-tail or two tail t-Test? two-tail
20
t-Test PROJECT QUESTION Now what?
21
t-Test PROJECT QUESTION Now what? Data!
22
t-Test PROJECT QUESTION Open the spreadsheet Note that you don’t need to have the same number in each group! Class A Class B 86 68 85 84 90 74 93 80 81 61 73 94 96 97
23
Do a t-Test: Two-Sample Assuming Unequal Variances
PROJECT QUESTION Do a t-Test: Two-Sample Assuming Unequal Variances
24
t-Test PROJECT QUESTION Tah-Dah!
25
t-Test PROJECT QUESTION But… what does it mean?
26
Here are the means for Class A and Class B
t-Test PROJECT QUESTION Here are the means for Class A and Class B
27
t-Test PROJECT QUESTION …and their variances
28
t-Test PROJECT QUESTION …and sample sizes
29
t-Test PROJECT QUESTION What is your p-value?
30
t-Test PROJECT QUESTION What is your p-value? 9.96%
31
t-Test PROJECT QUESTION Do you reject H0?
32
Do you reject H0? Nope: p is bigger than alpha
t-Test PROJECT QUESTION Do you reject H0? Nope: p is bigger than alpha
33
What is your conclusion?
t-Test PROJECT QUESTION What is your conclusion?
34
t-Test PROJECT QUESTION What is your conclusion? We have been unable to show that scores from the two classes are different
35
Questions?
36
“Tailed” Tests A two-tailed test will reject H0 either if the experimental values we get are too high or too low
37
“Tailed” Tests α is split between the upper and lower tails
38
“Tailed” Tests A one-tailed test will reject H0 only on the side we think is likely to be true
39
“Tailed” Tests You will be able to reject H0 more often for a one-tailed test – if you pick the right tail!
40
1-Tailed t-Test PROJECT QUESTION For our two classes, suppose there were student complaints about the teacher in class B Class A Class B 86 68 85 84 90 74 93 80 81 61 73 94 96 97
41
1-Tailed t-Test PROJECT QUESTION If we want to show class B has poorer scores than class A, what is our alternate hypothesis? Class A Class B 86 68 85 84 90 74 93 80 81 61 73 94 96 97
42
Step 1: α-level = 0.05 Step 2: Ha: μA > μB
1-Tailed t-Test PROJECT QUESTION Step 1: α-level = 0.05 Step 2: Ha: μA > μB
43
1-Tailed t-Test PROJECT QUESTION If we want to show class B has poorer scores than class A, what is our null hypothesis? Class A Class B 86 68 85 84 90 74 93 80 81 61 73 94 96 97
44
Step 1: α-level = 0.05 Step 2: Ha: μA > μB Step 3: H0: μA ≤ μB
1-Tailed t-Test PROJECT QUESTION Step 1: α-level = 0.05 Step 2: Ha: μA > μB Step 3: H0: μA ≤ μB
45
Is this a one-tail or two tail t-Test?
PROJECT QUESTION Is this a one-tail or two tail t-Test?
46
Is this a one-tail or two tail t-Test? one-tail
PROJECT QUESTION Is this a one-tail or two tail t-Test? one-tail
47
t-Test PROJECT QUESTION What is your p-value?
48
t-Test PROJECT QUESTION What is your p-value? 4.98%
49
t-Test PROJECT QUESTION Do you reject H0?
50
Do you reject H0? YES! p is smaller than alpha
t-Test PROJECT QUESTION Do you reject H0? YES! p is smaller than alpha
51
What is your conclusion?
t-Test PROJECT QUESTION What is your conclusion?
52
What is your conclusion? Class B has a lower score than class A
t-Test PROJECT QUESTION What is your conclusion? Class B has a lower score than class A
53
“Tailed” Tests So, if you pick the tail correctly, the 1-tail test will be more powerful (reject H0 more often) that a 2-tail test
54
Questions?
55
Difference Between Means
The P comes from a standardized t-distribution:
56
Hypothesis Tests We want our test to be powerful enough to reject a false null hypothesis
57
Hypothesis Tests To do that, we take advantage of the Law of Large Numbers and take a large sample size
58
Hypothesis Tests Mr. Gosset designed his t-test to be very powerful for small sample sizes He had only a limited number of trained tasters, so he would not be able to increase his sample size to increase the power of his tests
59
Hypothesis Tests SO… A large sample size can lead to finding statistically significant differences that are SO tiny they have no practical significance
60
Hypothesis Tests So… we also set a level of practical significance (the minimum difference that would actually be a REAL difference)
61
Hypothesis Tests For our car mpg test, we found our car got 27 mpg while the manufacturer stated we should get 30 mpg
62
Hypothesis Tests We set a personal level of practical significance for the test
63
PRACTICAL SIGNIFICANCE
PROJECT QUESTION What would be your level of practical significance for stat test scores?
64
PRACTICAL SIGNIFICANCE
PROJECT QUESTION What would be your level of practical significance for stat test scores? Did our observed difference (87.9 vs 79.5) meet your level of practical significance?
65
Questions?
66
Difference Between Means
To compare two paired group's means, use a: “Paired t-test”
67
Difference Between Means
“Paired”: two measurements on the same person measurements on twins two measurements for the same date, etc
68
Difference Between Means
Open up the spreadsheet
69
Difference Between Means
Mr Gosset has two batches of stout: F5_10 and N25_5 Tasters are tasting each to see if they are the same Mr Gosset thinks they are not!
70
Difference Between Means
These are paired data because each analyst tasted each of the batches – two measurements BY the same person
71
Difference Between Means
H0: (what we want to disprove) There is no difference in the flavor of the two batches Ha: (what we want to prove) There is a difference in the
72
Difference Between Means
He hopes to disprove H0 and thereby to prove Ha
73
Paired t-Test PROJECT QUESTION Step 1:
74
Paired t-Test PROJECT QUESTION Step 1: Set the α-level
75
Step 1: Set the α-level = 0.05 Step 2:
Paired t-Test PROJECT QUESTION Step 1: Set the α-level = 0.05 Step 2:
76
Paired t-Test PROJECT QUESTION Step 1: α-level = 0.05 Step 2: Set the practically-significant difference
77
Paired t-Test PROJECT QUESTION Step 1: α-level = 0.05 Step 2: Set the practically-significant difference = Mr Gosset says: 2 rating points Step 3:
78
Paired t-Test PROJECT QUESTION Step 1: α-level = 0.05 Step 2: practically-significant difference = 2 rating points Step 3: Set Ha:
79
Paired t-Test PROJECT QUESTION Step 1: α-level = 0.05 Step 2: practically-significant difference: 2 rating points Step 3: Set Ha (they are different) Ha: μF5_10 ≠ μN25_5 or: Ha: μF5_10 - μN25_5 ≠ 0
80
Paired t-Test PROJECT QUESTION Step 1: α-level = 0.05 Step 2: practically-significant difference = 2 rating points Step 3: Ha: μF5_10 ≠ μN25_5 Step 4: Set H0:
81
Paired t-Test PROJECT QUESTION Step 1: α-level = 0.05 Step 2: practically-significant difference = 2 rating points Step 3: Ha: μF5_10 ≠ μN25_5 Step 4: Set H0 (they are the same) H0: μF5_10 = μN25_5 or: H0: μF5_10 - μN25_5 = 0
82
Paired t-Test PROJECT QUESTION Because each taster tastes each of the two batches, the data are paired
83
use: Data/Data Analysis/ t-Test: Paired Two Sample for Means
Paired t-Test PROJECT QUESTION use: Data/Data Analysis/ t-Test: Paired Two Sample for Means
84
Paired t-Test PROJECT QUESTION
85
Paired t-Test PROJECT QUESTION POOF! OK… now what?
86
Paired t-Test PROJECT QUESTION If you had any reason to believe that one batch would be better than the other you would use: P(T<=t) one tail
87
We didn’t, so you would use: P(T<=t) two tail
Paired t-Test PROJECT QUESTION We didn’t, so you would use: P(T<=t) two tail
88
The probability is .03 Do you reject H0?
Paired t-Test PROJECT QUESTION The probability is .03 Do you reject H0?
89
Difference Between Means
How all the inferential tests work:
90
Difference Between Means
How all the inferential tests work: Excel calculates a probability that you would get the data you got if the null hypothesis were true
91
Difference Between Means
How all the inferential tests work: Excel calculates a probability that you would get the data you got if the null hypothesis were true If it’s ≤ α-level, reject H0
92
The probability is .03 Do you reject H0?
Paired t-Test PROJECT QUESTION The probability is .03 Do you reject H0?
93
The probability is .03 Do you reject H0? Yup!
Paired t-Test PROJECT QUESTION The probability is .03 Do you reject H0? Yup!
94
Difference Between Means
CELEBRATE!
95
Difference Between Means
Remember – Reject the hypothesis if the statistic is smaller than 0.05
96
Paired t-Test PROJECT QUESTION Reject H0 ! Conclusion?
97
Reject H0 ! Conclusion: The batches do taste different!
Paired t-Test PROJECT QUESTION Reject H0 ! Conclusion: The batches do taste different!
98
Do we need a Multiple Comparison Graph?
Paired t-Test PROJECT QUESTION Do we need a Multiple Comparison Graph?
99
Paired t-Test PROJECT QUESTION Which tastes better?
100
Questions?
101
Paired t-Test PROJECT QUESTION For tests of differences between means, what would happen if you had a smaller sample size?
102
Paired t-Test PROJECT QUESTION What is the minimum sample size you would need for this dataset to provide a significant result?
103
t-Tests Try the problems on the following sheets!
104
Questions?
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.