ANOVA [One Level Analysis of Variance]

Here we present a program to compute analysis of variance for 1 level using 3 groups and to the confident interval and P-value requirement.

Using material from

Montgomery C. Douglas and Runger C. George, Applied Statistics and Probability for Engineers, Wiley, 2007.

INPUT

E = [ E1 E2 E3 E4 E5

E6 E7 E8 E9 E10

E11 E12 E13 E14 E15 ]

= [E]

Assuming these are three separate levels and each level contains 5 replications

[ E1 E2 E3 E4 E5]

[ E6 E7 E8 E9 E10 ]

[ E11 E12 E13 E14 E15 ]

Null hypothesis: there is no difference between the means of the different levels

Alternative: at least two of the means are different

OUTPUT

Level of significance, confidence interval

Hypothesis testing

2 → DIM(L6)
DIM([E]) → L6
L6(1) → S
L6(2) → T
{1,1} → DIM([G])
0 → [G](1,1)
{S,S} → DIM([G])
For(P,1,S,1)
For(M,1,T,1)
[H](P,M) + [G](P,1) → [G](P,1)
[I](P,M) + [G](P,2) → [G](P,2)
[J](P,M) + [G](P,3) → [G](P,3)
END
END
FOR(P,1,S,1)
FOR(M,1,S,1)
[G](P,M) / T → [G](P,M)
END
END
0 → DIM(L4)
0 → DIM(L5)
S → DIM(L4)
S → DIM(L5)
FOR(P,1,S,1)
FOR(M,1,S,1)
L4(P) +[G](P,M) → L4(P)
L5(M) +[G](P,M) → L5(M)
END
END
L4/S → L4
L5/S → L5
0 → Z
FOR(M,1,S,1)
Z+L5(M) → Z
END
Z/S → Z
0 → A
0 → B
FOR(P,1,S,1)
A+(L4(P)-Z)^2 → A
B+(L5(P)-Z)^2 → B
END
A*S*T → A
B*S*T → B
FOR(P,1,S,1)
FOR(M,1,S,1)
([G](P,M)-L4(P)-L5(M)+Z)^2→[G](P,M)
END
END
0 → C
FOR(M,1,S,1)
FOR(P,1,S,1)
C + [G](M,P) → C
END
END
T*C → C
AUGMENT([H],[I]) → [E]
AUGMENT([J],[E]) → [E]
S*T → R
FOR(M,1,S,1)
FOR(P,1,R,1)
([E](M,P)-Z)^2 → [E](M,P)
END
END
0 → D
FOR(M,1,S,1)
FOR(P,1,R,1)
D+[E](M,P) → D
END
END
D-A-B-C → E
(S-1) → X
(S-1) → Y
(S-1) * (S-1) → V
S * S * (T-1) → W
DISP “USING F DISTRIBUTION”
((X + W)/2-1)! * ((X/W)^(X/2))→ K
K / ((X/2-1)! * (W/2-1)!) → K
(X/2)-1 → M
(X/W) → R
(X+W)/2 → Q
“K * (X^M) / ((R*x+1)^Q)→ Y1
((Y+W)/2-1)! * ((Y/W)^(Y/2))→ K
K / ((Y/2-1)! * (W/2-1)!) → K
(Y/2)-1 → M
(Y/W) → R
(Y+W)/2 → Q
“K * (X^M) / ((R*x+1)^Q)→ Y2
((V+W)/2-1)! * ((V/W)^(V/2))→ K
K / ((V/2-1)! * (W/2-1)!) → K
(V/2)-1 → M
(V/W) → R
(V+W)/2 → Q
“K * (X^M) / ((R*x+1)^Q)→ Y3
A/X → M
B/Y → N
C/V → P
E/W → R
M/R → L
N/R → J
P/R → K
fnInt(Y1,x,0,L) → H
1-H → Z
H*100 → H
DISP “for each setting or sample, required confidence interval to accept null hypothesis”, H
DISP “for each setting or sample, required level of significance to accept null hypothesis”, Z
fnInt(Y2,x,0,J) → H
1-H → Z
H*100 → H
DISP “for each level or column, required confidence interval to accept null hypothesis”, H
DISP “for each level or column, required level of significance to accept null hypothesis”, Z
fnInt(Y3,x,0,K) → H
1-H → Z
H*100 → H
DISP “for interaction between settings or factors, required confidence interval to accept null hypothesis”, H
DISP “for interaction between settings or factors, required level of significance to accept null hypothesis”, Z