Boost logo

Boost Users :

Subject: Re: [Boost-users] [Math Toolkit] Gamma Distribution
From: Mikhail Levin (svarneticist_at_[hidden])
Date: 2009-07-20 16:53:16


John Maddock <john <at> johnmaddock.co.uk> writes:

>
> John Maddock wrote:
> > Christian Henning wrote:
> >> Hi John, thanks for your reply. Your answer is basically what the
> >> documentation describes. But, it still leaves me with question marks
> >> in my head.
> >>
> >> Let me ask differently. How do I construct the the red curve in the
> >> second image? Parameters here are: Shape = 1 and Scale = 1.
>
> With apologies, ignore my previous message, the first graph is correct, the
> second graph has an incorrect title: it shows how the gamma distribution
> varies when the shape = 3, and the scale changes. So the red curve on the
> second graph is for shape = 3, scale = 1.
>
> I've just updated SVN to reflect this, and hopefully put an end to the
> confusion !
>
> John.
>

Hello,

I am confused about the graphs in Gamma Distribution documentation page:
http://www.boost.org/doc/libs/1_39_0/libs/math/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/gamma_dist.html

The first (blue) curve in the first graph suggests that Gamma PDF(0.0, 0.5, 1.0)
== 1.0. Is this correct? Shouldn't it go to infinity as x approaches 0?
PDF(x, k, theta) = x^(k-1)*exp(-x/theta)/(theta^k*gamma(k))
PDF(0.0, 0.5, 1.0) = 0^(-0.5)*1/gamma(0.5) = 1/(0^0.5 * gamma(0.5)) = Inf

In the second graph both first and third curves have scale = 2 and shape = 2,
yet they look different.

Am I missing something?

Thank you

Mikhail


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net