Problem 1

Let \(X_1, X_2, . . . , X_n\) 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 \(X_i's\). Find the distribution of \(Y\).

Let \(P(Y \le y)\) be the distribution of the minimum. \[P(min(X_1, X_2, ..X_n) \le y)\]

Using the complement, \(P(Y \le y)\) is equivalent to the following. \[1-P(X_1 \ge y, X_2 \ge y, ...X_n \ge y )\]

By independence,

\[P(Y \le y)= 1-P(X_1 \ge y) \times P(X_2 \ge y) \times ... P(X_n \ge y)\]

By definition of the CDF, \[[1]\ P(Y \le y)= 1-(1-F(X)^n)\]

By definition of the pdf and using the chain rule, \[[2]\ f(y)=n(1-F(X))^{n-1} f(x) \]

Now, the discrete uniform pdf is \[[3]\ f(x)=1/(k-1+1) = 1/k, I_k \ge 1\]

And the discrete uniform cdf is \[[4] \ F(X)=\sum_x 1/k = x/k, I_{x \in 0, 1,...,k}\] and \(F(X)=1\) for \(x>k\).

So the pdf of the minimum, its distribution, is found by placing [3] and [4] into [2]. \[f(y)= n/k(1-x/k)^{n-1}I_{x \in 0, 1,\infty}\]

Problem 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.).

  1. What is the probability that the machine will fail after 8 years? Provide also the expected value and standard deviation. Model as a geometric.

First things first. We are going to model continuous and discrete distributions, so let’s refine them from years to days using 365 days per year. (You could use 365.25 but that doesn’t have an effect on the results below.)

\[P(X>8 \times 365| \pi = 1/3650)=1-P(X \le 2920 | \pi = 1/3650) \] We will keep in mind that 8 years is about 2920 days and 10 years is 3650 days (roughly).

PX=1-pgeom(2920, 1/3650)
EX=1/(1/3650) #1/p
VARX=(3649/3650)/(1/3650)^2 #q/p^2
ans1=round(c(PX, EX, VARX),3)
names(ans1)=c("P", "E", "V")
ans1
##            P            E            V 
##        0.449     3650.000 13318850.000
  1. 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(Y>8 \times 365| \lambda = 1/(365 \times 10))=1-P(Y \le 8 \times 365 | \lambda=1/3650) \]

PY=1-pexp(8*365,1/3650)
EY=3650 #1/lambda
VARY=3650^2 #1/lambda^2
ans2=round(c(PY, EY, VARY),3)
names(ans2)=c("P", "E", "V")
ans2
##           P           E           V 
## 4.49000e-01 3.65000e+03 1.33225e+07
  1. 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(Z=0 | N = 365 \times 8 , \pi = 1/ (365 \times 10))\]

PZ=dbinom(0, 365*8, 1/3650)
EZ=365*8*1/3650
VARZ=365*8*1/3650*3649/3650
ans3=round(c(PZ, EZ, VARZ),3)
names(ans3)=c("P", "E", "V")
ans3
##     P     E     V 
## 0.449 0.800 0.800
  1. What is the probability that the machine will fail after 8 years?. Provide also the expected value and standard deviation. Model as a Poisson.

\[P(A=0 | \lambda = 2920 / 3650)\]

PA=dpois(0, 2920/3650)
EA=2920/3650
VARA=EA^2
ans4=round(c(PA, EA, VARA),3)
names(ans4)=c("P", "E", "V")
ans4
##     P     E     V 
## 0.449 0.800 0.640

Let’s compare

mymat=rbind(ans1,ans2,ans3,ans4)
mymat
##          P      E           V
## ans1 0.449 3650.0 13318850.00
## ans2 0.449 3650.0 13322500.00
## ans3 0.449    0.8        0.80
## ans4 0.449    0.8        0.64