
Type: Subtask

Status: Closed

Priority: Major

Resolution: Duplicate

Affects Version/s: None

Fix Version/s: ODF 1.2

Component/s: OpenFormula

Labels:None
5.) ZTEST
> TODO: OOo Calc and Gnumeric produce the same results. Excel (2007
> beta) claims to calculate the onetailed 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 onetailed 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)
Well, I'll test it in R. There is NO standard ztest, BUT the ttest
will do it, too. [There is also the package 'TeachingDemos' wich does
define the ztest]
> > z.test(x, mu=15, sd=sd)
>
> One Sample ztest
>
> data: x
> z = 0.3111, n = 30.000, Std. Dev. = 8.803, Std. Dev. of the sample mean
> = 1.607, pvalue = 0.7557
> alternative hypothesis: true mean is not equal to 15
> 95 percent confidence interval:
> 12.34980 18.65020
> sample estimates:
> mean of x
> 15.5
where x = 1..30
This same example gives a value of 0.38 in Calc. I have NO idea what
0.38 stands for. And I just noticed that it is impossible to compute a
ttest on a single array in Calc against the expected mean  or did I
miss something?
[The ttest in R gives virtually identical results, because a sample
size of 30 is large enough to approximate the zdistribution.]