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 Y denote the minimum of the \(X_i\)’s.
P(Y) = min(\(X_1, X_2, X_3, ….. X_n\))
Assuming each Xi has k possibilities: 1,2,3,….k, then total number of assignments would be kn . The number of ways of getting X = 1 is $ {k^n}$, since \(k^n\) is the total number of possibilities and \((k-1)^n\) is all of the options where none of the \(X_i\)’s are equal to 1.
\[\begin{equation} P(X) = \frac {k^n - (k - 1)^n} {k^n} \\\\ Generalizing \ P(X = 2) = \frac {(k−2+1)^n−(k−2)^n} {k^n} \\\\ Generalizing \ P(X = 3) = \frac {(k−3+1)^n−(k−3)^n} {k^n} \\\\ ... \\\\ P(X=t) = \frac {(k−t+1)^n−(k−t)^n} {k^n} \end{equation}\]
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..)
p <- 1/10
p_c <- 1 - p
n <- 8
(prob <- ( 1 - p)^(n))
## [1] 0.4304672
(expected_value <- 1/p)
## [1] 10
(sd <- 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 Distribution \(P(X \leq x) = 1 – e^{–mx}\) where m is decay parameter.
lambda <- 1/10
# probability that the machine will fail after 8 years
(p_expo <- 1 - pexp(n, lambda))
## [1] 0.449329
#Expected Value of being failed
(exp_val_expo <- 1/lambda)
## [1] 10
#standard deviation
(sd_expo <- 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)
Binomial Distribution b(n, p, k) = \[\binom {n}{k} * p^k * q^{n−k} \] where q = 1-p
n <- 8
p <- 1/10
q <- 1-p
k <- 0 # 0 success in 8 years
# probability that the machine will fail after 8 years
(p_binom <- dbinom(k, n, p))
## [1] 0.4304672
#Expected Value of being failed
(exp_val_bino <- n*p
)
## [1] 0.8
#Std deviation
(sd_bino <- 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.
we know that, Poisson Distribution P(X=k) = \(e^{-\lambda}\cdot\frac{\lambda^k}{k!}\)
lambda <- 8/10
k <- 0
# probability that the machine will fail after 8 years
(p_pois <- ppois(k, lambda=lambda))
## [1] 0.449329
#Expected Value of being failed
(exp_val_pois <- lambda)
## [1] 0.8
#standard deviation
(sd_pois <- sqrt(lambda))
## [1] 0.8944272