Video: Sample Size Determination in One-Way ANOVA Example

Problem 1

  1. Suppose we wish to design a new experiment that tests for a significant difference between the mean effective life of four insulating fluids at an accelerated load of 35kV.  The variance of fluid life is estimated to be 3.5 hrs based on preliminary data.  We would like this test to have a type 1 error probability of 0.05, and for this test to have an 80% probability of rejecting the assumption that the mean life of all the fluids are the same if there is a difference greater than 2 hours between the mean lives of the fluids, with a min of 18 hrs and max of 20 hrs.  How many samples of each fluid will need to be collected to achieve this design criterion in the case of Min, Intermediate, and Max variability?

The variability determines the the effect size. For each variability the effect size, f, will change.

Min Variability

\[f = d\sqrt{\frac{1}{2k}}\]

sigma <- 3.5 
range <- 2 
d <- range/sigma 
library(pwr) 
pwr.anova.test(k=4,n=NULL,f=d*sqrt(1/(2*4)),sig.level=0.05,power=0.8)
## 
##      Balanced one-way analysis of variance power calculation 
## 
##               k = 4
##               n = 67.76303
##               f = 0.2020305
##       sig.level = 0.05
##           power = 0.8
## 
## NOTE: n is number in each group

Intermediate Variability

\[f = \frac{d}{2}\sqrt{\frac{k+1}{3(k-1)}}\]

pwr.anova.test(k=4,n=NULL,f=(d/2)*sqrt(5/(3*3)),sig.level=0.05,power=0.8) 
## 
##      Balanced one-way analysis of variance power calculation 
## 
##               k = 4
##               n = 61.08609
##               f = 0.2129589
##       sig.level = 0.05
##           power = 0.8
## 
## NOTE: n is number in each group

Max Variability

\[(Even\:Number\:of\:Observations)\:f = \frac{d}{2}\]

pwr.anova.test(k=4,n=NULL,f=d/2,sig.level=0.05,power=0.8)
## 
##      Balanced one-way analysis of variance power calculation 
## 
##               k = 4
##               n = 34.38178
##               f = 0.2857143
##       sig.level = 0.05
##           power = 0.8
## 
## NOTE: n is number in each group

Conclusion

As the variability increased, the number of samples required decreased from 68 samples required at minimum variability to 35 samples required at maximum variability.