Question 1

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.

\[1\leq j \leq k\] \[total\hspace{.2cm}options\hspace{.2cm}where\hspace{.1cm}Y=1\hspace{.1cm} is\hspace{.2cm} k^n\] \[Total\hspace{.2cm} options\hspace{.2cm}where\hspace{.2cm}Y\neq1\hspace{.2cm}is\hspace{.2cm}(k-1)^n\] \[Y=1\hspace{.2cm}is\hspace{.2cm}k^n-(k-1)^n\] \[k^n-(k-1)^n-[k^n-(k-1)^n]\Rightarrow\] \[\frac{(k-j+1)^n-(k-j)^n}{k^n}\]

Question 2

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(One failure in ten years)=1/10

P(No failures in ten years)=9/10

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.) \[\text{P(failure after 8 years)} = 1 - \sum_{k=1}^{9} \frac{1}{10}\times\Big(\frac{9}{10}\Big)^{k-1}\] \[\begin{align} P(x) &= p (1-p)^{x-1} \\ M(t) &= p (e^{-t} - 1 + p)^{-1} \\ E(X) &= \dfrac{1}{p} \\ Var(X) &= \dfrac{1-p}{p^2} \\ \sigma &= \dfrac{ \sqrt{1-p}}{p} \\ \end{align}\]

p <- 1/10
q <- 9/10
n=8

year = 9
v = vector()
for (k in 1:year) {
 v[k] <- p*(q^(k-1))
 
}

prob_geight <-round(pgeom(n,p,lower.tail = F),3)

E_x <- 1/p

sigma <- round(sqrt(1-p)/p,3)
## [1] "Probability that a machine fails after 8 years is 0.387"
## [1] "The expected value is 10"
## [1] "The standard deviation is 9.487"

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.

\[P(X\geq 8\hspace{.2cm}years)= e^\frac{-k}{u}\] \[\begin{align} pdf &= \lambda e^{-\lambda x} \\ cdf &= 1 - e^{-\lambda x} \\ M(t) &= \dfrac{\lambda}{\lambda - t} \\ E(X) &= \dfrac{1}{\lambda} \\ Var(X) &= \dfrac{1}{\lambda^2} \\ \sigma &= \dfrac{1}{\lambda} \\ \end{align}\]

lamb <- 1/10

expo <- round(exp(-n/10),3)
rprob<-round(pexp(p,n,lower.tail = F),3)

gE_x <- 1/lamb

varia <- 1/lamb^2

std <- 1/lamb
## [1] "The probability that a machine fails after 8 years is 0.449"
## [1] "The expected value is 10"
## [1] "The standard deviation is 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)

\[\begin{align} P(x) &=\left( {}_n C_x \right) p^x (1-p)^{n-x} \\ M(t) &= \left[pe^t + 1 - p \right]^n \\ E(X) &= np \\ Var(X) &= np(1-p)\\ \sigma &= \sqrt{ np(1-p)} \end{align}\]

pbin<- round(pbinom(q,n,p),3)

bE_x <- round(n*p,3)

b_std <- sqrt(n*p*q)
## [1] "The binomial probability that the machine will fail after 8 years is 0.43"
## [1] "The expected value is 0.8"
## [1] "The standard deviation is 0.848528137423857"

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.

\[\begin{align} \lambda &= \dfrac{np}{t}\\ P(x) &= \dfrac{ \lambda^x e^{-\lambda}}{x!} \\ M(t) &= e^{\lambda (e^t - 1)} \\ E(X) &= \lambda \\ Var(X) &= \lambda \\ \sigma &= \sqrt{ \lambda} \end{align}\]

plamb <- n*p

pE_x <- plamb

p_prob <-round(ppois(q,plamb),3)
p_std <- round(sqrt(plamb),3)
## [1] "The probability that the machine will fail after 8 years is 0.449"
## [1] "The expected value 0.8"
## [1] "The standard deviation is 0.894"