Results 1 to 13 of 13

Thread: Average of a random variable

  1. #1

    Thread Starter
    Addicted Member Rassis's Avatar
    Join Date
    Jun 2004
    Location
    Lisbon
    Posts
    248

    Average of a random variable

    I am so sorry to come back to this subject but I am facing the same problem once again. I explain: a few months ago I started a thread on how to integrate the Weibull function. At the time I didn’t receive any satisfactory answers and so I kept on using my good old numerical (approximate) method to solve the problem. But, this time, it seems that I have no other choice.
    The function is the following:



    Where alpha, beta and t0 are constants and e is the Neper number. I need to find the average of the variable t between 0 and tp. This average is given by:



    I can find in the literature no other than the result of t between 0 and infinity which yields:



    Where tau is the gamma function.



    An example follows: Suppose an item that fails according to a Weibull probability distribution with alpha (shape parameter) of 3, beta (scale parameter) of 1500 running hours and t0 (location parameter) of 500 running hours. What is its mean life if this item is replaced preventively every 2000 hours (tp) of accumulated time (as some times it will be replaced following a random failure and other times during preventive tasks at time tp)? The answer using a numerical method is 1539 hours (please see the attached Excel file).

    How do I come to the same result analytically?
    Attached Files Attached Files
    ...este projecto dos Deuses que os homens teimam em arruinar...

  2. #2
    Frenzied Member zaza's Avatar
    Join Date
    Apr 2001
    Location
    Borneo Rainforest Habits: Scratching
    Posts
    1,486

    Re: Average of a random variable

    I haven't gone all the way through it myself, but offhand can you not do the following:

    1) Substitute x = t - t0 into the integral

    2) Split the result into two, an (x) part + a (t0) part

    3) The first part is recognition - the derivative of the exponential gives you (more or less) the thing you're integrating so the integral is just the exponential.

    4) The second part you could multiply by x (to give the same as the first part) and then divide by x - solve by parts.

    Maybe you have gotten this far and run into trouble, but that looks to be the way to go at first glance.

    zaza
    Last edited by zaza; Nov 15th, 2005 at 05:13 PM.

  3. #3

    Thread Starter
    Addicted Member Rassis's Avatar
    Join Date
    Jun 2004
    Location
    Lisbon
    Posts
    248

    Re: Average of a random variable

    Thanks Zaza. I am going to explore your suggested steps and I will share results when I finish (or when I get blocked...)
    ...este projecto dos Deuses que os homens teimam em arruinar...

  4. #4

    Thread Starter
    Addicted Member Rassis's Avatar
    Join Date
    Jun 2004
    Location
    Lisbon
    Posts
    248

    Re: Average of a random variable

    For the time being, I gave up the constant t0 (which can be recovered easily at any time) and changed variables the following way:



    Then I picked up the Integrator http://integrals.wolfram.com/ , entered this expression and got the answer showed below.



    And I am now blocked! I don´t understand the meaning of "Gamma-brackets-two expressions separated by a comma", and I don’t know how to proceed. Any help?
    ...este projecto dos Deuses que os homens teimam em arruinar...

  5. #5
    Frenzied Member zaza's Avatar
    Join Date
    Apr 2001
    Location
    Borneo Rainforest Habits: Scratching
    Posts
    1,486

    Re: Average of a random variable

    Did you try doing it the way I suggested? The exponentials are much easier to take care of.

    zaza

  6. #6

    Thread Starter
    Addicted Member Rassis's Avatar
    Join Date
    Jun 2004
    Location
    Lisbon
    Posts
    248

    Re: Average of a random variable

    Hi Zaza.

    I have been away from home for sometime. Thank you for your last message. I studied carefully your suggested steps, but I couldn’t see any advantage in replacing variables (t – t0) by (x), because (t) still remains in the equation. And because I gave up the value t0, I would rather have your comments on the transformed expression which appears in my latest post and on the meaning of "Gamma-brackets-two expressions separated by a comma" shown in “The Wolfram integrator”. I suspect that it will be now easier to proceed. Thanks in advance.
    ...este projecto dos Deuses que os homens teimam em arruinar...

  7. #7
    Frenzied Member
    Join Date
    Jul 2002
    Posts
    1,370

    Re: Average of a random variable

    Assuming I understand your question here is a discussion on analysis of the Weibull function:

    http://www.mathpages.com/home/kmath122/kmath122.htm

  8. #8

    Thread Starter
    Addicted Member Rassis's Avatar
    Join Date
    Jun 2004
    Location
    Lisbon
    Posts
    248

    Re: Average of a random variable

    Jim,

    This site doesn´t provide the answer to my problem.
    Thanks anyway.
    ...este projecto dos Deuses que os homens teimam em arruinar...

  9. #9
    Frenzied Member zaza's Avatar
    Join Date
    Apr 2001
    Location
    Borneo Rainforest Habits: Scratching
    Posts
    1,486

    Re: Average of a random variable

    I think that this may be the incomplete gamma function.
    This may be leading back in a circle...

  10. #10

    Thread Starter
    Addicted Member Rassis's Avatar
    Join Date
    Jun 2004
    Location
    Lisbon
    Posts
    248

    Re: Average of a random variable

    Thanks Zaza. I am definitively unable to proceed but I am still hopeful that someone ends up bringing a "brilliant" solution one of these days. Fortunately and in the mean time, I have the alternative of the numerical method which is quite accurate - too heavy though.
    ...este projecto dos Deuses que os homens teimam em arruinar...

  11. #11
    Frenzied Member zaza's Avatar
    Join Date
    Apr 2001
    Location
    Borneo Rainforest Habits: Scratching
    Posts
    1,486

    Re: Average of a random variable

    Hm, I do wish you'd try it in the way I suggested.

    Substituting x=t-t0, dx=dt

    f(x) = (a/b) (x/b)^(a-1) e^-((x/b)^a)

    You can see that:

    d/dy e^-(y^a) = -a y^(a-1) e^-(y^a)

    and if you substitute y = x/b then you get -f(x) above. Hence this gets a lot easier to integrate because it is what is known as a Recognition Integral.

    Doing the integral, you integrate f(t).t.dt, which becomes f(x).(x+t0).dx integrated between -t0 and tp-t0. This you split into two integrals:

    f(x).x.dx and f(x).t0.dx

    The latter just gets you -t0.e^-(x/b)^a whereas the former you have to integrate by parts.
    Integration by parts of the function u.dv/dx gives you:

    [uv] - Int(v.du/dx)

    so if you choose u=x and dv/dx = f(x), then the whole thing will disappear in two steps - the first gets rid of the u part (differentiates to 1) and the second leaves you integrating the exponential.

    Then evaluate the lot between -t0 and tp-t0, and you're there.


    Unless I've made a mistake somewhere...


    zaza

  12. #12

    Thread Starter
    Addicted Member Rassis's Avatar
    Join Date
    Jun 2004
    Location
    Lisbon
    Posts
    248

    Re: Average of a random variable

    Zaza,

    I feel miserable because I tried unsuccessfully all the help that you provided for a few days and I am actually unable to reach a conclusion. I am not that proficient in integration and I just can’t move any further. Could you please show me a final expression (together with an example)?

    Alfa = 3;
    Beta = 1500;
    t0 = 500;
    tp = 2000;

    I know that the correct answer is 1539.

    Thanks.
    ...este projecto dos Deuses que os homens teimam em arruinar...

  13. #13

    Thread Starter
    Addicted Member Rassis's Avatar
    Join Date
    Jun 2004
    Location
    Lisbon
    Posts
    248

    Re: Average of a random variable

    Any help on this?
    ...este projecto dos Deuses que os homens teimam em arruinar...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width