pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch #5583] NPAR TESTS


From: John Darrington
Subject: Re: [patch #5583] NPAR TESTS
Date: Tue, 19 Dec 2006 08:15:28 +0900
User-agent: Mutt/1.5.9i

On Mon, Dec 18, 2006 at 11:52:27AM -0500, Jason Stover wrote:
     On Sun, Dec 17, 2006 at 01:47:29PM +0900, John Darrington wrote:
     > On Sat, Dec 16, 2006 at 10:27:01PM +0000, Jason H Stover wrote:
     >      
     >      I would use the exact result until the sample size grows enough to 
cause
     >      overflows. 
     > 
     > OK.  Any ideas how large such a sample would be ?
     
     I would have to look at this closely to decide, but after some initial
     thought, I would say: Large enough that we should just use
     gsl_cdf_binomial_[PQ] always. gsl_cdf_binomial_[PQ] use a
     gamma-function reparameterization to the binomial distribution, which
     means they don't compute the summation of the binomial mass function
     to compute the binomial CDF. 

So the complexity is independent of the sample size?  That's good.

     The problem with the exact computations
     is usually overflow due to small values of the mass function. Since
     gsl_cdf_binomial_[PQ] cicumvent this by reparamaterizing with the
     gamma function, my guess is that there is no need for an asymptotic
     approximation.
     
     I can run some tests to look for a threshold at which pspp should use 
     an approximation, but I'm certain it's going to be large enough to be
     almost, and possibly never, necessary with IEEE 754 arithmetic. Because of
     that, I'd recommend checking in the NPAR procedure with the gsl
     functions. 

That would certainly make the code and the tests simpler.

J'
     

-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.


Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]