library(matlib)
library(glue)

#11 and #14 on page 303 of probability text #1 on page 320-321

Q11: 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.)

bulbs=100
lambdai =1/1000
product =(bulbs*lambdai)
minE = (1/product)
glue('We can expect the first bulb to burn out after about {minE} hours of use on average.')
## We can expect the first bulb to burn out after about 10 hours of use on average.

Q14: 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|).

an image caption Source: Question 14

Q1: 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.

Chebyshev’s Inequality: P(|X−μ|≥kσ)≤1/k^2

Using Chebyshev’s Inequality, we can find an upper bound for the probabilities as follows:

  1. P(|X - 10| ≥ 2)

kσ=2 k=2/sqrt(100/3) P(|X - 10| ≥ 2) = 1/k^2= 8.3333

  1. P(|X - 10| ≥ 5)

kσ=5 k=5/sqrt(100/3) P(|X - 10| ≥ 5) = 1/k^2= 1.3333

  1. P(|X - 10| ≥ 9)

kσ=9 k=9/sqrt(100/3) P(|X - 10| ≥ 9) = 1/k^2= 0.4115

  1. P(|X - 10| ≥ 20)

kσ=20 k=20/sqrt(100/3) P(|X - 10| ≥ 10) = 1/k^2= 0.4115