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 .
k <- 8
n <- 6
Totalnum_Xs <- 100000
Y <- c()
for (i in 1:Totalnum_Xs)
{
X <- c()
X = c(runif(1, 1,k), runif(1, 1,k), runif(1, 1,k), runif(1, 1,k), runif(1, 1,k), runif(1, 1,k))
Y[i] <- min(X)
i = i + 1
}
hist(Y)
Problem 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.).
\[ P(X \gt x) = (1-p)^{n} \]
\[ p = 1/10 = 0.1; 1-p = 0.9 (One \space failure \space within \space 10 \space years) \] \[ P(X > 8) = (0.9)^{9} (probability \space of \space 8 \space failures \space until \space first \space success \space at \space 9th \space year) \] \[ P(X > 8) = 0.3874205 \]
pgeom(8, 0.1, lower.tail = F)
## [1] 0.3874205
\[ E(X) = 1/p = 1/0.1 = 10 \] \[ V(X) = \sqrt{1-p/p^2} = \sqrt{0.9/(0.1)^2} = 9.486833 \]
\[ P(X \geq k) = e^{-k/\mu} \] \[ k=8; \mu=10\] \[ P(X \geq 8) = e^{-8/10} \] \[ P(X \geq 8) = 0.449329\]
pexp(8, rate=(1/10), lower.tail = F)
## [1] 0.449329
\[ E(X) = \mu = 1/\lambda = 1/0.1 = 10 \] \[ V(X) = \sqrt{1/\lambda^2} = \sqrt{1/(0.1)^2} = 10 \]
\[ P(X = k) = \binom{N}{k}p^rq^{n-r} \]
\[ p = 0.1; q = 0.9 (One \space failure \space within \space 10 \space years); k=0; N=8 \] \[ P(X = 0) = \binom{8}{0}0.1^00.9^{8-0} \] \[ P(X = 0) = 0.4304672 \]
pbinom(0, 8, 0.1, lower.tail = T)
## [1] 0.4304672
\[ E(X) = Np = 8*0.1 = 0.8 \] \[ V(X) = \sqrt{npq} = \sqrt{8*0.1*0.9} = 0.8485281 \]
\[ P(X = x) =\lambda ^x e^{-\lambda} / x! \]
\[ \lambda = 0.1 (Failure \space rate \space per \space year), \lambda = 0.1*8 = 0.8 (failures \space in \space 8 \space years); x = 0 \] \[ P(X = 0) = 0.8^0 e^{-0.8} / 0! \] \[ P(X = 0) = 0.449329 \]
ppois(0, 0.8, lower.tail = T)
## [1] 0.449329
\[ E(X) = \lambda = 0.8 \] \[ V(X) = \lambda = 0.8 \]