David K said:
the function =STDEV(1.4434,1.4434,1.4434) gives
2.98023E-08 (at least on my computer using Excel
2002, sp3)
Is this just rounding error due to IEEE double precision.
Yes. But the numerical error caused by the binary
representation is exacerbated by the variance formula
apparently used in Excel 2002 (sp3), which seems to
be different from Excel 2003.
Mathematically, the sample variance can be computed
using either the following equivalent formulas:
1. var = SUM((x - mean)^2, for all x) / (n - 1)
2. var = (SUM(x^2, for all x) - SUM(x, for all x)^2 / n) / (n - 1)
In both cases, std dev = SQRT(var).
When we compute var manually using #2, where
x1 = x2 = x3 = 1.4434 (n = 3), we get:
var = 8.88178419700125E-16
sd = 2.98023223876953E-08
That matches your results. But when we use #1,
we get:
var = 7.39557098644699E-32
sd = 2.71947991102104E-16
That matches the STDEV(1.4434,1.4434,1.4434)
result using Excel 2003.
Note that in both cases, VAR() and STDEV() are not
zero, as you might have expected, even though
AVERAGE(1.4434,1.4434,1.4434) displays 1.44340000000000E+00.
I believe the displayed result of AVERAGE() belies the
fact that there are non-zero bits in the remaining 2-3
binary bits that Excel must round in order to display a
decimal result. I believe that is evidenced by the fact
that (1.4434 - AVERAGE(...))^2 yields 7.39557098644699E-32.
(But I am mystified by the fact that this numerical error
is not evident when I program #1 in VBA, which does
display var = 0 -- a pleasant surprise. Without access
to the VBA binary representations, VBA compiled code
and internal Excel algorithms, I can only speculate wildly
about the disparity.)