Announcements
Statistics:�Independent-groups t-test�Hypothesis testing with one-tailed and two-tailed testing
(**Calculator needed from this point on)
Learning Objectives
Statistics:�Independent-groups t-test�Hypothesis testing with one-tailed and two-tailed testing
Independent-groups Design/ t-test
Research Q: Evaluate the mean difference between TWO populations (or experiment conditions)
Examine with TWO samples
Example Research Questions:
Scrolling through TikToks makes you happier than scrolling through Instagram reels
We almost never have any information about the
Entire Population (Mean, Variability)
Therefore, we use
TWO samples to make inferences about these populations.
TikTok Group
IG Reels Group
n=21
n=21
Four Steps of Hypothesis Testing �
TikTok | IG Reels |
4 | 1 |
4 | 1 |
5 | 3 |
3 | 3 |
4 | 2 |
What is IV? DV?
Hypothesis: People who scroll TikTok will score higher on a happiness score than people who scroll IG Reels.
TikTok | IG Reels |
4 | 1 |
4 | 1 |
5 | 3 |
3 | 3 |
4 | 2 |
What is IV? DV?
Hypothesis: People who scroll TikTok will score different happiness score than people who scroll IG Reels.
Pre-Step: Prepare Sample Data
Collect & Calculate the following information:
Sample size= n
Sum of scores= ∑X
Sample mean= M= ∑X / n
Deviation Score= X-M
Sum of Squares (SS)= Sum of Squared Deviations= ∑ (X-M)2
It will be easy, we will go through them later!
Step 1: State the Hypothesis
H0: Null hypothesis
Null hypothesis suggests that in the general population, there is no change, no difference, no relationship
🡪 Says that the IV has NO effect in DV
H1 : Alternative hypothesis
Alternative hypothesis suggests that in the general population, there is a change, a difference, a relationship
🡪 Says that the IV HAS an effect in DV
Step 1: State the Hypothesis
H0: Null hypothesis
There is no difference in mean happiness scores between TikTok users and IG Reels users.
H1 : Alternative hypothesis
There is a difference in mean happiness scores between TikTok users and IG Reels users
Things to keep in mind about Step 1
Hypothesis: TikTok users are more likely to score higher on happiness scores than IG Reels users.�
One-tailed, Directional Hypothesis
Hypothesis: TikTok users differ from IG Reels users in their overall happiness scores.�
Two-tailed Hypothesis
One-tailed vs. Two-tailed
Two tail
H0: μ1 = μ2
Null Hyp: Population mean of Group 1 equals Population mean of Group 2.
H1: μ1 ≠ μ2
Alternative Hyp: Population mean of Group 1 differs from Population mean of Group 2.
One Tail
H0: μ1 ≤ μ2
Null Hyp: Population mean of Group 1 will be less than or equal to the Population mean of Group 2.
H1: μ1 > μ2
Alternative Hyp: Population mean of Group 1 will be a higher than the population mean of Group 2.
Step 1:
Step 2: Set the Criteria for a Decision
Set the decision criteria (Using the t-table)
2 tail
α= .05 (5%)
α= .01 (1%)
α= .001 (0.1%)
Degrees of freedom
Degrees of Freedom (df)
From your formula sheet 🡪
TikTok | IG Reels |
4 | 1 |
4 | 1 |
5 | 3 |
3 | 3 |
4 | 2 |
Degrees of Freedom (df)
Determined by the df of TWO separate samples
df = (5 – 1) + (5 – 1)
Sample 5 students from Tiktok
Sample 5 students from IG Reels
= 8
Critical t for One-tailed &
Two-tailed Hypothesis
Two-tailed hypotheses:
Critical t for One-tailed &
Two-tailed Hypothesis
Two-tailed hypotheses:
One-tailed hypothesis:
Set the decision criteria
Tcritical = ± 2.306
BOX IT STAR IT REMEMBER IT!!
Step 2:
Step 1:
Step 2:
Step 3:
Step 4:
Set the null and alternative hypotheses - H0 & H1
Set the decision criteria
Use the t-table to find your critical value(s).
“Collect data” & Compute Sample Statistics
Make a decision + Report in perfect APA style
Remember these steps!
Step 3: Calculate Statistics (t-value)
Independent-groups t statistic (compare the means of two groups)
Sample Mean difference (between two groups)
Population Mean difference
from Null Hypothesis (usually they are 0 bc null)
Estimated Standard Error
(standard deviation of a sample population)
The reason why we need to calculate this is because data are randomly collected, participants perform differently, and there is individual difference
Sample Mean difference (between two groups)
The reason why we need to calculate this is because data are randomly collected, participants perform differently, and there is individual difference
TikTok | IG Reels |
4 | 1 |
4 | 1 |
5 | 3 |
3 | 3 |
4 | 2 |
M1 = 4
M2 = 2
= 2
Independent-groups t statistic (compare the means of two groups)
Population Mean difference
from Null Hypothesis (usually they are 0 bc null)
Estimated Standard Error
(standard deviation of a sample population)
The reason why we need to calculate this is because data are randomly collected, participants perform differently, and there is individual difference
2
Independent-groups t statistic (compare the means of two groups)
Estimated Standard Error
(standard deviation of a sample population)
The reason why we need to calculate this is because data are randomly collected, participants perform differently, and there is individual difference
2
0
Estimated Standard Error
(standard deviation of a sample population)
The reason why we need to calculate this is because data are randomly collected, participants perform differently, and there is individual difference
Estimated Standard Error
(standard deviation of a sample population)
The reason why we need to calculate this is because data are randomly collected, participants perform differently, and there is individual difference
Estimated standard error formula for Unequal number of groups
Total amount of error involved in using TWO sample means to approximate TWO population means
Pooled Variance (pool here means group)
Sample size for Sample 1
Calculate SS1 and SS2
TikTok |
4 |
4 |
5 |
3 |
4 |
M1 = 4
M2 = 2
IG Reels |
1 |
1 |
3 |
3 |
2 |
- 4 = 0 🡪 Square the value = 0
- 4 = 0 🡪 Square the value = 0
- 4 = 1 🡪 Square the value = 1
- 4 = -1 🡪 Square the value = 1
- 4 = 0 🡪 Square the value = 0
SUM them = 2
- 2 = -1 🡪 Square the value = 1
- 2 = -1 🡪 Square the value = 1
- 2 = 1 🡪 Square the value = 1
- 2 = 1 🡪 Square the value = 1
- 2 = 0 🡪 Square the value = 0
SUM them = 4
SS1
SS2
Estimated standard error formula for Unequal number of groups
Total amount of error involved in using TWO sample means to approximate TWO population means
2 + 4
4 + 4
0.75
Estimated standard error formula for Unequal number of groups
Total amount of error involved in using TWO sample means to approximate TWO population means
0.75
0.75
0.75
5
5
= 0.54
Independent-groups t statistic (compare the means of two groups)
The reason why we need to calculate this is because data are randomly collected, participants perform differently, and there is individual difference
2
0
0.54
Set the decision criteria
Tcritical = ± 2.306
BOX IT STAR IT REMEMBER IT!!
T = 3.704
Step 2:
+2.306
-2.306
Set the decision criteria
Tcritical = ± 2.306
BOX IT STAR IT REMEMBER IT!!
T = 3.704
Step 2:
+2.306
-2.306
3.704
Step 4: Make a decision
Use the Sample t and decision criteria (Critical t) to make a decision about the Null (H0)
Two options:
If sample data are WITHIN the critical region
🡪 Reject H0, accept H1; IV has an effect
If the sample data are NOT in the critical region
🡪 Fail to Reject H0, accept H0; IV has NO effect
Step 4: Make a decision
+2.306
-2.306
3.704
Perfect APA style report of t-test
We report our sample t statistic and decision, and also the criteria we used to make the decision (from Step 2).
We Reject the null hypothesis. TikTok happiness scores are significantly different than IG Reels scores�t(8)= 3.704, p < 0.05
Practice Q: A researcher wants to examine the relationship between watching educational TV as a child and academic performance as a high school student. Researchers predict that high school students who watched Sesame Street regularly as a 5-year old will have higher grades than students who did not watch Sesame Street regularly. Can they make this conclusion? Use α= .05 and calculate & interpret an effect size if it makes sense to do so.
Watched Sesame Street
Did NOT Watch Sesame Street
X | |
86 | 99 |
87 | 97 |
91 | 94 |
97 | 89 |
98 | 92 |
X | |
90 | 79 |
89 | 83 |
82 | 86 |
83 | 81 |
85 | 92 |
Practice Q: A researcher wants to examine the relationship between watching educational TV as a child and academic performance as a high school student. Researchers predict that high school students who watched Sesame Street regularly as a 5-year old will have higher grades than students who did not watch Sesame Street regularly. Can they make this conclusion? Use α= .05 and calculate & interpret an effect size if it makes sense to do so.
Statistical Significance vs. Effect Size
Statistical significance
There IS a significant effect/ increase/ decrease
p < .05: There is less than 5% chance of getting this sample mean if the H0 is true.
Effect size
What is the size of this difference?
Provides a measurement about the absolute magnitude of a treatment effect.
We ONLY calculate Effect size when we have a significant effect
(Reject the Null hypothesis)
Calculating Effect Size (estimated d)
Measures the size of treatment effects in terms of standard deviations- always positive!
Small: .2
Medium: .5
Large: .8
Calculating Effect Size (r2)
The percentage of the variability in DV explained by the IV
Interpretation: __ % of the variability in the DV is explained by the IV
Calculating Effect Size (r2)
The percentage of the variability in DV explained by the IV
Interpretation: 47 % of the variability in the DV is explained by the IV
What do you do when the df in your test is NOT on the t table?
Two-tailed
α= .05
df= 81
df= 60 🡪 tcrit 2.00
df= 120 🡪 tcrit 1.98
df= 81
USE THE MORE STRINGENT CRITERIA!
Step 1: Find relative location of Study df
Study df – Smaller df
Larger df – Smaller df
Step 2: Find the difference between the critical t values
Larger tcrit – Smaller tcrit
Step 3: Multiply values from Step1 and Step 2
Step 4: Subtract value from Step 3 from larger tcrit
df= 60 🡪 tcrit 2.00
df= 120 🡪 tcrit 1.98
df= 81
An important assumption of the�Independent-groups t test
Assumption of Equality of Variance
The two populations from which the two samples are selected from must have equal variances
Requires a separate Hypothesis Test (F-max Test).
🡪 If two population variances are equal, the two sample variances should be very similar as well.
Technically, you are supposed to run through another hypothesis test to test this assumption.�😱 😫��We’ll look at this with an SPSS output instead!
Hypothesis testing with F-max test
Test of Equality of Variance
Step 1: State the hypotheses
H0: σ1= σ2 🡪 The TWO populations have equal variance
H1: σ1≠ σ2 🡪 The TWO populations DO NOT have equal variance
* Important Note: With the F-max test, we WANT the populations to have equal variance, so the goal is to Fail to Reject the Null hypothesis.
✨🌟 SPSS Outputs of t-tests 🌟✨
So far, we have gone through running the t-test by hand.
In psychology, we commonly use statistical programs to conduct t-tests, and the most common one is SPSS!
We will not be using the program in our course, but you will need to know how to interpret SPSS Outputs of t-tests.
Independent t-test Output Example #1
RQ: Do dog and cat-people differ in their energy levels?
Independent t-test Output Example #1
Sample
Size
Mean for
each Group
Standard Deviation (s)= Square root of Variance (s2)
Sig = p
In the test F-test, the null hypothesis states that variances ARE equal.
p= .355 🡪 p > .05 🡪 Fail to Reject the Null
🡪 Conclude that the two variances are equal.
Fmax-test: Testing the assumption of Ind-t-tests: Equal Variances
Independent t-test Output Example #1 continued
RQ: Do dog and cat-people differ in their energy levels?
Fmax-test: Testing the assumption of Ind-t-tests: Equal Variances
Sig = p
Read the TOP row of results for the t-test because we CAN ASSUME equal variances based on the results of the F-test.
t-test Results
Sig = p
M2-M1
SM1-M2
Report the appropriate t-test and interpret!
Fail to Reject the Null.
t(29)= .45, p > .05 (two-tailed)
Dog and cat-people do not differ in their level of energy
Independent t-test Output Example #2: Try it on your own!
RQ: Does Instruction A differ from Instruction B on assembly time?
(Note: This is the same question as Problem Set #2 Q2. However, SPSS always runs a two-tailed test, so results can differ!)