R Markdown

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 .

A caption

A caption

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
geometric_prob <- ((1 - p)^ (8 - 1) * p)
round(geometric_prob, 4)
## [1] 0.0478
expected_value <- 1 / p
expected_value
## [1] 10
standard_deviation <- sqrt((1 - p) / (p ^ 2))
round(standard_deviation, 4)
## [1] 9.4868

The probability that the machine will fail after 8 years is 0.0478 or 4.78%. The expected value is 10 and the standard deviation is 9.4868.

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.

lambda <- 1 / 10
e <- exp(1)
exponential_prob <- e ^ (- lambda * 8)
round(exponential_prob, 4)
## [1] 0.4493
expected_value_exponential <- 1 / lambda
expected_value_exponential
## [1] 10
standard_deviation_exponential <- 1 / (lambda ^ 2)
standard_deviation_exponential
## [1] 100

The probability that the machine will fail after 8 years is 0.4493 or 44.93%. The expected value is 10 and the standard deviation is 100.

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)

p <- 1 / 10
binomial_prob <- choose(8, 0) * (p ^ 0) * ((1 - p) ^ (8))
round(binomial_prob, 4)
## [1] 0.4305
expected_value_binomial <- p * 8
expected_value_binomial
## [1] 0.8
standard_deviation_binomial <- sqrt((p * 8) * (1 - p))
round(standard_deviation_binomial, 4)
## [1] 0.8485

The probability that the machine will fail after 8 years is 0.4305 or 43.05%. The expected value is 0.8 and the standard deviation is 0.8485.

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.

lambda_poisson = 8 * (1 / 10)
e <- exp(1)
poisson_prob <-(e ^ (- lambda_poisson) * lambda_poisson ^ 0) / factorial(0)
round(poisson_prob, 4)
## [1] 0.4493
expected_value_poisson <- lambda_poisson
expected_value_poisson
## [1] 0.8
standard_deviation_poisson <- sqrt(lambda_poisson)
round(standard_deviation_poisson, 4)
## [1] 0.8944

The probability that the machine will fail after 8 years is 0.4493 or 44.93%. The expected value is 0.8 and the standard deviation is 0.8944.