This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Random Number Questions
- From: Rodney Sparapani <rsparapa at post dot its dot mcw dot edu>
- To: gsl-discuss at sources dot redhat dot com
- Date: Fri, 29 Mar 2002 12:09:15 -0600 (CST)
- Subject: Random Number Questions
- Reply-to: Rodney Sparapani <rsparapa at post dot its dot mcw dot edu>
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