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

Answer 1 ## Y=min(X1,X2,…..Xn)

Xi Uniformly distributed U(1,k)

Distribution function for Y

F(y)=P(Xi<y)=1−P(min(X1,X2,…..Xn>y))

F(Y)=1−((b−y)/(b−a))n

U(a,b)=U(1,k)

F(Y)=1−((k−y)/(k−1))n

F(Y)=1−((1−y/k)n)

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

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

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

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

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

Answer 2 ## (a) P(successonthenthtrial)=((1−p)n−1).p

In this case, success is the failure of the machine. For example, probability of machine faulire which is probability of success is 1 out of 10 = 0.10

# calculating probability for geometric model.

p_success <- 0.10
n_trial <- 8

p_success_nth_trial <- (((1 - p_success))^7)*0.10
p_success_nth_trial
## [1] 0.04782969

μ=1/p

σ=((1−p)/p2))−−−−−−−−−−√

# calculating mean and standard deviation for geometric model.

m=1/0.10
std=sqrt((1-0.10)/0.10^2)
m
## [1] 10
std
## [1] 9.486833

(b) P(timeweneedtowaituntilmachinefailswithin8years)=P(x<=8)=1−exp(−λ∗x) λ=0.10

# calculating probability
t <- 1-(exp(- 0.1 * 8))
t
## [1] 0.550671

nμ=1/λ

σ=1/(λ2)−−−−√

# calculating mean and standard deviation

m2 <- 1/0.10
std_2 <- sqrt(1/(0.10^2))
m2
## [1] 10
std_2
## [1] 10

(c)

P(singlescanerio)=pk∗(1−p)(n−k)

Probability = ( # number of ways ) * P(single Scanerio)

k = 0 successes

n = 8 trials

# calculating probability

number_of_ways = choose(8,0)
p_single_scanerio <- (0.10^0) * (1-0.10)^8
p <- number_of_ways * p_single_scanerio
p
## [1] 0.4304672

μ=n∗p

σ=(n∗p)∗(1−p)−−−−−−−−−−−−−√

#calculating mean and standard deviation

m3 <- 8 * 0.10
std_3 <- sqrt((8*0.10)*(1-0.10))
m3
## [1] 0.8
std_3
## [1] 0.8485281

(d)

P(X=x)=eλ∗(λx/x!)

x= 0 n=8 trials probabilty success = 0.10

p <- exp((-1 * 0.10*8)*(0.10*8)^0)/ factorial(0)
p
## [1] 0.449329

μ=λ

σ=λ−−√

# calculating mean and standard deviation

m4 <- 0.10 * 8
std_4= sqrt(0.10*8)
m4
## [1] 0.8
std_4
## [1] 0.8944272