1 Attachment(s)
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:
http://img322.imageshack.us/img322/6335/ft7ug.jpg
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:
http://img246.imageshack.us/img246/8836/meanofft8kf.jpg
I can find in the literature no other than the result of t between 0 and infinity which yields:
http://img267.imageshack.us/img267/7...nfinity7ww.jpg
Where tau is the gamma function.
http://img267.imageshack.us/img267/5221/graph5ey.jpg
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?
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
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...) :)
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:
http://img251.imageshack.us/img251/7...requaes9eh.jpg
Then I picked up the Integrator http://integrals.wolfram.com/ , entered this expression and got the answer showed below.
http://img123.imageshack.us/img123/4...ator8iq.th.jpg
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?
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
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.
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
Re: Average of a random variable
Jim,
This site doesn´t provide the answer to my problem.
Thanks anyway.
Re: Average of a random variable
I think that this may be the incomplete gamma function.
This may be leading back in a circle...
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.
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
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.
Re: Average of a random variable