Practice Quiz 2 Quiz Date: Feb 6, 2015 STAT-3610 Here is an example of the type of problem that could be on the quiz. The quiz can come from any one of the homework or related problems, including this one. The weekly demand for propane gas (in 1000s of gallons) from a particular facility is a rv X with pdf 1 2 1− 2 f (x) = x 0 1≤x≤2 otherwise Plotting the pdf: When sketching the graph by hand, note that the function f (x) is increasing on [1, 2], i.e., f 0 (x) > 0 for all x ∈ [1, 2]. Since we know the value at x = 1, f (1) = 0, the value at x = 2, f (2) = 3/2, and the function is increasing from 1 to 2, we can easily plot the graph by finding the value of the cdf at some interim value say x = 3/2, f (3/2) = 1/3. 1.5 1 0.5 1 2 Computing the cdf: We know that F (x) = 0, for X < 1 and F (x) = 1 for x > 2, but for 1≤x≤2 x Z F (x) = P (X ≤ x) = 2 1 1 1− 2 t 1 dt = 2 t + t x 1 1 =2 x+ −2 x Note, F (1) = 0 and F (2) = 1. Now we have the cdf define everywhere on (−∞, ∞) 0 2 x+ F (x) = 1 1 x −∞ < x < 1 −2 1≤x≤2 2<x<∞ 1 0.5 1 Characteristics of Probability Distributions 2 Practice Quiz 2 Quiz Date: Feb 6, 2015 STAT-3610 Obtaining Percentiles: Find an expression for the (100p)th percentile, where p ∈ (0, 1). What is the value of µ̃, the population median? Let p be any value between 0 and 1, i.e., 0 < p < 1. For any value of x, 1 < x < 2 the cdf is 1 F (x) = P (X ≤ x) = 2 x + − 2 x To find the percentile, set F (x) = p and solve for x, to get the following equation, 1 2 x+ −2 =p x Divide both sides by 2 and multiply both sides by x and you get x2 + 1 − 2x = (p/2)x subtract p/2 from both sides and combine like terms, you get the following quadratic equation, x2 − (2 + p/2)x + 1 = 0 Plugging into the quadratic formula it is easy to show that p xp = (1 + p/4) ± (1 + p/4)2 − 1 for 1 < xp < 2. If p = 1/2 then √ √ 9 17 9 + 17 13.1231 µ̃ = + = ≈ = 1.64 8 8 8 8 Note: F (1.64) = 2(1.64 + 1/1.64 − 2) = 0.4995 ≈ 0.5 . Finding Expected Values: Compute E(X) and V (X). Z µ = E(X) = 2 Z 2 2x(1−1/x )dx = 1 2 2(x−1/x)dx = 2(x2 /2 − ln x) 1 2 Z 2 2 2 Z 2x (1 − 1/x )dx = E(X ) = 1 1 2 1 = 4−2 ln 2−1 = 3−2 ln 2 ≈ 1.6137 2 2(x2 − 1)dx = 2(x3 /3 − x) 2 1 = 8/3 σ 2 = V (X) = EX 2 − (E(X))2 = 8/3 − (3 − ln 2)2 ≈ 0.0626 √ σ = σ 2 = 0.2503 . Application of expected value: If 1.5 thousand gallons are in stock at the beginning of the week and no new supply is due during the week, how much of the 1.5 thousand gallons is expected to be left at the end of the week? [Hint: Let h(x) = amount left when demand = x.] Let h(X) = 1.5 − X, the E(h(X)) = 1.5 − EX = 1.5 − 1.6137 < 0. So, the expected demand is more than the amount in stock so, the tank would be expected to be empty by the end of the week. Trick Question: For a given week, what is the probability that the demand will be between 1 and 2 thousand gallons? P (1 < X < 2) = 1. Characteristics of Probability Distributions