14. Simple Statistical Example
Student test scores are scaled
to produce grades which have an average of 80
and standard deviation of 15:
% cat grades.ss
a0:d0 = { "grade", "score", "avg", "stdev"};
mean = avg(b1:b5); c1 = mean; d1 = stdev(b1:b5);
a1 = 80+15*(b1-mean)/$d$1; // scaled scores
copy a2:a5 a1:a4;
b1:b5 = { 57, 67, 92, 87, 76 }; // raw scores
eval; print symbols values formulas pointers;
% SS --Table grades.ss
mean = avg(B1:B5) = 75.8
|
A |
B |
C |
D |
0 |
grade |
score |
avg |
stdev |
1 |
60.29 |
57.00 |
75.80 |
14.31 |
2 |
70.77 |
67.00 |
|
|
3 |
96.98 |
92.00 |
|
|
4 |
91.74 |
87.00 |
|
|
5 |
80.21 |
76.00 |
|
|
|
A |
B |
C |
D |
0 |
"grade" |
"score" |
"avg" |
"stdev" |
1 |
80+((15*(B1-mean))/$D$1) |
57 |
mean |
stdev(B1:B5) |
2 |
80+((15*(B2-mean))/$D$1) |
67 |
|
|
3 |
80+((15*(B3-mean))/$D$1) |
92 |
|
|
4 |
80+((15*(B4-mean))/$D$1) |
87 |
|
|
5 |
80+((15*(B5-mean))/$D$1) |
76 |
|
|
|
A |
B |
C |
D |
0 |
0x8ed9b88 |
0x8ed9bd8 |
0x8ed9c18 |
0x8ed9c58 |
1 |
0x8eda010 |
(nil) |
0x8ed9d90 |
0x8ed9e30 |
2 |
0x8eda010 |
(nil) |
|
|
3 |
0x8eda010 |
(nil) |
|
|
4 |
0x8eda010 |
(nil) |
|
|
5 |
0x8eda010 |
(nil) |
|
|