Hi all,

David King schrieb:
[..]
Whatever :). Yours is certainly clearer, mine a bit faster.

I've attached a patch with your proposal to the issue.


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.

I read in http://office.microsoft.com/en-us/excel/HP100625561033.aspx:

ZTEST is calculated as follows when sigma is not omitted:

ZTEST(array,µ0)=1-NORMSDIST((xquer-µ0)/(sigma/sqrt(n)))

or when sigma is omitted:

ZTEST(array,µ0)=1-NORMSDIST((xquer-µ0)/(s/sqrt(n)))

where xquer is the sample mean AVERAGE(array); s is the sample standard deviation STDEV(array); and n is the number of observations in the sample COUNT(array).

And so does Calc work.


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

Yes.


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

I thing, that further work on ZTEST should be postponed, until the specification in ODF1.2 is finished.

kind regards
Regina


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

Reply via email to