(Measurement error)
It has been found that an electronic device exhibits a measurement error, denoted by X, which is regarded as a random variable with density function
f(x)= \begin{cases} \frac{1}{7}, \quad -3 \leq x \leq c, \\ 0, \quad ~~ \text{elsewhere}, \end{cases}for some suitable constant c > 0, which represents the maximum value of that error.
(i) Find the value of c.
(ii) Obtain the density function of the random variable Y = |X|, which denotes the magnitude of the error (or the absolute error) made by the device.
(i) Since we are given that ƒ is a probability density, it must satisfy conditions DF1 and DF2. The first of them is trivially true, while from the second we obtain
\int_{-\infty}^{\infty}f(x)\mathrm{d}x=\int_{-3}^{c}{\frac{1}{7}}\;\mathrm{d}x=1,which yields (c + 3)∕7 = 1, or the value of c to be c = 4.
(ii) From Part (i) we have, for x ∈ [−3, 4], the density as f(x) = 1∕7.
For the distribution function of Y, we find
F_{Y}(y)=P(Y\leq y)=P(|X|\leq y)=P(-y\leq X\leq y)=F(y)-F(-y),where F is the distribution function of X. By differentiation, we then derive
f_{Y}(y)=F^{\prime}(y)=(F(y)-F(-y))^{\prime}=F^{\prime}(y)-F^{\prime}(-y)\cdot(-1),which yields
f_{Y}(y)=f(y)+f(-y).\qquad\qquad\qquad\qquad\qquad(6.7)We observe that, since X takes values in the interval [−3, 4], the range of values for Y = |X| will be [0, 4].
Taking into account the specific form of the density ƒ , we consider the following two cases for values of y in (6.7):
• For 0 ≤ y ≤ 3, we have −3 ≤ −y ≤ 0, and so ƒ(y) = ƒ(−y) = 1∕7 and for any such y, (6.7) yields
f_{Y}(y)={\frac{1}{7}}+{\frac{1}{7}}={\frac{2}{7}}.
• For y in (3, 4], we have −y to be outside the range of values for the variable X, and so ƒ(−y) = 0, hence for values of y in that interval, (6.7) yields that
f_{Y}(y)={\frac{1}{7}}+0={\frac{1}{7}}.
Upon combining these expressions, the density function of Y is obtained as
f_Y(y)= \begin{cases} \frac{2}{7}, \quad 0 \leq y \leq 3, \\ \frac{1}{7}, \quad 3 \lt y \leq 4,, \end{cases}Intuitively, this makes sense since for a small 𝜖 > 0, it is twice more likely that Y takes a value in an interval (y − 𝜖, y + 𝜖) when y ∈ [0, 3] compared to the values of y in (3, 4]. This is so because the former occurs both for positive and negative values of the original error X, while the latter occurs only when X takes values in (3, 4].