1. 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 .

Answer: method#1
when Y=1, frequecy is \({ k }^{ n } - { (k-1) }^{ n }\)

when Y=2, frequecy is \({ k }^{ n }-{ (k-2) }^{ n }-[{ k }^{ n }-{ (k-1) }^{ n }]\) = \({ (k-1) }^{ n }-{ (k-2) }^{ n }\)

When Y=j, frequecy is \({ (k-j+1) }^{ n }\) - \({ (k-j) }^{ n }\)

k=10
n=3
y=c()
for (j in 1:k){
  y[j] <-((k-j+1)^n - (k-j)^n)
}
y
##  [1] 271 217 169 127  91  61  37  19   7   1

method#2

k = 10
n = 3
distribution_Y <- replicate(300, {
  yi = min(sample(1:k, n, replace=T))
})

hist(distribution_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..)

Answer:Given mean = 10, (1-p)/p = 10 (p is the probability of unfail). So p = 1/11.
E(x) = 1/p = 11
SD(x) = (var(1/p2))0.5 = 11

pgeom(8,1/11)
## [1] 0.5759024
  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.

Answer: Given E[x] = 10, 1/lambda = 10. So lambda = 1/10. Var[x] = 1/lambda^2, so sd(x) = 1/lambda = 10.

pexp(8,1/10)
## [1] 0.550671
  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)

Answer: Given E[x] = 10, np = 10. Since the probability of fail is 0.5, n = 10/0.5 =20. SD[x] = (np(1-p))^0.5 = 5^0.5

pbinom(8, size=20, prob=0.5) 
## [1] 0.2517223
  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.

Answer:Given E[x] = 10, lambda = 10 and Var[x] = 10 then SD[x] = 10^0.5.

ppois(8, lambda=10, lower=TRUE) # lower tail
## [1] 0.3328197