We will derive the probability distribution function for the exponential density function and illustrate the application of this probability function. The exponential density function can be defined with a parameter lambda by the following statements. We set the parameter = 2 for illustrative purposes. syms t u lam = sym(2); f=lam*exp(-lam*u);
pretty(f)
2 exp(-2 u)
The distribution function can be found by symbolically integrating the over 0 < t and simplifying the results
F
0 t
e
x dx
F=int(f,u,0,t); pretty(F)
-exp(-2 t) + 1
The density and distribution function can be plotted over the nonzero domain of t hold on; ezplot(f,[0 3]); ezplot(F,[0 3]); axis([0 3 0 2])
-exp(-2*t)+1
2
1.8
1.6
1.4
1.2
1
0.8
0.6
0.4
0.2
0
0 0.5
1 1.5
2 2.5
3 t
This probability law is often used for reliability calculations in order to describe the lifetimes of part or component of a system.. A probability relationship that repeatedly occurs in reliability calculations can be defined in terms of the distribution function. The probability the random variable T is greater than t or P[T >t] is P[ T > t] = 1 - P[ T< t ] = 1 - F(t)
PROBLEM: Let us assume that the lifetime of a part is exponentially distributed. To what value should the parameter
be set to in order to make the probability that a part will last at least 4 hours equal to 0.368? Repeat the calculation when we desire the component lifetime should be greater than 4 hours rather than less than with the same probability.
SOLUTION: We first translate the problem statement to a precise mathematical one
P[ T < 4] = F[4,
] = 0.368
The distribution function F(t) is rewritten to allow for the parameter
t= sym(4); lam = sym('lam');
F= 1-exp(-lam*t);
The problem may be solved numerically by using the solve function of Matlab or by analytical function inversion. The first solution technique uses the solve function, double(solve(F-0.368,lam)) ans =
0.1147 and for the second part of the problem solve 1 - F(4,
) = 0.368
double(solve(1 - F - 0.368,lam)) ans =
0.2499
The second solution method begins by solving the equation symbolically for the variable u syms u t a s=solve('1-exp(-u*t) =a'); pretty(s)
log(1 - a)
- ----------
t
Substitution of numerical values we obtain the same result as we found using the numerical method a=0.368; t=4; subs(s) ans =
0.1147