CDF of a gamma distribution ($X \sim \mathcal{G}(n, \lambda)$) looks like

$$F(x) = \frac{\Gamma_x(n)}{\Gamma(n)}$$

Where $\Gamma_x(n) = \int_0^x t^{n-1} e^{-t} \, dt$ the incomplete gamma function. Ok so far?

But how do I differentiate such an expression?

$$\frac{d}{dx} \frac{\int_0^x t^{n-1} e^{-t} \, dt}{\int_0^\infty t^{n-1} e^{-t} \, dt}$$


With help from @MhenniBenghorbal, I have gotten:

$$\frac{d}{dx} \frac{\int_0^x t^{n-1} e^{-t} \, dt}{\int_0^\infty t^{n-1} e^{-t} \, dt} = \frac{1}{\Gamma(n)} x^{n-1}e^{-\lambda t}$$

but then its missing the $\lambda^n$ term of the original PDF of a gamma distribution. How do I get that back? I must have overlooked something? But I can see where ...

  • $\begingroup$ The denominator does not depend on $x$. You can use Leibniz rule. $\endgroup$ – Mhenni Benghorbal Nov 5 '13 at 1:29
  • $\begingroup$ @MhenniBenghorbal, Ok I havent seem to learn this in school, but looking the the wiki page, I will obtain something like: $\frac{1}{\int_0^\infty t^{n-1} e^{-t}\, dt} \int_0^x \frac{\delta}{\delta x} (t^{n-1}e^{-t}) dt$. But $t^{n-1}e^{-t}$ it self doesn't have an $x$ term and will differenciate to $0$? $\endgroup$ – Jiew Meng Nov 5 '13 at 1:45

Here is how you apply it

$$ \frac{d}{dx}\int_{0}^{x}t^{n-1}e^{-t}dt= x^{n-1}e^{-x}. $$

Note: In your case you the fundamental theorem of calculus is enough

Theorem: Let $f$ be a continuous real-valued function defined on a closed interval $[a, b]$. Let $F$ be the function defined, for all $x$ in $[a, b]$, by $$F(x) = \int_a^x\!f(t)\, dt.$$ Then, $F$ is continuous on $[a, b]$, differentiable on the open interval (a, b), and $$F'(x) = f(x)\,$$ for all $x$ in $(a, b)$.

  • $\begingroup$ Ok, thanks. But now I have a minor hicup, I don't seem to be able to get back the expected PDF of a Gamma distribution. $\frac{1}{\Gamma(n)}x^{n-1} e^{-\lambda x}$ but the PDF of a gamma RV is $\frac{\lambda^n}{\Gamma(n)}x^{n-1}e^{-\lambda x}$. I am missing a $\lambda^n$? $\endgroup$ – Jiew Meng Nov 5 '13 at 3:00
  • $\begingroup$ Just make sure of your integrals. $\endgroup$ – Mhenni Benghorbal Nov 5 '13 at 3:17
  • $\begingroup$ By integrals, what are you referring to? $\endgroup$ – Jiew Meng Nov 5 '13 at 9:55
  • $\begingroup$ There are basically 2 terms the numerator which equals what u gave $x^{n-1}e^{-\lambda t}$ and the denominator which is $\Gamma(n)$. $\endgroup$ – Jiew Meng Nov 5 '13 at 10:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.