Problem 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 .
The Distribution is a right-skewed or positive distribution.
set.seed(100)
n <- 100000
k <- 50
draws <- 10
Y <- c()
for (i in 1:n){
Xn <- sample(1:k, draws, TRUE)
Y <- c(Y, min(Xn))
}

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..)
Geometric distribution: p(X=n) = (1−p)^n−1 ∗ p
The Probability that the machine fails after 8 years (geometric):
p <- 1 /10
u <- 10
n <- 8
pgeom(n,p,lower.tail=F)
## [1] 0.3874205
Mean Failure Time:
(expFailTime <- 1/p)
## [1] 10
The standard deviation of the failure time:
(sdFailTime <- sqrt((1-p)/p^2))
## [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.
Exponential:P (x<=8) = 1- e^(- λ* x)
lam <- 1/10
k <- 8
exp(-lam * k)
## [1] 0.449329
The Probability that the machine fails after 8 years(exponential):
exp(-lam * k)
## [1] 0.449329
Mean Failure Time:
1/lam
## [1] 10
The standard deviation of the failure time:
sqrt(1/lam^2)
## [1] 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)
n<- 8
p<- 1/10
q<- 1-p
k <- 0
The Probability that the machine fails after 8 years(binomial):
dbinom(k, n, p)
## [1] 0.4304672
Mean Failure Time:
n*p
## [1] 0.8
The standard deviation of the failure time:
sqrt(n*p*q)
## [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.
lam <- 8/10
The Probability that the machine fails after 8 years(poisson):
ppois(0,lambda = lam)
## [1] 0.449329
Mean Failure Time:
(lam)
## [1] 0.8
The standard deviation of the failure time:
sqrt(lam)
## [1] 0.8944272