DATA605 Homework 7

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 \leq j \leq k, m(j) = \frac{(k-j+1)^n -(k-j)^n}{k^n} \]

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. (Hint: the probability is equivalent to not failing during the first 8 years…)

PDF: \(P(n) = p(1-p)^n = pq^n\) where \(o < p < 1, q = 1-p\) and the distribution function is \(D(n) = 1-q^{n+1}\).

\[Pr(X = k) = (1-p)^{k-1}p = (1-0.5)^{8-1}0.5= \]

Expected Value: \(E(X) = \frac{1}{p} = \frac{1}{0.1} = 10\) Variance: \(var(x) = \frac{p}{(1-p)^2} = 0.1234\)
Standard Deviation: \(\sqrt\frac{p}{(1-p)^2} = 0.3514\)

V <- 0.1/((1-0.1)^2)
V
## [1] 0.1234568
std.dev <- sqrt(V)
std.dev
## [1] 0.3513642
e.x <- 1/0.1
e.x
## [1] 10
pgeom(8, prob = 1/10)
## [1] 0.6125795

The probability that a machine will fail after 8 years is 61.26%.

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.

\(f(X) = \frac{1}{u} e^{\frac{-x}{u}}\) when \(x \geq 0\) \(f(x) = 0\) when \(x < 0\)

pexp(8, rate = 1/10)
## [1] 0.550671

Expected Value: \(\frac{1}{k} = \frac{1}{10} = 0.1\) Variance: \(\sigma^2 = \frac{1}{k^2} = \frac{1}{100} = 0.01\)
Standard Deviation: \(\sigma = \frac{1}{k} = \frac{1}{10} = 0.1\)

The probability that the machine will fail after 8 years is 55.06%

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)

\[P(X success) = (^n_k)p^x(1-p)^{n-x}\]

Expected value: \(np = 8*0.1 = 0.8\) Standard deviation: \(\sqrt(v(x)) = \sqrt(npq) = \sqrt(0.72) = 0.8485\)

binom <- choose(8, 0) * 0.1^0 * ((1-0.1)^8)
binom
## [1] 0.4304672

The probability that the machine will fail after 8 years is 43.05%.

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.

X ~ Exp$(= 1/10 = 0.1) $
PDF: \(f(x) = \lambda e^{-\lambda x}, 0<x\)
CDF: \(P(X < x) = 1-e^{-\lambda x}\)
\(P(X \leq x) = 1-e^{-0.1x}\) for x > 0
\[P(X > x) = e^{\lambda x}\] \[P(X > 8) = exp(-\lambda 8) = e^{-0.8} = 0.449329 = 0.4493\] \[P(X > 8) = 0.4493\]

X ~ Exp$(= 1/10 = 0.1) $
Expected value: \(E(X) = \frac{1}{\lambda} = 10\)
Variance: \(\sigma^2 = \frac{1}{\lambda^2} = 100\)
Standard Deviation: \(\sigma = \frac{1}{\lambda} = 10\)

ppois(8, lambda = 0.1)
## [1] 1

The probablity that the machine will fail after 8 years is 44.93%.