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

For 1≤j≤k,

\(P(Y=y) = \frac{(k−y+1)^n − (k - y)^n}{k^n}\)

the number of possible combinations of \(X_i\)’s is \(k^n\) (choosing \(n\) values out of \(k\) options with replacement).

Consider number of combinations with at least one \(1\). It is equal to all combinations (\(k^n\)) minus all combinations with values between \(2\) and \(k\) (\((k-1)^n\)). So \(P(Y=1) = \frac{k^n-(k-1)^n}{k^n}\).

Consider number of combinations with at least one \(2\) and no \(1\). It is euqal to all combinations (\(k^n\)) minus all combinations with at least one \(1\) (see above: \(k^n-(k-1)^n\)) and minus all combinations with values between \(3\) and \(k\) (\((k-2)^n\)). So \(P(Y=2) = \frac{k^n-(k^n-(k-1)^n)-(k-2)^n}{k^n}= \frac{k^n-k^n+(k-1)^n-(k-2)^n}{k^n}= \frac{(k-1)^n-(k-2)^n}{k^n}\).

Like-wise for Y=3 which is all combinations without \(1\) or \(2\) and with at least one \(3\),

\[ \begin{split} P(Y=3) &=\frac{k^n - (k^n-(k-1)^n)-((k-1)^n-(k-2)^n)-(k-3)^n}{k^n}\\ &=\frac{k^n - k^n+(k-1)^n-(k-1)^n+(k-2)^n-(k-3)^n}{k^n}\\ &= \frac{(k-2)^n-(k-3)^n}{k^n} \end{split} \].

In all and all, we can see that \(P(Y=a) = \frac{(k-a+1)^n-(k-a)^n}{k^n}\).

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

p = P(machine will fail after 10 years) = .1

P(machine will not fail after 10 years) = 1 - p = .9

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

Probability that the machine will fail after 8 years

p = 1/10
q = 1-p
n <- 8
pgeom(8,p,lower.tail = F)
## [1] 0.3874205

Expectation Value:

geo_EV = (q)/(p)
paste("E(X) = ", geo_EV)
## [1] "E(X) =  9"

Standard Deviation:

# sd = sqrt(q/p^2)
sd <- sqrt((.9)/(.1^2))
paste("sd = ", sd)
## [1] "sd =  9.48683298050514"

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

The probability following an exponential distribution is 0.449329

lambda <- 1/10
k = 8
exp(-lambda*k)
## [1] 0.449329

Expected Value && Standard deviation both are 10

ex_val <- 1/lambda
sd <- sqrt(1/lambda^2)

ex_val
## [1] 10
sd
## [1] 10

c. 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 probability following a binomial distribution is 0.4304672

n <- 8
p <- 1/10
q <- 1-p
k <- 0
dbinom(k, n, p)
## [1] 0.4304672

Following binomial distribution, Expected Value = 0.8 && Standard deviation = 0.8485281

ex_val <- n*p
sd <- sqrt(n*p*q)

ex_val
## [1] 0.8
sd
## [1] 0.8485281

d. 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 probability following a poison distribution is 0.449329

lambda <- 8/10

ppois(0, lambda = 0.8)
## [1] 0.449329

Following Poisson distribution Expected Value is 0.8 and Standard deviation is 0.8944272

lambda <- 8/10

Exp_val <- lambda
Exp_val
## [1] 0.8
sd <- sqrt(lambda)
sd
## [1] 0.8944272