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.

Solution:

Given, \(X1, X2, . . . , Xn\), n mutually independent random variables uniformly distributed on the integers from 1 to k.

Total number of possibilities = \(k^{n}\)

Possibilities where none of the Xi’s are equal to 1 is \((k-1)^{n}\)

For X=1

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

Similarly for X=2

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

X=3

\(P(X=3)=\frac{(k-3+1)^{n}-(k-3)^{n}}{k^{n}}\)

We can generalize this as below

\(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..)

Solution:

Probability that the machine will fail after 8 years

n<-8
prob_failure <- 1/10
prob_nonfailure <- 1-prob_failure

prob_geomet <-1-pgeom(n-1,prob_failure)

prob_geomet
## [1] 0.4304672

Expected value

e_val <- 1/prob_failure
e_val
## [1] 10

Standard deviation

sd<-sqrt(prob_nonfailure/(prob_failure^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.

Solution:

Probability that the machine will fail after 8 years

n <- 8 
lambda <- 1/10

p_expo <- pexp(n, lambda, lower.tail=FALSE)
p_expo
## [1] 0.449329

Expected value

e_val <- 1/lambda
e_val
## [1] 10

Standard deviation

sd <- sqrt(1/lambda^2)
sd
## [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)

Solution

Probability that the machine will fail after 8 years

n <- 8
p <- 1/10
q <- (1-p)
k <- 0

p_binomial <- dbinom(k, n, p)
p_binomial
## [1] 0.4304672

Expected value

e_val <- n * p
e_val
## [1] 0.8

Standard deviation

sd <- sqrt(n*p*q) 
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.

Solution

Probability that the machine will fail after 8 years

lambda <- 8/10
k <- 0
ppois(0,lambda = .8 )
## [1] 0.449329

Expected value

e_val <- 8/10
e_val
## [1] 0.8

Standard deviation

sd <- sqrt(8/10)
sd
## [1] 0.8944272