Page 8-19
The class mark data can be stored in variable S, while the frequency count can
be stored in variable W, as follows:
Given the list of class marks S = {s
1
, s
2
, …, s
n
}, and the list of frequency counts
W = {w
1
, w
2
, …, w
n
}, the weighted average of the data in S with weights W
represents the mean value of the grouped data, that we call ⎯s, in this context:
,
where represents the total frequency count.
The mean value for the data in lists S and W, therefore, can be calculated using
the procedure outlined above for the weighted average, i.e.,
We’ll store this value into a variable called XBAR:
The variance of this grouped data is defined as
N
sw
w
sw
s
n
k
kk
n
k
k
n
k
kk
∑
∑
∑
=
=
=
⋅
=
⋅
=
1
1
1
∑
=
=
n
k
k
wN
1