1. 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? (See Exercise 10.)

##From problem 10 from book

##the density of minimum value among n independent random variables with an exponential density has mean μ/n
n = 100
μ = 1000
##expected time for the first of the bulbs to burn out is

em <- μ/n
em
## [1] 10
# expected time for the first of the bulbs to burn out is 10 hrs

##2.Assume that X1 and X2 are independent random variables, each having an exponential density with parameter λ. Show that Z = X1 − X2 has density fZ(z) = (1/2)λe−λ|z|

Answer: For X1≥X2

f_Z(z) = {-}^{}f{X_1}(z+x_2)f_{X_2}(x_2)dx_2 \ f_Z(z) = _0{}e{-(z+x_2)} e^{-x_2}dx_2 \ f_Z(z) = _0{}e{-(z)} e^{-2x_2}dx_2 \ f_Z(z) = ^2 e^{-z}(_0^{} e^{-2x_2}dx_2) \ f_Z(z) = ^2 e^{-z}() \ f_Z(z) = (e^{-z})

For X1≥X2 f_Z(z) = {-}^{}f{X_1}(z+x_2)f_{X_2}(x_2)dx_2 \ f_Z(z) = {-}0e{-(z+x_2)} e^{-x_2}dx_2 \ f_Z(z) = {-}0e{-(z)} e^{-2x_2}dx_2 \ f_Z(z) = ^2 e^{-z}(_{-}^0 e^{-2x_2}dx_2) \ f_Z(z) = ^2 e^{-z}() \ f_Z(z) = (e^{-z})

combine these two separate cases we get the combined distribution of:

f(z)=λ2e−λ|z|

##Answer: For X1≥X2

## f_Z(z) = \int_{-\infty}^{\infty}f_{X_1}(z+x_2)f_{X_2}(x_2)dx_2 \\
## f_Z(z) = \int_0^{\infty}\lambda e^{-\lambda (z+x_2)} \lambda e^{-\lambda x_2}dx_2 \\
## f_Z(z) = \int_0^{\infty}\lambda e^{-\lambda (z)} \lambda e^{-2\lambda x_2}dx_2  \\
## f_Z(z) = \lambda^2 e^{-\lambda z}(\int_0^{\infty} e^{-2\lambda x_2}dx_2) \\
## f_Z(z) = \lambda^2 e^{-\lambda z}(\frac{ -1}{2\lambda}) \\
## f_Z(z) = \frac{\lambda}{2} (e^{-\lambda z})

## For X1≥X2
## f_Z(z) = \int_{-\infty}^{\infty}f_{X_1}(z+x_2)f_{X_2}(x_2)dx_2 \\
## f_Z(z) = \int_{-\infty}^0\lambda e^{-\lambda (z+x_2)} \lambda e^{-\lambda x_2}dx_2 \\
## f_Z(z) = \int_{-\infty}^0\lambda e^{-\lambda (z)} \lambda e^{-2\lambda x_2}dx_2  \\
## f_Z(z) = \lambda^2 e^{-\lambda z}(\int_{-\infty}^0 e^{-2\lambda x_2}dx_2) \\
## f_Z(z) = \lambda^2 e^{-\lambda z}(\frac{ -1}{2\lambda}) \\
## f_Z(z) = \frac{-\lambda}{2} (e^{-\lambda z})

## combine these two separate cases we get the combined distribution of:

## f(z)=λ2e−λ|z|

##3.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. (a) P(|X − 10| ≥ 2) (b) P(|X − 10| ≥ 5) (c) P(|X − 10| ≥ 9) (d) P(|X − 10| ≥ 20

## P(|X−μ|≥kσ)≤σ^2/k^2σ^2=1/k^2
#μ=10
#σ^2=100/3
#k=kσ/σ
##(a) P(|X − 10| ≥ 2).
# P(|X−10|≥2)≤100/3/2^2
# P(|X−10|≥2)≤25/3

## (b) P(|X − 10| ≥ 5).
# P(|X−10|≥5)≤100/3/5^2
# P(|X−10|≥5)≤4/3

## (c) P(|X − 10| ≥ 9)
# P(|X−10|≥9)≤100/3/9^2
# P(|X−10|≥5)≤100/243

## (d) P(|X − 10| ≥ 20
# P(|X − 10| ≥ 20)≤100/3/20^2
# P(|X−10|≥20)≤100/1200