Question: A company buys 100 lightbulbs, each of which has an exponential lifetime of 1000 hours. What is the expected time for the first of these bulbs to burn out?
Solution:
Expected time (value) of an exponential density can be calculated by finding the minimim value of \(\mu / n\):
n <- 100
m <- 1000
m/n
## [1] 10
Question: Assume that \(X_1\) and \(X_2\) are independent random variables, each having an exponential density with parameter \(\lambda\). Show that \(Z = X_1 - X_2\) has density:
\[ fn(z)=\frac{1}{2}\lambda e^{-\lambda |z|} \]
Solution:
We know from the text that the density functions of \(X_1\) and \(X_2\) can be expressed as:
\[ f_X1(x) = f_X2(x) = \left \{ \begin{array}{ll} \lambda e^{-\lambda x}, & \;\mbox{if $x \geq 0$,} \\ 0 & \;\mbox{otherwise;} \end{array} \right. \]
When \(z > 0\), the joint densities of these functions can be reduced using convolusion to:
\[ \begin{eqnarray*} f_Z(z) &=& \int_{-\infty}^{+\infty} f_{X_1}(z - x_1) f_{X_2}(x_2)\, dx_2 \\ &=& \int_0^z \lambda e^{-\lambda(z - y)} \lambda e^{-\lambda y}\, dx_2 \\ &=& \int_0^z \lambda^2 e^{-\lambda z}\, dx_2 \\ &=& \lambda^2 z e^{-\lambda z}\\ \end{eqnarray*} \] We know that \(Z = X_1 - X_2\) and \(X_1\) and \(X_2\) share the same distribution, \(\lambda\). Thus, we can also infer that \(-Z = X_2 - X_1\) and shares the same distribution as \(Z\). This means that:
\[ fz(z) = f-z(-z) \] As a result, the convolusion of \(X_2 \geq X_1\) is:
\[ \begin{eqnarray*} f_Z(z) &=& \int_{-\infty}^{+\infty} f_{X_1}(z + x_2) f_{X_2}(x_2)\, dx_2 \\ &=& \int_{-\infty}^0 \lambda e^{-\lambda(z + x_2)} \lambda e^{-\lambda x_2}\, dx_2 \\ &=& \int_{-\infty}^0 \lambda e^{-\lambda(z)} \lambda e^{-2\lambda x_2}\, dx_2 \\ &=& \int_{-\infty}^0 \lambda^2 e^{-\lambda z}\, \int_{-\infty}^0 e^{-2\lambda x_2} dx_2 \\ &=& \lambda^2 z e^{-\lambda z} \frac{-1}{2\lambda}\\ &=& -\frac{1}{2}\lambda e^{-\lambda z}\\ \end{eqnarray*} \] And, the convolusion of \(X_1 \geq X_2\) is:
\[ \begin{eqnarray*} f_Z(z) &=& \int_{-\infty}^{+\infty} f_{X_1}(z + x_2) f_{X_2}(x_2)\, dx_2 \\ &=& \int_{0}^{\infty} \lambda e^{-\lambda(z + x_2)} \lambda e^{-\lambda x_2}\, dx_2 \\ &=& \int_{0}^{\infty} \lambda e^{-\lambda(z)} \lambda e^{-2\lambda x_2}\, dx_2 \\ &=& \int_{0}^{\infty} \lambda^2 e^{-\lambda z}\, \int_{0}^{\infty} e^{-2\lambda x_2} dx_2 \\ &=& \lambda^2 z e^{-\lambda z} \frac{-1}{2\lambda}\\ &=& \frac{1}{2}\lambda e^{-\lambda z}\\ \end{eqnarray*} \] These expressions can be combined as follows:
\[ f(z) = \left \{ \begin{array}{ll} -\frac{1}{2}\lambda e^{-\lambda z}, & \;\mbox{when $z \leq 0$,} \\ \frac{1}{2}\lambda e^{-\lambda z} & \;\mbox{when $z \geq 0$} \end{array} \right. \]
Finally, we can simply \(f(z)\), which results in the target density:
\[ fn(z)=\frac{1}{2}\lambda e^{-\lambda |z|} \]
Let X be a continuous random variable with mean \(\mu = 10\) and variance \(\sigma^2 = \frac{100}{3}\). Using Chebyshev’s Inequality, find an upper bound for the following probabilities.
Solution: Chebyshev’s Inequality:
\[ P(|X-\mu| \geq k\sigma) \leq \frac{\sigma^2}{k^2\sigma^2}=\frac{1}{k^2} \] The text explains that, given the inequality above, we know that the probability of a deviation from the mean of more than k standard deviations is \(\leq \frac{1}{k^2}\).
Thus, the upper bounds of the following probabilities can be calculated using the function below:
m = 10 # mean
var = 100/3 # variance
cheb_ineq <- function(m, var, n){ # Chebyshev function
k<-n/sqrt(var) ##
ub<-round(1/k^2, 2)
print(paste0("The upper bounds of the probability is : ", ub))
}
\(P(|X-10| \geq 2)\)
n <- 2
cheb_ineq(m, var, n)
## [1] "The upper bounds of the probability is : 8.33"
\(P(|X-10| \geq 5)\)
n <- 5
cheb_ineq(m, var, n)
## [1] "The upper bounds of the probability is : 1.33"
\(P(|X-10| \geq 9)\)
n <- 9
cheb_ineq(m, var, n)
## [1] "The upper bounds of the probability is : 0.41"
\(P(|X-10| \geq 20)\)
n <- 20
cheb_ineq(m, var, n)
## [1] "The upper bounds of the probability is : 0.08"