V NBS PROJECT

tfzTU .*£ A/ To 9r« T. L- L+O i SjotK

NBS REPORT

1103-21-5X18

18 February 1955

TTrcftmc-*

3850

Preliminary Report

oia

commim the analysis of variance

OF factorial experiments on automatic computers

by

Ic M e Cameron

Statistical lagiaeeriag Laboratory

to

Chemical Corps Biological Laboratories

Camp Batriok*, Mary la ad

litis report is issued foi in any fora, either in wh<

frost the Office of the Di:

Approved for public release by the

Director of the National Institute of

Standards and Technology (NIST) on October 9, 2015

, reprinting, or reproduction

Lssion in writing is obtained

lington 25, D. C.
I

I
COMPUTING Til ARALTSIS OF VARIANCE

OF FACTORIAL EXPERIMENTS 01 AUTOMATIC ©0WJT1RS

(A Preliminary Reports

fey

So Mo €&£!©£“©&

Statistical Engineering Laboratory

Rational Easr^sn of Standards

fia© purpose of this note is to describe the method of Y&tem®

whleh ^©@13® well suited for oomptating the analysis of variance of

factorial experiments @® large &m

M

©ompuiersc The analysis for

the 2

a and S

E aeries i@ glv@sa &s$ the analysis for the general ffae«

torial indisgtedo Tb© detailed analysis ©£ examples of the and

3

s designs as*© given 0

lo Analysiss of vurf&no® of the 2^ factorial d@sigE^ Q

In a factorial design the effects of a number of factors si*©

investigated simultaneously,, las the 2n factorial design there ar© a

factors Csueh as temperature9 dilution^ ®t©o} @&©h of which is studied

at two levels C«»g<, 2©^ and 30® for temperature^ « Test conditions as*©

set up corresponding to ©ach of the possible comb lea tions of the two

levels of the n factors Cio© 0 2

s combinations in allj and an observation is recorded for eacho

The 2U

©©sabina t ions ©an h@ designated by a ©<ts*ie© of n subscripts

which &r© either 0 os* 1 depending ®n whether the factor is at its low

@r high levels For example for n 63 3 ©s shown below each of the S? »

8 possible eomfeinations eaa b© designated by X

a ^p where a^ and ©

ar© either © or lo

In the procedure given here it is neoessary that the observations

fes presented in a ©olumn ®£ 2® values in the order shown below im*

the ©stse n ® 3 3 The ©sten^ion to ©th@a* values cf n is obvious

„

$

Fo Tate®^ °®B©sign and Analysis of Factorial Experiments n

B Imperial

Bureau of. Soil, Science^ Tech s Com® c Mo» 35 «, Barpendeh*;

1937,
'

. .SS'"'
4 Designation of

observation

Level of factor ABC

~2 ~

X

X

000

100

x

010

X UG

X

001

X

101

X011

X

X1X

0 0 0 10 0

0 10 110

0 0 1

10 1

Oil 111

Once tills column of data is in the machine a column of ’’sums

and differences” also containing 2

“ values is obtained from if by

J

7T> -.-.I) tabulating the 2 sums of successive pairs of observations followed

by the 2

L’ differences between the elements of the same pairs. Thus

for u *= 3 we have

r~

Observations ’’Sums and Differences”

X

Q0O ^OOO ^ X

I00

X

010 ^ X110

XQ10 X0O1 ^ X

101

I

iC !10 X01! ^ X

lll

X

00i X000

“ X

i0G

l

l X

101 S01G

“ :I 110

1

^.1 © M

1“* j !

X

001

“ X

1©1

| X

lll . x011

“ s

lll

The same process is repeated on the first column of ’’sums and

differences” to form a second column of ’’sums and dif f erences 9 % and

so on for each successive column so formed until the n-th column of

’’sums and differences” is obtained.

The square of an entry in the n-th column of ’’sums and difference:.”

divided by 2

L corresponds to a single degree of freedom in the analysis

of variance. The single degrees of freedom for the several main effects

and interactions come out in the following sequence
• > a '

'

"

.
-3 -

The entries in the n-th column of T 'sums and differences” divided

by 2 gives an estimate of the average difference between the levels

of a factor*

Computational checks.

I* The su® of the entries in the n-th column of ’’sums

differences” is equal to 2

a Xqqqqq

q

Cio© 0 2 n times

the leading element in the data as presented to the

machinal

2o The sum of the squares of the entries in the n-th

column is equal to 2

E times the sum of squares of the

elements of the original column of observations.
«

.

'

,

•
-4

a Analysis of Variance for 2 Factorial

Aevel of factor

A

0

1

0

1

0

1

0

0

1

1

0 0

0

0

0

0

0

0

fc

1 1

0 ©

1 ©

© 1

1 1

© 0

1 ©

© 1

1 1

0

0

0

1

1

©

1

1

1

1

I

1

1

1

Designs Example for n *= 4 . . TT^-r. Jsao -I- “n -I X. n xjl i -*»«;.

observed value#

-• treatment combination

$

Ts/Aen from table of random

numbers

«

“""W pR 1 A/T 0 <7 Y 1

i f< %0ooo

/

f <?r*p

• P

7.^'* .

ry Tne—7 • 6<t»' b

6b$»i-if*/' \r*tl+* i

1 ‘

t.

S*f> 5/*-f 5^p

X)

2 Uv^Uj

C*k*^a*j ^ |

1ro^w«uv^c 1

i4 * « 0

X. / / 2- b 4 ,

O O o Q

- /

f \ yp 0J $o J22A 57<J 747 SS2,oo<*

*

<T#>i5

Co * cec*<w-" %.tv~

trv' £a, w 34S7tT. 5 6; f

1 o o 0 2-0 . Hi 377 -in nlzi J - i3. 97T A llO.O(,l 5

6(oo &3 U '43 -2o -/*? 35 72/ - J-3. 625 & 1 13 1.5(,25

^ OO Si Sa 2}<J -*>/ ~'f «y - 1.375 71(3 7, 5425

0 e \ o - h

-j 6

I 6<i 7 -2.125 <2. li>,o6l5

1 o 1 0 77 M 2 -54 -/V */ bpio 1 IO. 11 S Ac ItO.C&S

0 110 '3 12

1 -/c -17 +H.U5 13 c 5<n.6(,2 s

1 1 1 0 3±_ Ibz '/2 s //7

13, ^ H.US Age %55.5U5

VO 0 1 5 Ao '' 6 a. ->1 "7

11 ' 0. 115 0 5. 06. 2.5

) 00 1 *b

-°1! 7/ SpA\ z,8?f /ip 3j 5. o6*5

dl o 1 77 '4 153 2^40 9 n.115 ?3P / ,o62 5

l/o/ 55

j -* -10 - 6 ? ~1/ 44/

-2 .bis App %-j.SGls

oo | / 25 -*/ H -/<J6 HS 7.0 . (,15 CD 170/P6)Z

10 1 / 47 -5S ? >/r 4 6 22.$ JAMS' /ICD iWl.ofrS

Vi 1

1

** - 2-2 i7

, —nr lbj>^ ->1.3,75 Eop ? 26y rt 2S

II 1 / n 1 /o -32 -**

i -* 441 - 2 . 62.5 /lgC£> 27, 5425

5oir* 747 Uo 1 5 2

, /70 | £0 .0

. 7p7^/ 47,6/1,0 01)#

S„. . s |- .'> 41>'> '152 . t>

cWciaa : (•? ^ D = X X0 Oo o © 2. o' - 2 x*

if *«te fVioCt iialu£ tS

9 to* i^o) t-'c* ifoe «vCAOg42.

152,176 -^1% oof)

-6 ~

2 o Analysis of variance of the 3

E factorial designs

Let the observations be presented according to the scheme shown

here for n = 4 e

Designation of

observation

X

O000

X

1000

X200®

X

01©0

X

1100

X21G0

X

02O0

X

1200

X

22G0

X

0010

X

1010

X

2OX0

Level of factor

A B C D

0 © 0 0 10 0 0

2 0 0 0

0 10 0

110 0

2 10 0

0 2 0 0

12 0 0

2 2 0 0

0 0 10

10 10

2 0 10

X

0222

X

1222

X

2222

0 2 2 2

12 2 2

2 2 2 2

rni *2 The 3

r observations give rise to 3n~ successive sets of 3

values, A column of ’"sums and differences* having S

R elements is

formed as follows Cl) the sums of the 3 elements of the 3 sets

are tabulated in order, (2) these are followed by the 3

n ”^ differences

between the first and third elements of the sets* and finally (3) the

sum of the first and third minus twice the middle value for each of

the 3^*"^ sets are tabulated to complete the first column of '’sums

and differences”
'

• : .
-7-

This same procedure is repeated ora the successive columns of

"sums and differences’* until the n-th column of "sums and differences’*

is obtained „ The square of the elements* D, of this n-th column divided by a corresponding factor* d* gives a single degree of freedom

for the main effects or interactions in the analysis of variance

table® These single degrees of freedom come out in the following

order o (The subscript 1 refers to the linear component and the subscript 2 refers to the quadratic component®)

The appropriate divisors for the squares of the entries in the

n-th column are given by raising the triple (3* 2 S 6) to the n-th

power according to the following rules

for n - 2 (3* 2* 6)2 * * (3*2*6) (3,2*6)

3 2 6

3 2 6

9 6 18

6 4 12

18 12 36

The sequence of divisors for the corresponding elements of the

n-th column being

9* 6, 18* 6* 4, 12, 18* 12, 36

-8 -

for n » S <(3,2, 6»

3 *s <3,2 i.6)

2 (3, 2,8)

9 8 IS 6 4 12 IS 12 36

3 2 6

27 18 54 18 12 38 54 38 108

18 12 38 12 8 24 86 24 72

54 36 108 36 24 72 108 72 216

The sequence of divisors being

27 n 18, 54, IS p 12 f> ® ° 0 9 0 0 ® « ® a 72, 108, 72 , 210.

The' ©sitension to larger values of n is carried on in the same manner 0 The case it B 4 is given in the worked out example

,

Coapufat tonal checks

Cl) The mum of squares of the original observations is

equal to the sum Z . d

C2j The sum of the n-tfe column of "sums and differences”

can be checked using the following procedures from

the successive sets of three values of the observation column form a column of the 3“~ quantities obtained by taking 3 times the first element of the

set minus the middle element plus the third element.

Repeat this process on the column so formed^

After n repetitions one final number remains. This

number is the cheek sum for the n-th column of sums

and differences.

Combining the individual degrees of freedom

The analysis of variance table is usually written in the form

shown here for n 35 4.
. >
9~

Analysis of variance table

Factor Sum of Squares is Sum of

CF

A

B

AB A.S

1

C

AC

BC

ABC

D

AD

CF

A

X

4l

2 VB

2

AgB

^ Aj, Bg A2

C

l'#,C2

o

o

©

o etc.

Degrees of Freedom

d of .

1

2

2

4

2

mean square

sum of aquas es

d of o

o

a

8

IS

03

(corresponding to

the 81 individual degrees of freedom for n - 4]5 into this conventional

form for the analysis oi variance tables* one can use successive

triads of the column of 81 individual d a f 6 Two columns of values are

formed from the 27 triads! (1> the first element of each triad is

recorded in sequence in the first column* and (2) the sum of the last

two elements of the 27 triads is recorded in the second column,.

These two columns are then combined into a single column of 54

elements by writing the second column at the end of the first* This

process is repeated n « 4 times and the resulting column is the "sum

of squares" column in the standard analysis of variance tafole 0

ABD

CD

ACD

BCD

ABCD

Sn order to convert the column of values
£S

& V

©«3f & axilla'V 1 :: E • •7i£

f

,

. :ir i,* b®'i,z $oo<g si : ;^i' rt

srj . > -i* •; . , ©in ; fo r tds >o s s iS aic a

! oo o% .
-20 -

Tae degrees of freedom associated eith the 16 sms of squares

for a 22 4 may be ©biaiaed by raising the couple Cl* 2}) to the 4-th

power ae follows

g

Clp2) Cl fi 2}) - <1,2,2 # 4)

«1„2)

3

- «1»2>* ( 1 , 2 } - «„2,2,4,2„4,4,8?

u»2.)

4

- U,2> 3

«1,2> - $1,2,2,4,2,4,4,8,2,4,4,8,4,8,8,16)

etc<>

The ®eae square is ©fet&iaed by dividing the "susa of squares”

by this divisor

\
'


sias^ / 0000 3 1 0 0 C l 0 0 v 1 0 1 0 0 3 > 1 0 0 6 Z 1 0 0 I 0 Z O l> 4 / 1 0 © 7 119d i 0 0 / 0 6 1 » 1 0 4 1*10 2 0 1 1 e) 7 1 1*0 3 Z 1 1 « 5 0 i / 0 1 Z ' C. 1 11/0 7 0 c Z 0 * ' . 1 2 t >0 1 . 1 0 / 2. 0 1 11 l j 5 2 1 l 0

£7

0

2

2

0

4

/ i/9

3

l

1

2

J

cool

7

1

00

1

9

Z0

0

1

O

1

01

1

1

0

1

/ III)/ J O 2 0 / £ / 2 0 / 4 2 1 0 ' 7 0 0 I / 1 loll 5 loll 6 0 1 1 1 * III' 3 i'll 0 * ! ' . 1 12

*

M

« 5*#

e

1 C.5T21

*t 81 i/yf

•

U #7 Al*

4 l.H IT

4,1, •4 cc C9 1*77 77 24

£

1 ^*

C ,*ij& va.

» M, nns

4 /.*/-* 6.7500 l»lt* <UsTlll AC

4 46175b

I&L »* i.H

0? 2.46*1 ,7bS9 5.5JO* tc jUVZ7

ItS 14. -^3 | .<vt

/ !./L 94 7-H-H •»BC

7 si* .to*? | .14 fL 6.® n 145.4 «j. i n 0 2 <V»74

5* I./152 icMfl i-.4b4«- iM.yioi

U 15 4»

4 *44 »4 V* 4.:* co "3 3* II

<1 1*93 2*4*5 i.lni e» 2.y7/2

*11 i.ziis 4.SJ4) 5l.7S.69

4 «n l5 Ti 6*

A

V ^*46

36 B.C, 2.1779 2.4.6*44 10. If1

/ a&T; a* 4/.**i7

24 *Av •oH >1 l.c* (7 ll.nzi 35.7744

72- .^Ob

2 7113 7.f3*J Sl.»64i

a co ' S t*JI

fo8 1.1/3* 6.75*0 i.oe 6* 41 //

W I’.pa. 6«.»

cr?H lx. «.V. }/25« 4*71 0fit If JJ 477*

1/6 4*1, 4.7791 7.ot/7 9.5765

4 *9 $0 154*419* r,r.i

UI 2f.53i2 1.-U41 .74 f7 5,53 -b 1 *3 42t •7.5? 16 iSLit 7^*16 2*.i«*S ) 24 Aici II *14£ till 75*6 *5 5*oi .

lo< 6,f

k .4 31 Iji *4 74777 *6.7653

72. o,i<> j«5» | .01 yi I'/c'ft •6.99 9?

-t/G i-mi into

7 m*

Ar*4ik*jt c>t iAI/^./iCc i.r

3^ «V.c* .7*0/ 1.1179 2.45 44

2-/5. , 9M ot- 1.

3 So?

3

"

f«C?04»*/ iLilAn

64% i*)ji 04.26°* 7.66

« 24.11-W

* ** r*t fit fr/ >Jr.<9

0, /o

- 57 2.76 71 Zi77«/

it A.D. 1/7157 8.t? 64

lot A»D, ' 2o*a 6,5672 7J./71?

3. ft.P, 3.3b II 11 74445

i-tf A.i,f. iyT*> .7.- |

13 8,1777 ft

1

72- Ms. ol

U

7. 577

/

5 /2 2.2.

1 ot 4.ofJ) V.156J /STfi

1

/

mI A<\ ft* 5S77/ 53/41-9)

•fc-16 A*,.. J.3?3P 72.57 J* 1.3.5444

ib CD. 14,47 ft | /oil II

24 «6A l.o4il 32*7»

72- **o II, .-

- 5*

7 05 56

*

»

24 «*,<>. ,-jto* ,T'

/to Wl*

1 '.JUJ

-

4S A^.C.

0, 7.52. tfi,0

72 /7.W-SV >||

\

L Z72Z1

144 *i v*>, n.

|G? 6/?.

72 A.C.tf, />*!

2-/6 /. 07

72 •IiCiO,

J91

49 . 1 *:

1*4

A«*4, 5.34,1

2/6 *A*.

7

p*|

144 <A*#» .ni

432 AA*j, 2.5:<

/62 0* 2.4»

s

/o* i.pl .45i

314 ‘a*. />y

CHECK'S

‘-iv

/o* «,c.

1 "V

72 .•/

1/6 »A

k

'i

<

414 5,6, .39

-1/4 »,«.l J'i. af

b* 4,f.

i »l

•

1

/ot e.6, /.fl7Z few. Ml So

1-/6 *. ,6 j.S*i5

71 sp

0 4159

4< M.t.6, f.V

/•M A*.*,,. HA

3-Vb «/l«. f.SV I ** M-i. 3.«:

43s- 4VI tfl Self

i>» <4. ( (i

l'

4 V.t i945S

MS <M. /,7f33

- .,

H* *'.fc I*.***

4

M4 *A<u. A, as*

432

- 7U ol

V-A 4„ iZ

*.

- 12 -

8. Analysis of variance of general factorial design

The proper sequence for presenting the column of observations

©an probably best be described by giving an example 0 For a 4 x 3 x 2

factorial the observations are presented in the order correspond ing

to the following combination of the factors

level of faster ABC

© © ©

1 © ©

2 0©

-3 © 0 ©10 11 ©

2 1 ©

3 10 ©20 12 ©

2 2 ©

3 2 0

0 0 1 10 1

2 0 1

3 0 1

2

©11 11111

3©21 12 1

2 2 1

3 2 1

In general for a kxasr factorial Ck>s®>p**) the observation-:

are put in order bo that the k levels of the factor A are record-;

'

in their sequence m r times 0 The corresponding index for B is obtained by writing each index for B k tin© and repeating this seq, : ::/

r>. times , The € index is obtained by writing each successive inde&

for C km times® For factorials with other than three factors* t"

sates approach is applied®
1
-13-

la the procedure described here a column of "suras and differences” is formed for the first factor 0 For a factor at two levels*

the column is formed by taking sums and differences in successive

pairs as described for the 2n factorial For a factor at 3 levelc*

triads are used and the column of "sums and differences” is formed

as described for the 3

R factorials. For factors at 4*5*6* or more

levels a "sums and differences” column is formed by operating on

sets of 4* 5* 6* etc.

The sums and differences to be used can be obtained from a

table of orthogonal polynomials <[See S. 3* Delury*K

The following table shows the linear functions of the setsS of

2* 3* 4* , .

,

0 corresponding to factors having 2* 3* 4* ... levels.

Ho, of levels

of factor

Coefficients of

linear functions

9 iii=

2 - a21

2 - d

22

n ° 2.

U1

1-1

n “ 3

I4 X4I

140-1

1—241

3 - d31

2 **32

S ‘ d33

a =» 4

irnro

4341—1—3

1-1-141

41—343—1

4 “ a4i • 20 - d42

4 ~ d43

20 - d44

n « 5

I4l4l4l4l

424140-1-2

2-1-2-142

41-24042-1

1-446-441

5 * d

51

10 dgg

14 * d S3

70 * d 55

«nacg>mw m

w»<i mb mhwwwmwmmw

Do Bo Delury* Values and Integrals of the Orthogonal Polynomials

up to n » 2©7~P^^'^s^ed

?

fbr '''^ITario' 'Research i'ounda t to; V Sy

- University of Toronto Press (1950}),
/•* . u >,r ^ »

• •*»

'

•»v-
~ A'il '>

procedure then consists of forming a 2nd p 3rd p 4tfo 0 oo.>etc«

* column of "sums and differences" by applying the appropriate set of

A-jear functions for the number of levels of each successive factor

to the preceding column* The final column of "suras and differences”

so obtained is squared aud divided by an appropriate constant to

give the individual degrees of freedom of the analysis of variance *- his individual degrees of freedom cob© out in the following

order*
:

•

X J OB

I m:h2 ;• ha& tv

• -::l mUR
f or the 4 3s $ x 2 factorial we have

divisor

€F 24

h 120

A

2 24

h 120

h 16

AA SO

A

2Bl 18

A

S®1 8©

% 48

*iB3 249

*2*2 48

AA 240

V € 24

A

X

C 120

V 24

AgC ISO

w 80

*2B

1

C 16

A

3B

1

C eo

®2C 48

HHC 240

AgBgC 48

A3»*C 240

The column 'of divisors ar© those used to divide the correspev.1 squares of 'the eleaente in the 3rd Clast column) of "suns a no m$s(, o

The appropriate divisors are obtained by writing the i d Cgive® in the table @sa pag© 13]) 1b $8i© form

^kl ^kg ‘’ ooodkk^ *o* the k levels ©X A

and multiplying by the successive terras of

' Cd^i c o - od^J for the a levels of B

-to get

(£d,i„ d d, kl ”al 8 “k3 dal ”’ 0<>dkk d»le d

kl «i« ° 0 ° ° akk

<> %. 9 then

carrying o® the prose®® until all factor® are accounted for.

For the 4 a 3 is 2 factorial haves

14204 20> <3,2 P 6)

tetag the multiplication we get

C12 60 12 BO 8 40 3 40 24 120 24 12GD {2P 2% *

C24 120 24 120 1© 8© 1© 80 48 24© 48 240

24 120 24 120 IS ©0 16 B0 48 24-0 4© 240}' e ®g shown ®n page 16 •

Computational check

The sum of square® of the observations ©aval to the sub ..: the Individual degrees of freed©®* i«sr, Z X1' * £ 0

Combination of individual degrees of freedom

A eomfeisaatio® of individual degrees of freedom is aecompl ir >:,•

by forming two using sets of k ({the number of levels of £*©?:<*

A^ individual degrees of freedom in the D8/d column,, Two r

formed g the first by writing the first element of each set of k in

sequence the second by adding the next .({k-l}> elements of each ss-;:. The two columns are formed into one by appending the second ct>l

to the end of the firsts This column is then operated on u

J

. • rtf

of m elements £the number of levels of factor BK Two cel- ->,: a-. re again formed as before and ©@sate&i&©<$ „ This process it - for all factors
c

'

-

.

- '

-
•17 -

Tfe© number ©f degrees of freedom associt ted ^ith the final

eolism of ”b®wb of aqoar#B” are given by the tera of the prottot;

• (1,-k-i) Cl .--II (l,r-l)

For the 4 s 3 x ^ example w® have (£s*©®$ page i§|

€F / A

© X A®

B / AB

€ ' AC

Eg ASS

i€ e y ABC

Ustag ®@ts of 3 from this @©l^ss® got

And finally* using sets of 2

The sequence of d 0 £<> is obtained by multiplying

(1,3) (1,2) (1,1) "(1326) (1,1)

* (1,3, 2, 6,1 3 2 6

)

r J
; ,

, 3: 0 £>

8

0