This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: confused about PDF and CDF functions
- From: Martin Jansche <jansche at ling dot ohio-state dot edu>
- To: <gsl-discuss at sources dot redhat dot com>
- Date: Fri, 29 Aug 2003 17:52:02 -0400 (EDT)
- Subject: Re: confused about PDF and CDF functions
On 29 Aug 2003, Rajarshi Guha wrote:
> Thus for a given distribution, which GSL function would I use to
> say get the value of P(X)? *_pdf, *_cdf_*_P or *cdf_*_Q
Can't tell, since you didn't say what you mean by P(X). As the names
of the GSL functions suggest, _pdf(x) gives you the density at point
x, *_cdf_*_P(x) computes the value of the definite integral of the
density up to point x, and *_cdf_*_Q(x) gives you the integral of the
density starting from point x. Some authors write *_cdf_*_P(x) as
Pr[X <= x], i.e., the probability that X takes on a value less than x.
> the function gsl_ran_gaussian_pdf() only takles the value of std
> dev. What would I need to do if I wanted the value from the
> distribution with a mean other than 0?
Transform the random numbers as described in the GSL manual.
> So say I use the gaussian CDF - that would imply that it is a two
> parameter distribution. Is this correct. If so why does
> gsl_ran_gaussian() take only one parameter?
Because transforming to means other than 0 is trivial.
- martin