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 .

Practically, P(Y<= y) = 1-P(Y>y) = 1-P(X_1 > y, X_2 > y, X_n > y) = 1 - ((k - y)/k)^n

Also follwing the math above:

P(Y<= y-1) = 1 - ((k - y+1)/k)^n

Therefore:

P(Y=y) = P(Y<= y)-P(Y<=y-1)

Simplify and combine: ((k-y+1)^n - (k-y)n)/(kn)

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

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
n=8
round((1 - pgeom(n-1, p)),4)
## [1] 0.4305

Expected is easy, as its a given (10 years) Probability that the machine will fail after 8 is 43%, which is kinda terrible.

standard_deviation <- round((sqrt((1-p)/p^2)),2)
standard_deviation 
## [1] 9.49

The Standard Deviation is 9.49.

What is the probability that the machine will fail after 8 years?. Provide also the expected value and standard deviation. Model as an exponential.

x <- 8
p <- 1/10
round((1 - pexp(x, p)), 4)
## [1] 0.4493

Expected is easy, as its a given (10 years) Probability that the machine will fail after 8 is 45%, which is still kinda terrible.

Standard deviation is 10.

sqrt(1/p^2)
## [1] 10

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

x <- 0
n <- 8
p <- 1/10
round((dbinom(x, n, p)), 2)
## [1] 0.43

Probability that the machine will fail after 8 is 43%, which is kinda terrible.

expected_value <- n*p
expected_value
## [1] 0.8

The expected value is 0.80

std <- sqrt(n*p*(1-p))
round(std,3)
## [1] 0.849

the standard deviation is 0.849.

What is the probability that the machine will fail after 8 years?. Provide also the expected value and standard deviation. Model as a Poisson.

x <- 0
n <- 8
p <- 1/10
t <- 1 
round((dpois(x, n*p/t)), 3)
## [1] 0.449

There is a 44.9% failure rate

Expected Value is 0.8

n*p/t
## [1] 0.8

Standard Deviation is:

(n*p/t)^.5
## [1] 0.8944272