1. Let \(X_1, X_2, ...,X_n\) 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 \(X_i\)’s. Find the distribution of \(Y\).
  1. 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.).
  1. 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..)
p <- 1/10 #probability of the event 
k <- 8 #no faiulres in first 8 trials
print(paste0("The probability that the machine will fail after 8 years is ", dgeom(k, p)))
## [1] "The probability that the machine will fail after 8 years is 0.043046721"
q <- 1-p
print(paste0("Expected value is ", 1/p))
## [1] "Expected value is 10"
print(paste0("Standard Deviation is ", sqrt((1-p)/p^2)))
## [1] "Standard Deviation is 9.48683298050514"
  1. What is the probability that the machine will fail after 8 years?. Provide also the expected value and standard deviation. Model as an exponential.
lambda <- 1/10 #success rate
print(paste0("The probability that the machine will fail after 8 years is ", dexp(k, p)))
## [1] "The probability that the machine will fail after 8 years is 0.0449328964117222"
print(paste0("Expected value is ", 1/p))
## [1] "Expected value is 10"
print(paste0("Standard Deviation is ", sqrt(1/lambda^2)))
## [1] "Standard Deviation is 10"
  1. 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)
n <- 8 #number of trials
k <- 0 #number of failures 
p <- 1/10 #probability of successes
print(paste0("The probability that the machine will fail after 8 years is ", dbinom(k, n, p)))
## [1] "The probability that the machine will fail after 8 years is 0.43046721"
print(paste0("Expected value is ", n * p))
## [1] "Expected value is 0.8"
print(paste0("Standard Deviation is ", sqrt(n*p*(1-p))))
## [1] "Standard Deviation is 0.848528137423857"
  1. What is the probability that the machine will fail after 8 years?. Provide also the expected value and standard deviation. Model as a Poisson.
lambda <- (1/10)*8 #mean number of successes in 8 years
x <- 0 #actual number of successes in 8 years
print(paste0("The probability that the machine will fail after 8 years is ", dpois(k, lambda)))
## [1] "The probability that the machine will fail after 8 years is 0.449328964117222"
print(paste0("Expected value is ", lambda))
## [1] "Expected value is 0.8"
print(paste0("Standard Deviation is ", sqrt(lambda)))
## [1] "Standard Deviation is 0.894427190999916"