Question_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.

set.seed(10000)
k = 100
n = 10
y_dist <- replicate(3000, {
  y_i = min(sample(1:k, n, replace=TRUE))
})

hist(y_dist)

Question_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..)

\[\mu \quad =\quad \frac { 1-p }{ p } \]

p_success = 1/11
Exp_value = 1/p_success
Exp_value
## [1] 11
Sd = Exp_value
Sd
## [1] 11
pgeom(8,1/11)
## [1] 0.5759024

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.

\[E(x)=\frac { 1 }{ \lambda } \] \[\lambda \quad =\quad \frac { 1 }{ 10 } \]

\[ var(x)\quad =\quad \frac { 1 }{ { \lambda }^{ 2 } } \] \[ SD(x)\quad =\quad \frac { 1 }{ { \lambda } } \] \[ SD(x)\quad =\quad 10\]

pexp(8,1/10)
## [1] 0.550671

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)

\[E(x)=\frac { 1 }{ \lambda } \]

\[E(x)=10 \]

\[np=10 \] \[q=(1 - p) = 0.5 \]

\[n=\frac { 10 }{ 0.5 } = 20\]

\[ SD(x)\quad =\quad \sqrt { np(1-p) } = \sqrt { 5}\]

pbinom(8, size=20, prob=0.5) 
## [1] 0.2517223

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.

\[E(x)=10 \]

\[\lambda =10 \] \[ var(x)\quad =10 \] \[ SD(x)\quad = \sqrt { 10}\]

ppois(8, lambda=10, lower=TRUE) # lower tail
## [1] 0.3328197