Load Packages

  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 .

Solution:

By the definition of the CFD, we can derive the following \[ F(y)=P(Y\le y)=1-P(Y< y)\\ =1-P(min(x_1,x_2,...x_n)>y) \]

We know that the minimum of the xi’s are greater than y when xi is greater than y for all values of i. These are i.i.d variables, we can write out the following:

\[ P(y)=1-P(x_1>y)P(x_2>y)...P(x_n>y) \]

We consider that xi are uniformally distributed on the interval (1,k)

\[ p(x_i>y)=1-\frac{y-1}{k-1} \]

We can now develop the distribution of y

\[ F(y)=1-(1-\frac{y-1}{k-1})^{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..)

Solution:

\[ P(X=k)=(1-p)^{k-1}p\\ E[X]=\frac{1}{p}\\ Var[X]=\frac{1-p}{p^{2}}\\ \] Probability of machine failure each year

## [1] 0.1

Probability of machine not failing every year

## [1] 0.9

Expected value

## [1] 10

Standard Deviation

## [1] 9.486833

We need to consider using the geometric to find the probability the machine will fail after 8 years. We can use some standard r functions

## [1] 0.04782969
  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.

Solution:

\[ X\le k: P(X\le k)= e^{-\lambda x}\\ E[X]=\frac{1}{\lambda}\\ Var[x]=\frac{1}{\lambda^{2}} \] Probability of failing

## [1] 0.449329

probability of not failing

## [1] 0.550671

Expected Value (we can use to compute lambda)

## [1] 10

\[ 10=\frac{1}{\lambda}\\ \lambda=.10 \]

standard deviation

## [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)

Solution:

\[ P(success)=(nCk)P^{n}(1-p)^{n-k}\\ E[X]=np\\ Var[X]=np(1-p) \]

probability of machine failure

## [1] 0.4304672

probability of non failure

## [1] 0.5695328

Expected Value

## [1] 0.8

standard deviation

## [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.

Solution:

\[ P(X=x)=\frac{\lambda^{x}e^{-\lambda}}{x!}\\ E[X]=\lambda\\ Var[X]=\lambda \]

probability of machine failure

## [1] 0.112599

The expected value is 10

Standard deviation

## [1] 3.162278