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 .
Commutative Distribution Function of Y
Let \(Y=min(X_{1},X_{2},\cdots ,X_{n})\)
\(P(Y\leq y)=1-P(Y> y)\) \(P(Y\leq y)=1-P(X_{1}>y,X_{2}>y,\cdots ,X_{n}>y)\)
Since “X1, X2, . . . , Xn be n mutually independent random variables”,the probability of all of X greater than y is the product their individual probabilities.
\(P(Y\leq y)=1-[P(X_{1}>y)\cdot P(X_{2}>y)\cdots P(X_{n}>y)]\)
\[P(X_{i}>y)=\frac{k-y}{k}\]
\(P(Y\leq y)=1-[P(X_{i}>y)]^{n}\)
\(P(Y\leq y)=1-(\frac{k-y}{k})^{n}\)
Probability Mass Function of Y
\(P(Y=y)=P(Y\leq y) - P(Y\leq y-1)\)
\(P(Y=y)=[1-(\frac{k-y}{k})^{n}]-[1-(\frac{k-y+1}{k})^{n}]\)
\(P(Y=y)=[(\frac{k-y+1}{k})^{n}]-[(\frac{k-y}{k})^{n}]\)
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..)
\(P(X=x)=(1-p)^{n-1}\cdot p\)
\(P(X>8)= 1- P(X\leq8)\)
p_fail <- 1/10
n = 8
1-pgeom(n,p_fail)
## [1] 0.3874205
\(E[X]=\frac{1}{p}\)
\(E[X]=\frac{1}{\frac{1}{10}}=10\)
e_geom <- 1/p_fail
paste("The expected value is",e_geom)
## [1] "The expected value is 10"
\(Var[X]=\frac{1-p}{p^{2}}\)
\(Var[X]=\frac{1-\frac{1}{10}}{(\frac{1}{10})^{2}}=90\)
var_geom <- (1-p_fail)/(p_fail)^2
paste("The variance is",var_geom)
## [1] "The variance is 90"
\(\sigma = \sqrt{\frac{1-p}{p^{2}}}\)
sd_geom <- sqrt(var_geom)
paste("The standard deviation is",sd_geom)
## [1] "The standard deviation is 9.48683298050514"
What is the probability that the machine will fail after 8 years?. Provide also the expected value and standard deviation. Model as an exponential.
\(E(X)=\frac{1}{\lambda}=10\)
The expected failure time is 10 years.
\(P(X)=\lambda e ^{-\lambda x}\)
\(P(X>x)=e ^{-\lambda x}\)
Solve for \(\lambda\). \(\lambda= \frac{1}{10}\)
\(P(X>8)=e ^{-\frac{1}{10} \cdot 8}\)
lambda8 <- 1/10
p8 <- 1-pexp(8,lambda8)
p8
## [1] 0.449329
paste("The probability that the machine will fail after 8 years is", round(p8,4))
## [1] "The probability that the machine will fail after 8 years is 0.4493"
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)
Formula for Binomoal Distribution
\(P(x=k)=\binom{N}{k} p^k(1-p)^{n-k}=\frac{n!}{(n-k)!k!}\cdot p^k(1-p)^{n-k}\)
\(P(x=0)=\binom{8}{0} (\frac{1}{10})^0(1-\frac{1}{10})^{8-0}=(\frac{9}{10})^{8}\)
n = 8
k = 0
p = 1/10
p_binom <- dbinom(k, n, p)
paste("The probability that the machine will fail after 8 years is ",p_binom)
## [1] "The probability that the machine will fail after 8 years is 0.43046721"
\(E(X)=n \cdot p\)
e <- n*p
paste("The expected value is ",e)
## [1] "The expected value is 0.8"
\(\sigma = \sqrt{np(1-p)} =\sqrt{8\cdot \frac{1}{10}(1-\frac{1}{10})}\)
sigma = sqrt(n*p*(1-p))
paste("The standard deviation is ",sigma)
## [1] "The standard deviation is 0.848528137423857"
What is the probability that the machine will fail after 8 years?. Provide also the expected value and standard deviation. Model as a Poisson.
Formula for Poisson Distribution
\(P(X=k)=\frac{e^{-\lambda} \lambda ^k}{k!}\)
\(\lambda = 10\)
\(P(X=3)=\frac{e^{-10}\cdot 10 ^3}{3!}\)
lambda <- 8/10
x <- 0
p <- dpois(x, lambda)
paste("The probability that the machine will fail after 8 years is ",p)
## [1] "The probability that the machine will fail after 8 years is 0.449328964117222"
\(E(X)=\lambda=rt\)
t <- 8
r <- 1/10
e_p <- r*t
paste("The expected value ", e_p)
## [1] "The expected value 0.8"
\(\sigma = \sqrt{\lambda}\)
sigma_p = sqrt(lambda)
paste("The standard deviation is ", round(sigma_p,4))
## [1] "The standard deviation is 0.8944"