# Thread: CDF & Gamma function

1. ## CDF & Gamma function

f(x)=a/b(x/b)^(a-1)exp(-(x/b)^a) for x>0.
i). find the cumulative distribution function F(x).I believe that i should start by antidifferentiation of f(x), but I was stuck there.
ii). calculate the n-th moment E(X^n) for all n=1,2,..Express it in terms of the Gamma function.
Thanx

2. Hello,
Originally Posted by Jojo123
f(x)=a/b(x/b)^(a-1)exp(-(x/b)^a) for x>0.
i). find the cumulative distribution function F(x).I believe that i should start by antidifferentiation of f(x), but I was stuck there.
ii). calculate the n-th moment E(X^n) for all n=1,2,..Express it in terms of the Gamma function.
Thanx
i) Yes, you have to find an antiderivative for f.

F(x) is 0 if x<0.
Now, if x>0 :

$F(x)=\int_0^x \frac ab \left(\frac tb\right)^{a-1} \exp\left(-\left(\frac tb\right)^a\right) ~dt$

Just substitute $y=\left(\frac tb\right)^a$
and the dy will simplify with $\left(\frac tb\right)^{a-1}$

ii)
$E(X^n)=\frac ab \int_0^\infty t^n \cdot \left(\frac tb\right)^{a-1} \exp\left(-\left(\frac tb\right)^a\right) ~dt$

The Gamma function is $\Gamma(z)=\int_0^\infty y^{z-1} e^{-y} ~dy$

Again, let $y=\left(\frac tb\right)^a$, to get -y in the exponential

3. For the second part ..

I got ..

$n \int^{\infty}_0 t^{n-1}e^{-y} dy$

How do I proceed any further from here?

4. Originally Posted by panda*
For the second part ..

I got ..

$n \int^{\infty}_0 t^{n-1}e^{-y} dy$

How do I proceed any further from here?
Hmm.. I don't see why you get an n at the beginning of the integral

Making the substitution, we get :

$\int_0^\infty t^n e^{-y} ~dy$

But now, you gotta transform t^n with respect to y.

$y=\left(\frac tb\right)^a \Rightarrow y^{1/a}=\frac tb \Rightarrow by^{1/a}=t \Rightarrow t^n=b^n y^{n/a}$

Hence the integral is :

$\mathbb{E}(X^n)=b^n \int_0^\infty y^{n/a} e^{-y} ~dy=b^n \Gamma\left(\tfrac na+1\right)$

Does it look clear ? Don't hesitate to tell if it is not.

I'm not that sure about the result, but I don't see where there would be a mistake ><

5. Yay ! \o/
It's correct, according to this : Weibull distribution - Wikipedia, the free encyclopedia