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 .

Y is the minimum of X. Let x be the smallest number. The probability that Y is greater than or equal to x is multiplying the probability of each X event together. P(X1) * P(X2) * . . . P(Xn). Each probability is written as

\(\frac{{(k - x + 1)}}{{k}}\)

And then you multiply them all together to get

\(\frac{{(k - x + 1)^n}}{{k^n}}\)

We want to find the uniform distribution, so we are looking at the probability when Y = x. This would be 1 - P(Y >= x), which is the following:

\(1 - \frac{{(k - x + 1)^n}}{{k^n}}\) = \(\frac{{k^n}} {{k^n}}\) - \(\frac{{(k - x + 1)^n}}{{k^n}}\) = \(\frac{{k^n - (k - x + 1)^n}}{{k^n}}\)

Therefore, f(x) = \(\frac{{k^n - (k - x + 1)^n}}{{k^n}}\)

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

Geometric distribution probability of failing within 8 years: \((1 - p)^{n - 1} * p\) p = probability of success n = quantity of time (days, years, etc.)

Probability of not failing until after 8 years: 1 - \((1 - p)^{n - 1} * p\)

p <- 1/10
n <- 8
failure <- 1 - (1 - p)^(n - 1) * (p)

expected <- 1 / p

standard_deviation <- sqrt((1 - p) / (p^2))

cat("Probability of failure after 8 years:", failure, "\n")
## Probability of failure after 8 years: 0.9521703
cat("Expected value:", expected, "\n")
## Expected value: 10
cat("Standard deviation:", standard_deviation, "\n")
## Standard deviation: 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.

Exponential probability for (x <= k) = \(1 - e^{-k/\mu}\) Exponential probability for (x >= k) = \(e^{-k/\mu}\)

mu <- 10
k <- 8

prob <- exp(-k / mu)
expected <- 1 / (1 / mu)
st_dev <- 1 / (1 / mu)

cat("Probability of failure after 8 years (Exponential):", prob, "\n")
## Probability of failure after 8 years (Exponential): 0.449329
cat("Expected value (mean):", expected, "\n")
## Expected value (mean): 10
cat("Standard deviation:", st_dev, "\n")
## Standard deviation: 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 binomial distribution uses the binom() function in R.

p <- 1 / 10

years <- 8

prob <- dbinom(0, size = years, prob = p)

expected <- years * p

standard_deviation <- sqrt(years * p * (1 - p))

cat("Probability of failure after 8 years:", prob, "\n")
## Probability of failure after 8 years: 0.4304672
cat("Expected value:", expected, "\n")
## Expected value: 0.8
cat("Standard deviation:", standard_deviation, "\n")
## Standard deviation: 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 Poisson distribution uses the dpois() function in R.

mean <- 10

years <- 8

lambda <- years / mean

pois_failure <- dpois(0, lambda = lambda)

expect <- lambda

standard_deviation <- sqrt(lambda)

cat("Probability of failure after 8 years:", pois_failure, "\n")
## Probability of failure after 8 years: 0.449329
cat("Expected value:", expect, "\n")
## Expected value: 0.8
cat("Standard deviation:", standard_deviation, "\n")
## Standard deviation: 0.8944272