Stat 232 Experimental Design Spring 2008 1 Ching-Shui Cheng Office: 419 Evans Hall Phone: 642-9968 Email: cheng@stat.berkeley.edu Office Hours: Tu Th 2:00-3:00 and by appointment 2 Course webpage: http://www.stat.berkeley.edu/~cheng/232.htm 3 No textbook Recommended (for first half of the course): Design of Comparative Exeperiments by R. A. Bailey, to appear in 2008 http://www.maths.qmul.ac.uk/~rab/DOEbook/ Experiments: Planning, Analysis, and Parameter Design Optimization by C. F. J. Wu and M. Hamada Statistics for Experimenters: Design, Innovation and Discovery by Box, Hunter and Hunter A useful software: GenStat 4 Experimental Design Planning of experiments to produce valid information as efficiently as possible 5 Comparative Experiments Treatments (varieties) Varieties of grain, fertilizers, drugs, …. Experimental units (plots): smallest division of the experimental material so that different units can receive different treatments Plots, patients, …. 6 Design: How to assign the treatments to the experimental units Fundamental difficulty: variability among the units; no two units are exactly the same. Each unit can be assigned only one treatment. Different responses may be observed even if the same treatment is assigned to the units. Systematic assignments may lead to bias. 7 R. A. Fisher worked at the Rothamsted Experimental Station in the United Kingdom to evaluate the success of various fertilizer treatments. 8 Fisher found the data from experiments going on for decades to be basically worthless because of poor experimental design. Fertilizer had been applied to a field one year and not in another in order to compare the yield of grain produced in the two years. BUT It may have rained more, or been sunnier, in different years. The seeds used may have differed between years as well. Or fertilizer was applied to one field and not to a nearby field in the same year. BUT The fields might have different soil, water, drainage, and history of previous use. Too many factors affecting the results were “uncontrolled.” 9 Fisher’s solution: Randomization In the same field and same year, apply fertilizer to randomly spaced F F plots within the field. This averages out the effect of F F F FF F F F F F F F F F F F F F F F variation within the field in drainage and soil composition on yield, as well as controlling for weather, etc. F F F F F F F F F F F F F F 10 Randomization prevents any particular treatment from receiving more than its fair share of better units, thereby eliminating potential systematic bias. Some treatments may still get lucky, but if we assign many units to each treatment, then the effects of chance will average out. Replications In addition to guarding against potential systematic biases, randomization also provides a basis for doing statistical inference. (Randomization model) 11 Start with an initial design F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F Randomly permute (labels of) the experimental units Complete randomization: Pick one of the 72! Permutations randomly 12 4 treatments 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 Pick one of the 72! Permutations randomly Completely randomized design 13 blocking A disadvantage of complete randomization is that when variations among the experimental units are large, the treatment comparisons do not have good precision. Blocking is an effective way to reduce experimental error. The experimental units are divided into more homogeneous groups called blocks. Better precision can be achieved by comparing the treatments within blocks. 14 After randomization: Randomized complete block design 15 Wine tasting Four wines are tasted and evaluated by each of eight judges. A unit is one tasting by one judge; judges are blocks. So there are eight blocks and 32 units. Units within each judge are identified by order of tasting. 16 17 Block what you can and randomize what you cannot. 18 Randomization Blocking Replication 19 Incomplete block design 7 treatments 20 Each of ten housewives does four washloads in an experiment to compare five new detergents. 5 treatments and 10 blocks of size 4. 21 Incomplete block design 7 treatments 22 Incomplete block design Balanced incomplete block design Randomize by randomly permuting the block labels and independently permuting the unit labels within each block. 23 Two simple block (unit) structures Nesting block/unit Crossing row * column 24 Two simple block structures Nesting block/unit Crossing row * column Latin square 25 26 Wine tasting 27 Simple block structures Iterated crossing and nesting cover most, though not all block structures encountered in practice Nelder (1965) 28 Consumer testing A consumer organization wishes to compare 8 brands of vacuum cleaner. There is one sample for each brand. Each of four housewives tests two cleaners in her home for a week. To allow for housewife effects, each housewife tests each cleaner and therefore takes part in the trial for 4 weeks. 8 treatments Block structure: 29 Aα Bβ Cγ Dδ Bγ Aδ Dα Cβ Cδ Dγ Aβ Bα Dβ Cα Bδ Aγ Trojan square 30 Treatment structures No structure Treatments vs. control Factorial structure A fertilizer may be a combination of three factors (variables) N (nitrogen), P (Phosphate), K (Potassium) 31 Treatment structure Block structure (unit structure) Design Randomization Analysis 32 Choice of design Efficiency Combinatorial considerations Practical considerations 33 McLeod and Brewster (2004) Technometrics A company was experiencing problems with one of its chrome-plating processes in that when a particular complex-shaped part was being plated, excessive pitting and cracking, as well as poor adhesion and uneven deposition of chrome across the part, were observed. With the goal being the identification of key factors affecting the quality of the process, a screening experiment was planned. In collaboration with the company’s process engineers, six factors were identified for consideration in the experiment. 34 Hard-to-vary treatment factors A: chrome concentration B: Chrome to sulfate ratio C: bath temperature Easy-to-vary treatment factors p: etching current density q: plating current density r: part geometry 35 The responses included the numbers of pits and cracks, in addition to hardness and thickness readings at various locations on the part. Suppose each of the six factors have two levels, then there are 64 treatments. A complete factorial design needs 64 experimental runs 36 Block structure: 4 weeks/4 days/2 runs Treatment structure: A * B * C * p * q * r Each of the six factors has two levels Fractional factorial design 37 Miller (1997) Technometrics Experimental objective: Investigate methods of reducing the wrinkling of clothes being laundered 38 Miller (1997) The experiment is run in 2 blocks and employs 4 washers and 4 driers. Sets of cloth samples are run through the washers and the samples are divided into groups such that each group contains exactly one sample from each washer. Each group of samples is then assigned to one of the driers. Once dried, the extent of wrinkling on each sample is evaluated. 39 Treatment structure: A, B, C, D, E, F: configurations of washers a,b,c,d: configurations of dryers 40 Block structure: 2 blocks/(4 washers*4 dryers) 41 Block 1 0000000000 0000000011 0000001100 0000001111 0110110000 0110110011 0110111100 0110111111 1011010000 1011010011 1011011100 1011011111 1101100000 1101100011 1101101100 1101101111 Block 2 0001110110 0001110101 0001111010 0001111001 0111000110 0111000101 0111001010 0111001001 1010100110 1010100101 1010101010 1010101001 1100010110 1100010101 1100011010 1100011001 42 GenStat code factor [nvalue=32;levels=2] block,A,B,C,D,E,F,a,b,c,d & [levels=4] wash, dryer generate block,wash,dryer blockstructure block/(wash*dryer) treatmentstructure (A+B+C+D+E+F)*(A+B+C+D+E+F) +(a+b+c+d)*(a+b+c+d) +(A+B+C+D+E+F)*(a+b+c+d) 43 matrix [rows=10; columns=5; values=“ b r1 r2 c1 c2" 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0] Mkey 44 Akey [blockfactors=block,wash,dryer; Key=Mkey; rowprimes=!(10(2));colprimes=!(5(2)); colmappings=!(1,2,2,3,3)] Pdesign Arandom [blocks=block/(wash*dryer);seed=12345] PDESIGN ANOVA 45 Outline Introduction; randomization and blocking Some mathematical preliminaries Linear models Block structures; strata, null ANOVA Computation of estimates; ANOVA table Orthogonal designs Non-orthogonal designs Factorial designs Response surface methodology Other topics as time permits 46