Problem

Problem 1

  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.

\[ 1 ≤ j ≤ k, m(j) = \tfrac{(k-j+1)^n - (k-j)^n}{k^n} \]

Problem 2

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

Ans.

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

The probability that the machine will fail after 8 years

## Probability machine will fail after 8 years.
P_of_failure <- 1/10
P_of_no_failure <- 1 - P_of_failure
n <- 8
P_10 <- 1-pgeom(n,P_of_failure) 

print(P_10)
## [1] 0.3874205

The expected value

## Expected Value
expected_value_A <- 1/ P_of_failure

print(expected_value_A)
## [1] 10

The Standard Deviation.

## Standard Deviation
SD_A<- sqrt(P_of_no_failure/(P_of_failure^2))

print(SD_A)
## [1] 9.486833
  1. What is the probability that the machine will fail after 8 years?. Provide also the expected value and standard deviation. Model as an exponential.

Probability the machine will fail after 8 years.

## Probability will fail after 8 years
n <- 8
Pro8 <- 1/10
Pro_exponent <- pexp(n, Pro8, lower.tail = FALSE)

print(Pro_exponent)
## [1] 0.449329

The Expected value

## Expected Value
expected_value_B <- 1/Pro8

print(expected_value_B)
## [1] 10

Standard Deviation

## Standard Deviation
SD_B <- sqrt(1/(Pro8^2))

print(SD_B)
## [1] 10
  1. 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)

The probability that the machine will fail after 8 years.

## Probability the machine will fail after 8 years
n <- 8
P_of_failure <- 1/10
S_8years <- 0
P_of_no_failure <- (1 - P_of_failure)
Binom_Prob <- dbinom(S_8years,n, P_of_failure)

print(Binom_Prob)
## [1] 0.4304672

The Expected Value

## The expected value
n <- 8
P_of_failure <- 1/10
expected_value_C <- (n*P_of_failure)

print(expected_value_C)
## [1] 0.8

The Standard Deviation

## Standard Deviation
n <- 8
P_of_failure <- 1/10
P_of_no_failure <- (1 - P_of_failure)
SD_C <- sqrt(n*P_of_failure*P_of_no_failure)

print(SD_C)
## [1] 0.8485281
  1. What is the probability that the machine will fail after 8 years?. Provide also the expected value and standard deviation. Model as a Poisson.

The probability that the machine will fail after 8 years

n <- 8
P_of_failure <- 1/10
S_8years <- 0
lambda <- n*P_of_failure
pois_prob <- ppois(0,lambda,lower.tail = TRUE, log.p = FALSE)

print(pois_prob)
## [1] 0.449329

The Expected value

## expected value
expected_value_D <- (lambda)

print(expected_value_D)
## [1] 0.8

\[EV = \lambda \]

The Standard Deviation

## Standard Deviation
SD_D <- sqrt(lambda)

print(SD_D)
## [1] 0.8944272

\[ SD = \sqrt{{\lambda}} \]