Refrences: https://math.dartmouth.edu/archive/m20f10/public_html/HW5Solutions.pdf

  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.

The distribution of Y can be found by the following:

For 1 <= j <= k, m(j) = ((k-j+1)^n - (k-j)^n) / k^n

To find the distribution function, we would need to calculate the number of way to assign X1 - Xn values between j and k having at least one Xi equal j and then divide by all the ways to assign X1-Xn values from 1-k without any conditions.

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

Probability of failure after 8 years: P(x=n) = ((1-p)^n-1)*p

# Using dgeom() 
dgeom(n,p)
## [1] 0.04304672
((1-p)^(n-1))*p
## [1] 0.04782969

Expected value: 1/p

1/p
## [1] 10

Standard Deviation: sqrt((1-p)/(p^2))

sqrt((1-p)/(p^2))
## [1] 9.486833
  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.
#Using dexp
dexp(n,p)
## [1] 0.0449329
#Using exponential distribution formula
0.1*(exp(1)^-(p*n))
## [1] 0.0449329

Expected value: 1/p

1/p
## [1] 10

Standard Deviation: sqrt((1/p)^2)

sqrt((1/p)^2)
## [1] 10
  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)
#Using dbinom
dbinom(0,n,p)
## [1] 0.4304672
#Using Binomial distribution formula
choose(n,0)*(p^0)*((1-p)^(n-0))
## [1] 0.4304672

Expected value: n*p

n*p
## [1] 0.8

Standard Deviation: sqrt(nxpx(1-p))

sqrt(n*p*(1-p))
## [1] 0.8485281
  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.
#Using dpois
dpois(0,n*p)
## [1] 0.449329
#Using Poisson approximation formula
((exp(1)^-(n*p))*((n*p)^0))/factorial(0)
## [1] 0.449329

Expected value: n*p

n*p
## [1] 0.8

Standard Deviation: sqrt(n*p)

sqrt(n*p)
## [1] 0.8944272

ppois(1,1000/500, lower.tail=F)