#Week 8 homework from Probability textbook

##11 on page 303

#A company buys 100 light bulbs, each of which has an exponential lifetime of 1000 hours. What is the expected time for the first of these bulbs to burn out? 
mu=1000
n=100
mu/n
## [1] 10
#10 hours is the expected time the first of the bulbs will burn out

##14 on page 303

#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|

#If z>0, then  y is greater than 0 implies x+y is also greater than 0

fX1(x)=fX2(x)={λe−λxx≥0 fz(z)=∫∞−∞f(x1)(x)f(x2)(x−z)dx ∫∞0λe−λxλe−λ(x−z)dx ∫∞0λ2e−2λx+λzdx λeλz∫∞0e−2λxdx

##1 on page 320-321, Problem 1. 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/k2

#a. abs val x-10 > or = 2
100/3/4
## [1] 8.333333
#upper bound is 1
#b. abs val x-10 > or = 5
100/75
## [1] 1.333333
#upper bound is 1
#c. abs val x-10 > or = 9
n=100
d=3*9^2
n/d
## [1] 0.4115226
#upper bound is .41
#d. abs val x-10 > or = 20
n=100
d=3*20^2
n/d
## [1] 0.08333333
#upper bound is below, .08