# Explicit CDF associated to Gamma PDF

Let the distribution function of $X$ for $x>0$ be:

$$F(x) = 1 - \sum_0^3 \frac{x^ke^{-x}}{k!}$$

what is the density function of $X$ for $x > 0$?

This is what I'm thinking:

$$\frac{x^0e^{-x}}{1} + \frac{x^1e^{-x}}{1} + \frac{x^2e^{-x}}{2} + \frac{x^3e^{-x}}{6}$$

and this looks like the beginning of a series expansion... and I know one thing we can do with series is try to differentiate or integrate.

And since we are going from cdf to pdf I think that means we want to differentiate (so maybe I didnt need to actually plug those numbers in above)

So: $$\frac d{dx}(1-\sum_0^3 \frac{x^ke^{-x}}{k!}) =$$ I don't know but here goes nothin...:$$-( kx^{k-1}e^{-x}-x^ke^{-x} ) =$$ I think thats the derivative of the numerator anyway. Now I'm seeing k! as a constant no matter what. So that denominator can just be left there til after? I guess the summation can't just disappear for no good reason either so: $$-\sum_0^3 \frac {kx^{k-1}e^{-x}-x^ke^{-x}}{k!}$$

OK so my reasoning about the why i THOUGHT it is discrete is because I saw the summation and thought 'ooh, discrete' but it's actually increasing the k by 1, not the x, and the problem states x>0.

So lemme try this again: $$-e^{-x}\sum_0^3 \frac {kx^{k-1}-x^k}{k!} =$$ $$e^{-x}\sum_0^3 \frac {x^k-kx^{k-1}}{k!} =$$

so now I can use my summation knowledge!...

Ooh wow, so this is interesting, the first 4 terms: $$(1) + (x-1) + (\frac12 x^2-x) + (\frac{x^3}6-\frac12 x^2)$$

so each successive term is negating the previous 2nd highest power's term.

Therefore: $$(\frac16)e^{-x}x^3$$

phew! But super interesting! What is this sort of series called? I like its style (I haven't done much with series)

• At first I noticed it is discrete. Also, the sum = 1 which makes sense being that it is a cdf. Accidentally pressed 'enter'.. im still writing
• As for the "$1-$": note that any cdf defined over $x>0$ has to have a limit of $1$ as $x \to \infty$ Sep 19, 2014 at 4:20
For every nonnegative integer $n$, the density $f$ defined on $x\gt0$ by $f(x)=\frac1{n!}x^n\mathrm e^{-x}$ is the PDF of the gamma distribution $(n+1,1)$. Your case is when $n=3$. The parameter $n$ could be any real number $n\gt-1$ provided $n!$ is replaced by $\Gamma(n+1)$.