We’re given that \(X_1\) and \(X_2\) are independent random variables with exponential densities, then we know the following (Prob. book Pg. 292);
We know the probability density for an exponentially distributed random variable is \(f(X_1) = λ e^{-λx_1}\) and \(f(X_2) = λ e^{-λx_2}\) if \(x \geq 0\) and 0 otherwise.
Using what we know about independent exponential random variables and the density function of their sum (Prob. book Pg. 293), we know;
\(Z = X_1 - X_2\) and thus \(x_1 = z + x_2\)
\(f_Z(z) = f_{X_1} +
f_{X_2}\)
\(= f_{x_1 + -x_2}(z)\)
\(= \int_{-∞}^{∞} f_{-x_2}(z-x_1) f_{x_1}(x_1) dx_1\)
\(= \int_{-∞}^{∞} f_{x_2}(x_1-z) f_{x_1}(x_1) dx_1\)
\(= \int_{-∞}^{∞} λe^{-λ(x_1 -z)} λe^{-λx_1} dx_1\)
\(= \int_{-∞}^{∞} λ^2 e^{-λx_1 +λz} e^{-λx_1} dx_1\)
\(= \int_{-∞}^{∞} λ^2 e^{λz-λx_1-λx_1} dx_1\)
\(= \int_{-∞}^{∞} λ^2 e^{λ(z-2x_1)} dx_1\)
Returning to what we know; \(z = x_1 - x_2\) and \(x_1 = z + x_2\)
If \(z \geq 0\), then \(x_1 = z + x_2 \geq 0\), so \(x_1 \geq z\), and
If \(z \geq 0\), then \(f_Z(z) = \int_{z}^{∞} λ^2 e^{λ(z-2x_1)} dx_1 = \frac{1}{2}λe^{-λz}\)
If \(z < 0\), then \(x_1 = z + x_2 < 0\) and \(x_1 \geq 0\), and
If \(z < 0\), then \(f_Z(z) = \int_{0}^{∞} λ^2 e^{λ(z-2x_1)} dx_1 = \frac{1}{2}λe^{λz}\)
So we can see that the PDF \(f_Z(z)\) =
\[ \left\{\begin{matrix} \frac{1}{2}e^{- \lambda z} \texttt{,if z >= 0 } \\ \frac{1}{2}e^{\lambda z} \texttt{, if z <0} \end{matrix}\right. \]
mu = 10
var = 100/3
sd = sqrt(var)
# (a)P(|X−10|≥2
# P(|X−10|≥2)≤ (100/3)(1/(2*2)) = 25/3
ka <- 2/sd
UBa <- 1/ka**2
# (b) P(|X−10|≥5)
# P(|X−10|≥5)≤ (100/3)(1/(5*5)) = 4/3
kb <- 5/sd
UBb <- 1/kb**2
# (c) P(|X−10|≥9)
# P(|X−10|≥9)≤ (100/3)(1/(9*9)) = 100/243
kc <- 9/sd
UBc <- 1/kc**2
# (d) P(|X − 10| ≥ 20)
# P(|X−10|≥20)≤ (100/3)(1/(20*20)) = 1/12
kd <- 20/sd
UBd <- 1/kd**2
cat("The upper bound for a is: ", UBa)
## The upper bound for a is: 8.333333
cat("The upper bound for b is: ", UBb)
## The upper bound for b is: 1.333333
cat("The upper bound for c is: ", UBc)
## The upper bound for c is: 0.4115226
cat("The upper bound for d is: ", UBd)
## The upper bound for d is: 0.08333333