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 .

Ans) We are given that Y denotes the minimum of the Xis. Suppose each independent random variable Xi has k possibilities.

To find the distribution function P(X=m) we need to do the following:

1) Count the number of ways we can assign X1, X2,…,Xn to values between m and k with at least one Xi being assigned to m

2) Count the total number of combinations to assign X1, X2,…,Xn to values between 1 and k. This is k^n.

Since kn represents the total number of combinations. (k−1)^n will represent the combinations where none of the Xi are equal to 1.

Therefore:

P(X=1) = k^n − (k−1)^n /k^n

Similarly:

P(X=2) = ((k−2+1)^n − (k−2)^n) /k^n

P(X=3) = ((k−3+1)^n − (k−3)n) /k^n

After generalization this for (X=m), we get:

P(X=m) =((k−m+1)^n − (k−m)^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 v 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..)

Ans) P(X=k)=(1−p)^k−1.p

E[X]=1/p

Var[X]=1−p/p2

# Probability of machine failure each year
(P_fail=1/10)
## [1] 0.1
# Probability of machine not failing every year
(P_not_fail<-1-P_fail) 
## [1] 0.9
# Expected value
(GEO_E<-1/P_fail)
## [1] 10
# Standard Deviation
(GEO_STD <- sqrt(P_not_fail/(P_fail^2)))
## [1] 9.486833
# The probability the machine will fail after 8 years

(P<- ((1-P_fail)^(8-1))*P_fail)
## [1] 0.04782969

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.

Ans) X≤k:P(X≤k)=e^−λx

E[X]=1/λ

Var[x]=sqrt(1/λ2)

# probability that the machine will fail after 8 years
lambda <- 1/10
k = 8
(P <- exp(-lambda*k))
## [1] 0.449329
#  Expected value
(EXP_E<- 1/lambda)
## [1] 10
# Standard Deviation  
(EXP_STD <-sqrt(1/lambda^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)

Ans) P(success)=(nCk).Pn.qn−k

E[X]=np

Var[X]= sqrt(npq)

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

# Probability of machine failure
(P <- dbinom(k, n, p))
## [1] 0.4304672
#  Expected value
(BIO_E <- n*p)
## [1] 0.8
# Standard Deviation  
(BIO_STD <- 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.

Ans) P(X=x)=λxe−λx!

E[X]=λ

Var[X]= sqrt(λ)

# probability that the machine will fail after 8 years
lambda <- 8/10
ppois(0, lambda = 0.8)
## [1] 0.449329
# Expected value
(POI_E <- lambda)
## [1] 0.8
# Standard Deviation 
(POI_STD <- sqrt(lambda))
## [1] 0.8944272