1 / 84

STT 511-STT411: DESIGN OF EXPERIMENTS AND ANALYSIS OF VARIANCE Dr. Cuixian Chen

STT 511-STT411: DESIGN OF EXPERIMENTS AND ANALYSIS OF VARIANCE Dr. Cuixian Chen. Chapter 4: Randomized Blocks, Latin Squares, and Related Designs. Example 1-- Review: Design Of Experiments (Chap2). Completely randomized designs (CRD). Repeat. Repeat. Random Allocation. Compare Response.

iirick
Download Presentation

STT 511-STT411: DESIGN OF EXPERIMENTS AND ANALYSIS OF VARIANCE Dr. Cuixian Chen

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Design & Analysis of Experiments 8E 2012 Montgomery STT 511-STT411:DESIGN OF EXPERIMENTS AND ANALYSIS OF VARIANCEDr. Cuixian Chen Chapter 4: Randomized Blocks, Latin Squares, and Related Designs

  2. Example 1-- Review: Design Of Experiments (Chap2) Completely randomized designs (CRD) Repeat Repeat Random Allocation Compare Response Repeat Design & Analysis of Experiments 8E 2012 Montgomery

  3. Example2 -- Review: Design Of Experiments (Chap2) Completely randomized designs (CRD) Randomized complete block design (RCBD) Design & Analysis of Experiments 8E 2012 Montgomery

  4. The most closely matched pair studies use identical twins. Review: Design Of Experiments (Matched pairs designs) Matched pairs: Choose pairs of subjects that are closely matched—e.g., same sex, height, weight, age, and race. Within each pair, randomly assign who will receive which treatment. It is also possible to just use a single person, and give the two treatments to this person over time in random order. In this case, the “matched pair” is just the same person at different points in time.

  5. Randomized complete block design (RCBD)

  6. Design of Engineering Experiments– The Blocking Principle • Text Reference, Chapter 4 • Blocking and nuisance factors • The randomized complete block design or the RCBD • Extension of the ANOVA to the RCBD • Other blocking scenarios…Latin square designs Design & Analysis of Experiments 8E 2012 Montgomery

  7. The Blocking Principle • Blocking is a technique for dealing with nuisancefactors • A nuisance factor is a factor that probably has some effect on the response, but it’s of no interest to the experimenter… however, the variability it transmits to the response needs to be minimized • Typical nuisance factors include batches of raw material, operators, pieces of test equipment, time (shifts, days, etc.), different experimental units, or locations. • Many industrial experiments involve blocking (or should) • Failure to block is a common flaw in designing an experiment (consequences?) Design & Analysis of Experiments 8E 2012 Montgomery

  8. The Hardness Testing Example • Text reference, pg 139, 140 • We wish to determine whether 4 different tips produce different (mean) hardness reading on a Rockwell hardness tester • Gauge & measurement systems capability studies are frequent areas for applying DOE • Assignment of the tips to an experimental unit; that is, a test coupon • Structure of a completely randomized experiment • The test coupons are a source of nuisance variability • Alternatively, the experimenter may want to test the tips across coupons of various hardness levels • The need for blocking Design & Analysis of Experiments 8E 2012 Montgomery

  9. The Hardness Testing Example Test coupon Tips Design & Analysis of Experiments 8E 2012 Montgomery https://www.youtube.com/watch?v=RJXJpeH78iU

  10. The Hardness Testing Example Design & Analysis of Experiments 8E 2012 Montgomery

  11. The Hardness Testing Example • Determine whether 4 different tips produce different (mean) hardness reading on a Rockwell hardness tester. • Test coupons are a source of nuisance variability. • Alternatively, experimenter may want to test tips across coupons of various hardness levels. • The need for blocking. Design & Analysis of Experiments 8E 2012 Montgomery

  12. The Hardness Testing Example • Determine whether 4 different tips produce different (mean) hardness reading on a Rockwell hardness tester. • Test coupons are a source of nuisance variability. • Alternatively, experimenter may want to test tips across coupons of various hardness levels. • The need for blocking. Design & Analysis of Experiments 8E 2012 Montgomery http://www.ogj.com/articles/print/volume-109/issue-18/transportaton/new-method-uses-hardness-to-find-yield.html

  13. The Hardness Testing Example • To conduct this experiment as a RCBD, assign all 4 tips to each coupon • Each coupon is called a “block”; that is, it’s a more homogenous experimental unit on which to test the tips • Variability between blocks can be large, variability within a block should be relatively small • In general, a block is a specific level of the nuisance factor • A complete replicate of the basic experiment is conducted in each block • A block represents a restriction on randomization • All runs within a block are randomized Design & Analysis of Experiments 8E 2012 Montgomery

  14. The Hardness Testing Example • Suppose that we use b = 4 blocks: • Notice the two-way structure of the experiment • Once again, we are interested in testing the equality of treatment means, but now we have to remove the variability associated with the nuisance factor (the blocks) Design & Analysis of Experiments 8E 2012 Montgomery

  15. Coded Data=(#-9.5)*10 Design & Analysis of Experiments 8E 2012 Montgomery

  16. Extension of the ANOVA to the RCBD • Suppose single factor, a treatments (factor levels) and b blocks • A statistical model (effects model) for the RCBD is • The relevant (fixed effects) hypotheses are • Model Assumption: Constraints: Design & Analysis of Experiments 8E 2012 Montgomery

  17. Extension of the ANOVA to the RCBD Let’s add and subtract three terms: ANOVA partitioning of total variability: Design & Analysis of Experiments 8E 2012 Montgomery

  18. Extension of the ANOVA to the RCBD Let’s add and subtract three terms here… ANOVA partitioning of total variability: Design & Analysis of Experiments 8E 2012 Montgomery

  19. Extension of the ANOVA to the RCBD The degrees of freedom for the sums of squares in are as follows: Therefore, ratios of sums of squares to their degrees of freedom result in mean squares and the ratio of the mean square for treatments to the error mean square is an F statistic that can be used to test the hypothesis of equal treatment means Design & Analysis of Experiments 8E 2012 Montgomery

  20. Manual computing (ugh!)…see Equations (4-9) – (4-12), page 144 Use software to analyze the RCBD (Design-Expert, JMP) ANOVA Display for the RCBD • Manual computing (ugh!)…see Equations (4-9) – (4-12), page 144 • The reference distribution for F0 is the F(a-1, (a-1)(b-1)) distribution • Reject the null hypothesis (equal treatment means) if Design & Analysis of Experiments 8E 2012 Montgomery

  21. ANOVA Display for the RCBD Manual computing: Design & Analysis of Experiments 8E 2012 Montgomery

  22. Example 4.1: CRBD Analysis with vascular grafts Design & Analysis of Experiments 8E 2012 Montgomery

  23. Vascular Graft Example (pg. 145) • To conduct this experiment as a RCBD, assign all 4 pressures to each of the 6 batches of resin • Each batch of resin is called a “block”; that is, it’s a more homogenous experimental unit on which to test the extrusion pressures Q: SSTotal = 480.31, SStreat = 178.17, SSblock = 192.25, first find SSerror; then find MStreat, MSerror. For both treatment and blocks factors: find F0, p-value and draw conclusions respectively. Design & Analysis of Experiments 8E 2012 Montgomery

  24. Example 4.1: CRBD Analysis with vascular grafts • we conclude that extrusion pressure affects the mean yield. The P-value for the test is also quite small. • Also, the resin batches (blocks) seem to differ significantly, because the mean square for blocks is large relative to error. Design & Analysis of Experiments 8E 2012 Montgomery

  25. Vascular Graft Example (pg. 145) p-value=1-pf(8.1067,3,15) = 0.001916699. Design & Analysis of Experiments 8E 2012 Montgomery

  26. Example 4.1: Incorrect approach to vascular grafts • The incorrect analysis of these data as a completely randomized single-factor design is shown in Table 4.5. MSerrorhas more than doubled, from 7.33 in RCBD to 15.11 in CRD. All variability due to blocks is now in error term. Call RCBD a noise-reducing design technique; It effectively increases signal-to-noise ratio, or it improves precision with which treatment means are compared. Design & Analysis of Experiments 8E 2012 Montgomery

  27. Example 4.1: CRBD Analysis with vascular grafts • Note that the square for error has more than doubled, increasing from 7.33 in the RCBD to 15.11. • All of the variability due to blocks is now in the error term. This makes it easy to see why we sometimes call the RCBD a noise-reducing design technique; it effectively increases the signal-to- noise ratio in the data, or it improves the precision with which treatment means are compared. • This example also illustrates an important point. If an experimenter fails to block when he or she should have, the effect may be to inflate the experimental error, and it would be possible to inflate the error so much that important differences among the treatment means could not be identified. Design & Analysis of Experiments 8E 2012 Montgomery

  28. Review: Example 3.1: ANOVA for CRD ## Here is the way we code the data into R: ## x=c(rep(160, 5), rep(180, 5), rep(200, 5), rep(220, 5)); Blocks=rep(1:5, 4) y=c(575, 542, 530, 539, 570, 565, 593, 590, 579, 610, 600, 651, 610, 637, 629, 725, 700, 715, 685, 710); anova(lm(y~factor(x)+factor(blocks))) ## Here is the way we code the data into R: ## x=c(rep(160, 5), rep(180, 5), rep(200, 5), rep(220, 5)); y=c(575, 542, 530, 539, 570, 565, 593, 590, 579, 610, 600, 651, 610, 637, 629, 725, 700, 715, 685, 710); anova(lm(y~factor(x))) Design & Analysis of Experiments 8E 2012 Montgomery

  29. Vascular Graft Example: Input data and ANOVA for CRBD ################ The Vascular Graft example #################### batch=rep(1:6, 4); pressure=c(rep(8500, 6), rep(8700, 6), rep(8900, 6), rep(9100, 6)); y=c(90.3,89.2,98.2,93.9,87.4,97.9,92.5,89.5,90.6,94.7,87.0,95.8,85.5,90.8,89.6,86.2,88.0,93.4,82.5,89.5,85.6,87.4,78.9,90.7) anova(lm(y~factor(pressure)+factor(batch))); ### or tab4.3<-read.table("http://people.uncw.edu/chenc/STT411/dataset%20backup/Vascular-Graft.TXT", header=TRUE); anova(lm(tab4.3$Yield~factor(tab4.3$Pressure)+factor(tab4.3$Batch))); ### or anova(lm(tab4.3[,3]~factor(tab4.3[,2])+factor(tab4.3[,1]))); Design & Analysis of Experiments 8E 2012 Montgomery

  30. Vascular Graft Example Design-Expert Output Design & Analysis of Experiments 8E 2012 Montgomery

  31. Vascular Graft Example JMP output Design & Analysis of Experiments 8E 2012 Montgomery

  32. Residual Analysis for the Vascular Graft Example • Basic residual plots to check whether normality, constant/equal variance assumptions are satisfied • Check randomization • Check:ideally No patterns in residuals vs. block • Can also plot residuals versus pressure (i.e. residuals vs. factor) • These plots provide more information about the constant variance assumption, possible outliers Design & Analysis of Experiments 8E 2012 Montgomery

  33. Residual Analysis for the Vascular Graft Example Model fits well and model assumptions are Satisfied. A normal probability plot of residuals No severe indication of non-normality, nor is there any evidence pointing to possible outliers. If model is correct and the assumptions are satisfied, this plot should be structureless. Design & Analysis of Experiments 8E 2012 Montgomery

  34. Residual Analysis for the Vascular Graft Example Plots of the residuals by treatment (extrusion pressure) and by batch of resin or block. If there is more scatter in residuals for a particular treatment, it indicates this treatment produces more erratic response readings than others. More scatter in residuals for a particular block could indicate that block is not homogeneous. However, Figure 4.6 gives no indication of inequality of variance by treatment but there is an indication that there is less variability in yield for batch 6. However, since all other residual plots are satisfactory, we will ignore this. Design & Analysis of Experiments 8E 2012 Montgomery

  35. ANOVA for CRBD for the Vascular Graft Example:Residual Analysis in R ################ The Vascular Graft example #################### batch=rep(1:6, 4); pressure=c(rep(8500, 6), rep(8700, 6), rep(8900, 6), rep(9100, 6)); y=c(90.3,89.2,98.2,93.9,87.4,97.9,92.5,89.5,90.6,94.7,87.0,95.8,85.5,90.8,89.6,86.2,88.0,93.4,82.5,89.5,85.6,87.4,78.9,90.7); anova(lm(y~factor(pressure)+factor(batch))); ### analysis after CRBD: #### Residual analysis model.4.3<-lm(y~factor(pressure)+factor(batch)); res.4.3<-resid(model.4.3); # or res.4.3<- model.4.3$resid; pred.4.3<-model.4.3$fitted; par(mfrow=c(3,2)) qqnorm(res.4.3); qqline(res.4.3); ##for residuals## plot(c(1:24),res.4.3); plot(pred.4.3,res.4.3); plot(pressure, res.4.3); plot(batch,res.4.3); dev.off(); Design & Analysis of Experiments 8E 2012 Montgomery

  36. Residual Analysis for the Vascular Graft Example Design & Analysis of Experiments 8E 2012 Montgomery

  37. Post-ANOVA Comparison of Means for RCBD • Determining which specific means differ, following an ANOVA is called the multiple pairwise comparisons b/w all a populations means. • Suppose we are interesting in comparing all pairs of a treatment means and that the null hypothesis that we wish to test H0: µi=µj v.s. Ha: µi ≠ µj for all i≠j. • We will use pairwise t-tests on means…sometimes called Tukey's ‘Honest Significant Difference’ method(or Tukey’s HSD) Method • Sometimes… OR Fisher’s Least Significant Difference (or Fisher’s LSD) Method Design & Analysis of Experiments 8E 2012 Montgomery

  38. ANOVA for CRBD for the Vascular Graft Example:Tukey's ‘Honest Significant Difference’ method ################ The Vascular Graft example #################### batch=rep(1:6, 4); pressure=c(rep(8500, 6), rep(8700, 6), rep(8900, 6), rep(9100, 6)); y=c(90.3,89.2,98.2,93.9,87.4,97.9,92.5,89.5,90.6,94.7,87.0,95.8,85.5,90.8,89.6,86.2,88.0,93.4,82.5,89.5,85.6,87.4,78.9,90.7); anova(lm(y~factor(pressure)+factor(batch))); #### post RBCD analysis ### analysis after RBD: #### Residual analysis model.4.3<-lm(y~factor(pressure)+factor(batch)); tapply(y, pressure, mean) TukeyHSD(aov(model.4.3), "factor(pressure)") ## Create a set of confidence intervals on differences between means of levels of a factor with specified ## family-wise probability of coverage. ## The intervals are based on the Studentized range statistic, Tukey's ‘Honest Significant Difference’ method. ## Each component is a matrix with columns diff giving the difference in the observed means, ## lwr giving the lower end point of the interval, ## upr giving the upper end point and ## p adj giving the p-value after adjustment for the multiple comparisons. ## It will list all possible pairwise comparison within different groups ## Design & Analysis of Experiments 8E 2012 Montgomery

  39. ANOVA for RCBD: Example 2

  40. Example 2: RCBD analysis in R ######## another example dat4.4<-read.table("http://people.uncw.edu/chenc/STT411/dataset%20backup/BHH2-Data/tab0404.dat",skip=1)[,2:4]; names(dat4.4)<-c("blend","treatment","value"); ##### a$blend<-factor(a$blend); #When R read the data file, it automatically take ##### character as factor, but it is not the case for numbers. We are suppose to ### transform it "by hand"##### summary(aov(value~blend+treatment,data=dat4.4)); summary(aov(value~factor(blend)+treatment,data=dat4.4)); anova(lm(value~factor(blend)+treatment,data=dat4.4)); Design & Analysis of Experiments 8E 2012 Montgomery

  41. Example 2: RCBD analysis in SAS /*First download the data in your computer. Then follow the steps below*/ data tab4p4; infile ‘c:\BHH2-Data\tab0404.dat' firstobs=2; input run blend$ treat$ value; run; procprint data=tab4p4; run; procanova data=tab4p4 ; /* instead of "anova", people also use "glm" */ class blend treat; model value = blend treat; run; Design & Analysis of Experiments 8E 2012 Montgomery

  42. Multiple Comparisons: Fisher’s Least Significant Difference for RCBD with exact p-value Test H0: µi=µj v.s. Ha: µi ≠ µj, for all i≠j. ~t( df=(a-1)(b-1) ) Then we can find exact p-value from this approach. b b If ANOVA for RCBD indicates a significant difference in treatment means, we are usually interested in multiple comparisons to discover which treatment means differ. Any of multiple comparison procedures discussed in Section 3.5 may be used, by simply replacing # of replicates (n) in single-factor CRD by the number of blocks (b) in RCBD. Also, remember to use # of error df for RCBD with [(a-1)(b-1)] instead of those for CRB [a(n-1)]. Design & Analysis of Experiments 8E 2012 Montgomery

  43. Fisher’s LSD for Vascular Graft Example (yi.)-bar’s are given: 8500 8700 8900 9100 92.82 91.68 88.92 85.77 Use Fisher’ LSD method to make comparison among all 4 pressure treatments to determine specially which designs differ in the mean response rate. Design & Analysis of Experiments 8E 2012 Montgomery

  44. Multiple Comparisons: Fisher’s Least Significant Difference Test H0: µi=µj v.s. Ha: µi ≠ µj, for all i≠j. df=(a-1)(b-1) df b b df=(a-1)(b-1) df b If ANOVA for RCBD indicates a significant difference in treatment means, we are usually interested in multiple comparisons to discover which treatment means differ. Any of multiple comparison procedures discussed in Section 3.5 may be used, by simply replacing # of replicates (n) in single-factor CRD by the number of blocks (b) in RCBD. Also, remember to use # of error df for RCBD with [(a-1)(b-1)] instead of those for CRB [a(n-1)]. Design & Analysis of Experiments 8E 2012 Montgomery

  45. Multiple Comparisons for the Vascular Graft Example – Which Pressure is Different with Fisher’s LSD? Also see Figure 4.2, Design-Expert output By Design Expert package µ1≠ µ3 µ1≠ µ4 µ2≠ µ4 By Tukey’s HSD: µ1≠ µ4 µ2≠ µ4 Design & Analysis of Experiments 8E 2012 Montgomery

  46. ANOVA for CRBD for the Vascular Graft Example:Fisher's ‘Least Significant Difference’ method ################ The Vascular Graft example #################### batch=rep(1:6, 4); pressure=c(rep(8500, 6), rep(8700, 6), rep(8900, 6), rep(9100, 6)); y=c(90.3,89.2,98.2,93.9,87.4,97.9,92.5,89.5,90.6,94.7,87.0,95.8,85.5,90.8,89.6,86.2,88.0,93.4,82.5,89.5,85.6,87.4,78.9,90.7); anova(lm(y~factor(pressure)+factor(batch))); #### post RBCD analysis tapply(y, pressure, mean) pairwise.t.test(y, factor(pressure), p.adjust.method ="none") By Fisher’s LSD µ1≠ µ4 µ2≠ µ4 Design & Analysis of Experiments 8E 2012 Montgomery

  47. ANOVA for RCBD: Example 3 (for students’ practice)

  48. Example 3:Review: The Hardness Testing Example • Suppose that we use b = 4 blocks: • Notice the two-way structure of the experiment • Once again, we are interested in testing the equality of treatment means, but now we have to remove the variability associated with the nuisance factor (the blocks) Design & Analysis of Experiments 8E 2012 Montgomery

  49. Example 3: ANOVA for the RCBD in R ############## How to code the data??? ######### Tip=c(rep(1,4), rep(2,4), rep(3,4), rep(4,4)); print(Tip) Coupon=rep(1:4, 4); print(Coupon) Hardness=c(9.3,9.4,9.6,10.0,9.4,9.3,9.8,9.9,9.2,9.4,9.5,9.7,9.7,9.6,10.0,10.2); print(Hardness); cbind(Tip, Coupon, Hardness) h.data = data.frame(cbind(Tip, Coupon, Hardness)) ## for more complicated operation ## OR read in the table: h.data<-read.table("http://people.uncw.edu/chenc/STT411/dataset%20backup/Hardness-Testing1.TXT", header=TRUE); Design & Analysis of Experiments 8E 2012 Montgomery

  50. Example 3: ANOVA for the RCBD in R ############## Randomized block design in R ######### h.data<-read.table("http://people.uncw.edu/chenc/STT411/dataset%20backup/Hardness-Testing1.TXT", header=TRUE); anova(lm(h.data[,3]~factor(h.data[,2])+factor(h.data[,1]))); ## or ## anova(lm(h.data$Hardness~factor(h.data$Coupon)+factor(h.data$Tip))); ### the connection with one way anova when the block effect is ignored.... anova(lm(h.data$Hardness~factor(h.data$Tip))); Design & Analysis of Experiments 8E 2012 Montgomery

More Related