Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Probability - Gamma Distribution - How do I solve this integral?

  • 20-11-2011 1:28pm
    #1
    Moderators, Education Moderators, Motoring & Transport Moderators Posts: 7,396 Mod ✭✭✭✭


    I am given the following:

    An RV W has the MGF [latex]M_W(t) = (\displaystyle\frac{1}{1-2t})^5[/latex]. Find Pr(W > 11.78).

    Rearranging the above MGF I can find that it's the MGF of a gamma RV with parameters [latex]\alpha=5, \lambda=\frac{1}{2}[/latex], and from lectures we know that the pdf function of a Gamma RV is

    [latex]f_X(x) = \displaystyle{\frac{\lambda^{\alpha}x^{\alpha-1}e^{-{\lambda}x}}{\Gamma(\alpha)}[/latex]

    Thus Pr(W>11.78) = 1-Pr(W<11.78)
    = [latex]1 - \displaystyle{\int_0^{11.78}\frac{(\frac{1}{2})^{5}x^{5-1}e^{-{\frac{1}{2}}x}}{\Gamma(5)}dx[/latex]
    Rewriting this slightly:

    = [latex]1 - \displaystyle{\frac{(\frac{1}{2})^5}{\Gamma(5)}\int_0^{11.78}x^{4}e^{-{\frac{1}{2}}x}dx[/latex]

    I won't type everything I did, but just considering the integral on it's own, I tried using integration by parts [latex]\int{udv} = uv - \int{vdu}[/latex] taking u = x^4 (thus du = [latex] 4x^3 dx[/latex]) and dv = [latex] e^{-x/2} dx[/latex] (thus v = [latex]-2e^{-x/2}[/latex]).

    After doing this, all I calculated was [latex]\displaystyle{\int_0^{11.78}x^{4}e^{-{\frac{1}{2}}x}dx = -2x^4e^{-x/2} + 8\int{x^3e^{-x/2}dx}[/latex] (all evaluated from x=0 to x=11.78)

    I can put in the details of the integration if you want, but my problem is that the result isn't actually any easier to solve!

    Am I going about this the wrong way? It's only a part (b) of a 3 part question, and both parts (a) and (c) are short and easy, so I think I'm missing something obvious.

    Thanks.


Comments

  • Registered Users, Registered Users 2 Posts: 2,481 ✭✭✭Fremen


    Use IBP on the new integral, too. That'll give you another integral in the same form, but with an x^2 term. Do it again and again, and you're left with an e^x integral.

    There's a standard formula formula for integrals of this type, you can just look it up. It might actually be easier to prove the general case rather than integrating by parts four times.


  • Moderators, Education Moderators, Motoring & Transport Moderators Posts: 7,396 Mod ✭✭✭✭**Timbuk2**


    Thanks Fremen, I'm not sure if this is the formula you are referring to, but I noticed one in the lecture notes which links Gamma Random Variables with Poisson Processes, and the formula is

    [latex]P[T_r > t] = \displaystyle\sum_{k=0}^{r-1}\frac{({\lambda}t)^k}{k!}e^{-{\lambda}t}[/latex],

    so if I use this, taking r = alpha = 5, t = 11.78, I get

    [latex]P[W > 11.78] = \displaystyle\sum_{k=0}^{4}\frac{(5.89)^k}{k!}e^{-5.89}[/latex] = 0.3 when I work it out.

    Is this valid? I have a feeling no, as we aren't necessarily dealing with a Poisson process, and I'm not fully sure what I'm doing when I apply that formula - it doesn't even seem like I'm working with a continuous RV anymore.

    Another way (maybe this is what should be done!) is to notice that as lambda = 1/2, W ~ Gamma(alpha = 5 = 10/2 , lambda = 1/2), which is a particular case of the gamma distribution, where W ~ Chi-Square(10 df).

    Using tables or software to solve for P(W>11.78) gives 1-0.7 = 0.3

    Does the above formula make sense in this context?

    Thanks again!


  • Registered Users, Registered Users 2 Posts: 3,745 ✭✭✭Eliot Rosewater


    Fremen wrote: »
    There's a standard formula formula for integrals of this type, you can just look it up. It might actually be easier to prove the general case rather than integrating by parts four times.

    The fundamental theorem of calculus can be used directly for a lot of these integrals to "guess" the answer.

    For **Timbuk2**'s particular case, I'd assume that

    [LATEX]\displaystyle \int x^4 e^{-x/2} = p(x) e^{-x/2}[/LATEX]

    for p(x) some polynomial of degree 4 (biggest term x^4). Differentiate both sides (using the product rule on the RHS),

    [LATEX]\displaystyle x^4 e^{-x/2} = p'(x) e^{-x/2} + (-1/2) p(x) e^{-x/2}[/LATEX]

    Cancelling the exponentials we get a condition on p(x),

    [LATEX]x^4 = p'(x) - \frac{1}{2} p(x)[/LATEX]

    If we can find a polynomial p(x) to satisfy this we'll have our answer.

    Let [LATEX]p(x) = a_0 + a_1x^1 + a_2x^2 + a_3x^3 + a_4x^4[/LATEX]

    We have [LATEX]p'(x) =a_1 + 2 a_2x^1 + 3 a_3x^2 + 4 a_4x^3[/LATEX]

    And then that

    [LATEX]x^4 = (a_1 + 2 a_2x^1 + 3 a_3x^2 + 4 a_4x^3)- \frac{1}{2}
    (a_0 + a_1x^1 + a_2x^2 + a_3x^3 + a_4x^4) [/LATEX]
    Which we re-write as
    [LATEX]0= (a_1 - \frac{1}{2}a_0) + (2 a_2 - \frac{1}{2})x^1 + (3 a_3 - \frac{1}{2}a_2)x^2 + (4 a_4 - \frac{1}{2}a_3)x^3 + (-1 - \frac{1}{2}a_4)x^4 [/LATEX]

    The co-efficient of each power of x must be 0 for this to be satisfied. So we get, for instance
    [LATEX]-1 - \frac{1}{2}a_4=0 [/LATEX] => [LATEX] a_4 = -2[/LATEX]

    [LATEX]4 a_4 - \frac{1}{2}a_3=0 [/LATEX] => [LATEX] a_3 = 8 a_4 = -16[/LATEX]

    It ain't the prettiest, but in in the company of 4 integrations by parts, it's nearly a candidate for belle of the ball.


  • Registered Users, Registered Users 2 Posts: 1,583 ✭✭✭alan4cult


    Hint:
    Turn it into a chi-squared. 11.78 is a value in the tables iirc.


  • Moderators, Education Moderators, Motoring & Transport Moderators Posts: 7,396 Mod ✭✭✭✭**Timbuk2**


    Thanks for the answers!

    Alan, I did use a chi-square as an afterthought, at the end of my last post. I'm starting to think that's the way we are expected to solve it. I'm thinking it mightn't be just a coincidence that we are given lambda = 1/2, as this is a special case of the gamma distribution where the rv is chi-square distributed with 2*alpha df - if lambda was given to us as 1/4 (say), I would have to integrate I think!

    Thanks again everyone.

    And yes, 11.78 is given in Percentage Points of Chi-Square table, and it's corresponding probability is exactly 0.3 - it's probably not a coincidence in that case!!


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 2,103 ✭✭✭misslt


    My god probability got hard since I did it :P


  • Registered Users, Registered Users 2 Posts: 7,095 ✭✭✭doc_17


    Jeez lads....what was all that about!


  • Moderators, Education Moderators, Motoring & Transport Moderators Posts: 7,396 Mod ✭✭✭✭**Timbuk2**


    misslt wrote: »
    My god probability got hard since I did it :P

    Haha, it's not too bad, I think I just missed the obvious method (Chi square). It only is chi-square distributed when the parameter lambda=1/2, but I'm pretty sure the question was set up that way as 11.78 is conveniently tabulated!

    Actually last year's paper (the one that you would have done) seems to be considerably more difficult than previous years!


Advertisement