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 .

In general, for \(X_i\) uniformly distributed over the integers from 1 to k, the probability for each segment between one integer to the next would be \(\frac 1k\). The general form for the probability between two integers a and b would be \(\frac {b - a}{k}\), where b is the larger of the two integers.

For \(Y\) equal to the minimum of \(X_i\), we are looking for the lowest value integer X from a sample of values from \(X_1, X_2, ... , X_n\). Because there are \(k\) possible outcomes for \(X_1\), and \(k\) possible outcomes for \(X_2\), there are \(k^n\) possible outcomes for \(n\) different \(X_i\).

For \(Y = 1\), the probability would be \(\frac {k^n - {(k - 1)}^n}{k^n}\)

Because we are not necessarily looking for when \(Y\) is equal to a certain value, but rather when \(X_i \geq\) a certain value, the number of possibilities and thus the probability for each successive value will decrease. Although the distribution for \(X\) is uniform, the distribution for \(Y\) is not.

For instance, if \(Y = 5\), the probability will decrease. The number of ways to obtain \(X > 5 = {(k - 5)}^n\) This is not the full story, however because there must be at least one \(X = 5\). So, to obtain at least one \(X = 5\), the number of ways is actually more complicated. The next component to consider is where \(X \leq 4\) = \(k^n - {(k - 4)}^n\). \(k - 4\) is used because there can be any number of \(X = 5\), but there can be no \(X \leq 4\). So, the full number of ways to obtain at least one \(X = 5\) is \(k^n - {(k - 5)}^n - (k^n - {(k - 4)}^n)\), which is the number of possibilities where \(X > 5\), less the number of possibilities where \(X \leq 4\), which isolates only the number of possibilities where \(X = 5\).

So, \(P(Y = 5) = \frac {-{(k - 5)}^n + {(k - 4)}^n}{k^n} = \frac {{(k - 4)}^n - {(k - 5)}^n}{k^n}\)

In general, \(P(Y = y) = \frac {{((k + 1) - y)}^n - {(k - y)}^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.).

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.

The probability that the machine will fail after 8 years is equivalent to the complement of the machine failing in the first 8 years.

The mean is \(\frac 1p = \frac 1{\frac 1{10}} = 10\)

\(P(X \geq x) = (1 - p)^{x - 1}\)

p <- 1/10
p_c <- 1 - p
x <- 8

prob <- ( 1 - p)^(x)

prob_R <- 1 - pgeom(x - 1, p)

prob
## [1] 0.4304672
prob_R
## [1] 0.4304672
var <- (1 -p)/(p^2)
sqrt(var)
## [1] 9.486833

The formula for the CDF of a geometric distribution is \(P(X \leq x) = 1 - (1 - p)^{x}\), and I evaluated for the probability that the failure occurs at greater than or equal to 8 years (the exponent would then be 7 and not 8), but pgeom gives a different answer. If I evaluate with 8 in the exponent instead, the two then agree.

Probability \(P(failure \geq 8) = 0.4305\).

Expected Value: Expectation is equivalent to the mean, which is 10.

Standard Deviation: \(Var[X] = \frac {1 -p}{p^2} = 90, SD = \sqrt {90} = 9.4869\)

B.

Exponential

\(\theta = 10\)

Expected Value: Expectation is equivalent to the mean, which is 10.

Standard Deviation: \(Var[X] = \theta^2 = 100, SD = 10\)

theta <- 10
x <- 8

prob <- exp(-x/theta)

prob_R <- 1 - pexp(x, 1/theta)

prob
## [1] 0.449329
prob_R
## [1] 0.449329

Probability \(P(failure \geq 8) = 0.44933\)

C.

Binomial

Expected Value: Expectation is equivalent to the mean, which is 10 years. In the case of the binomial distribution, \(mean = np\) In this case, \(p = \frac {1}{10}\) and n = 8, so the expectation is 0.8 failures in the first 8 years.

Standard Deviation: \(Var[X] = np(1 - p) = 0.72, SD = 0.8485\)

p <- 1/10
x <- 8

prob_R <- pbinom(0, 8, p)

prob
## [1] 0.449329
prob_R
## [1] 0.4304672

Probability \(P(failure \geq 8) = 0.4305\)

D.

Poisson

Expected Value: \(\lambda = \frac{np}{t} = \frac{8}{10}\)

\(\lambda = \frac{8}{10}\)

Standard Deviation: \(Var[X] = \lambda = \frac{8}{10}, SD = \sqrt{\frac{8}{10}} = 0.8944\)

PMF = \(\frac {e^{-\lambda} \times \lambda^x}{x!}\) Where x is the number of occurrences

lambda <- 8/10
x <- 0 # No failures in the first 8 years
prob <- (exp(-lambda)*lambda^x)/(factorial(x))

prob_R <- ppois(x, lambda)

prob
## [1] 0.449329
prob_R
## [1] 0.449329

Probability \(P(failure \geq 8) = 0.44933\)