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 = min) = (\frac{possible outcomes}{tot. outcomes})^n \] In the folling, k^2 represents the total possible outcomes, and k^n - (k-1)^n represents outcomes where at least one independent random variable is equal to 1.

\[ F(Y = 1) = \frac{k^n - (k-1)^n}{k^n} \]

In the folling, k^2 represents the total possible outcomes, and (k-1)^n - (k-2)^n represents outcomes where at least one independent random variable is equal to 2 and no independent random variable is equal to 1. \[ F(Y = 2) = \frac{(k-1)^n - (k-2)^n}{k^n} \]

In the folling, k^2 represents the total possible outcomes, and (k-2)^n - (k-3)^n represents outcomes where at least one independent random variable is equal to 3 and no independent random variable is equal to 1 or 2. \[ F(Y = 3) = \frac{(k-2)^n - (k-3)^n}{k^n} \]

General solution:

\[ F(Y = min) = \frac{(k-min+1)^n - (k-min)^n}{k^n} \]

Simulated distributions are plotted below.

```
n <- 20 # set value of n - number of mutually independent random variables
k <- 100 # set value of k
min <- 1
max <- k
y <- c()
y_trials <- 10000
for (i in (1:y_trials)){
x <- as.integer(runif(n,min,max+1) ) #generate random uniform numcases numbers from min to max
y <- append(y,min(x))
i = i+1
}
#as.integer truncates, round converts to integers, add .5 for equal intervals
par(mfrow=c(2,1)) #stack two figures above each other
hist(x,main=paste0("Outcomes of X1, X2, ..., X", n, " (final run)"),breaks=seq(min-.5,max+.5,1)) #show the histogram
hist(y,main=paste0("Minimum of X1, X2, ..., X", n, " for ", y_trials, " trials"),breaks=seq(min-.5,max+.5,1)) #show the histogram
```

```
n <- 100 # set value of n - number of mutually independent random variables
k <- 50 # set value of k
min <- 1
max <- k
y <- c()
y_trials <- 10000
for (i in (1:y_trials)){
x <- as.integer(runif(n,min,max+1) ) #generate random uniform numcases numbers from min to max
y <- append(y,min(x))
i = i+1
}
#as.integer truncates, round converts to integers, add .5 for equal intervals
par(mfrow=c(2,1)) #stack two figures above each other
hist(x,main=paste0("Outcomes of X1, X2, ..., X", n, " (final run)"),breaks=seq(min-.5,max+.5,1)) #show the histogram
hist(y,main=paste0("Minimum of X1, X2, ..., X", n, " for ", y_trials, " trials"),breaks=seq(min-.5,max+.5,1)) #show the histogram
```

```
n <- 10 # set value of n - number of mutually independent random variables
k <- 100 # set value of k
min <- 1
max <- k
y <- c()
y_trials <- 10000
for (i in (1:y_trials)){
x <- as.integer(runif(n,min,max+1) ) #generate random uniform numcases numbers from min to max
y <- append(y,min(x))
i = i+1
}
#as.integer truncates, round converts to integers, add .5 for equal intervals
par(mfrow=c(2,1)) #stack two figures above each other
hist(x,main=paste0("Outcomes of X1, X2, ..., X", n, " (final run)"),breaks=seq(min-.5,max+.5,1)) #show the histogram
hist(y,main=paste0("Minimum of X1, X2, ..., X", n, " for ", y_trials, " trials"),breaks=seq(min-.5,max+.5,1)) #show the histogram
```

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

Geometric - the number of trials needed to get one success. Consider a success to be the machine failing. The expected value p = p(maching failing each year) = 0.1 q = 1 - p = 0.9

Geometric cdf that the machine will not fail in the first 8 years: \[Prob = (q)^k = (0.9)^8 = 0.43046721\]

Expected value = expected no. years until machine failure

\[E(x) = \frac{1}{p} = \frac{1}{0.1} = 10 years\]

\[Stdev = \sqrt{\frac{1-p}{p^2}} = \sqrt{\frac{1-0.1}{0.1^2}} = 9.487\]

- 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 - the amount of time until an event occurs. \[Prob = e^{-\lambda x} = e^{-0.1 * 8} = 0.44932896411\]

Expected value = expected no. years until machine failure

\[E(x) = \frac{1}{\lambda} = \frac{1}{0.1} = 10 years\]

\[Stdev = \frac{1}{\lambda} = \frac{1}{0.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)

Binomial - the number of successes in a sequence of n independent true/false events

\[Prob = (^n_i)p^i(1-p)^{n-i} = (^8_0)0.1^0(0.9)^{8-0} = 0.9^8 = 0.4304672\]

\[E(x) = np = 8 * 0.1 = 0.8\]

\[Stdev = \sqrt{np(1-p)} = \sqrt{0.8(0.9)} = 0.84852813742\]

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

Poisson - probability of number of events occuring in period of time

\[prob = \frac{\lambda^k}{k!}*e^{-\lambda} = \frac{0.8^0}{0!}*e^{-0.8} = 0.44932896411\]

\[E(x) = \lambda = 0.8\]

\[Stdev = \sqrt{\lambda} = \sqrt{0.8} = 0.894427191\]