This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Random Number Questions


gsl-discuss:

First, there seems to be a problem in the Random Number docs.  For example, in 
The Gaussian Dist.  I believe that gsl_ran_gaussian_ratio_method should be 
random and gsl_ran_ugaussian_pdf should be function.  There seem to be many 
instances where function and random are reversed.  Of course, it would be 
obvious to the reader.  In addition, the gaussian functions take the standard 
deviation rather than the variance.  I find this contrary to common practice.  
I'd suggest that new functions be added to use the variance (maybe these could 
be provided by the pre-processor).  Also, it is generally more convenient to 
work with the logarithm of the pdf.  Could functions like the following be 
entertained?

double gsl_ran_gaussian_log_pdf (const double x, const double variance)
{
  double p = -0.5 * (log (2 * M_PI * variance) + (x * x) / variance);
  return p;
}

Rodney Sparapani              Medical College of Wisconsin
Sr. Biostatistician           Patient Care & Outcomes Research (PCOR)
rsparapa@mcw.edu              http://www.mcw.edu/pcor
Was 'Name That Tune' rigged?  WWLD -- What Would Lombardi Do


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]