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 .

This is an order statistic problem

\[ Given\ CDF\ of\ 1st\ order\ statistic\ is\ F_1(x)=1-(1-F_x(x))^n \] \[F_x(x) = \frac{y}{k}\] \[1-F_x(x) = \frac{k}{k}-\frac{y}{k} = \frac{k-y}{k}\]

\[ P(Y=y) = P(Y\leqslant y) - P(Y\leqslant y-1) \] \[ P(Y=y) = (1-(\frac{k-y}{k})^n)- (1-(\frac{k-y+1}{k})^n)\] \[ P(Y=y) = -(\frac{k-y}{k})^n + (\frac{k-y+1}{k})^n\] \[ P(Y=y) = \frac{(k-y+1)^n-(k-y)^n}{k^n}\]

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

X = 8

P = 1/10

q = 1-P = 1-1/10

SD = sqrt((1/P) * (1/P-1))

Expected Value = 1/p

P(X>8) = 1-P(X<=8) = 1-(1-(1-P)^8) = (1-P)^8

x = 8
p = 1/10

(1-p)^(x)
## [1] 0.4304672
1-pgeom(x-1, p, lower.tail = TRUE)
## [1] 0.4304672

Expected Value = 1/p = 1/0.1 = 10 years

S_D = sqrt((1/p)*(1/p-1))
S_D
## [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.

u = 10 years

lambda = 1/u = 0.1

\[ f(x) = \lambda e^{-\lambda x} \]

P(X>8) = e^(-0.1*8)

exp(-0.1*8)
## [1] 0.449329
1 - pexp(8, 0.1)
## [1] 0.449329

Expected value = 1/lambda = 1/0.1 = 10 years

The standard deviation is equal to the mean for exponential distributions which is 10 years

  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)

Formula for Binomial

\[ P(X = x ) = nCx*p^x*(1-p)^{(n-x)} \]

x (number successes) = 0

n (number of trials) = 8

p (probability of success) = 1/10 = 0.10

# Probability of exactly 0 failures in 8 years [P(X=0)]:

dbinom(0,8,0.1)
## [1] 0.4304672
# expected Value
# E(x) = n * P
Ex = 8*0.1
Ex
## [1] 0.8
# Standard Deviation
# SD = sqrt(np(1-p))

SD = sqrt((8*0.1*(1-0.1)))
SD
## [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.
# Probability of exactly 0 failures in 8 years [P(X=0)]

x1 =0
lamda = 8/10 

p_exact_0 = dpois(x1, lamda)
p_exact_0
## [1] 0.449329

Expected value

u1 = 1/10 , E=1

lamda = ?, E=8

Multiplying u1 will gives us lamba = 8/10

Therefore, Expected value is 0.8

# standard deviation is the square root of the mean (lambda)

SD2 = sqrt(lamda)
SD2
## [1] 0.8944272