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.
Answer:
We’ll need to count the number of ways that we can assign \({ X }_{ 1 },{ X }_{ 2,..., }{ X }_{ i }\) to value between y and k with at least one Xi being assigned to y and divide by the total number of possible ways to assign \({ X }_{ 1 },{ X }_{ 2,..., }{ X }_{ i }\) to values between 1 and k.
Let \({ x }_{ i }\sim Discrete\quad Uniform\quad \{ 1,k\}\), we know that
\(P({ X }_{ i }=x)=\frac { 1 }{ k } ,\quad x=1,2,...,k\)
\(P({ X }_{ i }\le x)=\sum _{ y=1 }^{ x }{ P({ X }_{ i }=y) } =\sum _{ y=1 }^{ x }{ \frac { 1 }{ k } } =\frac { x }{ k } ,\quad x=1,2,...,k\)
\(Y=min\{ { X }_{ 1 },...,{ X }_{ n }\}\)
So,
\(P({ X }_{ i }\ge x)=1-P({ X }_{ i }<x)=1-P({ X }_{ i }\le x-1)=1-\frac { x-1 }{ k }\)
\(P(Y\le y)=P(min\{ { X }_{ 1 },...,{ X }_{ n }\} \le y)\)
= \(1-P(min\{ { X }_{ 1 },...,{ X }_{ n }\} >y)\)
= \(1-{ (P({ X }_{ i }>y)) }^{ n }\)
= \(1-{ (1-\frac { y }{ k } ) }^{ n }\)
and
\(P(Y\le y-1)=1-{ (1-\frac { y-1 }{ k } ) }^{ n }\)
Therefore, we can write the distribution of Y as
\(P(Y=y)=P(Y\le y)-P(Y\le y-1)\)
= \(1-{ (1-\frac { y }{ k } })^{ n }-[1-{ (1-\frac { y-1 }{ k } ) }^{ n }]\)
= \(1-{ (\frac { k }{ k } -\frac { y }{ k } })^{ n }-1+{ (\frac { k }{ k } -\frac { y-1 }{ k } ) }^{ n }]\)
= \({ (\frac { k-y+1 }{ k } })^{ n }-{ (\frac { k-y }{ k } ) }^{ n }\)
= \(\frac { { (k-y+1 })^{ n }-{ (k-y) }^{ n } }{ { k }^{ n } }\)
= \(\begin{Bmatrix} \frac { { (k-y+1) }^{ n }-{ (k-y) }^{ n } }{ { k }^{ n } } , & y=1,2,...,k \\ 0 & else \end{Bmatrix}\)
The numerator for the probability distribution function, \({ (k-y+1) }^{ n }- {(k-y) }^{ n }\), represents the number of ways that we can assign \({ X }_{ 1 },{ X }_{ 2,..., }{ X }_{ i }\) to value between y and k with at least one Xi being assigned to y.
The denominator for the probability distribution function, \({ k }^{ n }\) is the total possible number of of assignments for the entire collection of random variables \({ X }_{ 1 },{ X }_{ 2,..., }{ X }_{ i }\).
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..)
What is the probability that the machine will fail after 8 years?. Provide also the expected value and standard deviation. Model as an exponential.
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)
What is the probability that the machine will fail after 8 years?. Provide also the expected value and standard deviation. Model as a Poisson.
Answer:
a.) If X is a Geometric random variable, then
Probability Density Function: \(P(X=x)={ pq }^{ x-1 }\), where x = 1,2,3,…
Cumulative Density Function: \(P(X\le x)=P(X=1)+P(X=2)...P(X=x)\)
= \(p + qp + {q}^{2}p...+ {q}^{x-1}p\)
= \(\frac {p(1-{q}^{x})}{1-q}\)
= \(1 - {q}^{x}\)
We know that the probability of failure of the machine, \(p = 0.1\) so \(q = 1-0.1=0.9\).
Then, the probability that the machine will fail after 8 years is
\(P(X>8) = 1 - P(X\le8)\)
= \(1 - (1-{0.9}^{8})\)
= 1 - 0.5695
= 0.4305
The expected value is
\(E(X) = \frac {q}{p} = \frac{0.9}{0.1} = 9\)
The standard deviation is
\(\sigma =\sqrt { \frac {q}{p^2} } = \sqrt { \frac {0.9}{0.1^2}} = 9.4868\)
# Parameters
p <- 1/10
q <- 1-p
# Probability that the machine will fail after 8 years
pgeom(7, p, lower.tail = FALSE)
## [1] 0.4304672
# Expected value
exp_val <- q/p
exp_val
## [1] 9
# Standard deviation
std <- sqrt(q/p^2)
std
## [1] 9.486833
b.) The exponential model is
\(P(X\le k)=1-{ e }^{ \frac { -k }{ \mu } },\quad where\quad \mu =\frac { 1 }{ \lambda }\)
We know that the rate of failure of the machine, \(\lambda = 0.1\)
So the probability that the machine will fail after 8 years is
\(P(X>8)=1-{ e }^{ \frac { -8 }{ \frac { 1 }{ 0.1 } } }=0.4493\)
The expected value is
\(E(X) = \frac {1}{\lambda} = \frac{1}{0.1} = 10\)
The standard deviation is
\(\sigma =\sqrt { \frac {1}{\lambda^2} } = \sqrt { \frac {1}{0.1^2}} = 10\)
# Parameters
lambda <- 1/10
# Probability that the machine will fail after 8 years
pexp(8, lambda, lower.tail = FALSE)
## [1] 0.449329
# Expected value
exp_val <- 1/lambda
exp_val
## [1] 10
# Standard deviation
std <- sqrt(1/lambda^2)
std
## [1] 10
c.) Let X be a random variable shows the number of failures in a year. Here X has binomial variable with parameters n=8 and p=1/10=0.10. So the probability of x failures is
\(P(X=x)=\begin{pmatrix} 8 \\ x \end{pmatrix}{ 0.1 }^{ x }{ 0.9 }^{ 8-x }\)
So the probability that the machine will fail after 8 years is
\(P(X>8)=\begin{pmatrix} 8 \\ 8 \end{pmatrix}{ 0.1 }^{ 8 }{ 0.9 }^{ 8-8 }=0.4305\)
The expected value is
\(E(X) = np = 8*0.1 = 0.8\)
The standard deviation is
\(\sigma =\sqrt { np(1-p) } =\sqrt { 8*0.1(1-0.1 } =0.8485\)
# Parameters
n <- 8
p <- 1/10
q <- 1-p
k <- 0
# Probability that the machine will fail after 8 years
dbinom(k, n, p)
## [1] 0.4304672
# Expected value
exp_val <- n*p
exp_val
## [1] 0.8
# Standard deviation
std <- sqrt(n*p*q)
std
## [1] 0.8485281
d.) The Poisson formula is
\(P(X=k)=\frac { { \lambda }^{ k } }{ k! } { e }^{ -\lambda }\)
Failure rate, \(\lambda=1/10=0.1\)
The probability of 0 failures is
\(P(X=0)=\frac { { \lambda }^{ 0 } }{ 0! } { e }^{ -0.1 }=0.9048\)
So, the probability that the machine will fail after 8 years is 8 times of the probability of 0 failures before 8 years,
\(P(X>8) =(\frac { { \lambda }^{ 0 } }{ 0! } { e }^{ -0.1 })^{8}=0.9048^8=0.4491\)
For Poisson distribution, the lambda (\(\lambda\)) is the expected value, E(X) and variance, V(X) .
So, the expected value is
\(E(X) = \lambda = 0.1\)
The standard deviation is
\(\sigma=\sqrt { \lambda }=\sqrt {0.1} = 0.3162\)
# Parameters
lambda <- 1/10
# Probability that the machine will fail after 8 years
(ppois(0, lambda = lambda))^8
## [1] 0.449329
# Expected value
exp_val <- lambda
exp_val
## [1] 0.1
# Standard deviation
std <- sqrt(lambda)
std
## [1] 0.3162278