Hypothesis Testing With T Tests
Hypothesis Testing With T Tests
Arlo Clark-Foos
What have we done so far?
Hypothesis Testing & Inferential Statistics
alpha levels, cut-offs, p-value One-tailed vs. Two-tailed tests
“Guinness is the best beer available, it does not need advertising as its quality will
sell it, and those who do not drink it are to be sympathized with rather than
advertised to.” --W.S. Gosset (aka “Student”)
( X M ) 2
s New!
N 1
Single sample t
◦ One sample, compared with known population mean
◦ Goal: Is our sample different from population?
Independent Samples t
◦ Different (independent) samples of participants
experience each level of IV
◦ Are our samples from different
populations?
Paired/Dependent Samples
◦ Same or related (dependent) samples
of participants experience each level of IV
◦ Are our samples from different
populations?
Degrees of Freedom
Necessary when making estimates…
The number of scores that are free to vary when
estimating a population parameter from a sample
◦ df = N – 1 (for a Single-Sample t Test)
Example: I decide to ask 6 people how often they floss their teeth
and record their average = 2 (times per week)
Eventual goal: Estimate population parameters (population variability).
How many scores are free to vary and can still produce an average of 2?
3 Free 2
5 Free 1
1 Free 0
0 Free 0
2 Free 0
1 LOCKED 9
Average = 2 Average = 2
One Tailed vs. Two Tailed Tests
Six Steps for Hypothesis Testing
1. Identify
2. State the hypotheses
3. Characteristics of the comparison
distribution
4. Critical values
5. Calculate
6. Decide
old hat
Single-Sample t Test: Attendance in
Therapy Sessions
Our Counseling center on campus is concerned that most students
requiring therapy do not take advantage of their services. Right
now students attend only 4.6 sessions in a given year!
Administrators are considering having patients sign a contract
stating they will attend at least 10 sessions in an academic year.
Question: Does signing the contract actually increase
participation/attendance?
◦ Distribution:
One Sample mean: Distribution of means
H0: Clients who sign the contract will attend the same
number of sessions as those who do not sign the
contract.
( X M ) 2 s 2.490
s
24.8
2.490 sM 1.114
N 1 5 1 N 5
Single-Sample t Test: Attendance in
Therapy Sessions
μM = 4.6, sM = 1.114, M = 7.8, N = 5, df = 4
4. Determine critical value (cutoffs)
◦ In Behavioral Sciences, we use p = .05 (5%)
◦ Our hypothesis (“Clients who sign the contract will attend a different
number of sessions than those who do not sign the contract.”) is
df = 4
Single-Sample t Test: Attendance in
Therapy Sessions
μM = 4.6, sM = 1.114, M = 7.8, N = 5, df = 4
4. Determine critical value (cutoffs)
tcrit = ± 2.76
Single-Sample t Test: Attendance in
Therapy Sessions
μM = 4.6, sM = 1.114, M = 7.8, N = 5, df = 4
5. Calculate the test statistic
( M M ) (7.8 4.6)
t 2.873
sM 1.114
6. Make a decision
-2.76 +2.76
Single-Sample t Test: Attendance in
Therapy Sessions
μM = 4.6, sM = 1.114, M = 7.8, N = 5, df = 4
2.873
6. Make a decision
t = 2.873 > tcrit = ±2.776, reject the null hypothesis
Stella Cunliffe
Paired (Dependent)
◦ What is it?
◦ Pros
◦ Cons
PAIRED SAMPLES
t TEST
(M M )
t
Paired-Samples t Test sM
New Terminology
◦ Distribution of Mean Differences
◦ Difference Scores: X1 –Y1, X2 –Y2, …
Difference Score
SAME (X) DIFFERENT (Y) X-Y
122 111 -11
131 116 -15
127 113 -14
123 119 -4
132 121 -11
M = -11
Paired Samples t Test:
Does Studying in the Exam Room Help?
1. Identify
◦ Populations:
Pop 1: Exam grades when studying and testing are in the same room.
Pop 2: Exam grades when studying and testing are in different rooms.
◦ Distribution:
Mean of Difference Scores: Distribution of Mean Differences
( X M ) 2 74 s 4.301
s 4.301 sM 1.923
N 1 5 1 N 5
Paired Samples t Test:
Does Studying in the Exam Room Help?
μM = 0, sM = 1.923, M = -11, N = 5, df = 4
4. Determine critical value (cutoffs)
◦ In Behavioral Sciences, we use p = .05 (5%)
◦ Our hypothesis (“Studying and testing in the same room will result in a
different grade than studying and testing in different rooms.”) is nondirectional
df = 4
Paired Samples t Test:
Does Studying in the Exam Room Help?
μM = 0, sM = 1.923, M = -11, N = 5, df = 4
4. Determine critical value (cutoffs)
tcrit = ± 2.76
Paired Samples t Test:
Does Studying in the Exam Room Help?
μM = 0, sM = 1.923, M = -11, N = 5, df = 4
5. Calculate the test statistic
( M M ) (11 0)
t 5.720
sM 1.923
6. Make a decision
-2.76 +2.76
Paired Samples t Test:
Does Studying in the Exam Room Help?
μM = 0, sM = 1.923, M = 11, N = 5, df = 4
6. Make a decision
t = -5.720 > tcrit = ±2.776, reject the null hypothesis
INDEPENDENT
SAMPLES
t TEST
My Father’s “Chinese Lock”
◦ Distribution:
Difference Between Means: Distribution of Differences Between Means
Not Distribution of Mean Differences
M X M Y X Y M X M Y
t
sDifference sDifference
SDifference
◦ Standard Error of the Difference:
a) Calculate variance for each sample
b) Pool variances, accounting for sample size
c) Convert from squared standard deviation to squared
standard error
d) Add the two variances
e) Take square root to get estimated standard error for
distribution of differences between means.
Calculating sDifference
a) Calculate variance (s2) for each sample
dfTotal = 7
Pooled Variance
b) Pool variances, accounting for sample size
Weighted average of the two estimates of variance
– one from each sample – that are calculated when
conducting an independent samples t test.
df X 2 dfY 2
s 2
Pooled sX sY
dfTotal dfTotal
3 4
s 2
Pooled 289.584 328.6
7 7
2
sPooled 124.107 187.771 311.878
Independent Samples t Test:
Gender Differences in Humor Appreciation
c) Convert from squared standard deviation to
squared standard error
2
sPooled 311.878
2 2
sPooled 311.878 sPooled 311.878
s 2
MX 77.970 s2
MY 62.376
N 4 N 5
d) Add the two variances
2
sDifference sM2 X sM2 Y 77.970 62.376 140.346
is two-tailed.
t = ± 2.365
dfTotal = 7
Independent Samples t Test:
Gender Differences in Humor Appreciation
4. Determine critical values
◦ dfTotal = 7 p = .05 t = ± 2.365
t
82.25 82.6
.03
11.847
Independent Samples t Test:
Gender Differences in Humor Appreciation
6. Make a decision