Hi David,
David King schrieb:
Moving discussion of this issue here, at Regina's request.
Hi Regina
The function ZTEST should depend on NORMSDIST.
Therefore NORMSDIST has to be controlled and improved first.
I'm afraid I disagree pretty whole heartedly :)
NORMSDIST may or may not be more accurate in Excel, but in Calc
it is accurate enough to use.
I agree, NORMSDIST is OK. But ZTEST doesn't use it, but calculates all
itself.
For example for our 2nd example the stats package R gives a p-
value of 0.02275 or 2.275% - accurate to just 4 digits - that's
good enough for practical purposes. Both Excel and Calc have more
digits.
The point is that Calc ZTEST is *broken* and has probably always
been - there is a clear and simple bug that I've found (and even
provided a couple of lines of code to solve).
Yes, I agree, that it is wrong. But I'm not sure about your solution.
Wouldn't it be more natural to calculate a "real" sigma than a variance?
I mean
sigma = sqrt((fSumSqr - fSum*fSum/rValCount)/(rValCount-1.0));
in stead of
sigma = (fSumSqr - fSum*fSum/rValCount)/(rValCount-1.0);
and than for both cases use your suggestion
PushDouble(0.5 - gauss((mue-x)*sqrt(rValCount)/sigma));
But both ways would have
fSumSqr - fSum*fSum/rValCount
which might give similar problems like in issue 78250.
The good news is that it's very easy to fix :)
Another quick fix would be to use sigma*sigma with the third parameter.
The real problem I see is, that a function, even corrected in one of
this ways, does not follow the definition in ODF1.2. What to do?
kind regards
Regina
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]