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.

\(F_Y(y)\), is calculated as: \[ F_Y(y) = P(Y \leq y) = 1 - P(Y > y) \] \[ = 1 - P(\min(X_1, X_2, \ldots, X_n) > y) \] \[ = 1 - P(X_1 > y, X_2 > y, \ldots, X_n > y) \] \[ = 1 - P(X_1 > y)P(X_2 > y) \ldots P(X_n > y) \] \[ = 1 - [P(X_i > y)]^n \] \[ = 1 - \left(\frac{{k - y}}{k}\right)^n \] Where \(k−y\), I’m considering how many outcomes are left after I’ve taken into account \(y\), and then I divide this by the total number of possible outcomes, which is \(k\).This calculation helps me figure out the probability of \(Y\) being less than or equal to \(y\). But if I want to find the probability of Y being exactly \(y\), I need to subtract the probability of \(Y\) being less than or equal to \(y−1\) from the probability of \(Y\) being less than or equal to \(y\).

\[ P(Y \leq y - 1) = 1 - \left(\frac{{k - (y - 1)}}{k}\right)^n = \frac{{(k - y + 1)^n}}{{k^n}} \]

\[ f_Y(y) = P(Y = y) = P(Y \leq y) - P(Y \leq y - 1) \] \[ = 1 - \left(\frac{{k - y}}{k}\right)^n - \frac{{(k - y + 1)^n}}{{k^n}} \] \[ = \frac{{(k - y + 1)^n - (k - y)^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..)

\(X \sim \text{Geom}(0.1)\), \[ P(X > n) = 1 - P(X \leq 8) = 1 - \sum_{i=1}^{8} (0.9)^{i-1} (0.1) \Rightarrow 1 - 0.1(1 + 0.9 + 0.9^2 + \ldots + 0.9^7) \] Expected Value \(E[X] = \frac{11}{10} = 1.0\) Standard Deviation \(\sigma = \sqrt{\text{Var}(X)} = \sqrt{90} = \frac{\sqrt{3 \times 10}}{\sqrt{10}}\) ]

p <- 1/10  # given by problem
q <- 1 - p

no_failure_8_years <- 1 - pgeom(7, p)

no_failure_8_years
## [1] 0.4304672
# not failing during the first 8 years
q^8
## [1] 0.4304672
  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.

\(X \sim \text{Exp}(1/10)\), the probability density function \(f_X(8)\) is calculated as: \[ f_X(8) = (0.1) e^{-(0.1) \cdot 8}, \quad x \geq 0 \] The expected value \(E[X] = \frac{11}{10} = 1.0\) and the standard deviation \(\sigma = \sqrt{\text{Var}(X)} = \sqrt{\frac{1}{(1/10)^2}} = \sqrt{100} = 10\).

exp_model <- pexp(8, p, lower.tail = FALSE)

exp_model
## [1] 0.449329
  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)

\(X \sim \text{Binom}(8, 1/10)\), the probability \(P(X=0)\) is calculated as: \[ P(X=0) = \binom{8}{0} \cdot 0.10^0 \cdot 0.9^8 \] The expected value \(E[X] = np = 8 \times 0.1 = 0.8\) and the standard deviation \(\sigma = \sqrt{np(1-p)} = \sqrt{0.8 \times (1-0.1)} = \sqrt{0.72}\).

n <- 8  # n trials
n_success <- 0  # n successes

binom_model <- pbinom(n_success, n, p)

binom_model
## [1] 0.4304672
  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.

\(X \sim \text{Pois}(8/10)\), the probability \(P(X=0)\) is calculated as: \[ P(X=0) = \frac{e^{-0.8} \cdot 0.8^0}{0!} = e^{-0.8} \] The expected value \(E[X] = 0.8\) and the standard deviation \(\sigma = \sqrt{0.8} \approx 0.8944\).

pois_model <- ppois(0, 8/10)

pois_model
## [1] 0.449329