GNOME Bugzilla – Bug 405958
ZTEST should take extra optional argument
Last modified: 2008-06-18 01:35:03 UTC
given the following values in A1 to A4: 2,3,4,5 ztest(A1:A4,3.5) correctly evaluates to 0.5 ztest(A1:A4,3.5,1.29) should also be 0.5 but evaluates to 4.93504506253327E-06 which is slightly off (to say the least)
It may not be worth mentioning that to be Excel compatible ztest of course allows a third optional argument that si ignored in the function description, and really returns the right-tailed p-value (rather than the two-tailed p-value). I guess this misdescription is compatible with Excel's documentation that also erroneously seems to claim to calculate the two-tailed p-value.
I'm not so sure. ztest(A1:A4,3.5) is 0.5 because 3.5 is dead-center in the set {2,3,4,5} 1.29 is far to the left of the center of {2,3,4,5,3.5} (The center is still 3.5 so ztest(a1:a4,3.5,3.5) is 0.5)
Ok, I see. We should take an extra optional argument to use in place of range_stddev_est on the range. Fine, we can do that.
Yes Morten, I had just figured out that my assumption that we were using the same syntax as Excel and OOo was flawed and 3.5 became part of the data set. We should have an optional argument (if we claim Excel compatibility).
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.