Let X1, X2, . . . , Xn be n mutually independent random variables, each of which is uniformly distributed on the integers from 1 to k. Let Y denote the minimum of the Xi’s. Find the distribution of Y.
This problem was very difficult and I used resources to come up with solution seen in references below. Definitely a challening problem!
Y = min{X1,X2,…Xn}
Fy(y) = P{Y<= y} = P{min{X1,X2} <= y}
Fy(y) = P{Y<= y} = 1 - P{Y > y} = 1 - P{min{X1,X2} > y}
= 1 - P{X1>y,X2>y,…,Xn>y}
= 1 - P{X1>y}P{X2>y}…P{Xn>y}
= 1 - (k-y/k)^n
Your organization owns a copier (future lawyers, etc.) or MRI (future doctors). This machine has a manufacturer’s expected lifetime of 10 years. This means that we expect one failure every ten years. (Include the probability statements and R Code for each part.).
a. What is the probability that the machine will fail after 8 years? Provide also the expected value and standard deviation. Model as a geometric. (Hint: the probability is equivalent to not failing during the first 8 years.)
X = year that the machine fails P(X>8) = 1 - P(X doesn’t fail in first 8 years)
p = 1/10
expected_value = 1/p
standard_deviation = sqrt((1-p)/p^2)
#no_fails_in_8_years = (1-p)^8
no_fails_in_8_years = pgeom(7,0.1,lower.tail=FALSE)
print(paste("The probability a fail will happen after year 8 is:",toString(no_fails_in_8_years)))
## [1] "The probability a fail will happen after year 8 is: 0.43046721"
print(paste("The expected value is:",toString(expected_value),"and standard deviation is:",standard_deviation))
## [1] "The expected value is: 10 and standard deviation is: 9.48683298050514"
b. What is the probability that the machine will fail after 8 years? Provide also the expected value and standard deviation. Model as an exponential. X = year that the machine fails P(X>8)
lambda = 1/10
k = 8
mean = 1/lambda
X_over_8 = exp(-k/mean)
expected_value = mean
standard_deviation = sqrt(1/(lambda^2))
print(paste("The probability a fail will happen after year 8 is:",toString(X_over_8)))
## [1] "The probability a fail will happen after year 8 is: 0.449328964117222"
print(paste("The standard deviation is:",toString(standard_deviation),"and expected value is:",expected_value))
## [1] "The standard deviation is: 10 and expected value is: 10"
c. What is the probability that the machine will fail after 8 years? Provide also the expected value and standard deviation. Model as a binomial. (Hint: 0 success in 8 years)
p = 1/10
n = 8
k = 0 #successes
X_over_8 <- choose(n,k)*(p)^k*(1-p)^(n-k)
mean = n*p
standard_deviation = sqrt(n*p*(1-p))
print(paste("The probability a fail will happen after year 8 is:",toString(X_over_8)))
## [1] "The probability a fail will happen after year 8 is: 0.43046721"
print(paste("The expected value is:",toString(mean),"and standard deviation is:",standard_deviation))
## [1] "The expected value is: 0.8 and standard deviation is: 0.848528137423857"
d. What is the probability that the machine will fail after 8 years? Provide also the expected value and standard deviation. Model as a Poisson. P(X = 0)
lambda = 1/10
t = 8
x = 0 #number of failures
expected_value = lambda
standard_deviation = sqrt(lambda)
fail_after_8 = ((lambda*t)^x)*(exp(-lambda*t))/factorial(x)
print(paste("The probability a fail will happen after year 8 is:",toString(fail_after_8)))
## [1] "The probability a fail will happen after year 8 is: 0.449328964117222"
print(paste("The expected value is:",toString(expected_value),"and standard deviation is:",standard_deviation))
## [1] "The expected value is: 0.1 and standard deviation is: 0.316227766016838"
Resources:
* http://stat.math.uregina.ca/~kozdron/Teaching/UBC/302Fall10/Handouts/summary17.pdf
* https://www.statisticshowto.com/uniform-distribution/