HW8
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.)
n <-c(1:100)
f <- 1/1000
nf <-999/1000
ff<-round(1000-sum(exp(log(nf^n))),0)The expected time for the first of these bulbs to burn out is on the 905th hour
Assume that X1 and X2 are independent random variables, each having anexponential density with parameter delta. Show that Z = X1 - X2 has density fZ(z) = (1/2)delta e - delta|z|
X1 <- runif(1000)
X2 <- runif(1000)
Z = X1 - X2
x1 = Z + X2
x2 = -Z + X1
f<- density(1/2 *(x1-x2)*(exp(-(x1-x2)*abs(Z))))
plot(f)Let X be a continuous random variable with mean = 10 and variance = 100/3. Using Chebyshev’s Inequality, find an upper bound for the following probabilities.
Chebyshev Inequality 1/k^2 gives the percentage of data from a sample that must fall within K standard deviations from the mean
#Chebyshev Inequality 1/k^2
f<-function(x)
{
m <- 10
s <- sqrt(100/3)
p <-1-1/x^2
lb<- round(p * ((2*s) - m),2)
ub<- round(p * ((2*s) + m),2)
ub
}a<-f(2)The upper bound for sample >=2 is 16.16
b<-f(5)The upper bound for sample >=5 is 20.69
c<-f(9)The upper bound for sample >=9 is 21.28
d<-f(20)The upper bound for sample >=20 is 21.49