[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Beta distribution
From: |
Ben Pfaff |
Subject: |
Re: Beta distribution |
Date: |
Sat, 12 Mar 2005 20:18:22 -0800 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux) |
John Darrington <address@hidden> writes:
> Some of the values which are causing problems aren't particularly
> extreme.
>
> I'm suspecting a problem with lib/gsl_extras/betadistinv.c
>
> In particular gslextras_cdf_beta_Pinv.
I have output for the same test when run with SPSS 12.0 on a
Windows machine. The diff against f.out produced by SPSS 12.0
versus the values in the PSPP tests directory looks like this:
85c85
< .50 2.00 1.00 1.50 .50 .13
---
> .50 2.00 1.00 1.50 .50 .12
98c98
< .60 1.00 2.00 1.13 .60 .17
---
> .60 1.00 2.00 1.12 .60 .17
101c101
< .60 2.00 1.00 2.62 .60 .06
---
> .60 2.00 1.00 2.63 .60 .06
172c172
< .99 5.00 10.00 5.64 .99 .01
---
> .99 5.00 10.00 10.00 1.00 .00
(The columns are:
P df1 df2 i c p
where i = idf.f(P, df1, df2),
c = cdf.f(i, df1, df2),
and p = pdf.f(i, df1, df2).)
Only a few values are off. The only one off by much is the
example you pointed out. A similar diff for the beta
distribution looks like this:
211c211
< .99 .75 .25 1.00 .99 164383.5
---
> .99 .75 .25 1.00 .98 20860.76
218c218
< .99 1.00 .25 1.00 .99 250000.0
---
> .99 1.00 .25 1.00 .98 46067.00
225c225
< .99 1.50 .25 1.00 .99 431322.3
---
> .99 1.50 .25 1.00 .98 67836.74
(The columns are:
P a b i c p
where i = idf.beta(P, a, b),
c = cdf.beta(i, a, b),
and p = pdf.beta(i, a, b).)
Here, only the extreme values are off as far as I can tell. I
suppose this must be the root of the problem though.
(This is a good part of what I was going to bring up with Jason
anyhow.)
--
"Long noun chains don't automatically imply security."
--Bruce Schneier