0% found this document useful (0 votes)
35 views42 pages

Ermi Stat LL ch5

The document discusses the one-way analysis of variance (ANOVA) statistical test. It has three key points: 1. One-way ANOVA is used to test if the means of three or more populations are equal. It partitions the total variation in the data into between-group and within-group components. 2. The between-group variation measures differences between sample means, while the within-group variation measures random error. 3. By taking the ratio of between-group to within-group variation, the one-way ANOVA F-test determines if there are statistically significant differences between two or more population means.

Uploaded by

newaybeyene5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views42 pages

Ermi Stat LL ch5

The document discusses the one-way analysis of variance (ANOVA) statistical test. It has three key points: 1. One-way ANOVA is used to test if the means of three or more populations are equal. It partitions the total variation in the data into between-group and within-group components. 2. The between-group variation measures differences between sample means, while the within-group variation measures random error. 3. By taking the ratio of between-group to within-group variation, the one-way ANOVA F-test determines if there are statistically significant differences between two or more population means.

Uploaded by

newaybeyene5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 42

One-Way ANOVA

One-Way Analysis of Variance


F-Distribution
Let s 2 and s 2 represent the sample variances of two different populations. If both
1 2
populations are normal and the population variances are equal, then the
sampling distribution of
σ 12 a n d σ 22
s 12
F  2
is called an F-distribution. s2
There are several properties of this distribution.

1. The F-distribution is a family of curves each of which is


determined by two types of degrees of freedom: the degrees
of freedom corresponding to the variance in the numerator,
denoted d.f.N, and the degrees of freedom corresponding to
the variance in the denominator, denoted d.f.D. Continued.
F-Distribution
Properties of the F-distribution continued:
2. F-distributions are positively skewed.
3. The total area under each curve of an F-distribution is equal
to 1.
4. F-values are always greater than or equal to 0.
5. For all F-distributions, the mean value of F is approximately
equal to 1.

d.f.N = 1 and d.f.D = 8


d.f.N = 8 and d.f.D = 26
d.f.N = 16 and d.f.D = 7
d.f.N = 3 and d.f.D = 11

F
1 2 3 4
Analysis of
Variance3e`1`

A analysis of variance is a technique that


partitions the total sum of squares of
deviations of the observations about their
mean into portions associated with
independent variables in the experiment
and a portion associated with error
One-Way ANOVA
 The one-way analysis of variance is used
to test the claim that three or more
population means are equal
 This is an extension of the two
independent samples t-test
One-Way ANOVA
 The response variable is the variable
you’re comparing
 The factor variable is the categorical
variable being used to define the groups
 We will assume k samples (groups)
 The one-way is because each value is
classified in exactly one way
 Examples include comparisons by gender,
race, political party, color, etc.
One-Way ANOVA
 Conditions or Assumptions
 The data are randomly sampled
 The variances of each sample are assumed
equal
 The residuals are normally distributed
One-Way ANOVA F-Test
Assumptions
1. Randomness & Independence of
Errors
2. Normality
 Populations (for each condition) are
Normally Distributed
3. Homogeneity of Variance
 Populations (for each condition) have Equal
Variances
One-Way ANOVA
 The null hypothesis is that the means are all
equal
H :        
0 1 2 3 k

 The alternative hypothesis is that at least one


of the means is different
 Think about the Sesame Street® game where
three of these things are kind of the same, but one
of these things is not like the other. They don’t all
have to be different, just one of them.
One-Way ANOVA F-Test
Hypotheses
H0: 1 = 2 = 3 = ... =
p
 All Population
Means are Equal
 No Treatment Effect

Ha: Not All j Are


Equal
 At Least 1 Pop.
Mean is Different
 Treatment Effect
 NOT     ...  
One-Way ANOVA F-Test
Hypotheses
H0: 1 = 2 = 3 = ... = p
 All Population Means f(X)
are Equal
 No Treatment Effect
X
1 = 2 = 3
Ha: Not All j Are Equal
 At Least 1 Pop. Mean is
Different f(X)
 Treatment Effect
 NOT 1 = 2 = ... = p
Or i ≠ j for some i, j. X

1 =  2  3
One-Way ANOVA
Basic Idea
1. Compares 2 Types of Variation to
Test
Equality of Means
2. If Treatment Variation Is Significantly
Greater Than Random Variation then
Means Are Not Equal
3.Variation Measures Are Obtained by
‘Partitioning’ Total Variation
One-Way ANOVA
Partitions Total Variation

Total variation

Variation due to
treatment
One-Way ANOVA
Partitions Total Variation

Total variation

Variation due to Variation due to


treatment random sampling
One-Way ANOVA
Partitions Total Variation

Total variation

Variation due to Variation due to


treatment random sampling

Sum of Squares Among


Sum of Squares Between
Sum of Squares Treatment
Among Groups Variation
One-Way ANOVA
Partitions Total Variation

Total variation

Variation due to Variation due to


treatment random sampling
Sum of Squares Among Sum of Squares Within
Sum of Squares Between Sum of Squares Error
Sum of Squares (SSE)
Treatment (SST) Within Groups Variation
Among Groups Variation
One-Way ANOVA
 The statistics classroom is divided into
three rows: front, middle, and back
 The instructor noticed that the further the
students were from him, the more likely
they were to miss class or use an instant
messenger during class
 He wanted to see if the students further
away did worse on the exams
One-Way ANOVA
The ANOVA doesn’t test that one mean is less
than another, only whether they’re all equal or
at least one is different.

H :   
0 F M B
One-Way ANOVA
 A random sample of the students in each
row was taken
 The score for those students on the
second exam was recorded
 Front: 82, 83, 97, 93, 55, 67, 53
 Middle: 83, 78, 68, 61, 77, 54, 69, 51, 63
 Back: 38, 59, 55, 66, 45, 52, 52, 61
Question: At the .05 level, is there a difference
in mean in each row?
One-Way ANOVA
The summary statistics for the grades of each row
are shown in the table below

Row Front Middle Back


Sample size 7 9 8
Mean 75.71 67.11 53.50
St. Dev 17.63 10.95 8.96
Variance 310.90 119.86 80.29
One-Way ANOVA
 Variation
 Variation is the sum of the squares of the
deviations between a value and the mean of
the value
 Sum of Squares is abbreviated by SS and
often followed by a variable in parentheses
such as SS(B) or SS(W) so we know which
sum of squares we’re talking about
One-Way ANOVA
 Are all of the values identical?
 No, so there is some variation in the data
 This is called the total variation
 Denoted SS(Total) for the total Sum of
Squares (variation)
 Sum of Squares is another name for variation
One-Way ANOVA
 Are all of the sample means identical?
 No, so there is some variation between the
groups
 This is called the between group variation
 Sometimes called the variation due to the
factor
 Denoted SS(B) for Sum of Squares (variation)
between the groups
One-Way ANOVA
 Are each of the values within each group
identical?
 No, there is some variation within the groups
 This is called the within group variation
 Sometimes called the error variation
 Denoted SS(W) for Sum of Squares
(variation) within the groups
One-Way ANOVA
 There are two sources of variation
 the variation between the groups, SS(B), or
the variation due to the factor
 the variation within the groups, SS(W), or the
variation that can’t be explained by the factor
so it’s called the error variation
One-Way ANOVA
 Here is the basic one-way ANOVA table

Source SS df MS F p

Between

Within

Total
One-Way ANOVA
 Grand Mean k
 The grand mean is the average of all the n x
x
i i
values when the factor is ignored i 1
k
It is a weighted average of the individual
n

sample means i
i 1

n x  n x   n x
x 1 1 2 2 k k

n  n   n 1 2 k
One-Way ANOVA
 Between Group Variation, SS(B)
 The between group variation is the variation between
each sample mean and the grand mean
 Each individual variation is weighted by the sample
size

SS  B    n  x  x 
k 2

i i
i 1

SS  B   n  x  x   n  x  x     n  x  x 
2 2 2

1 1 2 2 k k
One-Way ANOVA
 Within Group Variation, SS(W)
 The Within Group Variation is the weighted total of
the individual variations
 The weighting is done with the degrees of freedom
 The df for each sample is one less than the sample
size for that sample.
One-Way ANOVA
Within Group Variation

SS W    df s
k
2
i i
i 1

SS W   df s  df s    df s
2
1 1 2
2
2 k
2
k
Total Variation
SS Total   Y11  Y   Y21  Y     Yij  Y 
2 2 2

Response, Y

Y

Group 1 Group 2 Group 3


Treatment Variation

SST  n1 Y1  Y   n2 Y2  Y     n p Y p  Y 


2 2 2

Response, Y
Y3
Y
Y2
Y1

Group 1 Group 2 Group 3


Random (Error) Variation

SSE  Y11  Y1   Y21  Y1     Y pj  Y p 


2 2 2

Response, Y

Y3
Y2
Y1

Group 1 Group 2 Group 3


One-Way ANOVA F-Test
Test Statistic
 1. Test Statistic STT /  p  1
 F = MST / MSE 
SSE / n  p 
 MST Is Mean Square for Treatment
 MSE Is Mean Square for Error

 2. Degrees of Freedom
 1 = p -1
 2 = n - p
 p = # Populations, Groups, or Levels
 n = Total Sample Size
One-Way ANOVA
Summary Table

Source of Degrees Sum of Mean F


Variation of Squares Square
Freedom (Variance)
Treatment p-1 SST MST = MST
SST/(p - 1) MSE
Error n-p SSE MSE =
SSE/(n - p)
Total n-1 SS(Total) =
SST+SSE
One-Way ANOVA F-Test Critical
Value
If means are equal,
F = MST / MSE  1.
Only reject large F! Reject H0

Do Not 
Reject H0

0 F
Fa ( p1, np)

Always One-Tail!
One-Way ANOVA
 Variances
 The variances are also called the Mean of the
Squares and abbreviated by MS, often with an
accompanying variable MS(B) or MS(W)
 They are an average squared deviation from the
mean and are found by dividing the variation by the
degrees of freedom
 MS = SS / df

Variation
Variance 
df
One-Way ANOVA
 Special Variances
 The MS(Within) is also known as the pooled
estimate of the variance since it is a weighted
average of the individual variances
 Sometimes abbreviated s 2
p
 The MS(Total) is the variance of the response
variable.
 Not technically part of ANOVA table, but useful none the
less
One-Way ANOVA
 Adding F to the table …

Source SS df MS F p

Between 1902 2 951.0 5.9

Within 3386 21 161.2

Total 5288 23 229.9


One-Way ANOVA F-Test
Example
As a vet epidemiologist you Food1 Food2 Food3
want to see if 3 food 25.40 23.40 20.00
supplements have different 26.31 21.80 22.20
mean milk yields. You assign 24.10 23.50 19.75
15 cows, 5 per food 23.74 22.75 20.60
supplement. 25.10 21.60 20.40
Question: At the .05 level, is
there a difference in mean
yields?
Performing a One-Way ANOVA Test
Example:
The following table shows the salaries of randomly selected individuals from four
large cities in Ethiopia. At  = 0.05, can you conclude that the mean salary is
different in at least one of the areas?

Addis Ababa Hawassa Adama Bahir Dar


27,800 30,000 32,000 30,000
28,000 33,900 35,800 40,000
25,500 29,750 28,000 35,000
29,150 25,000 38,900 33,000
30,295 34,055 27,245 29,805

Continued.

You might also like