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.

If \(K^n\) is the sum of variables then \((k-1)^n\) would represent varaibles where \(X_i\) does not contain 1

\[P(X=1)=\frac { { k }^{ n }-{ (k-1) }^{ n } }{ { k }^{ n } }\]

\[P(X=2)=\frac { { (k-2+1) }^{ n }-{ (k-2) }^{ n } }{ { k }^{ n } }\]

\[P(X=y)=\frac { { (k-y+1) }^{ n }-{ (k-y) }^{ n } }{ { k }^{ n } }\]

2. 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..)

prob_fail <- 1/10
prob_fail
## [1] 0.1
prob <- ((1 - prob_fail)^ (8 - 1) * prob_fail)
prob
## [1] 0.04782969
exp_value <- 1/prob_fail
exp_value
## [1] 10
sd <- sqrt((1-prob_fail)/(prob_fail^2))
sd
## [1] 9.486833

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.

l <- (1 / 10)
eprob <- exp(1) ^ (- l * 8)
eprob
## [1] 0.449329
evalue <- 1 / l
evalue
## [1] 10
sd <- 1 / (l ^ 2)
sd
## [1] 100

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
yrs <- 8
suc <- 0

# Probability of failure
prob_b <- choose(yrs, suc)*((p)^(suc))*(1-p)^yrs
prob_b
## [1] 0.4304672
# Probability of non failure
prob_not_b <- 1 - prob_b
prob_not_b
## [1] 0.5695328
# Expected Value
exp_v <- yrs *p
exp_v
## [1] 0.8
# Standard Deviation
sd <- sqrt(yrs*p*(1 - p))
sd
## [1] 0.8485281

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.

\[\frac { { e }^{ -\lambda }{ \lambda }^{ n } }{ n! }\]

yrs <- 8

lp = yrs * (1 / 10)
e <- exp(1)
prob_poi <-(e ^ (- lp) * lp ^ 0) / factorial(0)
prob_poi
## [1] 0.449329
pv_exp <- lp
pv_exp
## [1] 0.8
sd <- sqrt(lp)
sd
## [1] 0.8944272
paste("Failure probabiity after,", yrs, " years is", round(prob_poi, 2), ". The expected value is", pv_exp, ". The standard deviation is", round(sd, 2), sep = " ")
## [1] "Failure probabiity after, 8  years is 0.45 . The expected value is 0.8 . The standard deviation is 0.89"