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

We are trying to find the distribution of Y and Y is equal to the minimum of the Xi’s

This means that Y must be less than or equal to the minimum of the Xi’s

This is equal to finding \(P(Y\leq y)= 1 - P(Y > y)\)

We are now trying to find the probability that the minimum of the Xi’s is greater than y and subtracting 1 from it because that is equal to the probability that y is less than or equal to the minimum of the xi’s and much easier to find.

This means we are looking to compute: \(P(Y\leq y)= 1 - P(min\{X_1,X_2,...X_n \}> y)\)

The probability that any of the Xi’s are greater than y is equal to: \(\frac{k-y}{k}\)

So then: \(P(Y\leq y)= 1 - (\frac{k-y}{k} * \frac{k-y}{k}*...n times...*\frac{k-y}{k})\)

This equals: \(P(Y\leq y)= 1 - (\frac{k-y}{k})^n\)

Then we can get that:

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

So the distribution of Y is equal to:

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

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

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

This is the same as calculating 1-P(Not failing within first 8) = 0.4304672

Then the mean is equal to 1/p and p=1/10 so the mean is 10 years

Then the standard deviation is given by: \(\sqrt{\frac{1-p}{p^2}}=\sqrt{\frac{1-\frac{1}{10}}{\frac{1}{10}2}}=9.486833\)

pAfter8 <- 1-pgeom(7, prob = 1 / 10)
print(pAfter8)
## [1] 0.4304672
s <- (9/10)/(1/100)
standardDev <- sqrt(s)
print(standardDev)
## [1] 9.486833

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

To calculate the probability as an exponential distribution we can use the pexp function in R

This function takes in two parameters n and p. N will be 8 for us because we are trying to find the probability that the machine will fail after 8 years. P will be 1/10 because the expected lifetime is ten years so this is the mean and p is equal to \(1/\lambda\)

When calculating \(P(x>8) =1- P(x\leq 8)=0.449329\)

We can see that this probability is not equal to but very close to the probability calculated in part A.

Then to calculate the mean we simply need to find: \(mean = 1/\lambda=\frac{1}{1/10}=10\)

The standard deviation is given by the same formula as the mean for the exponential distribution so that is 10 as well

pExpAfter8 <- 1-pexp(8,1/10)
print(pExpAfter8)
## [1] 0.449329

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

To model this problem as a binomial distribution we can use the pbinom function in R.

This function takes in 3 parameters, x which is the number of successes so for us that will be 0.

Then p which is the probability of success which for us is 1/10

Then n which is the number of trials which will be 8 for us.

We are trying to figure out the probability that the machine does not fail in the first 8 years which is the same as it failing after 8 years.

\(P(x>8)= 0.4304672\). This is exactly equal to the probability calculated using the geometric distribution. and very close to the probability calculated using the exponential.

The expected value of a binomial distribution is given by: \(Mean = n*p= 8*1/10=.8\)

The standard deviation is given by: \(\sqrt{(n*p*(1-p))}=\sqrt{8*(1/10)*(1-1/10)} = 0.8485281\)

pAfter8Binomial<- pbinom(0,8,1/10)
print(pAfter8Binomial)
## [1] 0.4304672
standardDevBinom <- sqrt(8*(1/10)*(1-(1/10)))
print(standardDevBinom)
## [1] 0.8485281

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

To model this as a Poisson we will follow the same basic steps as all the other models. We will calculate the probability that the machine will not fail within the first 8 years. We will do this using the ppois function in R which takes two parameters q and lambda. q will be 8 for us as it represents amount of time and lambda will be equal to \(\lambda*time=1/10*8=8/10\) because we need to adjust for the mean over 8 years not 10.

We then can calculate that \(P(x>8)=0.449329\) This is exactly equal to the probability given by the exponential distribution and is very close to the values given from the binomial and geometric. This makes sense because the exponential and poisson are closely related and the binomial and geometric are also closely related to each other.

The mean has already been calculate as .8

The standard deviation is given by: \(\sqrt{\lambda}= \sqrt{.8}= 0.8944272\)

pAfter8Pois <-ppois(0,8/10)
print(pAfter8Pois)
## [1] 0.449329
standardDevPois <- sqrt(.8)
print(standardDevPois)
## [1] 0.8944272