Presentation is loading. Please wait.

Presentation is loading. Please wait.

The greatest blessing in life is in giving and not taking.

Similar presentations


Presentation on theme: "The greatest blessing in life is in giving and not taking."— Presentation transcript:

1 The greatest blessing in life is in giving and not taking.
1-Way Anova 1-Way ANOVA 1 1

2 One-Way Analysis of Variance
Y= DEPENDENT VARIABLE (“yield”) (“response variable”) (“quality indicator”) X = INDEPENDENT VARIABLE (A possibly influential FACTOR) 2 2

3 = Many other factors (possibly, some we’re unaware of)
OBJECTIVE: To determine the impact of X on Y Mathematical Model: Y = f (x, ) , where  = (impact of) all factors other than X Ex: Y = Battery Life (hours) X = Brand of Battery = Many other factors (possibly, some we’re unaware of)

4 Completely Randomized Design (CRD)
Goal: to study the effect of Factor X The same # of observations are taken randomly and independently from the individuals at each level of Factor X i.e. n1=n2=…nc (c levels) 1-Way ANOVA 4

5 Example: Y = LIFETIME (HOURS) BRAND
3 replications per level 5.8 1-Way ANOVA 5

6 Analysis of Variance 1-Way ANOVA 6

7 R observations for each level
Statistical Model C “levels” OF BRAND R observations for each level • • •  •  •  • • • R 1 2 C Y11 Y12 • • • • • • •Y1R Yij = + i + ij i = 1, , C j = 1, , R Y21 YcI Yij YcR •   •  •   •    •   •    •    •  1-Way ANOVA 7

8 mi = AVERAGE associated with ith level of X (brand i)
Where = OVERALL AVERAGE i = index for FACTOR (Brand) LEVEL j= index for “replication” i = Differential effect associated with ith level of X (Brand i) = mi – m and ij = “noise” or “error” due to other factors associated with the (i,j)th data value. mi = AVERAGE associated with ith level of X (brand i) m = AVERAGE of mi ’s. 1-Way ANOVA 8

9 The experiment produces
Yij =  + i + ij By definition, i = 0 C i=1 The experiment produces R x C Yij data values. The analysis produces estimates of ,c. (We can then get estimates of the ij by subtraction). 1-Way ANOVA 9

10 Let Y1, Y2, etc., be level means
Y • = Y i /C = “GRAND MEAN” (assuming same # data points in each column) (otherwise, Y • = mean of all the data) c i=1 1-Way ANOVA 10

11 These estimates are based on Gauss’ (1796) PRINCIPLE OF LEAST SQUARES
MODEL: Yij =  + i + ij Y• estimates  Yi - Y • estimatesi (= mi – m) (for all i) These estimates are based on Gauss’ (1796) PRINCIPLE OF LEAST SQUARES and on COMMON SENSE 1-Way ANOVA 11

12 If you insert the estimates into the MODEL,
MODEL: Yij =  + j + ij If you insert the estimates into the MODEL, (1) Yij = Y • + (Yj - Y • ) + ij. < it follows that our estimate of ij is (2) ij = Yij – Yj, called residual < 1-Way ANOVA 12

13 { { { Then, Yij = Y• + (Yi - Y• ) + ( Yij - Yi)
or, (Yij - Y• ) = (Yi - Y•) + (Yij - Yi ) { { { (3) TOTAL VARIABILITY in Y Variability in Y associated with X Variability in Y associated with all other factors + = 1-Way ANOVA 13

14 SUM OF SQUARES BETWEEN SAMPLES SUM OF SQUARES WITHIN SAMPLES
If you square both sides of (3), and double sum both sides (over i and j), you get, [after some unpleasant algebra, but lots of terms which “cancel”] {{ C R C C R (Yij - Y• )2 = R •  (Yi - Y•)2 + (Yij - Yi)2 { i=1 j=1 i=1 i=1 j=1 TSS TOTAL SUM OF SQUARES ( SSB SUM OF SQUARES BETWEEN SAMPLES = + SSW (SSE) SUM OF SQUARES WITHIN SAMPLES ( ( ( ( ( 1-Way ANOVA 14

15 ANOVA TABLE SSB SSB C - 1 = MSB C - 1 SSW MSW SSW (R - 1) • C =
SOURCE OF VARIABILITY SSQ DF Mean square (M.S.) Between samples (due to brand) SSB SSB C - 1 = MSB C - 1 Within samples (due to error) SSW MSW SSW (R - 1) • C = (R-1)•C TOTAL TSS RC -1 1-Way ANOVA 15

16 Example: Y = LIFETIME (HOURS) BRAND
3 replications per level 5.8 SSB = 3 ( [ ]2 + [ ] 2 + • • • + [ ]2) = 3 (23.04) = 1-Way ANOVA 16

17 SSW =? ( )2 = ( )2 = ( )2 = 2.56 ( )2 = ( )2= .64 • • • • ( )2 = 0 ( )2 = ( )2= ( )2 = 2.56 Total of ( • • • ), SSW = 46.72 1-Way ANOVA 17

18 ANOVA TABLE Source of Variability df SSQ M.S. BRAND 69.12 7 9.87 ERROR
= 9.87 ERROR 46.72 16 = 2 (8) 2.92 TOTAL = (3 • 8) -1 1-Way ANOVA 18

19 { ( ( { We can show: i “VCOL” E (MSB) = 2 + R C-1 E (MSW) = 2
MEASURE OF DIFFERENCES AMONG LEVEL MEANS ( R ( • (i - )2 { C-1 i E (MSW) = 2 (Assuming Yij follows N(j , 2) and they are independent) 1-Way ANOVA 19

20 > 1 , < 1 , E ( MSBC ) = 2 + VCOL E ( MSW ) = 2
This suggests that There’s some evidence of non-zero VCOL, or “level of X affects Y” if MSBC > 1 , MSW if MSBC No evidence that VCOL > 0, or that “level of X affects Y” < 1 , MSW 1-Way ANOVA 20

21 With HO: Level of X has no impact on Y
HI: Level of X does have impact on Y, We need MSBC > > 1 MSW to reject HO. 1-Way ANOVA 21

22 (All level means are equal) HO: 1 = 2 = • • • • c
More Formally, HO: 1 = 2 = • • • c = 0 HI: not all j = 0 OR (All level means are equal) HO: 1 = 2 = • • • • c HI: not all j are EQUAL 1-Way ANOVA 22

23  The distribution of MSB = “Fcalc” , is MSW
The F - distribution with (C-1, (R-1)C) degrees of freedom Assuming HO true. C = Table Value 1-Way ANOVA 23

24 In our problem: ANOVA TABLE Source of Variability SSQ df M.S. Fcalc
BRAND 69.12 7 9.87 3.38 ERROR 46.72 16 = 1-Way ANOVA 24

25 F table: table 8  = .05 C = (7,16 DF) 1-Way ANOVA 25

26 Hence, at  = .05, Reject Ho . (i.e., Conclude that level of BRAND does have an impact on battery lifetime.) 1-Way ANOVA 26

27 MINITAB INPUT life brand 1.8 1 5.0 1 1.0 1 4.2 2 5.4 2 . . 9.0 8 7.4 8
1.8 1 5.0 1 1.0 1 4.2 2 5.4 2 . . 9.0 8 7.4 8 5.8 8 1-Way ANOVA 27

28 ONE FACTOR ANOVA (MINITAB)
MINITAB: STAT>>ANOVA>>ONE-WAY Analysis of Variance for life Source DF SS MS F P brand Error Total Estimate of the common variance s^2 1-Way ANOVA 28

29 1-Way ANOVA 29

30 Assumptions Yij = + i + ij 1.) the ij are indep. random variables
MODEL: Yij = + i + ij 1.) the ij are indep. random variables 2.) Each ij is Normally Distributed E(ij) = 0 for all i, j 3.) 2(ij) = constant for all i, j Run order plot Normality plot & test Residual plot & test 1-Way ANOVA 30

31 Normal probability plot & normality test of residuals
Diagnosis: Normality The points on the normality plot must more or less follow a line to claim “normal distributed”. There are statistic tests to verify it scientifically. The ANOVA method we learn here is not sensitive to the normality assumption. That is, a mild departure from the normal distribution will not change our conclusions much. Normal probability plot & normality test of residuals 1-Way ANOVA 31

32 Minitab: stat>>basic statistics>>normality test
1-Way ANOVA 32

33 Diagnosis: Constant Variances
The points on the residual plot must be more or less within a horizontal band to claim “constant variances”. There are statistic tests to verify it scientifically. The ANOVA method we learn here is not sensitive to the constant variances assumption. That is, slightly different variances within groups will not change our conclusions much. Tests and Residual plot: fitted values vs. residuals 1-Way ANOVA 33

34 Minitab: Stat >> Anova >> One-way
1-Way ANOVA 34

35 Minitab: Stat>> Anova>> Test for Equal variances
1-Way ANOVA 35

36 Diagnosis: Randomness/Independence
The run order plot must show no “systematic” patterns to claim “randomness”. There are statistic tests to verify it scientifically. The ANOVA method is sensitive to the randomness assumption. That is, a little level of dependence between data points will change our conclusions a lot. Run order plot: order vs. residuals 1-Way ANOVA 36

37 Minitab: Stat >> Anova >> One-way
1-Way ANOVA 37

38 KRUSKAL - WALLIS TEST (Non - Parametric Alternative)
HO: The probability distributions are identical for each level of the factor HI: Not all the distributions are the same 1-Way ANOVA 38

39 BATTERY LIFETIME (hours)
Brand A B C BATTERY LIFETIME (hours) (each column rank ordered, for simplicity) Mean: (here, irrelevant!!) 1-Way ANOVA 39

40 HO: no difference in distribution. among the three brands with
HO: no difference in distribution among the three brands with respect to battery lifetime HI: At least one of the 3 brands differs in distribution from the others with respect to lifetime 1-Way ANOVA 40

41 Ranks in ( ) Brand A B C 32 (29) 32 (29) 28 (24)
32 (29) (29) (24) 30 (26.5) (29) (18) 30 (26.5) (22) (10.5) 29 (25) (22) (10.5) 26 (22) (19) (7) 23 (20) (16.5) 14 (7) 20 (16.5) (14.5) (7) 19 (14.5) (12) (3) 18 (13) (7) (2) 12 (4) (7) (1) T1 = T2 = T3 = 90 n1 = n2 = n3 = 10 1-Way ANOVA 41

42 TEST STATISTIC: 12 •  (Tj2/nj ) - 3 (N + 1) H = N (N + 1)
K 12 H = •  (Tj2/nj ) - 3 (N + 1) N (N + 1) j = 1 nj = # data values in column j N = nj K = # Columns (levels) Tj = SUM OF RANKS OF DATA ON COL j When all DATA COMBINED (There is a slight adjustment in the formula as a function of the number of ties in rank.) K j = 1 1-Way ANOVA 42

43 [ [ H = = 8.41 (with adjustment for ties, we get 8.46)
30 (31) [ + + - 3 (31) = 8.41 (with adjustment for ties, we get 8.46) 1-Way ANOVA 43

44 What do we do with H? We can show that, under HO , H is well approximated by a 2 distribution with df = K - 1. Here, df = 2, and at = .05, the critical value = 5.99 = H  = .05 c21-adf df F1-adf, = 8 Reject HO; conclude that mean lifetime NOT the same for all 3 BRANDS 1-Way ANOVA 44

45 Minitab: Stat >> Nonparametrics >> Kruskal-Wallis
Kruskal-Wallis Test: life versus brand Kruskal-Wallis Test on life brand N Median AveRank Z Overall H = DF = 7 P = 0.078 H = DF = 7 P = (adjusted for ties) 1-Way ANOVA 45


Download ppt "The greatest blessing in life is in giving and not taking."

Similar presentations


Ads by Google