# Obtaining Summary Statistics and Plots by Groups (Factor Levels) in EXCEL

```Obtaining Summary Statistics and Plots
by Treatment Groups in EXCEL
Data Format
• Data are in a Block of (n+1) rows and (f+m)
columns where:
–
–
–
–
Variable labels are in row 1
Data on n units are in rows 2:n+1
f Columns of factor levels (one column per factor)
m Columns of response measurements (one column
for each response variable)
• For this presentation, we will assume
– n=24
– f = 2 (With Factor A at 2 Levels, B at 3 Levels)
– m = 2 Response Variables (X , Y)
Data Layout
Row 1
Row 25
Factor A Factor B
1
1
1
1
1
1
1
1
1
2
1
2
1
2
1
2
1
3
1
3
1
3
1
3
2
1
2
1
2
1
2
1
2
2
2
2
2
2
2
2
2
3
2
3
2
3
2
3
X
76.54
78.02
79.26
78.82
99.26
95.14
95.33
97.15
117.24
118.72
116.16
116.89
85.50
89.58
87.75
85.74
106.92
109.82
109.26
105.10
129.65
126.98
125.37
127.80
Y
539.43
556.10
553.53
542.07
564.42
569.95
576.09
571.91
594.91
599.49
604.30
602.08
523.72
514.91
520.08
520.14
534.14
539.98
550.64
534.95
565.16
562.24
570.77
575.81
Data in Columns A-D
Highlight the data, then click:
• Insert
• Name
• Define
• type in a name (e.g. expdat)
• OK
Obtaining Summaries for 1 Factor (I)
• Go to cells outside the range of the data
(different columns)
• Type in the Factor label in as many cells in a
row as there are levels
• In the cells below them, enter the factor levels
• Example: Factor B has 3 levels
Column G
Row 1
Row 2
Column H
Column I
Factor B Factor B Factor B
1
2
3
Obtaining Summaries for 1 Factor (II)
Column F, Row 1
For Summaries of X, In cell G3, Type:
• =DCOUNT(expdat,”X”,G1:G2)
Copy/Paste G3 to Cells H3,I3
Factor B Factor B Factor B
1
2
3
n
Mean
Variance
Std Dev
Min
Max
Repeat for the following cells/commands:
• G4: =DAVERAGE(expdat,”X”,G1:G2)
• G5: =DVAR (expdat,”X”,G1:G2)
• G6: =DSTDEV (expdat,”X”,G1:G2)
• G7: =DMIN (expdat,”X”,G1:G2)
• G8: =DMAX (expdat,”X”,G1:G2)
The first element in each command is the database (could have entered
\$A\$1:\$D\$25 instead), the second element is the variable to be analyzed, the
third is the criteria (e.g. Factor B at Level 1)
Obtaining Summaries for 1 Factor (III)
Factor B Factor B Factor B
1
2
3
n
8
8
8
Mean
82.65
102.25
122.35
Variance
25.24
38.54
31.57
Std Dev
5.02
6.21
5.62
Min
76.54
95.14
116.16
Max
89.58
109.82
129.65
Obtaining Summaries for Combinations
of Levels of 2 Factors (I)
• List the 2 Factor names in 2 side-by-side
cells
• Below them enter their factor levels (There
will be ab pairs of cells
Column G
Row 11
Row 12
H
I
J
K
L
M
N
O
P
Q
R
Factor A Factor B Factor A Factor B Factor A Factor B Factor A Factor B Factor A Factor B Factor A Factor B
1
1
1
2
1
3
2
1
2
2
2
3
Obtaining Summaries for Combinations
of Levels of 2 Factors (II)
• Similar to process for levels of one factor,
except criteria are in pairs of columns.
• Put Results in (say) the righthand of the 2
columns
• In cell H13, type:
=DCOUNT(expdat,”X”,G11:H12)
• Copy and Paste cells G13:H13 to cells
I13:R13
• Repeat Process for mean, variance, etc
Obtaining Summaries for Combinations
of Levels of 2 Factors (II)
Factor A Factor B Factor A Factor B Factor A Factor B Factor A Factor B Factor A Factor B Factor A Factor B
1
1
1
2
1
3
2
1
2
2
2
3
n
4
4
4
4
4
4
Mean
78.16
96.72
117.25
87.14
107.77
127.45
Variance
1.44
3.68
1.16
3.67
4.76
3.17
Std Dev
1.20
1.92
1.08
1.92
2.18
1.78
To obtain a “factor effect/interaction” plot:
• List the factor levels of the factor with most levels in a column
• In successive columns give the means for the combinations of
that factor’s level and the various levels of the other factor
Factor B
1
2
3
A1
78.16
96.72
117.25
A2
87.14
107.77
127.45
Factor Effect/Interaction Plot
Highlight the entire field on previous slide, then click on:
• Chart Wizard
•XY(Scatter)
• Series in Columns
• Picture with points and jagged (not smooth) lines
• Complete Dialog Box (Select separate chart window)
• Experiment with format by right clicking on parts of graph
and formatting.
• Copy and Paste into word processor
140.00
120.00
Mean of X
100.00
80.00
A1
A2
60.00
40.00
20.00
0.00
0
0.5
1
1.5
Factor B Level
2
2.5
3
3.5
140.00
130.00
120.00
Mean of X
110.00
A1
100.00
A2
90.00
80.00
70.00
60.00
0
1
2
Factor B Level
3
4
```