Title: Compared to what? Differences among several means
1Lecture 14
Sociology 549 Paul von Hippel
- Compared to what?Differences among several means
2Overview
- You can already calculate and interpret
- hypothesis tests
- for a single population mean mY
- or for the difference between k2 population
means(mY1 mY2) - Today youll learn a test
- for differences among several (k?2) population
means mY1, mY2,
3Steps of a hypothesis test (review)
- State null and research hypotheses
- Collect sample
- Calculate test statistic
- If the null hypothesis were true,how
extreme/unusual would the test statistic be? - Interpret
4Example 1 k2 populations
- Do sociology and criminology majors differ in
starting salary? - Hypotheses (Criminology is group 1.)
- No. H0 mY1 mY2 or H0 mY1-
mY20 - Yes. H1 mY1? mY2 or H1 mY1-
mY2?0 - two tailed
5Example 1 k2 groups
- 2. Collect sample
- NACE CPC survey
6Example 1 k2 groups
- 3. Calculate test statistic t
7Example 1 k2 populations
- 3. Alternative test statistic F
- Ft2
Note. Mean Square ? Variance. F test
? Analysis of Variance (ANOVA)
MSW How much do cases vary within each group?
MSB How much do means vary between groups?
How much do the group means vary around the
grand mean?
8Example 1 k2 groups
3. Calculate test statistic (F)
9Example 1 k2 groups
- Like t, F has sampling variation
- If you took a different sample,youd get a
different value for F. - If H0 were true,
- then across samples
- F would have a skewed distribution
- with a mean of one
- Would our sample be extreme?
- Would you reject H0?
10Example 1 k2 groups
- 4. If H0 were true, would the test statistic
seem unusual? - F tables (course binder)
- require two degrees of freedom
- degrees of freedom between groups dfbdf1k-11
- degrees of freedom within groups
dfwdf2N-k161-2159 - In table, youd approximate with dfw100.
- Whats the p value? Would we reject H0?
11Example 1 k2 groups
- 5. Interpret
- We dont have convincing evidence that soc and
crim majors have different average starting
salaries. - If the populations had equal average starting
salaries,almost 30 of samples would have
differences at least this large.
12Example 1 k2 groups
- Compare t and F
- t-1.05, p.30
- F1.11, p.30
- The p values are equal
- The decisions are the same
- Finally, for k2 groups,
- Ft2
- Here 1.11(-1.05)2
- Sowhy use F?
13Why use F?
- Unlike t, F works for kgt2 groups.
14Example 2 kgt2 groups
- Are there differences in average starting salary
among college majors in - computer science,
- criminology, and
- sociology?
- State hypotheses
- No. H0 mY1 mY2mY3
- Yes. H1 mY1? mY2 and/or mY1? mY3 and/or mY2? mY3
- one vs. two tailsnot an issue
15Example 2 kgt2 groups
- 2. Collect sample
- NACE CPC survey, 2001-2
Footnote. Sometimes you arent given the combined
mean. You can get it as follows.
Exercise. Verify the combined mean for the table
above.
16Example 2 kgt2 groups
- 4. Calculate test statistic F MSB / MSW
17Example 2 kgt2 groups
- 4. Calculate test statistic F MSB / MSW
18Example 2 kgt2 groups
- 4. Calculate test statistic
- F MSB / MSW
- F 29,388 / 90.176
- 325.89
- If H0 were true, would F325.89 be extreme?
- Remember If H0 were true, F would have a skewed
distribution with a mean of 1. - Do you reject H0?
19Example 2 kgt2 groups
- 5. If H0 were true, would our test statistic be
unlikely?
- What is the p value?
- Do we accept or reject H0?
20Example 2 kgt2 groups
21Interpretation The effect of major
- When comparing CS, Soc Crim majors
- we rejected the hypothesis of equal starting
salaries - We couldnt reject that hypothesis
- when comparing only Soc Crim
- So the difference comes from CS
22Summary
- Comparing means
- To compare k2 means
- we use t
- To compare k?2 means
- we use F
- When k2, we can use either
- and Ft2
- Interpreting groups of tests. E.g.,
- Crim Soc may not be different (Example 1)
- But Crim, Soc CS are (Example 2)
- So CS is different
23Bonus slides
24F test The idea
- Even if all populations had the same mean (H0)
- Sample means would probably be different
- MSB gt 0
- This is sampling variation
- Sampling variation depends on within-group
variance (MSW) - Remember standard error formula?
- So big MSW?big MSB
- F MSB / MSW
- Considering the size of MSW
- Is MSB too big for mere sampling variation?
- Yes (big F, small p)?Reject H0
25Example 3 short report
- For criminology majors, are there differences in
average starting salary among the k5 main
employer types? - Hypotheses
- No. H0 mY1 mY2mY3 mY4 mY5
- Yes. H1 mY1? mY2, mY1? mY3,
- one vs. two tailsnot an issue
26Example 3 short report
- NACE CPC survey, 2001-2, criminology majors
In the sample, Educational Services (teaching?)
has the highest average
salary. Does this mean teaching is the
best-paying profession? Test statistic
F(4,64).35, p.84. What do you conclude? What
if you were just told F(4,64). 35?
27Example 3 short report
- In the F table, wed approximate with dfw50.
- Our observed statistic F0.35 has .80ltplt.90.
If H0 were true (equal avg salaries) 80-90 of
samples would have F gt.35.
our sample