Block 1: Week 1 and 2
Lecture 1:
summary of Statistics 1
Lecture 2:
One-way Analysis of Variance
One-way ANOVA: Comparing means of more than 2 groups.
H0: Population mean is equal between groups
Example: In the population, the average travel time home-to-work is equal between groups
based on region of residence.
Requirements one-way ANOVA:
- independent cases
- ratio/interval variable
- data in more than 2 groups
● each group normally distributed or sufficient amount of cases (more than 30)
● standard deviation between groups is equal (homoscedasticity)
Standard deviation equal?
● Levene’s test
● Rule of thumb: if biggest standard deviation < 2* smallest standard deviation, we
assume standard deviation is equal.
Why Analysis of Variance?
Two types of variance:
- Within groups (WITHIN or ERROR)
- between groups (FIT or BETWEEN)
,If: Variance between groups > variance within group ⇒ Reject H0 (population means groups
not equal)
Variance between groups:
Yi bar = mean each group
Ybar =
Ni = number of cases in each group
Variance within groups:
formula 1: for information on groups
formula 2: for information on individual cases
N = number of cases (total)
,Ni = number of cases in each group
t = number of groups
F-statistic (same as z- and t-statistic -> number to probability).
F = mean sum of squares between groups / mean sum of squares within groups
Differences between groups increase F -> This test is one-sided
p-value = 0,000 -> significant -> reject H0 -> We assume group means are not equal
We now know groups are different. But which groups are different? so we can move on to
multiple comparisons to compare the groups to each other.
Multiple comparisons (only when significant one-way ANOVA)
Why: Why this test except of t-test for every group? -> many t-tests is time consuming and
the chance of making a type I error increases significantly
,Error Bar Plot:
- When confidence intervals overlap, we suspect they do not differ.
- When confidence intervals do not overlap, we suspect they differ.
Multiple comparison: adjusts significance level
● Bonferroni correction:
a = significance level (5%)
m=
● Scheffe
, Compares each group to all other groups. a star (*) behind the mean differences shows it is
significant (sig. value also shows that).
if 0 in confidence interval -> not significant
if 0 not in c.i. -> significant
Example:
One-way ANOVA: p = 0,000 -> significant -> reject H0 -> we may assume that the group
means are not equal.
Multiple comparisons: significant difference between the West and the North, and the West
and the South.
Testing contrast:
Test hypothesis that you possibly have about the degree in which specific groups differ from
each other.
Sample contrast (c) -> Linear combination of sample means
H0: population contrast = 0
Language and logic:
Normal H0: difference between means
Also possible H0: relationship between variables
Lecture 1:
summary of Statistics 1
Lecture 2:
One-way Analysis of Variance
One-way ANOVA: Comparing means of more than 2 groups.
H0: Population mean is equal between groups
Example: In the population, the average travel time home-to-work is equal between groups
based on region of residence.
Requirements one-way ANOVA:
- independent cases
- ratio/interval variable
- data in more than 2 groups
● each group normally distributed or sufficient amount of cases (more than 30)
● standard deviation between groups is equal (homoscedasticity)
Standard deviation equal?
● Levene’s test
● Rule of thumb: if biggest standard deviation < 2* smallest standard deviation, we
assume standard deviation is equal.
Why Analysis of Variance?
Two types of variance:
- Within groups (WITHIN or ERROR)
- between groups (FIT or BETWEEN)
,If: Variance between groups > variance within group ⇒ Reject H0 (population means groups
not equal)
Variance between groups:
Yi bar = mean each group
Ybar =
Ni = number of cases in each group
Variance within groups:
formula 1: for information on groups
formula 2: for information on individual cases
N = number of cases (total)
,Ni = number of cases in each group
t = number of groups
F-statistic (same as z- and t-statistic -> number to probability).
F = mean sum of squares between groups / mean sum of squares within groups
Differences between groups increase F -> This test is one-sided
p-value = 0,000 -> significant -> reject H0 -> We assume group means are not equal
We now know groups are different. But which groups are different? so we can move on to
multiple comparisons to compare the groups to each other.
Multiple comparisons (only when significant one-way ANOVA)
Why: Why this test except of t-test for every group? -> many t-tests is time consuming and
the chance of making a type I error increases significantly
,Error Bar Plot:
- When confidence intervals overlap, we suspect they do not differ.
- When confidence intervals do not overlap, we suspect they differ.
Multiple comparison: adjusts significance level
● Bonferroni correction:
a = significance level (5%)
m=
● Scheffe
, Compares each group to all other groups. a star (*) behind the mean differences shows it is
significant (sig. value also shows that).
if 0 in confidence interval -> not significant
if 0 not in c.i. -> significant
Example:
One-way ANOVA: p = 0,000 -> significant -> reject H0 -> we may assume that the group
means are not equal.
Multiple comparisons: significant difference between the West and the North, and the West
and the South.
Testing contrast:
Test hypothesis that you possibly have about the degree in which specific groups differ from
each other.
Sample contrast (c) -> Linear combination of sample means
H0: population contrast = 0
Language and logic:
Normal H0: difference between means
Also possible H0: relationship between variables