0% found this document useful (0 votes)
34 views315 pages

DoE Lecture

Uploaded by

mereninnas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views315 pages

DoE Lecture

Uploaded by

mereninnas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 315

Design and Analysis of Experiments (Stat 2103)

March, 2017
1
1. Introduction

2
Introduction: Why for Experiments?
 Research is systematic investigation to establish facts.
 It is systematic because all the activities are planned and

executed based on rules so everything can be repeated.

 Researchers use experiments to answer questions.

 Is a drug safe, effective cure for a disease?

 Does a new diet perform better wait gain compared with a


standard?

 Can amount of fertilizer used increase yield/production?

 How continuous assessment help students to pass course if


replaced by other method of assessment?
3
Introduction: Definition
 Experiment:
 involve researchers manipulating situations, by applying
treatments, in an effort to draw conclusions about what their
manipulations have caused

 represent a very important technique in the acquisition of


scientific knowledge

 An experiment is the act of conducting a controlled test or


investigation.

 A design mean an arrangement

 Design of experiment means an arrangement of a controlled test.


4
Introduction: Why Design of Experiments?
 MAXIMIZE:
 Probability of having a successful experiment.

 Information gain: the results and conclusions derived depend on


the way information was collected.

 MINIMIZE
 Unwanted effects from other sources of variation.

 Cost of experiment if results are limited.

5
Advantage of Experiments
 Experiments help us answer questions, but there are also non-
experimental techniques (eg. surveys).
 Experiments allow us to set up a direct comparison between

the treatments of interest.

 We can design experiments to minimize any bias in the

comparison.

 We can design experiments so that the error in the comparison

is small.

 allows us to make stronger inferences about the nature of

differences that we see in the experiment.


6
Strategy of Experimentation
 Best guess approach (trial and error)

 can continue indefinitely

 cannot guarantee best solution has been found

 One-factor-at-a-time (OFAT) approach

 inefficient (requires many test runs)

 fails to consider any possible interaction between factors

7
Strategy of Experimentation
 Factorial approach (invented in the 1920’s)

 Factors varied together

 Correct, modern, and most efficient approach

 Can determine how factors interact

 Used extensively in industrial R and D, and for process


improvement.

Remark: All DOE are based on the same statistical


principles and method of analysis - ANOVA and
regression analysis.
8
Strategy of Experimentation
 Consider an engineer is interested to study the performance
of a process or system

 The general approach to


planning and conducting the
experiment is called STRATEGY
OF EXPERIMENTATION

9
A Brief History of Experimental Design
 Four Eras in the History of DOE

 The agricultural origins, 1918 – 1940s

 R. A. Fisher & his co-workers

 Profound impact on agricultural science

 Factorial designs, ANOVA

 The first industrial era, 1951 – late 1970s

 Box & Wilson, response surfaces

 Applications in the chemical & process industries

10
A Brief History of Experimental Design
 The second industrial era, late 1970s – 1990

 Quality improvement initiatives in many companies

 Total Quality Management (TQM) and Continuous quality


improvement (CQI) were important ideas and became
management goals

 Taguchi and robust parameter design, process robustness

 The modern era, beginning circa 1990, when economic


competitiveness and globalization is driving all sectors of the
economy to be more competitive.

11
Some Typical Applications of Experimental Design
 Experimental design is applicable in many disciplines.

 Engineering

 Process characterization & optimization

 Evaluation of material properties

 Product design & development

 Component & system tolerance determination

 Agriculture

 Identifying varieties giving best yield

 Clinical Trial

 Identifying effective and safe drug


12
Some Applications of DoE in Daily Life
 Photography

 Factors: speed of film, lighting, shutter speed

 Response: quality of slides made close up with flash attachment

 Boiling water

 Factors: Pan type, burner size, cover

 Response: Time to boil water

 Basketball

 Factors: Distance from basket, type of shot, location on floor

 Response: Number of shots made (out of 10) with basketball


13
Guidelines for Designing Experiments
i. Recognition of and statement of the problem
 need to develop all ideas about the objectives of the experiment -

get input from everybody - use team approach.

ii. Choice of factors, levels, ranges, and response variables.

 Need to use engineering judgment or prior test results.

iii. Choice of experimental design

 sample size, replicates, run order, randomization, software to

use, design of data collection forms.

14
Guidelines for Designing Experiments
iv. Performing the experiment

 vital to monitor the process carefully. Easy to underestimate

logistical and planning aspects in a complex R and D environment.

v. Statistical analysis of data

 provides objective conclusions - use simple graphics whenever

possible.

v. Conclusion and recommendations

 follow-up test runs and confirmation testing to validate the

conclusions from the experiment.

 Do we need to add or drop factors, change ranges, levels, new

responses, etc.. ??? 15


Using Statistical Techniques in Experimentation
 Use non-statistical knowledge of the problem

 physical laws, background knowledge

 Keep the design and analysis as simple as possible

 Don’t use complex, sophisticated statistical techniques

 If design is good, analysis is relatively straightforward

 If design is bad - even the most complex and elegant statistics

cannot save the situation

 Recognize the difference between practical and statistical


significance
 statistical significance  practically significance
16
Using Statistical Techniques in Experimentation
 Experiments are usually iterative

 unwise to design a comprehensive experiment at the start of the

study

 may need modification of factor levels, factors, responses, etc.. -

too early to know whether experiment would work

 use a sequential or iterative approach

 should not invest more than 25% of resources in the initial

design.

 Use initial design as learning experiences to accomplish the final

objectives of the experiment.


17
Basic Principles

 Statistical design of experiments (DOE)

 the process of planning experiments so that appropriate data can

be analyzed by statistical methods that results in valid, objective,


and meaningful conclusions from the data

 involves two aspects: design and statistical analysis

18
Basic Principles

 Every experiment involves a sequence of activities:

 Conjecture - hypothesis that motivates the experiment

 Experiment - the test performed to investigate the conjecture

 Analysis - the statistical analysis of the data from the experiment

 Conclusion - what has been learned about the original

conjecture from the experiment.

19
Basic Principles

 The three basic principles of experimental design are:- replication,


randomization and blocking.

 Replication: repetition of a basic experiment without


changing any factor settings
 allows an estimate of experimental error

 allows for a more precise estimate of the sample mean value, i.e.

allows the experimenter to obtain more statistical power (ability


to identify small effects)

20
Basic Principles

 Randomization

 cornerstone of all statistical methods

 “average out” effects of extraneous factors

 reduce bias and systematic errors

 Blocking

 increases precision of experiment by breaking the experiment

into homogeneous segments

 “factor out” variable not studied

21
Terms and Concepts
 Factors
 Input variables that can be changed
 fertilizer in agronomy,

 Temperature in a reactor vessel in chemical engineering

 Levels

 Specific values of factors (inputs)

 different kinds or amounts of fertilizer in agronomy,

 different temperatures in a reactor vessel in chemical engineering

22
Terms and Concepts

 Experimental units

 are the things to which we apply the treatments. These

could be
 plots of land receiving fertilizer,

 batches of feedstock processing at different temperatures.

23
Terms and Concepts

 Responses are outcomes that we observe after applying a


treatment to an experimental unit. That is, the response is
what we measure to judge what happened in the experiment;
we often have more than one response.
 Responses for the above examples might be nitrogen content

or biomass of corn plants,

 yield and quality of the product per ton of raw material.

24
Terms and Concepts

 Experimental Error:

 is the random variation present in all experimental results.

 Different experimental units will give different responses to

the same treatment, and it is often true that applying the same
treatment over and over again to the same unit will result in
different responses in different trials.

 Experimental error does not refer to conducting the wrong

experiment or dropping test tubes.

25
Terms and Concepts

 Measurement units (or response units)

 are the actual objects on which the response is measured.

These may differ from the experimental units.

 For example, consider the effect of different fertilizers on the

nitrogen content of corn plants.


 Different field plots are the experimental units, but the
measurement units might be a subset of the corn plants on the
field plot, or a sample of leaves, stalks, and roots from the field
plot.

26
2. Review of Simple Comparative Experiments

27
Introduction

 The tension bond strength of Portland cement mortar is an


important characteristics of the product.

 An engineer is interested in comparing the strength of a


modified formulation in which polymer latex emulsions have
been added during mixing to the strength of the unmodified
mortar.
 Experimenter collected 10 observations on strength for the

modified formulation and 10 on unmodified formulation.

 The data is displayed in the following table (kgf/cm2)


28
Portland Cement Formulation

29
Graphical View of the Data: Dot Diagram

 The strength of the unmodified mortar is greater than the modified


mortar strength (quick impression)
 Is it a real difference? Because of sampling fluctuation?

‡ A technique of statistical inference should be employed?


‡ Hypothesis Testing/significance test
30
Graphical View of the Data…

31
Basic Statistical Concepts
 Each of the observations in the Portland cement experiment
described would be called a run.

 The individual runs differ, there is fluctuation or noise in the


results
 This noise is usually called experimental error or simply

noise

 It is a statistical error; it arises from variation that is

uncontrolled and generally unavoidable

 The presence of error or noise implies that the response,

tension bond strength, is a random variable.


32
Basic Statistical Concepts
 a random variable can be either discrete or continuous.

 If the set of all values of the random variable is either finite or

countably finite then the random variable is discrete.

 If the set of all values of the random variable is an interval

then the random variable is continuous.

 Information from sample data can be summarized by Diagrams and


graphs
 Dot plot

 Box and whisker plot

 Histogram
33
Basic Statistical Concepts

Probability Distribution
 The probability structure of a random variable is described by

its probability distribution

 If a random variable, y, is discrete, often call the probability

distribution of y, p(y), the probability function of y.

 If y is continuous , the probability distribution of y, say f(y), is

often called the probability density function for y.

34
Basic Statistical Concepts

35
Basic Statistical Concepts

Mean
 The mean, µ, of a probability distribution is a measure of its

central tendency or location. Mathematically

Variance
 Measures the variability or dispersion of a probability

distribution.

36
Basic Statistical Concepts

Properties of expectation and variance

 c is a constant and y’s are random variables

37
Basic Statistical Concepts

Sampling and Sampling Distributions


a) Sample mean and sample variance
n

y i
y i 1
n

  yi  y 
2

s2 
n 1
 S: sample standard deviation

 Both are statistics

38
Basic Statistical Concepts
b) Properties of sample mean and sample variance

i) Estimator
 y¯ is an estimator of the population mean µ

 s2 is an estimator of the population variance σ2

 Estimator is a statistic and a random variable

 Estimate is a realization of an estimator

ii) Important properties of good estimators


 Unbiasedness: E(y¯)=µ, E(s2) = σ2

 Minimum variance

39
Basic Statistical Concepts

c) Sampling distributions
i. i. Important distributions
 normal
 χ2
 t
 F
ii. Sampling distributions

40
Inference About the Difference in Means
 Consider the Portland cement
example

 Study how this two

formulations are different

using hypothesis testing

and confidence interval.

41
Hypothesis Testing

 Statistical hypothesis testing is a useful framework for many


experimental situations

 Origins of the methodology date from the early 1900s

 We will use a procedure known as the two-sample t-test

 Interested in comparing the strength of two different


formulations
 An unmodified mortar and modified mortar

 The two formulations are two levels of the factor “formulation”.

42
Hypothesis Testing

 Let y11, y12, …, y1n1 from the first factor level


 y21, y22, …, y2n2 from the second factor level

 Assume the samples are drawn at random from two independent

normal populations

43
Hypothesis Testing
 From Portland cement experiment we may claim that the mean
tension bond strength of two mortar formulations are equal
H 0 : 1  2
H1 : 1  2
 µ1 the mean tension bond strength of the modified mortar

 µ2 the mean tension bond strength of the unmodified mortar


 H0:µ1=µ2 is called null hypothesis

 Ha:µ1≠µ2 is called alternative hypothesis

 To test a hypothesis we devise a procedure for taking random


sample  test statistic
 Establish rejection/critical region.
44
Hypothesis Testing
 Types of errors
 Type I: probability of null hypothesis rejected when it is true

  p Type I error   p  reject H 0 / H 0 is true 

 Type II: probability of null hypothesis not rejected when it is

false
  p Type II error   p  fail to reject H 0 / H 0 is false 

 Sometime it is more convenient to work with power: probability

of rejecting null when it is false.


Power  1    p  reject H 0 / H 0 is false 

 Remark: the value for should be specified priory which called the level
of significance
45
Two Sample T-Test
 Assume the variances of tension bond strengths were
identical for both mortar formulations.

 The appropriate test statistic to use for comparing treatment


means in the completely randomized design is

 Where

46
Two Sample T-Test
 Estimation of parameters
1 n
y   yi estimates the population mean 
n i 1
1 n
S 
2
 i
n  1 i 1
( y  y ) 2
estimates the variance  2

 Use the sample means to draw inferences about the population


means.
 Difference in sample means is : 16.76 -17.92=-1.16
47
Two Sample T-Test
 The pooled estimated standard deviation is:

 The inference is drawn by comparing the difference with


standard deviation of the difference in sample means:
Difference in sample means
────────────────────────────────
Standard deviation of the difference in sample means

48
Two Sample T-Test
 This suggests a statistic:

 t0 is a “distance” measure-how far apart the averages are expressed


in standard deviation units

 Values of t0 that are near zero are consistent with the null
hypothesis

 Values of t0 that are very different from zero are consistent with the

alternative hypothesis
49
Two Sample T-Test
 A value of t0 between –2.101
and 2.101 is consistent with
equality of means, outside of
these supports non equality of
means
 The P-value is the risk of

wrongly rejecting the null


hypothesis of equal means
(it measures rareness of the
We would reject the null hypothesis and
event) conclude that mean tension bond strengths of
the two formulations of Portland cement are
 The null hypothesis Ho: µ1 different
different.
= µ2 would be rejected at
any level of significance a

≥ 0.00000000355. 50
Confidence Intervals
 To define an interval estimate of θ , we need to find two statistics L and U
such that the probability statement is true. The
interval is called a 100(1-α) percent confidence interval for
θ.

 The interpretation of this interval is that if, in repeated random


samplings, a large number of such intervals are constructed, 100(1-α)
percent of them will contain the true value of θ .

 Example: Portland cement

51
Confidence Intervals

52
Confidence Intervals: Example

53
Summary on Mean Test

54
Summary on Mean Test

55
Inference About the variances of Normal Distribution
 In Some experiments it is the comparison of variability in the
data that is important.

 For instance Food and beverage industry,

 It is important that the variability of filling equipment be small

so that all package have close to nominal net weight or volume


content

 In chemical laboratories, we may wish to compare the

variability of two analytical methods

 Unlike the tests on means, the procedures for tests on variances


are rather sensitive to normality assumptions
56
Inference About the variances of Normal Distribution
 Suppose we wish to test the hypothesis that the variance of a
normal population equals a constant

 The test statistic is

57
Inference About the variances of Normal Distribution
 Consider testing the equality of variances of two normal
populations
 Independent random samples of sizes n1 and n2 are taken from population

1 and 2, respectively, the test statistic for

is the ratio of the sample variances

58
Inference About the variances of Normal Distribution
 The upper and lower tails of F-distribution are related as follows

Summary

59
Inference About the variances of Normal Distribution
 Example: A chemical engineer is investigating the inherent
variability of two types of test equipment that can be used to
monitor the output of a production process. He suspects that the
old equipment, type 1, has a larger variance than the new one. A
random samples of n1=12 and n2=10 observations are taken, and
the sample variances are s12  14.5 and s22  10.8 .

 Hypothesis

 Test statistic

60
Inference About the variances of Normal Distribution
 F0.05, 11, 9=3.10, so the null hypothesis can’t be rejected.

 We have found insufficient statistical evidence to conclude that


the variance of the old equipment is greater than the variance of
the new equipment.

 The 100(1-α) confidence interval for the ratio of the population


variance is

61
Inference About the variances of Normal Distribution
 Construct a 95% confidence interval for the ratio of variance
for chemical engineer monitor the output of production process

 Homework:

62
Statistical Inference
 Exercise 1:

63
Statistical Inference
 Exercise 2:

64
Inference About the variances of Normal Distribution
 Exercise 3:

65
3. Completely Randomized Design: Single Factor Analysis
of Variance

66
Introduction
 In section 2, we discussed methods for comparing two
conditions or treatments.

 For example, the Portland cement tension bond experiment

 Involved two different mortar formulations

 This can alternatively be described as a single factor experiment

with two levels of factor:


 Factor: Mortar formulation

 Two levels (treatments): modified mortar and unmodified mortar

 However, many experiments involve more than two levels of a

factor.
67
Introduction
Example

 A product development engineer is interested in investigating the


tensile strength of a new synthetic fiber that will be used to make
cloth for men’s shirts.
 Strength is affected by

 Weight percent of cotton used in the blend of materials for the fiber

 Suspects of increasing content of cotton increases strength

 Cotton content should range between about 10 and 40 percent

 Decided to use specimens at five levels cotton weight percent:15, 20,

25, 30, and 35.

 Five specimens at each level of cotton content used


68
Introduction
 This is an example of a single factor experiment with 5 levels of the
factor and 5 replicates with 25 runs.

 The 25 runs should be made in random order.

 Consider the following numbers assigned (1 to 25)

 Select random number between 1 and 25

 Suppose 8 is withdrawn, hence cotton weight of 20 percent will run

first. etc
69
Introduction
 Suppose the test sequence is as follows

 This is completely randomized


design
 Prevents the effect of unknown
nuisance variables
 Eg. Warm up effect of
machine

70
Introduction
 The engineer has performed the experiment and obtained the
following result

71
Introduction
 From the figure, tensile strength increase as cotton weigh percent
increases up to 25%

 Marked decrease when 35%

 The variability don’t depend on the cotton weight percent


 Suspicions:
1. Cotton content affects tensile
strength
2. Around 30% cotton results in
maximum strength
 Does really difference exist?
a. T-test Type I error increases!!!
b. ANOVA? best

72
Analysis of Variance
 Suppose there is a single factor with a treatments/levels

 The observed response from each of the a treatments is a random


variable

 yij represents the jth observation for ith treatment/factor level

73
Analysis of Variance
Models for the Data

 Let

 yij is the ijth observation,

 µi is the mean of the ith factor level or treatment

  ij is the random error (all other sources of variability)

 Then the model is Means


Model

 An alternative model is

Effects
Model
74
Analysis of Variance
Models for the Data

 Both means model and effects model are linear statistical models.

 The response is a linear function of the model parameters

 The means model (effects model) are also called one way or single
factor analysis of variance model

 The experimental design is a completely randomized design:


experiments performed in random order

 Objective:

 Hypothesis testing of mean

 Estimating means

75
Analysis of Variance
Model Assumptions

 Model errors are assumed to be independently normally

distributed

 Model errors has mean zero and constant variance σ2

 Variance is same for all levels of the factor

 This implies

76
Analysis of Variance
 yi. represent the total of observations in the ith factor

level/treatment

yi. the average of observations under ith factor level/treatment

 y represent the grand total of all observations


..

 y.. Represent the grand average of all observations


n

yi.   yij
n
y
j 1
ij
yi.
j 1
yi.   , i  1, 2, , a.
n n

a n

 y
a n
y..   yij ij
y..
i 1 j 1
i 1 j 1 y..  
N N
77
Analysis of Variance
 The question is are the a treatment means equal?

 The appropriate hypothesis is

 In the effects model

 The over all mean is

78
Analysis of Variance
 The treatment or factor effects are deviations from the
overall mean
 The hypothesis in terms of the treatment effects is

 The appropriate procedure for testing the equality of treat


means is the analysis of variance.

Derived from partitioning of total variability into its components

79
Analysis of Variance
Decomposition of the Total Sum of Squares
 The total corrected sum of square is

 Used for measuring overall variability in the data

 If divided by the degrees of freedom, it results the sample variance

 Total corrected sum of square can be written as

 It is partitioned into two parts

80
Analysis of Variance
Decomposition of the Total Sum of Squares
 Partitioned into

 sum of squares of the difference between the treatment averages and grand

averages

 Sum of squares of the differences of observations within treatments from

treatment average.

 The difference between the observed treatment average and the grand
average is a measure of the difference between treatment means

 The difference of observations within a treatment from the treatment average


can be due only to random error

81
Analysis of Variance
Decomposition of the Total Sum of Squares

 There N=an observations, thus SST has N-1 df

 There are a levels of the factor (treatment means), SSTreatments

has a-1 df

 With in each treatment there are n replicates, providing n-1 df

with which to estimate the experimental error.


 The error df is a(n-1)=N-1.

82
Analysis of Variance
Error sum of square

a sample variances

 Combining all variances give

 Single estimate of common


population variance

83
Analysis of Variance
 If there were no differences between the a treatments means, the
variation of the treatment averages from the grand average estimates
σ2

 The expected mean square of error is

 The expected mean square of treatment is

 If no difference between treatments, then we expect

84
Analysis of Variance
Statistical Analysis

 Reject the null hypothesis if

85
Analysis of Variance
Statistical Analysis (Example)

The tensile strength experiment

 Test whether the mean tensile strength is not equal at the five
different cotton weight percentage

86
Analysis of Variance
Statistical Analysis (Example):The tensile strength experiment

87
Analysis of Variance
Statistical Analysis (Example):The tensile strength experiment

88
Analysis of Variance
Estimation of the model parameters

 The single factor model is

 The overall mean is estimated by the grand average of the

observations, i.e.

 The effect of any treatment is estimated by the difference of the

treatment average and the grand average, i.e.

 The mean of the ith treatment is estimated as

89
Analysis of Variance
Estimation of the model parameters
 If the errors are normally distributed, then yi. NID  i. ,  2 n 

 The normal distribution is used to estimate confidence interval for µi.

 MSE is used as an estimator of σ2

and

90
Analysis of Variance
Estimation of the model parameters (Example)
 Consider the tensile strength data (at the beginning of section 3)

 Estimate the overall mean? treatment effects?

91
Analysis of Variance
Estimation of the model parameters (Example)
 The estimate of the overall mean is

 The estimate of the treatment effects is

 The 95% CI on the mean of treatment 4 (30 percent cotton) is

92
Analysis of Variance

93
Analysis of Variance
Unbalanced Data
 Advantage of choosing balanced design

 The test statistic is relatively insensitive to small departures

from the assumption of equal variances

 The power of the test is maximized

94
Analysis of Variance: Model Adequacy Checking
Model Adequacy Checking

 Assumptions are

 Observations are adequately described by the model

 The errors are

 Independent

 Normally distributed
 Mean zero and constant variance σ2

 If these assumptions are meet, analysis of variance procedure is an


exact test of the hypothesis of no difference in treatment means.
95
Analysis of Variance: Model Adequacy Checking
Model Adequacy Checking

 Residuals: for observation j in treatment i is:

 If the model is adequate the residuals should be structureless;


residuals should contain no obvious pattern

96
Analysis of Variance: Model Adequacy Checking
Non-constant variance

 Since there is generally no ordering to the levels of the predictor


variable, it doesn’t make sense to look for a “megaphone”.

 Rather, simply look for large differences in vertical spreads.

 If sample sizes differ greatly between factor levels, use


studentized residuals.

 If residual plots indicate potential problems, can use statistical


tests to check.

97
Analysis of Variance: Model Adequacy Checking
Non-constant variance

 Hartley test: also known as the Fmax test or Hartley's Fmax

 simpler test, but requires equal sample sizes and is quite

sensitive to departures from normality.

 The test involves computing the ratio of the largest group

variance, max(sj2) to the smallest group variance, min(sj2).

 The resulting ratio, Fmax, is then compared to a critical value

from a table of the sampling distribution of Fmax.

 If the computed ratio is less than the critical value, the groups are

assumed to have similar or equal variances


98
Analysis of Variance: Model Adequacy Checking
Bartlett’s test:

 Bartlett’s Test is the uniformly most powerful (UMP) test for the

homogeneity of variances problem under the assumption that each


treatment population is normally distributed.

 Bartlett’s Test has serious weaknesses if the normality assumption is not

met.
 The test’s reliability is sensitive (not robust) to non-normality.

 If the treatment populations are not approximately normal, the true significance level
can be very different from the nominal significance level
99
Analysis of Variance: Model Adequacy Checking
Non-constant variance
 Levene’s test

 Levene’s Test is robust because the true significance level is


very close to the nominal significance level for a large variety of
distributions.

 It is not sensitive to symmetric heavy-tailed distributions

100
Analysis of Variance: Model Adequacy Checking
Non-constant variance
 Brown-Forsythe test

101
Analysis of Variance: Model Adequacy Checking
Non-constant variance
 Easiest remedial measure is usually a transformation (can help both
non-constant variance and non-normality)
 If variance proportional to μi then try Y (sometimes occurs if Y
is a count)
 Plot of

 If standard deviation proportional to μi , try log transformation.

 Plot of
1
 If standard deviation proportional to 
2
i , try Y
 Plot of
102
Analysis of Variance:Model Adequacy Checking
The Normality Assumption

 If unequal variances, then often nonnormality will be falsely


indicated by using regular residuals; should transform first and
then recheck.

 Normality is the least important assumption; almost all of


ANOVA procedures robust to minor departures from normality

103
Analysis of Variance: Model Adequacy Checking
The Normality Assumption

 Can be made by plotting a histogram

 Should look like a sample from normal centered at zero

 Draw Box plot of residuals

 Displays the symmetry of residuals and possible outliers

 Construct a normal probability plot of residuals

 Plot residual versus expected residuals under normality

 Points on the plot will form a line:-consider central values than


the extremes

 Kolmogorove-Smirnov and Shapiro Wilk test


104
Analysis of Variance:Model Adequacy Checking
The Independence Assumption

 If data obtained in time sequence, plot residuals against time

 If pattern, then may have non-independence.

 Positive Serial Correlation (adjacent residuals tend to have the


same sign)

 Negative Serial Correlation (adjacent residuals tend to have


opposite signs)

105
Analysis of Variance:Model Adequacy Checking
The Independence Assumption

 Durbin-Watson Test

 The Hypotheses for the Durbin Watson test are:

 H0 : no first order autocorrelation.

 H : first order correlation exists.

 Assumptions are:
 That the errors are normally distributed with a mean of 0.

 The errors are stationary.

106
Analysis of Variance: Interpretation of Results
Comparison Among Treatment Means

 If H0 is rejected, then we know there is difference at least


between means.

 Comparison between treatment means are made in terms of


treatment total or treatment average

 The procedure for making these comparisons are usually called


multiple comparison methods.

 Graphical comparisons can be used

107
Analysis of Variance: Interpretation of Results
Contrasts

 It is mathematical jargon for a linear combination of terms (a


polynomial) whose coefficients sum to zero

 For a One-way ANOVA, a contrast is a specific comparison of


Treatment group means.

 Contrast constants are composed to test a specific hypothesis


related to Treatment means based upon some prior information
about the Treatment groups.

108
Analysis of Variance: Interpretation of Results
Contrasts

 Consider the synthetic fiber testing example

109
Analysis of Variance: Interpretation of Results
Contrasts

 We might suspect, weight percentage of cotton at 30 and 35 is


same.

 Then the hypothesis can be stated as

or equivalently

110
Analysis of Variance: Interpretation of Results
Contrasts

 Also, the average of the lowest weight cotton percentage (1 and


2) didn’t differ from the average of highest levels of cotton
weight percentage (4 and 5)

111
Analysis of Variance: Interpretation of Results
Contrasts

 In general contrast is a linear combination of parameters of the


form a
L   ci i
i 1

Where the contrast constants sum to 0. that is;

 The hypothesis will be:

112
Analysis of Variance: Interpretation of Results
Contrasts

 Testing hypothesis using contrasts can be conducted in two


ways
 Write the contrast of interest in terms of treatment totals

 The variance of C is

when the sample sizes are equal.

113
Analysis of Variance: Interpretation of Results
Contrasts (equal sample size)

 If the null hypothesis is true, then


a

c y ι i.
i=1
N  0,1
a
nσ 2  ci2
i=1

 Since σ is unknown estimate by MSE,

a
 cy
i i.
t0  i = 1 t , N  a
a 2 2
nMS  c
E i
i=1

114
Analysis of Variance: Interpretation of Results
Contrasts (equal sample size)

 Squaring the above gives an F distributed random variable


2
 a   a 
2

  cy    c y 
 i i.  i i.
F0   t0 
2
 i  1  i  1 
  F ,1, N  a
 a 2  a 2
 nMS E  ci  nMS  c
E i
 i 1  i  1

SSC
 Alternatively MSC 1
F0  
MS E SS E
N a

Where

115
Analysis of Variance: Interpretation of Results
Contrasts (unequal sample size)

 When the sample sizes in each treatment are different the


contrast is

 The t statistics is

 Alternatively
SSC
MSC 1
F0  
MS E SS E
N a
Where

116
Analysis of Variance: Interpretation of Results
Orthogonal Contrasts
 Two contrasts are orthogonal if the pairwise products of the terms
sum to zero.

 The formal definition is that two contrasts c1 , c2 , , caand


d1 , d2 , , da are orthogonal if:
 balanced data and

 unbalanced data

 For a treatment the set of a-1orthogonal contrasts partition the sum of


squares due to treatments into a-1 independent single degree of
freedom components. 117
Analysis of Variance: Interpretation of Results
Orthogonal Contrasts (Example)
 Consider the tensile strength experiment

 Suppose prior running the experiment the following comparison


is specified

118
Analysis of Variance: Interpretation of Results
Orthogonal Contrasts (Example)
 The contrasts from the hypothesis (planned)

 a 
  i i. 
c y
 The contrast sum of squares are computed as  i 1 
a
n ci2
i 1

119
Analysis of Variance: Interpretation of Results
Orthogonal Contrasts (Example)

120
Analysis of Variance: Interpretation of Results
Orthogonal Contrasts (Class Activity)
Results (mg shoot dry weight) of an experiment (CRD) to determine
the effect of seed treatment by  acids on the early growth of rice
seedlings.
Treatment Replications Total Mean
Control 4.23 4.38 4.10 3.99 4.25 20.95 4.19
HCl 3.85 3.78 3.91 3.94 3.86 19.34 3.87
Propionic 3.75 3.65 3.82 3.69 3.73 18.64 3.73
Butyric 3.66 3.67 3.62 3.54 3.71 18.20 3.64

The treatment structure of this experiment suggests that the investigator had several specific questions in mind from the
beginning: Hint:
1) Do acid treatments affect seedling growth?  HCL, Propanic and Butyric
2) Is the effect of =organic acids different from that of inorganic acids? are all acids
3) Is there a difference in the effects of the two different organic acids?  HCL is inorganic and
Conduct an orthogonal contrast test? Butyric&propanic are organic
121
Analysis of Variance: Interpretation of Results
Scheffe’s Method for Comparing all Contrasts
In many exploratory experiments, comparisions of interest are
discovered after some preliminary examination of data

 Suppose a set of m contrasts in the treatment means of interest is

Lu  c1u 1  c2u 2    cau a , u  1, 2,, m


 The corresponding contrast in the estimated treatment averages
is
Lu  c1u y1  c2u y2    cau ya , u  1, 2,, m

122
Analysis of Variance: Interpretation of Results
Scheffe’s Method for Comparing all Contrasts
 The standard error of this contrast is

a
 ciu2 
SCU  MS E   
i 1 
ni 

 Where

ni is the number of observations in the ith treatment

123
Analysis of Variance: Interpretation of Results
Scheffe’s Method for Comparing all Contrasts
 The critical value against which Cu compared is

Sa ,u  SCU a 1 F , a1, N a


 If |Cu|>Sα,U the hypothesis that the contrast LU equals zero is
rejected

 Example: Consider the tensile strength Experiment

L1=µ1 + µ3 - µ4 - µ5

and

L2=µ1 - µ4
124
Analysis of Variance: Interpretation of Results
Scheffe’s Method for Comparing all Contrasts (example)
Contrast estimated value

with standard error

For 2nd contrast

With standard error

125
Analysis of Variance: Interpretation of Results
Scheffe’s Method for Comparing all Contrasts (example)
The critical values are

The means strength of treatment 1 and 3 is not different from the


mean strength of treatmen 4 and 5.

The mean stremngths of treatment 1 and 4 are significnatly


different.
126
Analysis of Variance: Comparing Pairs of Treatment Means
Tukey Test
 Suppose we are interested to test all pairwise a treatment means

 Over all significance level is α when equal sized and atmost α


unequal sized.

 Uses the distribution of studentised range statistic

Wehere
ymax maximum sample mean ymin minimum sample means

127
Analysis of Variance: Comparing Pairs of Treatment Means
Tukey Test
 Test statistic for equal sample size is

f is the error degrees


of freedom

 Test statistic for unequal sample size

 Reject H0 when
ymax  ymin  T

128
Analysis of Variance: Comparing Pairs of Treatment Means
Tukey Test (Example-cotton weight percentage experiment)
 Test statistic value is (5 treatments and 25 observations)

 The five treatment averages are

 Any pair of treatment difference averages that differ in absolute


value by more than 5.37 would imply that the corresponding
pair of population means are significantly different.

129
Analysis of Variance: Comparing Pairs of Treatment Means
Tukey Test (Example-cotton weight percentage experiment)
 The differences in pairs of averages

*indicates pairs of treatments which are significantly different.


130
Analysis of Variance: Comparing Pairs of Treatment Means
Fisher Least Significant Difference(LSD)
 It uses the F statistic for testing

 The least significant difference is

 Significant difference exists if

yi.  y j .  LSD

131
Analysis of Variance: Comparing Pairs of Treatment Means
LSD(Example-cotton weight percentage experiment)
 Test statistic value is (5 treatments and 25 observations)

 The five treatment averages are

 Any pair of treatment difference averages that differ in absolute


value by more than 3.75 would imply that the corresponding
pair of population means are significantly different.

132
Analysis of Variance: Comparing Pairs of Treatment Means
LSD(Example-cotton weight percentage experiment)
 The differences in pairs of averages

*indicates pairs of treatments which are significantly different.


133
Analysis of Variance: Comparing Pairs of Treatment Means
Duncan's Multiple Range Test
 Arrange the averages(mean) in ascending order and compute the
standard error as follows:

 Equal sample size

 Unequal sample size


MS E
S yi . 
nh

134
Analysis of Variance: Comparing Pairs of Treatment Means
Duncan's Multiple Range Test
 From duncans table of significan't ranges obtain

for p=2, 3, , . . ., a

 Convert these ranges into a set of a-1 least significant ranges

 Start comparing largest with smalles and compare with

 Largest and second smalles and compare with

 Continue until all means have been compared with largest mean

 The second largest and smalles and compare with


135
Analysis of Variance: Comparing Pairs of Treatment Means
Duncan’s Multiple Range Test (Example-cotton weight
percentage experiment)

Recall that

Ranking the treatment averages in ascending order

The standard error of each average is

136
Analysis of Variance: Comparing Pairs of Treatment Means
Duncan’s Multiple Range Test (Example-cotton weight
percentage experiment)
Significant ranges with α=0.05, f=20 (error degrees of freedom)

The least significant ranges are

137
Analysis of Variance: Comparing Pairs of Treatment Means
Duncan’s Multiple Range Test (Example-cotton weight
percentage experiment)
The comparisions are

When the least


significant range is
smaller than the
difference then
reject the null

138
Analysis of Variance: Comparing Treatment Means with
Control
Dunnett's Test

 When a control is compared with other a-1 treatments

 There are only a-1 comparisions to be made

 Suppose thattreatment a is a control, wish to test the hypothesis

for i=1, 2, . . ., a-1

The null ypothesis is rejected if

139
Analysis of Variance: Comparing Pairs of Treatment Means
Dunnett’s Test(Example-cotton weight percentage experiment)
Consider the 5th treatment is control, a=5, f=20, and ni=5

At 5% level of significance

The critical difference is

Any treatment mean that differes from the control by more than
4.76 would be declared significantly different

140
Analysis of Variance: Comparing Pairs of Treatment Means
Dunnett’s Test(remark)
When comparing control with treatments, use more observations
in control than treatments.

Choose the ratio to be approximately equal to square root of


number of treatments

na
 a
n

141
Analysis of Variance: More About Single Factor Experiments
Choice of sample size: Operating Characteristic curves
 Choice of sample size is closely related to the probability of type II
error  .

 Hypotheses H o : 1  2
H1: 1  2
 Power = 1   = P(Reject HoHo is false)

= P(Fo > F,a-1,N-a Ho is false)

 The probability of type II error depends on the true difference in


means d  1  2
142
Analysis of Variance: More About Single Factor Experiments
Choice of sample size: Operating Characteristic curves
 Operating characteristic curves plot  against a parameter F
where
a
n  i
2

F 
2 i 1
a 2

 F is related to d. It depends on  and degrees of freedom for


numerator (a-1) and denominator (N-a).

 2 can be estimated through prior experience/ previous


experiment/preliminary test/judgment, or assuming a range of
likely values of 2.
143
Analysis of Variance: More About Single Factor Experiments
Choice of sample size: Operating Characteristic curves
 ith treatment effect  i  i  
1 a
where    i
a i 1
 Assumed i’s can be used for which we would like to reject the
null hypothesis with high probability

 Example (tensile strength) If the experimenter is interested in

rejecting the null hypothesis with a probability of at least 0.90 and


experimenter planned  = 0.01, if the five treatment means are
1  11 2  12 3  15 4  18 5  19
144
Analysis of Variance: More About Single Factor Experiments
Choice of sample size: Operating Characteristic curves

 a = 5, N = an = 5n, a – 1 = 4, N – a = 5(n-1)

  i 1  50 is calculated using assumed i’s


5
i
2

  is assumed no larger than 3


n i 1 i2
5
n(50)
F2    1.11n
a 2 2
5(3 )
 We use the operating characteristic curve for a-1=5-1=4, with
a(n-1)=5(n-1) error degrees of freedom and =0.01

145
Analysis of Variance: More About Single Factor Experiments
Choice of sample size: Operating Characteristic curves

146
Analysis of Variance: More About Single Factor Experiments
Choice of sample size: Operating Characteristic curves
 The objective is to find   to see if the power is satisfied

 It needs v2 (or n) to determine the particular curve, and a value of


F to determine 

147
Analysis of Variance: More About Single Factor Experiments
Choice of sample size: Operating Characteristic curves
 It is often difficult to select a set of treatment means for choosing
the sample size

 A very common way to use these charts is to define a difference in


two means D of interest, then the minimum value of F2 is
2
nD
F2 
2a 2

 Typically work in term of the ratio of D/ and try values of n until
the desired power is achieved

148
Analysis of Variance: More About Single Factor Experiments
Choice of sample size: Specifying a Standard Deviation Increase
 If the treatment means don’t differ, the standard deviation of an
observation chosen is 

 If the treatment means are different, the standard deviation of a


randomly chosen observation is
 a 2 
    i / a 
2

 i 1 
 As the difference between means increase, the standard deviation
increases
 a

   2    i2 / a 
 i 1 
149
Analysis of Variance: More About Single Factor Experiments
Choice of sample size: Specifying a Standard Deviation Increase

 Choose a percentage P for the increase in  of an observation


beyond which the null hypothesis is rejected, equivalently

 a 2 
    i / a 
2

 i 1 
 1  P / 100

 Rearrange it
a

 i /a
 2

i 1
 1  P / 1002  1

150
Analysis of Variance: More About Single Factor Experiments
Choice of sample size: Specifying a Standard Deviation Increase

 There fore F can be expressed as


a

 i /a
 2

F i 1
 1  P / 100
2
 1( n )
/ n
 We can use operating characteristics curve to determine n.

 Example: tensile strength

 Suppose 20 percent increase in standard deviation with probability

at least 0.90 and =0.05

 Reference to operating characteristics curve needs n=9


151
Analysis of Variance: More About Single Factor Experiments
Choice of sample size: Confidence Interval
 When an experimenter wishes to disseminate the last result in an
interval

 The experimenter specifies how wide the confidence interval to be

 Suppose that in the tensile strength experiment, a 95% confidence


interval on difference in mean tensile strength for any two cotton
weight percentage to be with in 5 psi and a prior estimate for  is 3
 Then the accuracy of the confidence interval is

2MS E
 t / 2, N  a
n
152
Analysis of Variance: More About Single Factor Experiments
Choice of sample size: Confidence Interval

 No OC curves are needed. Need  and N (an) to determine


t/2,N-a, and  to estimate MSE
 (prior) estimate 2 (32 =9)

 n=3

 n=4

 n=5

 n=4 is the smallest sample size that leads to the desired


accuracy
153
Analysis of Variance: More About Single Factor Experiments
Least square estimation of model parameters
 The single factor model is:

 Using the method of least squares (determine the sum of squares


of the error)

 The appropriate solutions are

154
Analysis of Variance: More About Single Factor Experiments
Least square estimation of model parameters
 The derivative yields and

 Simplifying

 Constraining

 Solution to the normal equation is

155
Analysis of Variance: More About Single Factor Experiments
Repeated measures

 Instead of having one score per subject, experiments are frequently


conducted in which multiple score are gathered for each case.

Measuring performance on the same variable over time


 performance during training or before and after a specific treatment

The same subject is measured multiple times under different conditions


 performance when taking Drug A, Drug B

The same subjects provide measures/ratings on different characteristics


 desirability of red cars, green cars and blue cars

156
Analysis of Variance: More About Single Factor Experiments
Repeated measures

In repeated measure ANOVA, there are three potential sources of


variability:
 Treatment variability: between columns,

 Within subjects variability: between rows, and

 Random variability: residual (chance factor or experimental error

beyond the control of a investigator).

A repeated measure design is powerful, as it controls for all


potential sources of variability.
157
Analysis of Variance: More About Single Factor Experiments
Repeated measures (Sum of square decomposition)

158
Analysis of Variance: More About Single Factor Experiments
Repeated measures (layout)
Condition/Treatment
Subject Cond 1 Cond 2 … Cond k Total Mean
1 Y11 Y12 … Y1k Y1. Y1./k
2 Y21 Y22 … Y2k Y1. Y2./k
… … … … … … …
n Y21 Y22 … Y2k Yn. Yn./k
Total Y.1 Y.2 Y.2 Y..
Mean Y.1/n Y.2/n … Y.k/n Y../N

159
Analysis of Variance: More About Single Factor Experiments
Repeated measures (Sum of square decomposition)

160
Analysis of Variance: More About Single Factor Experiments
Repeated measures (Sum of square decomposition)
SST   Yij Y .. 
2

SS Condition  SSTreatment   Y. j Y ..    nY. j Y .. 


2 2

SS subject   Yi. Y ..   k  Yi. Y .. 


2 2

161
Analysis of Variance: More About Single Factor Experiments
Repeated measures (Example)

Five subjects, all are tested for reaction time after taking each of
the four drugs, over a period of four days. The following result is
obtained
Person Drug 1 Drug 2 Drug 3 Drug 4 Totali Mean
(Ci )
1 30 28 16 34 108 27
2 14 18 10 22 64 16
3 24 20 18 30 92 23
4 38 34 20 44 136 34
5 26 28 14 30 98 24.5
Total 132 128 78 160 498
(Rj)
Mean 26.4 25.6 15.6 32 24.9 24.9 162
Analysis of Variance: More About Single Factor Experiments
Repeated measures (Example)

Person Drug 1 Drug 2 Drug 3 Drug 4 Totali Mean


(Ci )
1 30 28 16 34 108 27
2 14 18 10 22 64 16
3 24 20 18 30 92 23
4 38 34 20 44 136 34
5 26 28 14 30 98 24.5
Total 132 128 78 160 498
(Rj)
Mean 26.4 25.6 15.6 32 24.9 24.9

Between Treatments Between Subjects Effects

Within Subjects

163
Analysis of Variance: More About Single Factor Experiments
Repeated measures (Example)
Source SS df MS F p
SSPeople/subject 680.80 4 170.20
SSDrug/Condition 698.20 3 232.73 24.759 0.000020
SSError 112.80 12 9.40
SST 1491.80 19 78.52

 This means we can reject the null hypothesis .

 There was a statistically significant effect of Drug on reaction

time, F(0.05, 3, 12) = 24.759, p = 0.000020.

164
4. Blocking

165
Introduction
Blocking

 A block is a group of homogeneous experimental units

 Maximize the variation among blocks in order to minimize the

variation within blocks

Reasons for blocking

 To remove block to block variation from the experimental error

(increase precision)

 Treatment comparisons are more uniform

 Increase the information by allowing the researcher to sample a

wider range of conditions


166
Randomized Block Design
A nuisance factor is a factor that has some effect on the

response, but is of no interest to the experimenter; however, the

variability it transmits to the response needs to be minimized or

explained.

Blocking is a technique for dealing with nuisance factors.

If the nuisance variable is known and controllable, we

use blocking and control it by including a blocking factor in our

experiment. 167
Randomized Block Design
If you have a nuisance factor that is known but uncontrollable,

sometimes we can use analysis of covariance to measure and

remove the effect of the nuisance factor from the analysis.

Many times there are nuisance factors that

are unknown and uncontrollable (sometimes called a “lurking”

variable), use randomization to balance out their impact.

Randomization is our insurance against a systematic bias due to a

nuisance factor. 168


Randomized Block Design
Criteria for blocking

Proximity or known patterns of variation in the field


 gradients due to fertility, soil type

 animals (experimental units) in a pen (block)

Time
 planting, harvesting

Management of experimental tasks


 individuals collecting data

 runs in the laboratory


169
Randomized Block Design
Criteria for blocking

Physical characteristics
 height, maturity

Natural groupings
 branches (experimental units) on a tree (block)

170
Randomized Block Design
Demonstration (The Hardness Testing Example The Hardness
Testing Example)
 We wish to determine whether 4 different tips produce different (mean)

hardness reading on a Rockwell hardness tester

 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

171
Randomized Block Design
Demonstration (The Hardness Testing Example 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

172
Randomized Block Design
Demonstration (The Hardness Testing Example The Hardness
Testing Example)
 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

173
Randomized Block Design
Demonstration (The Hardness Testing Example The Hardness Testing Example)
Suppose that we use b = 4 blocks:

Notice the two-way structure of the experiment

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)

174
Randomized Complete Block Design

Let yij be the response for the ith treatment in the jth block.

The standard model for an RCBD has a grand mean, a treatment


effect, a block effect, and experimental error

yij = µ + αi + βj + εij

This standard model says that treatments and blocks are additive,

 treatments have the same effect in every block and blocks only serve to

shift the mean response up or down.

 a where i  (1/ b) j 1 (    i   j )    i


b
H 0 : 1  2 

175
Randomized Complete Block Design
The quantities are

176
Randomized Complete Block Design (Sum of Squares)
ANOVA Partitioning of Total Sum of Squares
a b a b

 ij ..   [( yi.  y.. )  ( y. j  y.. )


( y  y
i 1 j 1
) 2

i 1 j 1

( yij  yi.  y. j  y.. )]2


a b
 b ( yi.  y.. ) 2  a  ( y. j  y.. ) 2
i 1 j 1
a b
  ( yij  yi.  y. j  y.. ) 2
i 1 j 1

SST  SSTreatments  SS Blocks  SS E

177
Randomized Complete Block Design (Sum of Squares)
ANOVA Partitioning of Total Sum of Squares

178
Randomized Complete Block Design (Sum of Squares)
ANOVA Table

179
Randomized Complete Block Design (Example)
 A hardness testing machine operates by pressing a tip into a metal test
“coupon.” The hardness of the coupon can be determined from the depth
of the resulting depression. Four tip types are being tested to see if they
produce significantly different readings. However, the coupons might
differ slightly in their hardness (for example, if they are taken from
ingots produced in different heats).

180
Randomized Complete Block Design (Example)
 Coupon (Block)
Type of Tip 1 2 3 4 yi. yi.
2

1 9.3 9.4 9.6 10 38.3 1466.89


2 9.4 9.3 9.8 9.9 38.4 1474.56
3 9.2 9.4 9.5 9.7 37.8 1428.84
4 9.7 9.6 10 10.2 39.5 1560.25
y.j 37.6 37.7 38.9 39.8 y..=154 ∑yi.2 = 5930.54

y.j2 1413.76 1421.29 1513.21 1584.04 ∑y.j2 = 1483.075

181
Randomized Complete Block Design (Example)
Source SS df MS F P-Value
Treatment
0.385 3 0.1283 14.4375 0.0009
(Tip)
Coupon
0.825 3 0.2750 30.9375
(block)
Error 0.08 9 0.0089
Total 1.29 15
The hypothesis

 H0: All tips give the same mean reading

 Ha : At least two tips give different mean readings.

Decision: Reject , the mean measurement hardness from the four tips is not

same
182
Randomized Complete Block Design (Example)
 Hardness as Completely randomized design

Source SS df MS F
Treatment (Tip) 0.385 3 0.1283 1.70
Error 0.905 12 0.0754
Total 1.29 15

Compare CRD and RCBD? Which reduces noise?

183
RCBD or CRD?
Which is better, a RCBD or a CRD?

Can check using “Relative Efficiency” which compares the variance


of the estimate of the ith treatment mean

under the two different experiment designs:

 Efficiency is calculated as the number of observations that would be

required if the experiment had been conducted as a CRD without any


blocking.

184
RCBD or CRD?
If the blocking was not helpful, then the relative efficiency
equals 1.

The larger the relative efficiency is, the more efficient the
blocking was at reducing the error variance.
n
The value can be interpreted as the ratio
b
 where n is the number of experimental units that would have to be

assigned to each treatment if a CRD had been performed instead of a


RCBD.

185
RCBD or CRD?
Example (Hardness test)

0.0754
RE RCBD , CRD    8.47
0.0089

This implies that it would have taken more than 8.47 times as many
experimental units/treatment to get the same MSE as we got using the
coupon as blocks.

We would have needed approximately 34 (≈ 8.47*4) coupons per


treatment in a CRD experiment testing the four types of tips.

186
Multiple Comparison RCBD
When a significant result is found, determine where the difference
lies

Multiple comparison discussed in chapter 3 works

Minor modification

 Replace number of replicates (n) in CRD by number of blocks (b)

 Replace error degrees of freedom (a(n-1) ) in CRD by (a-1)(b-1) in

RCBD.

 Refer: Scheffe, Tukey, LSD, Duncan, Bonferroni

187
Latin Square Design
 Latin square designs are used to simultaneously control (or
eliminate) two sources of nuisance variability.

 It is a design in which each treatment occurs once and only once


in each row and column

 The number of rows, columns and treatments are equal

 The total number of observations is pxp


 Example: Machines are to be tested to see whether they differ
significantly in their ability to produce a manufactured part.

 Different operators and different time periods in the work

day are known to have an effect on production.


188
Latin Square Design
 Examples of Latin square design

189
Latin Square Design (ANOVA Table)

190
Latin Square Design (Example)
 Five different formulations of a rocket propellant

 Five different materials, and five operators

 Two nuisance factors

 This is a 5x5 Latin square design

191
Latin Square Design (Example)
 Coding (by subtracting 25 from each observation)

192
Latin Square Design (Example)
 The sum of squares for the total, Batches (rows), (Operators)
columns are computed as follows

193
Latin Square Design (Example)

194
Latin Square Design (Example)

 Analysis of variance for the rocket propellant

 There is a significant difference in the means of formulations

195
Graeco-Latin Square Design
 There is a single factor of primary interest, typically called the
treatment factor, and several nuisance factors.

 For Latin square designs there are 2 nuisance factors, for Graeco-
Latin square designs there are 3 nuisance factors

 a Graeco-Latin square design is a pxp tabular grid in which p is the


number of levels of the treatment factor.
 However, it uses 3 blocking variables instead of the 2 used by the

Latin square design.

196
Graeco-Latin Square Design
 A 4x4 Graeco-Latin square design

197
Graeco-Latin Square Design
 ANOVA table for Graeco-Latin square design

198
Graeco-Latin Square Design
 A 4x4 Graeco-Latin square design

199
Graeco-Latin Square Design (Example)
 Five different formulations of a rocket propellant

 Five different materials, five operators, and five different test


assemblies

 The following 5x5 Graeco-Latin Square s found

200
Graeco-Latin Square Design (Example)
 The sum of squares for the total, Batches (rows), (Operators)
columns are computed as follows

201
Graeco-Latin Square Design (Example)

202
Graeco-Latin Square Design (Example)

203
Graeco-Latin Square Design (Example)
 The ANOVA table

204
Balanced Incomplete Block Design (BIBD)
 A BIBD is a design in which

 There are a treatments

 There are b blocks

 There are k (k<a) experimental units in each block, k is block size

 Each treatment occurs in the same number (r times)

 Each treatments occur together in the same block the same number

of times, λ (each pair of treatments occur together in λ blocks).

 Each block, k different treatments are randomly assigned to the

experimental units
205
Balanced Incomplete Block Design (BIBD)
 N = a(r) = b(k), total number of subjects

 λ must be an integer

 Certain combination of a, r, k, b, and λ are possible

 Consider the following examples


 Each pair of treatments occurs λ=2 times Treatment Block(b=4)
(a=4) 1 2 3 4
 In each block there are k=3 experimental units
1 1 1 0 1
 Each treatment occurs r=3 times 2 0 1 1 1
3 1 1 1 0
4 1 0 1 1

206
Balanced Incomplete Block Design (BIBD)
 Consider the following examples
Treatment Block(b=4)
 Each pair of treatments occurs λ times? (a=4) 1 2 3 4
 In each block there are k experimental units? 1 1 0 1 0
2 0 1 0 1
 Each treatment occurs r times?
3 1 0 1 0
4 0 1 0 1
 Is it BIBD?

207
Balanced Incomplete Block Design (BIBD)

208
Balanced Incomplete Block Design (BIBD)

209
Balanced Incomplete Block Design (BIBD)
 The adjusted treatment sum of square is

210
Balanced Incomplete Block Design (BIBD)
 The adjusted treatment sum of square is

211
Balanced Incomplete Block Design (Example)
 Suppose a chemical engineer thinks that the time of reaction for a
chemical process is a function of the type of catalyst employed. Four
catalysts are being investigated. Variation in the batches of raw
material may affect the performance of the catalysts, the engineer
decides the use batches of raw material as a block. However each
batch is only large enough to permit three catalyst to be run.

212
Balanced Incomplete Block Design (Example)
 There are
a=4, b=4, k=3, r=3, λ=2, and N=12

213
Balanced Incomplete Block Design (Example)
 The adjusted treatment totals are

214
Balanced Incomplete Block Design (Example)
 The Analysis of variance table

215
5. Factorial Design

216
Basic Definition and Principles
 Two factors A and B are said to be crossed if every level of A
occurs with every level of factor B, and vice versa.

 The various combinations of the level of factors (i.e treatments)


are some times called treatment combinations

 Let factor A have two levels(L,H) and factor B has two levels
(L, H)
 When the factors crossed the treatment combinations would be

as follows:

 Treatment 1 2 3 4

LL LH HL HH
217
Basic Definition and Principles
 A factorial experiment allows investigation into the effect of two
or more factors on the mean value of a response.

 Various combinations of factor ‘levels’ can be examined.

 The effect of a factor is defined to be a change in response


produced by a change in the level of the factor
 This is also called main effect- primary interest

 The different categories within each factor are called levels

 Denote different factors by upper case letters (A, B, C, etc) and


different levels by lower case letters with subscripts
218
Two factor design without interaction
 Let two factors ( A and B) having two levels each

 The main effect of factor A is the difference between average


response at low level of A and average response at high level of A

 Increasing factor A from low level to high level causes an average


response increase of 21 units
219
Two factor design without interaction
 Similarly, the main effect of B is

 In some experiments, we may find that the difference in


response between the levels of one factor is not the same at all
levels of the other factor.
 When this occurs, there is an interaction between the factors

220
Two factor design with interaction
 Consider the two factor experiment shown below

 The effect of A depends on the level chosen for factor B


221
Two factor design with interaction
 This indicates existence of interaction between A and B.

 The magnitude of interaction effect is the average difference in


these two A effects,

AB 
 28  30
 29
2

 When an interaction is large, the corresponding main effects have


little practical meaning.

 A significant interaction will often mask the significance of main


effects.

222
Advantages of Factorial Designs
 More efficient than one factor at a time experiments

 Necessary when interactions may be present to avoid misleading


conclusions

 Factorial designs allow the effect of a factor to be estimated at


several levels of the other factors, yielding conclusions that are
valid over a range of experimental conditions.

223
The Two Factor Factorial Design
 The simplest type of factorial designs involve only two factors or
treatments

 There are a levels of factor A and b levels of factor B, and these are
arranged in a factorial design, that is, each replicate of the
experiment contains all ab treatment combinations.

 In general there are n replicates

224
The Two Factor Factorial Design
 The observations in a factorial experiment can be described by a
model.

 The effects model

225
The Two Factor Factorial Design
 Hypothesis to be tested

226
The Two Factor Factorial Design
Statistical Analysis

227
The Two Factor Factorial Design
Sum of squares

228
The Two Factor Factorial Design (ANOVA Table)

To get sum of squares of error at least two replications is required.

229
The Two Factor Factorial Design
Expected values for mean of squares

230
The Two Factor Factorial Design (Example))
The Battery Design Experiment: An engineer is designing a battery for
use in a device that will be subjected to some extreme variations in
temperature. The only design parameter that he can select at this point is the
plate material for the battery, and he has three possible choices. When the
device is manufactured and is shipped to the field, the engineer has no
control over the temperature extremes that the device will encounter, and he
knows from experience that temperature will probably affect the effective
battery life. However, temperature can be controlled in the product
development laboratory for the purpose of the test. All three plate materials
tested at three temperature levels (15, 70, 125 oF), four batteries are tested at
each combinations plate material and temperature, and all 36 tests are
performed in random order.
231
The Two Factor Factorial Design (Example)
The life (in hours) data is as follows

 Two questions:
 What effects do material type and temperature have on the life of the battery?

 Is there a choice of material that would give uniformly long life regardless of

temperature?

232
The Two Factor Factorial Design (Example)

233
The Two Factor Factorial Design (Example)

234
The Two Factor Factorial Design (Example)

235
The Two Factor Factorial Design (Example)

There is significant effect of

 Material Type

 Temperature

 Temperature x material type

 Caution on interpreting main effects


236
The Two Factor Factorial Design (Example)

 In general longer life is attained at low temperature, regardless of material type

 Changing from low to intermediate temperature, battery life with material type 3

actually increases, decreases for types 1 and 2.

 From intermediate to high temperature, battery life decreases for material type 2 and 3,

and unchanged for type 1.

 Material type 3 seems to give the best results if engineer want less loss of effective life

as temperature changes

237
The Two Factor Factorial Design (Example)
Checking interaction for single replication

Test developed by Tukey: Partitions the residual sum of squares into


a single degree-of-freedom component due to non-aditivity (interaction)
and a component for error with (a-1)(b-1)-1 degrees of freedom

238
The Two Factor Factorial Design (Example)
Impurity present in a chemical product is affected by two factors-
pressure and temperature. The data from a single replicate of a
factorial experiment are

239
The Two Factor Factorial Design (Example)

240
The Two Factor Factorial Design (Example)

241
The Two Factor Factorial Design (Example)

242
Three factor factorial design

243
Three factor factorial design

244
Three factor factorial design
ANOVA Table

245
Three factor factorial design (Example)
Soft Drink Bottling Problem
A soft drink bottler is interested in obtaining more uniform fill heights
in the bottles produced by his manufacturing process. An
experiment is conducted to study three factors of the process,
which are the percent carbonation (A): 10, 12, 14 percent the
operating pressure (B): 25, 30 psi the line speed (C): 200, 250 bpm
The response is the deviation from the target fill height. Each
combination of the three factors has two replicates and all 24 runs
are performed in a random order. The experiment and data are
shown below
246
Three factor factorial design (Example)
Soft Drink Bottling Problem

247
Three factor factorial design (Example)
Soft Drink Bottling Problem

248
Three factor factorial design (Example)
Soft Drink Bottling Problem

249
Three factor factorial design (Example)
Soft Drink Bottling Problem

250
Three factor factorial design (Example)
Soft Drink Bottling Problem

Sum of squares of error by subtraction

251
Three factor factorial design (Example)
ANOVA Table: Soft Drink Bottling Problem

252
Three factor factorial design (Example)

253
Blocking in factorial design
 We have discussed factorial experiments in a completely
randomized design way.

 We often need to eliminate the influence of extraneous factors


when running an experiment. We do this by "blocking".

 Consider a factorial experiment with two factors (A and B) with n


replicates. The linear statistical model is

254
Blocking in factorial design
 Now suppose to run this experiment a particular raw material is
needed

 Run each replicates in a separate raw material

 The batches of raw materials represent a randomization restriction


or a block, and a single replicate of a complete factorial experiment
is run within each block

255
Blocking in factorial design

256
Blocking in factorial design(Example)

257
Blocking in factorial design(Example)
ANOVA table

258
The 2k factorial design
 The 2k designs are a major set of building blocks for many

experimental designs.

 These designs are usually referred to as screening designs.

 The 2k refers to designs with k factors where each factor has just

two levels.

 These designs are created to explore a large number of factors,

with each factor having the minimal number of levels, just two.
 By screening we are referring to the process of screening a large
number of factors that might be important in your experiment, with the
goal of selecting those important for the response that you're measuring.
259
The 2k factorial design
The 22 factorial design
 The simplest case is 2k where k = 2.

 We will define a new notation which is known as Yates notation.

 We will refer to our factors using the letters A, B, C, D, etc. as


arbitrary labels of the factors.

 In the chemical process case A is the concentration of the reactant


and B is the amount of catalyst, both of which are quantitative.

 The yield of the process is our response variable.

 Since there are two levels of each of two factors, 2k equals four.

260
The 22 factorial design
 Therefore, there are four treatment combinations and the data

are given below:

 You can see that we have 3 observations at each of 4 = 2k

combinations for k = 2. So we have n = 3 replicates.


261
The 22 factorial design
 The Yates notation used for denoting the factor combinations is as
follows:

 We use

 "(1)" to denote that both factors are at the low level,

 "a" for when A is at its high level and B is at its low level,

 "b" for when B is at its high level and A is at its low level, and

 "ab" when both A and B factors are at their high level.

 The use of this Yates notation indicates the high level of any factor
simply by using the small letter of that level factor.

262
The 22 factorial design
 This notation actually is used for two purposes.
 One is to denote the total sum of the observations at that
level.
 In the case below b = 60 is the sum of the three observations
at the level b.

263
The 22 factorial design

264
The 22 factorial design

 Practical interpretation?
 Increasing reactant concentration increases yield
 Catalyst effect is negative
 Interaction effect is relatively smaller

265
The 22 factorial design (Sum of squares)
Consider the sum of square for A, B, and AB.

Contrast is used to estimate effect of A, the following contrast is


total effect of A;

Contrast is used to estimate effect of B, the following contrast is


total effect of B;

Contrast is used to estimate effect of AB, the following contrast


is total effect of AB;

The three contrasts are orthogonal.

266
The 22 factorial design (Sum of squares)
The sum of squares for any contrast can be computed (chapter 3),

Which states that the that the contrast sum of squares is equal to
the contrast squared divided by the number of observations in each
total the contrast times the sum of squares of the contrast
coefficients

267
The 22 factorial design (Sum of squares)
The sum of squares are

268
The 22 factorial design

 The main effects are statistically significant and

 There is no interaction between these factors

269
The 23 factorial design
 Here is an example in three dimensions, with factors A, B and C.

 Below is a figure of the factors and levels as well as the table

representing this experimental space.

270
The 23 factorial design

271
The 23 factorial design
Consider estimating main effects

 The effect of A when B and C are at low level is

 The effect of A when B at high and C at low level is

 The effect of A when B at low and C at high levels is

 The effect of A when B and C are at high level is


The average effect of A is the average of these four effects

The average effect of B is the average of these four effects

The average effect of C is the average of these four effects

272
The 23 factorial design
The average effect of AB interaction

The average effect of AC interaction is

The average effect of BC interaction is

The average effect of ABC interaction is

273
The 23 factorial design
 Sum of squares for effects are

 Example: refer Soft drink bottling problem (each at two levels,


eliminate 15% carbonation

274
The 23 factorial design
 Sum of squares for effects are

 Example: refer Soft drink bottling problem (each at two levels,


eliminate 15% carbonation

275
The 23 factorial design

276
The 23 factorial design

277
The 23 factorial design
The effects estimates, sum of squares and percent contribution.

 The percentage contribution is often a rough but effective guide to

the relative importance of each model term

 Main effects dominate this process, accounting for over 87 percent

of the total variability


278
The 23 factorial design
 The sum of squares are

279
6. Nested and Split Plot Design

280
Nested Design
 Nested design, the levels of one factor (B) is similar to but not
identical to each other at different levels of another factor (A)

 Consider a company that purchases material from three


suppliers
 The material comes in batches

 Is the purity of the material uniform?

 Experimental design

 Select four batches at random from each supplier

 Make three purity determinations from each batch

281
Nested Design (Two stage)

 Statistical Model and ANOVA

 Bracket notation represents nesting factor

 Here factor B(level j) is nested under factor A(level i)

 Cannot include interaction


282
Nested Design (Two Stage)
 Sum of Squares

 Anova Table

283
Nested Design-Two stage (Example)
Example

284
Nested Design
The sum of squares are

285
Nested Design
The ANOVA table

 Suppliers are fixed and batches random

 There is no significant effect on purity due to suppliers, but

 The purity of batches of raw material from the same supplier does
differ significantly.

286
Nested Design
The ANOVA table

 Suppliers are fixed and batches random

 There is no significant effect on purity due to suppliers, but

 The purity of batches of raw material from the same supplier does
differ significantly.

287
Nested Design –Three Stage

288
Nested Design- Three Stagae

289
Split Plot Design
Split-plot designs are needed when the levels of some treatment
factors are more difficult to change during the experiment than those
of others. or

Useful when the nature of the experiment requires the use of large
experimental units for some factors and smaller experimental units for
others

 The designs have a nested blocking structure: split plots are nested
within whole plots, which may be nested within blocks.

290
Split Plot Design
Split-plot designs have three main characteristics:

i. The levels of all the factors are not randomly determined and reset for
each experimental run. Did you hold a factor at a particular setting and then
run all the combinations of the other factors?

ii. The size of the experimental unit is not the same for all experimental
factors. Did you apply one factor to a larger unit or group of units involving
combinations of the other factors?

iii. There is a restriction on the random assignment of the treatment


combinations to the experimental units. Is there something that prohibits
assigning the treatments to the units completely randomly?

291
Split Plot Design
Example

 An experiment is to compare the yield of three varieties of


oats (factor A with a=3 levels) and four different levels of
manure (factor B with b=2 levels).
 Suppose 2 farmers agree to participate in the experiment and each will

designate a farm field for the experiment (blocking factor with s=s
levels).

 Since it is easier to plant a variety of oat in a large field, the

experimenter uses a split-plot design as follows:

292
Split Plot Design
i. The blocks are divided into three (equal sized) large experimental units
called whole plots.

ii. The three levels of factor A (oats) are randomly assigned to these whole
plots (each plot is assigned a variety of oat according to a randomized
block design).

iii. Each whole plot is sub divided into two smaller experimental units
called sub plots (split-plots) and the two levels of manure are randomly
assigned to the 2 split plots.

Remark: randomization in a split plot design is completed in two stages

293
Split Plot Design
A2 A1 A3 A3 A1 A2

B2 B1 B1 B2 B2 B1
subplots
B1 B2 B2 B1 B1 B2

Whole plots

Block 1 Block 2

294
Split Plot Design (Example)
The general model for a two factor split plot experiment with in
RCBD
 With r random blocks

 Fixed factor A with a levels

 Fixed factor B with b levels Sub plot


Whole plot error
error
Yijk     i   j   ij   k    jk   ijk ,
i  1, 2,, r; j  1, 2,, a; k  1, 2,, b.
Main
Main factor B
Blocking/replicate factor A effect
effect

295
Split Plot Design (ANOVA Table)
Source df Sum of E(MS)
Square
Blocks (R) r-1 Ssblock
A a-1 SSA

Whole plot error (r-1)(a-1) SSRA


(RA)
B b-1 SSB

AB (a-1)(b-1) SSAB

Sub plot error a(r-1)(b-1) SSError

Total rab-1 SST

296
Split Plot Design (ANOVA Table)
r a b
SST   yijk
2
 CF
i j k

1 a 2
SS A   y.j.  CF Y ...
2

rb j 1 CF 
rab
1 r 2
SS Block  
ab i 1
yi..  CF

1 b
SS B   y..k  CF
ra k 1

1 r k 2
SS RA   yij.  CF  SSblock  SS A
b i 1 j 1

SS Error  SST  SSblock  SS A  SS B  SSRA  SS AB


297
Split Plot Design (Example)
An experiment was conducted compare the yield of two varieties of
wheat. An additional factor to be considered is type of spray for weeds
and three different brands were to be considered. Two farms were
selected for the study and for each farm three fields were available for
planting. It was deemed impractical to use different sprays in a field;
there fore a split plot design was utilized. At each farm the three sprays
were randomly assigned to the fields (whole plot), with the restriction
that there be one spray used per filed. Each field was divided into two
subplots, again with the restriction that each variety is used in exactly
one subplot in each field. The response variable is the yield in quintals

298
Split Plot Design (Example)
The result is as follows

Spray
Variety
1 2 3
1
1 71 64 84
Farm
2 66 56 82
1 83 77 97
2
2 79 73 88

299
Split Plot Design (Example)
The ANOVA table
Source SS Df MS F P-value
Farm 456.33 1 456.33 82.97 0.0028
Spray 842.17 2 421.03 76.56 0.027
Farm*Spray 15.17 2 7.58 1.38 0.3761
Variety 85.33 1 85.33 15.52 0.0292
Spray*Variety 1.17 2 0.58 0.11 0.9026
Error 16.5 3 5.50
Total 1416.67 11

The mean square for Spray is: 421.08, p-value=0.0177 (look at the
anova table)

The whole plot error is larger than sub plot error


300
Split Plot Design
an experiment in which a researcher is interested in studying the
effect of technicians, dosage strength and wall thickness of the
capsule on absorption time of a particular type of antibiotic. There are
three technicians, three dosage strengths and four capsule wall
thicknesses resulting in 36 observations per replicate and the
experimenter wants to perform four replicates on different days. To do
so, first, technicians are randomly assigned to units of antibiotics
which are the whole plots. Next, the three dosage strengths are
randomly assigned to split-plots. Finally, for each dosage strength, the
capsules are created with different wall thicknesses, which is the split-
split factor and then tested in random order. 301
7. Analysis of Covariance (ANCOVA)

302
Introduction
A ‘classic’ ANOVA tests for differences in mean responses to
categorical factor (treatment) levels.

When we have heterogeneity in experimental units sometimes


restrictions on the randomization (blocking) can improve the test
for treatment effects.

 In some cases, we don’t have the opportunity to construct


blocks, but can recognize and measure a continuous variable as
contributing to the heterogeneity in the experimental units.

303
Introduction
These sources of extraneous variability historically have been
referred to as ‘nuisance’ or ‘concomitant’ variables.

When a continuous covariate is included in an ANOVA we have the


analysis of covariance (ANCOVA).

Inclusion of covariates in ANCOVA models often means the


difference between concluding there are or are not significant
differences among treatment means using ANOVA.

ANCOVA by definition is a general linear model that includes both


ANOVA (categorical) predictors and Regression (continuous)
predictors.
304
ANCOVA for CRD
 An appropriate statistical model is

 df
305
ANCOVA for CRD
 If no effect of treatment then the model will be

distributed

306
ANCOVA for CRD
 Adjusted mean estimates are as follows

 Standard error of any adjusted treatment mean is

has distribution

307
ANCOVA for CRD
 Cross products are computed as follows

308
ANCOVA for CRD
 Example:

 Three different machines produce monofilament fiber for a

textile company. Strength is also affected by thickness of


monofilament. The experiment is conducted and the results are
displayed below?

309
ANCOVA for CRD
 Cross products

310
ANCOVA for CRD
 Cross products

311
ANCOVA for CRD
 Cross products

312
ANCOVA
 Test Statistic

The estimate of the regression coefficient is

313
ANCOVA
 Adjusted estimated treatment means are

314
ANCOVA for CRD
 ANOVA Table

315

You might also like