Topic 3-3 PDF basics Solved problems Problem 3-3-1 The profit (in thousand dollars) of a construction job is described by the following probability density function: fX(x) 0.02 0.01 Profit, x ($1000) -10 0 10 20 30 40 50 60 70 (a) What is the probability that the contractor will lose money on this job? (ans. 0.2) (b) Suppose the contractor declares that he has made money on this job; what is the probability that his profit was more than 40 thousand dollars? (ans. 0.1875) Solution: Let X be the profit (in $1000) from the construction job. (a) P(lose money) = P(X < 0) = Area under the PDF where x is negative = 0.0210 = 0.2 (b) Given event is X > 0 (i.e. money was made), hence the conditional probability, P(X > 40 | X > 0) = P(X > 40 X > 0) P(X > 0) = P(X > 40) P(X > 0) Let's first calculate P(X > 40): comparing similar triangles formed by the PDF and the x-axis (with vertical edges at x = 10 and at x = 40, respectively), we see that P(X > 40) = Area of smaller triangle 2 70 40 = Area of larger triangle 70 10 = 0.52 [(70 - 10)(0.02) 2] = 0.015 Hence the required probability P(X > 40 | X > 0) is 0.015 [100.02 + (70 - 10)(0.02) 2] = 0.015 0.08 = 0.1875 Problem 3-3-2 The storm run-off X (in cubic meters per second, cms) from a subdivision can be modeled by a random variable with the following probability density function: fX(x) = x2 c(x ); 6 for 0 x 6 0 otherwise ; (a) Determine the constant c and sketch the density function. (ans. 1/6) (b) The run-off is carried by a pipe with a capacity of 4 cms. Overflow occurs when the run-off exceeds the pipe capacity. If overflow occurs after a storm, what is the probability that the run-off in this storm is less than 5 cms? (ans. 0.714) (c) An engineer considers replacing the current pipe by a larger pipe having a capacity of 5 cms. Suppose there is a probability of 60% that the replacement would be completed by the next storm. What is the probability of overflow in the next storm? (ans. 0.148) Solution: (a) Applying the normalization condition f X ( x)dx = 1 6 x2 x3 x2 c( x ) dx = 1 c = 1 6 2 18 0 0 18 c = 1/6 9 36 6 3 6 (b) To avoid repeating integration, let’s work with the CDF of X, which is 1 x2 x3 FX(x) = 6 2 18 = (9x2 – x3)/108 (for x between 0 and 6 only) Since overflow already occurred, the given event is X > 4 (cms), hence the conditional probability P(X < 5 | X > 4) = P(X < 5 and X > 4) / P(X > 4) = P(4 < X < 5) / [1 – P(X 4)] = [FX(5) - FX(4)] / [1 - FX(4)] = [(952 – 53) – (942 – 43)]/ [108 – (942 – 43)] = (100 – 80) / (108 – 80) = 20/28 = 5/7 0.714 (c) Let C denote “completion of pipe replacement by the next storm”, where P(C) = 0.6. If C indeed occurs, overflow means X > 5, whereas if C did not occur then overflow would correspond to X > 4. Hence the total probability of overflow is (with ’ denoting compliment) P(overflow) = P(overflow | C)P(C) + P(overflow | C’)P(C’) = P(X > 5)0.6 + P(X > 4)(1 – 0.6) = [1 - FX(5)]0.6 + [1 - FX(4)]0.4 = (1 – 100/108)0.6 + (1 – 80/108)0.4 0.148 Problem 3-3-3 Severe snow storm is defined as a storm whose snowfall exceeds 10 inches. Let X be the amount of snowfall in a severe snow storm. The cumulative distribution function (CDF) of X for a given town is: FX(x) = 1 - ( 10 4 ) x for x 10 and the CDF is zero for x < 10. (a) Determine the median of X. (ans. 11.9) (b) What is the expected amount of snowfall in a severe snow storm? (ans. 13.3) (c) Suppose a disastrous snow storm is defined as a storm with over 15 inches of snowfall. What percentage of the severe snow storms are disastrous? (ans. 0.2) (b) Suppose the probability that the town will experience 0, 1 and 2 severe snow storm in a year is 0.5, 0.4 and 0.1 respectively. Determine the probability that the town will not experience a disastrous snow storm in a given year. Assume the amounts of snowfall between storms are statistically independent. (ans. 0.885) Solution: (a) The median of X, xm, is obtained by solving the equation that defines xm, P(X xm) = 0.5 FX(xm) = 0.5 1- (10 xm)4 = 0.5 xm 11.9 (inches) (b) First, obtain the PDF of X: fX(x) = dFX/dx = 4104x-5 for x 10, and zero elsewhere. Hence the expected amount of snowfall in a severe snow storm is E(X) = xf X ( x )dx = 4 10 4 x 4 dx 10 = 4 4 3 10 x 10 3 = 4310 13.3 (inches) (c) P(disastrous severe snowstorm) = P(X > 15) = 1 - P(X 15) = 1 - [1 - (10/15)4] = (2/3)4 0.2 About 20% of snow storms are disastrous. (d) Let N denote "No disastrous snow storm in a given year". Also, let E0, E1, E2 denote the respective events of experiencing 0,1,2 severe snow storms in a year. In each event, the (conditional) probability of N can be computed: P(N | E0) = 1 (if there's no severe snow storm to begin with, definitely there won't be any disastrous one); P(N | E1) = P(X 15) = 1 - (10/15)4 = 1 - (2/3)4; P(N | E2) = [P(X 15)]2 = [1 - (2/3)4 ]2 (statistical independence between storms); Noting that E0, E1 and E2 are m.e. and c.e., the total probability of N can be computed: P(N) = P(N | E0)P(E0) + P(N | E1)P(E1) + P(N | E2)P(E2) = 10.5 + [1 - (2/3)4]0.4 + [1 - (2/3)4]20.1 0.885 Problem 3-3-4 Suppose X is a random variable defined as X= final cost of project estimated cost of project Which has a probability density function (PDF) as follows: x 1 0 f X ( x) 3 / x 2 0 1 x a x 1.5 (a) Determine the value of a (ans. 1.5) (b) What is the probability that the final cost of a project will exceed its estimated cost by 25%? (ans. 0.4) (c) Determine the mean value and standard deviation of X. (ans. 1.216, 0.143) Solution: Let F be the final cost (a random variable), and C be the estimated cost (a constant), hence X=F/C is a random variable. (a) To satisfy the normalization condition, a 1 a 3 3 3 dx 3 1 , 2 a x x 1 hence a = 3/2 =1.5 (b) The given event is “F exceeds C by more than 25%”, i.e. “F > 1.25C”, i.e. “F / C > 1.25”, whose probability is P(X > 1.25) = f X ( x)dx 1.25 1.5 1.5 3 3 dx = 2 x x 1.25 1.25 = -2 – (- 2.4) = 0.4 = (c) The mean, 1 .5 E(X) = 3 x x 2 dx = 3 ln x11.5 1.216, 1 while 1 .5 E(X2) = x 2 1 3 dx = 3(1.5 – 1) = 1.5, x2 with these, we can determine the variance Var(X) = E(X2) – [E(X)]2 = 1.5 – 1.2163953242 = 0.020382415 X = 0.02038241 5 0.143 Problem 3-3-5 The duration of a rainstorm at a given location is described by the following probability density function 0 x2 x / 8 f X ( x) 2 / x 2 0 2 x8 elsewhere (a) Determine the mean duration of a rainstorm. (ans. 3.106) (b) If the current rainstorm started two hours ago, what is the probability that it will be over within another hour? (ans. 4/9) Solution: 2 8 x 2 x3 (a) E(X) = xf ( x) dx = x dx + x 2 dx = 8 24 x 2 0 2 8 2 ln x 2 = 1/3 + 2(ln 8 – ln 2) 3.106 0 3 (b) P(X < 3 | X > 2) = P( X 3 and X 2) P(2 X 3) = = P( X 2) P( X 2) 2 2 dx x2 2 1 x 8 dx 0 = 2 x 3 2 2 x 1 16 0 2 = 1 2/ 3 = 4/9 1 1/ 4 Exercises Exercise 3-3-1 The annual maximum snow load X (in lb/ft2) on buildings with a flat roof in a northern location can be modeled by a random variable with the following cumulative probability distribution function 0 4 FX ( x) 10 1 x for x 10 for x 10 (a) Determine the mean value and median of X. (b) An engineer recommends a design snow of 30 lb/ft2 for a building. What is the probability of roof failure (design load being exceeded) in a given year? For the first time in the 5th year? (c) If roof failure occurs in 2 or more of the next 10 years, the design engineer will face a penalty. What is his chance of going through the next 10 years without a penalty? Solution: Exercise 3-3-2 The cumulative distribution function (CDF) of the daily progress in a tunnel excavation construction project is given below. F (x) X 1.0 0.6 0.4 0 2 6 10 x, length in meters (a) What is the probability that the progress in tunnel excavation will be between 2 and 8 meters on a given day? (b) Determine the median length of tunnel excavated on a given day. (c) Plot the probability density function (PDF) of the daily progress in tunnel excavation. (d) Determine the mean length of tunnel excavated on a given day. Solution: (a) Note that we are given the CDF, FX(x) = P(X x) and it is a continuous function. Hence P(2 X 8) = FX(8) – FX(2) = 0.8 – 0.4 = 0.4 (b) The median is defined by where F(x) = 0.5, which occurs somewhere along x = 2 and x = 6; the constant slope there gives (0.5 – 0.4) / (xm – 2) = (0.6 – 0.4) / (6 – 2) xm = 2 + 2 = 4 (c) The PDF is the derivative (i.e. slope) of the CDF, hence it is the following piecewise constant function: f (x) X 0.2 0.1 0.05 0.05 2 6 10 x Exercise 3-3-3 The maximum load S in tons on a structure is modeled by a continuous random variable S whose cumulative distribution function CDF is given as follows: 0 s3 s2 FS ( s) 864 48 1 for s 0 for 0 s 12 for s 12 (a) Determine the mode and mean value of S. (b) The strength R of the structure can be modeled by a discrete random variable with the following probability mass function. PR (r) 0.7 0.3 10 r, tons 13 Determine the probability of failure, i.e., the probability that loading S is greater than the strength R. Exercise 3-3-4 The cumulative distribution function (CDF) of an engineering variable X is: 0 FX ( x) 0 .5 ( x 2 ) 1 e (a) Determine the median of X (b) Determine the probability of X being between 1 and 4. (c) Determine the probability density function (PDF) of X. for x 2 for x 2 Exercise 3-3-5 The annual maximum flood level of a river at a given measuring location has the following cumulative distribution function (CDF): 0 x0 2 FX ( x) 0.0025 x 0.1x 0 x 20 1 x 20 (a) Determine and sketch the probability density function f X (x). (b) What is the median annual maximum flood level? Exercise 3-3-6 The size (in mm) of a crack in a structural weld is described by a random variable x with the following probability density function: x / 8 f X ( x) 1 / 4 0 0 x2 2 x5 elsewhere (a) Sketch the PDF and CDF on a piece of graph paper. (b) Determine the mean crack size. (c) What is the probability that a crack will be smaller than 4mm? (d) Determine the median crack size. (e) Suppose there are four cracks in the weld. What is the probability that only 1 of these 4 cracks is larger than 4mm? (ans. P(N=1|n=4,p=1/4) = 0.422) Exercise 3-3-7 The total load, X (in tons), on the roof of a building has the following Probability Density Function 24 / x 3 f X ( x) 0 3 X 6 elsewhere (a) Determine and plot the cumulative distribution function of X, i.e., FX (x). (b) What is the expected total load? (c) Determine the coefficient of variation of the total load. (d) Suppose the roof could carry only 5.5 ton before collapse. What is the probability that the roof will collapse?