1. Let \(X_1, X_2, . . . , X_n\) 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 \(X_i\)’s. Find the distribution of \(Y\).

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

  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..)
  2. What is the probability that the machine will fail after 8 years?. Provide also the expected value and standard deviation. Model as an exponential.
  3. 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)
  4. What is the probability that the machine will fail after 8 years?. Provide also the expected value and standard deviation. Model as a Poisson.

Given, \[Y = min(X_i)\] Find \(P(Y) = ?\) for \[ 1 \leq X_i \leq k\]

If \[ 1 \leq i \leq k\] this means that \(X_i\) has k possibilities. Since \(X_i \in X_1,..,X_n\), then the possibility k becomes \(k^n\) in this case. \(k^n\) is the total number of all possibilites.

The distribution formula is in the form of: \[P(Y) = \frac{number\space of\space possibilities\space greater\space than\space Y}{total\space number\space of\space possibilities}\]
- For Y = 1: \[P(1) = \frac{number\space of\space possibilities\space greater\space than\space 1}{total\space number\space of\space possibilities} \\ = \frac{k^n - (k-1)^n}{k^n}\]
- For Y = 2: \[P(2) = \frac{number\space of\space possibilities\space greater\space than\space 2}{total\space number\space of\space possibilities} \\ = \frac{k^n - (k-2)^n - [k^n - (k-1)^n]}{k^n} \\ = \frac{(k-2)^n - (k-1)^n}{k^n}\]
- For Y = 3: \[P(3) = \frac{number\space of\space possibilities\space greater\space than\space 3}{total\space number\space of\space possibilities} \\ = \frac{k^n - (k-3)^n - [k^n - (k-2)^n - [k^n - (k-1)^n]]}{k^n} \\ = \frac{(k-3)^n - (k-2)^n}{k^n}\]
- For Y = i: \[P(Y) = \frac{\Bigg(k - (i-1)\Bigg)^n - \Bigg(k-i\Bigg)^n}{k^n}\]


  1. Given:
fail_1_every_10 <- 1/10

a)

P(X>8) = ? E(X) = ? sd = ?

Model as an geometric:

\(P(X > 8) = 1 - P(X \leq 8)\)

cat(sprintf("%s = %f\n", c(" Probability", "Expected Value", "Standard Deviation"),
    c(1-(1-((1-fail_1_every_10)^{8+1})), (fail_1_every_10)^{-1}, sqrt((1-fail_1_every_10)/fail_1_every_10^2))))
##  Probability = 0.387420
##  Expected Value = 10.000000
##  Standard Deviation = 9.486833

b)

Model as an exponential:

\(P(X > 8) = e^{-\lambda y}\), with \(\lambda = 0.1\) and \(y = 8\)

\(E(X) = \frac{1}{\lambda}\)

lambda <- 1/10
years <- 8
e <- 2.71828
cat(sprintf("%s = %f \n", c(" Probability", "Expected Value", "Standard Deviation"),
            c(e^(-lambda*years), 1/lambda, sqrt(1/lambda^2))))
##  Probability = 0.449329 
##  Expected Value = 10.000000 
##  Standard Deviation = 10.000000

c)

Model as an binomial:

years <- 8
cat(sprintf("%s = %f \n", c(" Probability", "Expected Value", "Standard Deviation"),
            c(pbinom(0, 8, 0.1), years * fail_1_every_10, sqrt(years * fail_1_every_10 * (1-fail_1_every_10)))))
##  Probability = 0.430467 
##  Expected Value = 0.800000 
##  Standard Deviation = 0.848528

d)

Model as Poisson:

Poisson’s probiblity theorem: \[P(x) = \frac{\lambda^{x}e^{-\lambda}}{x!}\] where,

P(x) = probability of x successes over 8 years

\(\lambda = 0.1\)

lambda <- 1/10
years <- 8
e <- 2.71828
x <- 0
cat(sprintf("%s = %f \n", c(" Probability", "Expected Value", "Standard Deviation"),
            c(ppois(x, years*lambda), years*lambda, sqrt(years*lambda))))
##  Probability = 0.449329 
##  Expected Value = 0.800000 
##  Standard Deviation = 0.894427