Re: Stat function requests
- From: "David J. Braden" <dbraden rochester rr com>
- To: Morten Welinder <terra diku dk>
- Cc: gnumeric-list gnome org
- Subject: Re: Stat function requests
- Date: Wed, 23 Oct 2002 17:41:50 -0400
On Wednesday, October 23, 2002, at 04:57 PM, Morten Welinder wrote:
(1) For distributions, return 0 for x <= lower-bound, and 1 for x >=
upper-bound.
While XL-incompatible, this might be useful. Not my call, though.
It *is* useful, especially in simulations when working with mixtures on
dist. parameters. It doesn't hurt that it is standard practice as well
<g>.
I would argue that while it doesn't replicate Excel's behavior, it
certainly isn't a strong incompatibility. Indeed, your GAMMAINV is
incompatible with Excel along the same lines: when p gets too close for
your algorithm to work, you switch to #VALUE! instead of returning 5E+06
(a la Excel, which BTW is inconsistent with what it does for NORMINV,
but hey...). Your binomdist does the reasonable thing (you evidently are
using beta-tails for the calcs) to give a far better implementation than
Excel's BINOMDIST; no one will complain about the incompatibility there,
will they?
<<snip>>
(3) Fix the discrete densities to correct what Excel does, namely,
truncating doubles, where integers are expected, before evaluation.
We cannot do this. All floating point arithmetic has rounding errors
and we would get some really weird failures if we tested for intergers.
Things might work for an explicit "3", but fail for (3*1.1-0.3).
Good point. A colleague suggests a global "fudge factor" that is
user-accessible to take care of this. Something as simple as abs(x -
round(x)) < fudge.
DaveB
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]