> I agree, NORMSDIST is OK. But ZTEST doesn't use it, but 
calculates all 
> itself.

It actually does use gauss() - which I assume is at the heart of 
NORMSDIST. 
GAUSS()=NORMSDIST+0.5 I think.

> 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));

Whatever :). Yours is certainly clearer, mine a bit faster.

> But both ways would have
>       fSumSqr - fSum*fSum/rValCount
> which might give similar problems like in issue 78250.

Yes - really should use the same algorithm as VAR, DVAR, STDEV 
etc.

> 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?

I don't think that ODFF (draft of 16May08) has the definitive 
answer to this:

"TODO: OOo Calc and Gnumeric produce the same results. Excel 
(2007 beta) claims 
to calculate the one-tailed test. All produce different results 
than expected! 
What OOo Calc and Gnumeric calculate is out of my scope. Excel 
tries to 
calculate the probability by integrating from minus infinity to z 
and 
substracts this from one. That would only be right, if the 
absolute value of z 
is taken, not the signed z! (I speak already of the one-tailed 
results for this 
case, so no confusion here.) So, either I made a 
mistake/misinterpretation or 
all three apps don't get it right(TM)."

We've gone back to basics and understand exactly what Excel does, 
which is 
admittedly daft, and is not what they say in their knowledge base 
article 
(revised Jan08) or Help. We can reproduce the results in R. It 
all supports 
what 'TM' says. We can document how to use the function sensibly, 
even if 
Excel's documentation is faulty.

So as far as I can see we've got the thing nailed... Do you 
agree?

I have a load of things to feed back to ODFF anyway; I'll just 
add this to the 
list.

Best regards
David



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to