Download presentation
Presentation is loading. Please wait.
Published byΣήθος Καψής Modified over 6 years ago
1
5-5 Inference on the Ratio of Variances of Two Normal Populations
5-5.1 Hypothesis Testing on the ratio of Two Variances We wish to test the hypotheses: The development of a test procedure for these hypotheses requires a new probability distribution, the F distribution.
2
5-5 Inference on the Ratio of Variances of Two Normal Populations
The F Distribution
3
5-5 Inference on the Ratio of Variances of Two Normal Populations
5-5.1 The F Distribution
4
5-5 Inference on the Ratio of Variances of Two Normal Populations
The Test Procedure
5
5-5 Inference on the Ratio of Variances of Two Normal Populations
The Test Procedure
6
5-5 Inference on the Ratio of Variances of Two Normal Populations
The Test Procedure
7
5-5 Inference on the Ratio of Variances
of Two Normal Populations
8
5-5 Inference on the Ratio of Variances of Two Normal Populations
5-5.2 Confidence Interval on the Ratio of Two Variances
9
5-5 Inference on the Ratio of Variances
of Two Normal Populations
10
5-5 Inference on the Ratio of Variances
of Two Normal Populations
11
5-8 What If We Have More Than Two Samples?
5-8.1 Completely Randomized Experiment and Analysis of Variance (Replicates) Treatments
12
5-8 What If We Have More Than Two Samples?
5-8.1 Completely Randomized Experiment and Analysis of Variance The levels of the factor are sometimes called treatments. Each treatment has six observations or replicates. The runs are run in random order.
13
5-8 What If We Have More Than Two Samples?
5-8.1 Completely Randomized Experiment and Analysis of Variance
14
5-8 What If We Have More Than Two Samples?
5-8.1 Completely Randomized Experiment and Analysis of Variance Table 5-6. Typical Data for a Single-Factor Experiment Treatment Observations Totals Averages 1 y11 y12 … y1n y1. 𝑦 1. 2 y21 y22 y2n y2. 𝑦 2. . a ya1 ya2 yan ya. 𝑦 a. y.. 𝑦 .. 𝑦 𝑖. = 𝑗=1 𝑛 𝑦 𝑖𝑗 𝑦 𝑖. = 𝑦 𝑖. 𝑛 𝑖=1, 2, …, 𝑎 𝑦 .. = 𝑖=1 𝑎 𝑗=1 𝑛 𝑦 𝑖𝑗 𝑦 .. = 𝑦 .. 𝑁
15
5-8 What If We Have More Than Two Samples?
5-8.1 Completely Randomized Experiment and Analysis of Variance Linear Statistical Model 𝑌 𝑖𝑗 = μ 𝑖 + 𝜖 𝑖𝑗 𝑖=1 𝑎 𝜏 𝑖 =0
16
5-8 What If We Have More Than Two Samples?
5-8.1 Completely Randomized Experiment and Analysis of Variance
17
5-8 What If We Have More Than Two Samples?
5-8.1 Completely Randomized Experiment and Analysis of Variance
18
5-8 What If We Have More Than
Two Samples?
19
5-8 What If We Have More Than Two Samples?
5-8.1 Completely Randomized Experiment and Analysis of Variance
20
5-8 What If We Have More Than Two Samples?
5-8.1 Completely Randomized Experiment and Analysis of Variance
21
5-8 What If We Have More Than
Two Samples?
22
5-8 What If We Have More Than
Two Samples?
23
5-8 What If We Have More Than Two Samples?
5-8.1 Completely Randomized Experiment and Analysis of Variance
24
5-8 What If We Have More Than Two Samples?
Which means differ?
25
5-8 What If We Have More Than Two Samples?
Multiple Comparisons If we wish to make all pairwise comparisons 𝜇 𝑖 − 𝜇 𝑗 we need to worry about the probability of a type I error on each test and also the probability of making at least one type I error on all the tests. This latter error is referred to as the experiment-wise error rate or the overall error rate. A number of procedures are available to protect the overall error rate. They all compare the differences 𝑋 𝑖 − 𝑋 𝑗 to a cut-off value. The cut-off values all have the form (𝑡𝑎𝑏𝑙𝑒𝑑 𝑣𝑎𝑙𝑢𝑒)× 𝑀𝑆𝐸×( 1 𝑛 𝑖 𝑛 𝑗 )
26
Steps in Multiple Comparisons
5-8 What If We Have More Than Two Samples? Steps in Multiple Comparisons Calculate 𝑋 𝑖 − 𝑋 𝑗 . Determine cut-off. Any difference in 1) larger than the cut-off have corresponding means that are significantly different from one another. Fisher’s Least Significant Difference (LSD). This does not protect the overall error rate. The overall error rate will be approximately 1− (1−𝛼) 𝑐 , where c is the number of comparisons being made. 𝐿𝑆𝐷= 𝑡 𝛼 2 , 𝑛−𝑟 𝑀𝑆𝐸×( 1 𝑛 𝑖 𝑛 𝑗 ) If all 𝑛 𝑖 =𝑚 then 𝐿𝑆𝐷= 𝑡 𝛼 2 𝑀𝑆𝐸× 2 𝑚
27
Steps in Multiple Comparisons
5-8 What If We Have More Than Two Samples? Steps in Multiple Comparisons Tukey’s Highest Significance Difference (HSD). This controls overall error rate. The overall error rate will be a. 𝐻𝑆𝐷= 𝑞 𝑛−𝑟, 𝑟 𝑀𝑆𝐸 ( 1 𝑛 𝑖 𝑛 𝑗 )/2 If all 𝑛 𝑖 =𝑚 then HSD= 𝑞 𝑛−𝑟, 𝑟 𝑀𝑆𝐸( 1 𝑚 ) An alternative in unbalanced designs is HSD= 𝑞 𝑛−𝑟, 𝑟 𝑀𝑆𝐸( 1 min( 𝑛 𝑖 ) ) With Tukey’s you need both the degrees of freedom (n – r) and also the number of means being compared (r).
28
Steps in Multiple Comparisons
5-8 What If We Have More Than Two Samples? Steps in Multiple Comparisons Student’s, Neuman’s, Keuls (SNK). This overall error rate is between that of Fisher’s and Tukey’s. SNK= 𝑞 𝑛−𝑟, 𝑑 𝑀𝑆𝐸 ( 1 𝑛 𝑖 𝑛 𝑗 )/2 d is the number of means apart the two means being compared are in the ordered list of means (d between 2 and r). Notice, more than one cut-off is needed for the SNK. The SNK is done sequentially, starting with the means the farthest apart. Once a pair of means is found to be not significantly different, all pairs closer together are deemed not significantly different.
29
5-8 What If We Have More Than
Two Samples?
30
5-8 What If We Have More Than Two Samples?
𝐿𝑆𝐷= 𝑡 𝛼 2 , 𝑛−𝑟 𝑀𝑆𝐸×( 1 𝑛 𝑖 𝑛 𝑗 ) = 𝑡 0.025, (24−4) × =(2.086)(1.473) = 3.073 𝐻𝑆𝐷= 𝑞 𝑛−𝑟, 𝑟 𝑀𝑆𝐸 ( 1 𝑛 𝑖 𝑛 𝑗 )/2 = 𝑞 20, ( )/2 =(3.96)(1.042) = 4.125 S𝑁𝐾= 𝑞 𝑛−𝑟, 𝑑 𝑀𝑆𝐸 ( 1 𝑛 𝑖 𝑛 𝑗 )/2 = 𝑞 20, ( )/2 =(2.95)(1.042) = 3.074 𝑞 20, 2 =2.95 𝑞 20, 3 =3.58 𝑞 20, 4 =3.96
31
5-8 What If We Have More Than Two Samples?
Cut-off value for Fisher’s LSD = 3.073 Cut-off value for Tukey’s HSD = 4.125 Cut-off value for SNK = (d=2) 3.731 (d=3) 4.125 (d=4) 20 15 10 5 22.2 17 15.7 12.2* 7* 5.7* - 6.5* 1.3 5.2* * Significantly different.
32
5-8 What If We Have More Than Two Samples?
Residual Analysis and Model Checking
33
5-8 What If We Have More Than Two Samples?
Residual Analysis and Model Checking
34
5-8 What If We Have More Than Two Samples?
Residual Analysis and Model Checking
35
5-8 What If We Have More Than Two Samples?
Residual Analysis and Model Checking
36
5-8 What If We Have More Than Two Samples?
proc format; value hc 1=' 5%' 2='10%' 3='15%' 4='20%'; DATA ex514; INPUT hc strength format hc hc.; CARDS; ods graphics on; proc anova data=ex514; class hc; model strength= hc; means hc/lsd snk tukey; TITLE 'proc anova balanced 1-way anova'; proc glm data=ex514 plots = diagnostics; /* General Linear Model uses the least squares to fit the model */ means hc/lsd snk tukey hovtest; /* Homogeneity variance test */ TITLE 'proc glm 1-way anova'; RUN; ods graphics off; QUIT;
37
5-8 What If We Have More Than
Two Samples?
38
5-8 What If We Have More Than
Two Samples?
39
5-8 What If We Have More Than
Two Samples?
40
5-8 What If We Have More Than
Two Samples?
41
5-8 What If We Have More Than
Two Samples?
42
5-8 What If We Have More Than
Two Samples?
43
5-8 What If We Have More Than
Two Samples?
44
5-8 What If We Have More Than
Two Samples?
45
5-8 What If We Have More Than
Two Samples?
46
5-8 What If We Have More Than
Two Samples?
47
5-8 What If We Have More Than
Two Samples?
48
5-8 What If We Have More Than
Two Samples?
49
5-8 What If We Have More Than
Two Samples?
50
5-8 What If We Have More Than Two Samples?
Contrasts Pairwise comparisons are one type of common comparison made in designed experiment. A contrast is a more general type of comparison. A contrast is a linear combination of the cell means such that the coefficients add up to zero, i.e. Ψ= 𝑐 1 𝜇 1 + 𝑐 2 𝜇 2 + …+ 𝑐 𝑟 𝜇 𝑟 such that 𝑖=1 𝑟 𝑐 𝑖 =0. To estimate Ψ we use Ψ = 𝑐 1 𝑋 1 + 𝑐 2 𝑋 2 + …+ 𝑐 𝑟 𝑋 𝑟 The estimated standard error of Ψ is 𝑆𝐸 Ψ = 𝑀𝑆𝐸( 𝑖=1 𝑟 𝑐 𝑖 2 𝑛 𝑖 ) A 100(1-)% confidence interval for Ψ is Ψ ± 𝑡 𝛼 2 𝑆𝐸( Ψ )
51
Kruskal-Wallis Nonparametric Test
5-8 What If We Have More Than Two Samples? Kruskal-Wallis Nonparametric Test H0: All k populations have the same distribution H1: Not all populations have the same distribution. Test Statistic: 𝐻= 12 𝑛(𝑛+1) 𝑖=1 𝑘 𝑅 𝑖 2 𝑛 𝑖 −3(𝑛+1) Here the Ri are the sum of the ranks for each population. The ranks are found by ranking the data in all populations combined. The n is the total sample size and ni is the sample size of the sample from the ith population. Rejection Region: 𝐻> χ 2 𝛼;𝑘−1 Paired comparison of population i to j: 𝐷=| 𝑅 𝑖 − 𝑅 𝑗 |> χ 2 𝛼;𝑘−1 𝑛(𝑛+1) 𝑛 𝑖 𝑛 𝑗
52
5-8 What If We Have More Than Two Samples?
Example An article in Fortune compared rent in five American cities: New York, Chicago, Detroit, Tampa, and Orlando. The following data are small random samples of rents (in dollars) in the five cities. The New York data are Manhattan only. Conduct the Kruskal-Wallis test to determine whether evidence exists that there are significant differences in the rents in these cities. If differences exit, where are they?
53
5-8 What If We Have More Than Two Samples?
OPTIONS NOOVP NODATE NONUMBER LS=80; proc format; value city 1=' New York' 2='Chicago' 3='Detroit' 4='Tampa' 5='Orlando'; DATA rent; INPUT city rent format city city.; CARDS; ods graphics on; proc npar1way data=rent wilcoxon; class city; var rent; TITLE 'Kruskal-Wallis Test'; PROC RANK DATA=RENT OUT=RRENT; VAR RENT; /* A one-way ANOVA applied to ranks is equivalent to the Kruskal-Wallis test. */ PROC GLM DATA=RRENT; CLASS CITY; MODEL RENT = CITY; LSMEANS CITY/ PDIFF=ALL; RUN; ods graphics off; QUIT;
54
5-8 What If We Have More Than
Two Samples?
55
5-8 What If We Have More Than
Two Samples?
56
5-8 What If We Have More Than
Two Samples?
57
5-8 What If We Have More Than
Two Samples?
58
5-8 What If We Have More Than
Two Samples?
59
5-8 What If We Have More Than
Two Samples?
60
5-8 What If We Have More Than
Two Samples?
61
5-8 What If We Have More Than Two Samples?
Cutoff for pairwise comparisons Tampa vs. Orlando χ 𝛼;𝑘−1 2 𝑛(𝑛+1) 𝑛 𝑖 𝑛 𝑗 = χ ;4 36(36+1) = 18.06 Chicago vs. NY χ 𝛼;𝑘−1 2 𝑛(𝑛+1) 𝑛 𝑖 𝑛 𝑗 = χ ;4 36(36+1) = 16.80 NYw 8 Chicago Detroit Tampa Orlando 32.6 24 16.9 8.8 8.2 24.4* 15.8 8.7 0.6 - 23.8* 15.2 8.1 15.7 7.1 8.6 * Significantly different.
62
5-8 What If We Have More Than Two Samples?
5-8.2 Randomized Complete Block Experiment The randomized block design is an extension of the paired t-test to situations where the factor of interest has more than two levels.
63
5-8 What If We Have More Than Two Samples?
5-8.2 Randomized Complete Block Experiment For example, consider the situation where three different methods were used to predict the shear strength of steel plate girders. Say we use four girders as the experimental units.
64
5-8 What If We Have More Than Two Samples?
5-8.2 Randomized Complete Block Experiment
65
5-8 What If We Have More Than Two Samples?
5-8.2 Randomized Complete Block Experiment The appropriate linear statistical model: treatments and blocks are initially fixed factors treatment and block effects as deviations from m treatments and blocks do not interact
66
5-8 What If We Have More Than Two Samples?
5-8.2 Randomized Complete Block Experiment The hypotheses of interest are:
67
5-8 What If We Have More Than Two Samples?
5-8.2 Randomized Complete Block Experiment
68
5-8 What If We Have More Than Two Samples?
5-8.2 Randomized Complete Block Experiment The mean squares are:
69
5-8 What If We Have More Than Two Samples?
5-8.2 Randomized Complete Block Experiment The expected values of these mean squares are:
70
5-8 What If We Have More Than Two Samples?
5-8.2 Randomized Complete Block Experiment
71
5-8 What If We Have More Than Two Samples?
5-8.2 Randomized Complete Block Experiment
72
5-8 What If We Have More Than Two Samples?
5-8.2 Randomized Complete Block Experiment The model for the randomized block design is the same as the two-way factorial where the interaction terms are assumed to be zero. The main question of interest is whether the means are the same for the different treatment levels. The blocks are used to explain some of the variability and many times to simplify the mechanics of collecting the data. For instance if the blocks are cities, it is much easier to collect data in one city at a time. The SSTR is the same as SSA in the two-way factorial, SSBL is the same as the SSB in the two-way factorial. Notice SSE in the corresponding two-way factorial model has zero degrees of freedom when you have only one observation per cell. The two-way factorial with only one observation is analyzed the same as the randomized block, and also assumes no interaction between the two factors.
73
5-8 What If We Have More Than
Two Samples?
74
5-8 What If We Have More Than
Two Samples?
75
5-8 What If We Have More Than
Two Samples?
76
5-8 What If We Have More Than
Two Samples?
77
5-8 What If We Have More Than Two Samples?
When is Blocking Necessary? RBD에서 error의 자유도는 (a-1)(b-1) CRD에서 error의 자유도는 a(n-1) = a(b-1) 그러므로, blocking을 사용함으로서 자유도 (b-1)의 손실에 의한 효과가 그다지 크지 않기 때문에, blocking effect가 중요하다면 RBD를 사용하는 것이 합리적이다.
78
5-8 What If We Have More Than Two Samples?
Which means differ?
79
5-8 What If We Have More Than Two Samples?
Residual Analysis and Model Checking
80
5-8 What If We Have More Than Two Samples?
Residual Analysis and Model Checking
81
5-8 What If We Have More Than Two Samples?
Residual Analysis and Model Checking
82
5-8 What If We Have More Than Two Samples?
Residual Analysis and Model Checking
83
5-8 What If We Have More Than Two Samples?
Residual Analysis and Model Checking
84
5-8 What If We Have More Than Two Samples?
Example 5-15 OPTIONS NOOVP NODATE NONUMBER LS=80; DATA ex515; DO type=1 to 4; DO fabsam=1 TO 5; INPUT strength OUTPUT; END; END; CARDS; PROC GLM DATA=ex515 plots=diagnostics; CLASS type fabsam; MODEL strength= type fabsam; MEANS TYPE/SNK; output out=new p=phat r=resid; TITLE 'Randomized Block Design FabSample: Block, ChemType: Treatment'; proc plot data=new; plot resid*phat; /* Residual Plot */ plot resid*type; /* Residual by Chemical Type */ plot resid*fabsam; /* Residuals by block */ proc anova data=ex515; class type; model strength=type; means type/snk; TITLE 'one-way anova'; run; quit;
85
5-8 What If We Have More Than
Two Samples?
86
5-8 What If We Have More Than
Two Samples?
87
5-8 What If We Have More Than
Two Samples?
88
5-8 What If We Have More Than
Two Samples?
89
5-8 What If We Have More Than
Two Samples?
90
5-8 What If We Have More Than
Two Samples?
91
5-8 What If We Have More Than
Two Samples?
92
5-8 What If We Have More Than
Two Samples?
93
5-8 What If We Have More Than
Two Samples?
94
5-8 What If We Have More Than
Two Samples?
95
5-8 What If We Have More Than
Two Samples?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.