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?
# Sum of the bulbs.
number_of_bulbs <- 100
# The mean lifetime of the bulbs is 1000 hours.
bulbs_mean_lifetime <- 1000
# We have 100 bulbs, so to find the lifetime of the first lightbulb (minimum lifetime),
# we divid the mean lifetime by the number of bulbs.
first_bulp_lifespan <- 1000/100
# The first lightbulb will burn out after 10 hours.
first_bulp_lifespan
## [1] 10
Answer: The expected time for the first of these bulbs to burn out is 10 hours.
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: \[f_{Z} = (1/2)\lambda_{e}^-\lambda|z|\]
Answer:
\(fX_1(x) = fX_2(x) = \begin{cases} \lambda e^{-\lambda x}, & x \ge 0 \\ 0, & x <0 \end{cases}\)
\(fZ(z) = \int_{-\infty}^{\infty} fX_1(x)fX_2(x - z)dx\)
\(= \int_{0}^{\infty} \lambda e^{-\lambda x}\lambda e^{-\lambda (x-z)}dx\)
\(= \int_{0}^{\infty} \lambda^2e^{-2\lambda x + \lambda z}dx\)
\(= \lambda e^{\lambda z} \int_{0}^{\infty} e^{-2 \lambda x} dx\)
\(= \frac{1}{2} \lambda e^{-\lambda |z|}\)
Let \(X\) be a continuous random variable with mean \(µ = 10\) and variance \(σ^2 = 100/3\). Using Chebyshev’s Inequality, find an upper bound for the following probabilities.
# Create a function to calculate Chebyshev’s Inequality.
chebyshev_inequality_calculator <- function(epsilon) {
variance <- 100 / 3
probability_x <- variance / epsilon^2
return(round(probability_x, 4))
}
# Find the upper bound of P(|X − 10| ≥ 2.
answer_a <- chebyshev_inequality_calculator(2)
paste("P(|X − 10| ≥ 2 =", answer_a)
## [1] "P(|X − 10| ≥ 2 = 8.3333"
# Find the upper bound of P(|X − 10| ≥ 5).
answer_b <- chebyshev_inequality_calculator(5)
paste("P(|X − 10| ≥ 5) =", answer_b)
## [1] "P(|X − 10| ≥ 5) = 1.3333"
# Find the upper bound of P(|X − 10| ≥ 9).
answer_c <- chebyshev_inequality_calculator(9)
paste("P(|X − 10| ≥ 9) =", answer_c)
## [1] "P(|X − 10| ≥ 9) = 0.4115"
# Find the upper bound of P(|X − 10| ≥ 20).
answer_d <- chebyshev_inequality_calculator(20)
paste("P(|X − 10| ≥ 20) =", answer_d)
## [1] "P(|X − 10| ≥ 20) = 0.0833"
Answers:
P(|X − 10| ≥ 2 = 8.3333
P(|X − 10| ≥ 5) = 1.3333
P(|X − 10| ≥ 9) = 0.4115
P(|X − 10| ≥ 20) = 0.0833