Anda di halaman 1dari 32

STATISTIK LINGKUNGAN

anova one - way

LECTURE’S NOTE

FIRRA ROSARIAWARI
ONE-FACTOR
ANALYSIS OF VARIANCE

A method to compare two or more (normal)


population means
OVERVIEW

• ANOVA pemodelan regresi.


• Respon (dependent variable) dan prediktor
(independent variable). Tetapi ANOVA
mempunyai dua prinsip beda dengan
regresi, yaitu:
• independent variable-nya adalah qualitative
(categorical), dan
• tidak dikenal adanya asumsi dalam hubungan
antara respon dan prediktor (model tidak
memasukkan coefficient dari variabel).
• ANOVA hanya melakukan testing hipotesis
secara umum saja:
Ho : Semua mean sama
H1 : tidak semua mean sama.
• One-Way - digunakan untuk menganalisis model
ANOVA satu arah, dimana struktur data respon
dituliskan dalam sebuah kolom (stacked) dan
satu kolom lain sebagai sub-script dari masing-
masing treatment.
• One-Way (Unstacked) - digunakan untuk
menganalisis model ANOVA satu arah, dimana
struktur data respon setiap treatment dituliskan
dalam kolom yang terpisah (unstacked)
PEMODELAN ONE – WAY ANOVA
• ·    One-way ANOVA melakukan pengujian kesamaan
mean dari beberapa populasi yang diklasifikasikan sesuai
dengan variabel atau factor-faktornya. Setiap variabel
atau faktor biasanya mempunyai level (treatment)
sebanyak 3 atau lebih. One-Way ANOVA dengan 2 level
adalah sama dengan t-test. Setiap level
merepresentasikan treatment.
• Stat > ANOVA > One-way, Perintah ini digunakan untuk
ANOVA satu arah dengan struktur data respon dituliskan
dalam sebuah kolom (stacked) dan kolom yang lain
sebagai sub-script dari masing-masing treatment. Jika
masing-masing grup data (treatment/faktor) berada
dalam kolom-nya masing-masing, maka gunakan Stat >
ANOVA > One-Way (Unstacked). Dalam
DOES DISTANCE IT
TAKES TO STOP CAR AT
60 MPH DEPEND ON TIRE
BRAND?
Brand1 Brand2 Brand3 Brand4 Brand5
194 189 185 183 195
184 204 183 193 197
189 190 186 184 194
189 190 183 186 202
188 189 179 194 200
186 207 191 199 211
195 203 188 196 203
186 193 196 188 206
183 181 189 193 202
188 206 194 196 195
COMPARISON OF FIVE
TIRE BRANDS
(STOPPING DISTANCE AT 60 MPH)

4
Brand

180 190 200 210


Distance (feet)
SAMPLE DESCRIPTIVE
STATISTICS
Brand N MEAN SD
1 10 188.20 3.88
2 10 195.20 9.02
3 10 187.40 5.27
4 10 191.20 5.55
5 10 200.50 5.44
HYPOTHESES
• The null hypothesis is that the group population
means are all the same. That is:
• H0: 1 = 2 = 3 = 4 = 5
• The alternative hypothesis is that at least one
group population mean differs from the others. That
is:
• HA: at least one i differs from the others
ANALYSIS OF
VARIANCE
Analysis of Variance
for comparing all 5 brands

Source DF SS MS F P
Brand 4 1174.8 293.7 7.95 0.000
Error 45 1661.7 36.9
Total 49 2836.5

The P-value is small (0.000, to three decimal places), so reject


the null hypothesis. There is sufficient evidence to conclude
that at least one brand is different from the others.
DOES LEARNING METHOD
AFFECT STUDENT’S EXAM
SCORES?
• Consider 3 methods:
• standard
• osmosis
• shock therapy
• Convince 15 students to take part. Assign 5 students
randomly to each method.
• Wait eight weeks. Then, test students to get exam
scores.
SUPPOSE … STUDY #1

Is there a reasonable conclusion?


SUPPOSE … STUDY #2

Is there a reasonable conclusion?


SUPPOSE … STUDY #3

Is there a reasonable conclusion?


“ANALYSIS OF
VARIANCE”

The variation between the group means and the grand mean
is larger than the variation within the groups.
“ANALYSIS OF
VARIANCE”

The variation between the group means and the grand mean
is smaller than the variation within the groups.
ANALYSIS OF VARIANCE
• A division of the overall variability in data values in
order to compare means.
• Overall (or “total”) variability is divided into two
components:
• the variability “between” groups, and
• the variability “within” groups
• Summarized in an “ANOVA” table.
ANOVA TABLE FOR
STUDY #1
“F” means “F test statistic”
One-way Analysis of Variance

Source DF SS MS F P
Factor 2 2510.5 1255.3 93.44 0.000
Error 12 161.2 13.4
Total 14 2671.7
P-Value

“Source” means “the source of the variation in the data”


“DF” means “the degrees of freedom”
“SS” means “the sum of squares”
“MS” means “mean sum of squares”
ANOVA TABLE FOR
STUDY #1
One-way Analysis of Variance

Source DF SS MS F P
Factor 2 2510.5 1255.3 93.44 0.000
Error 12 161.2 13.4
Total 14 2671.7

“Factor” means “Variability between groups” or “Variability due to


the factor (or treatment) of interest”

“Error” means “Variability within groups” or “unexplained random


error”
“Total” means “Total variation from the grand mean”
ANOVA NOTATION
Group Data Means
1 X 11 X 12  X 1n1 X 1
2 X 21 X 22  X 2n2 X 2

     
m X m1 X m2  X mnm X m

Grand Mean X 
GENERAL ANOVA
TABLE
One-way Analysis of Variance

Source DF SS MS F P
Factor m-1 SS(Between) MSB MSB/MSE
Error n-m SS(Error) MSE
Total n-1 SS(Total)
From F-distribution
with m-1 numerator and
n-m denominator d.f.

MSB = SS(Between)/(m-1)
n-1 = (m-1) + (n-m) MSE = SS(Error)/(n-m)

SS(Total) = SS(Between) + SS(Error)


ANOVA TABLE FOR
STUDY #1
One-way Analysis of Variance

Source DF SS MS F P
Factor 2 2510.5 1255.3 93.44 0.000
Error 12 161.2 13.4
Total 14 2671.7

1255.3 = 2510.5/2
13.4 = 161.2/12
14 = 2 + 12 93.44 = 1255.3/13.4
2671.7 = 2510.5 + 161.2
TOTAL SUM OF
SQUARES SS(TO)
ni
SS (TO )    X  X 
m
2
Definition: ij 
i 1 j 1

SS (TO )    X ij2  2 X ij X   X 2 


m ni

i 1 j 1

m ni m ni
SS (TO )   X ij2  2 X   X ij  nX 2
i 1 j 1 i 1 j 1

m ni
Shortcut: SS (TO )   X ij2  nX 2
i 1 j 1
TREATMENT SUM OF
SQUARES SS(T)
ni
SS (T )    X i  X  
m
2
Definition:
i 1 j 1

SS (T )   ni  X i   X     ni  X i2  2 X i X   X 2 
m m
2

i 1 i 1

m m m
SS (T )   ni X  2 X   ni X i   X
2
i
2
 n i
i 1 i 1 i 1

m
Shortcut: SS (T )   ni X i2  nX 2
i 1
ERROR SUM OF
SQUARES SS(E)
ni
SS ( E )    X  X 
m
2
Definition: ij i
i 1 j 1

Shortcut: SS ( E )  SS (TO )  SS (T )
SS(TO) = SS(T) + SS(E)
ni ni
SS (TO )    X ij  X      X ij  X i     X i   X   
m m
2 2

i 1 j 1 i 1 j 1
ni ni
   X ij  X i    2  X ij  X i   X i   X  
m m
2

i 1 j 1 i 1 j 1
ni
   X i   X  
m
2

i 1 j 1

SS (TO )  SS (T )  SS ( E )

We’ve broken down the TOTAL variation into a component due to


TREATMENT and a component due to random ERROR.
RECALL STUDY #3
ANOVA TABLE FOR
STUDY #3
One-way Analysis of Variance

Source DF SS MS F P
Factor 2 80.1 40.1 0.46 0.643
Error 12 1050.8 87.6
Total 14 1130.9

The P-value is large so we cannot reject the null hypothesis.


There is insufficient evidence to conclude that the average exam
scores differ for the three learning methods.
ONE-WAY ANOVA WITH
UNSTACKED DATA
DATA: IN MINITAB:

std1 osm1 shk1 1. Select Stat.


51 58 77 2. Select ANOVA.
45 68 72 3. Select One-way (Unstacked).
40 64 78 4. Select the columns containing the
41 63 73 data.
41 62 75 5. If you want boxplots or dotplots of the
data, select Graphs...
6. Select OK.
DATA:
ONE-WAY ANOVA WITH
Method Score
STACKED DATA
1 51
1 45 IN MINITAB:
1 40
1 41 1. Select Stat.
1 41 2. Select ANOVA.
2 58 3. Select One-way.
2 68
2 64
4. Select the “response.” (Score)
2 63 5. Select the “factor.” (Method)
2 62 5. If you want boxplots or dotplots of the
3 77 data, select Graphs...
3 72 6. Select OK.
3 78
3 73
3 75
DO HOLOCAUST SURVIVORS HAVE
MORE SLEEP PROBLEMS THAN
OTHERS?
ANOVA TABLE FOR
SLEEP STUDY
One-way Analysis of Variance

Source DF SS MS F P
Factor 2 1723.8 861.9 61.69 0.000
Error 117 1634.8 14.0
Total 119 3358.6

Anda mungkin juga menyukai