The time required, in hours, to repair a car at a garage is a random variable X with density function
f(x) = c(4x − x²), 0 < x ≤ 4.
(i) Find the value of the constant c.
(ii) Find the probability that for a car which arrives now at the garage, the amount of time needed to get repaired will be
(a) at least one but less than three hours;
(b) more than two hours.
(i) For ƒ given in the example to be a probability density function, conditions DF1 and DF2 should be satisfied, that is, f(x) ≥ 0 for all x and \int\limits_{-\infty }^{\infty }{f(x)dx} =1. The first condition is met when c ≥ 0, because for x ∈ (0, 4] the quantity 4x − x² is nonnegative. The second condition gives
\int_{-\infty}^{\infty}f(x)\mathrm{d}x=\int_{0}^{4}f(x)\mathrm{d}x=1(the first equality holds since the density is zero outside the interval (0, 4]). Replacing ƒ by the specific form given in the statement of the example, we get that
\int_{0}^{4}f(x)\mathrm{d}x=\int_{0}^{4}c(4x-x^{2})\mathrm{d}x=c\left(2x^{2}-{\frac{x^{3}}{3}}\right)\Biggr|_{0}^{4}=c\left(32-{\frac{64}{3}}\right)={\frac{32c}{3}}.Since this must be equal to 1, we obtain that c = 3∕32. Therefore, the density for the time to repair a car at the garage is
f(x)={\frac{3}{32}}(4x-x^{2})={\frac{12x-3x^{2}}{32}},\quad0\lt x\leq4.(ii) (a) The probability that the car will need at least one but less than three hours to be repaired is given by P(1 ≤ X < 3). From Proposition 6.1, we have it as
P(1\leq X\lt 3)=P(1\leq X\leq3)=\int_{1}^{3}f(x)\mathrm{d}x.Upon using the density function f , which was found in Part (i), we get
P(1\leq X\lt 3)=\int_{1}^{3}{\frac{12x-3x^{2}}{{32}}}\mathrm{d}x=\frac{1}{32}(6x^{2}-x^{3})|_{1}^{3}=\frac{1}{32}[(6\cdot3^{2}-3^{3})-(6\cdot1^{2}-1^{3})]={\frac{22}{32}}={\frac{11}{16}}.(b) The probability that the car will need more than two hours to be repaired is given by P(X > 2). To emphasize the link with the distribution function, we deal with the probability of the complementary event, P(X ≤ 2) which, by an appeal to (6.3),
F(t)=P(X\leq t)=P(X\in A)=\int_{A}f(x)\mathrm{d}x=\int_{-\infty}^{t}f(x)\mathrm{d}x.\qquad\qquad\qquad(6.3)equals
P(X\leq2)=F(2)=\int_{-\infty}^{2}\!f(x)\mathrm{d}x=\int_{0}^{2}\!f(x)\mathrm{d}x,because ƒ is zero for negative argument. Substituting for ƒ from Part (i), we get
P(X\leq2)=\int_{0}^{2}{\frac{12x-3x^{2}}{32}}\mathrm{d}x={\frac{1}{32}}(6x^{2}-x^{3})|_{0}^{2}={\frac{6\cdot2^{2}-2^{3}}{32}}={\frac{1}{2}}.Recall that this is the probability that X is at most 2, while we want the probability of the complementary event, which is
P(X\gt 2)=1-P(X\leq2)=1-{\frac{1}{2}}={\frac{1}{2}}.