Data605 Assignment 7

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 uniformly distributed on the integers from 1 to k, the miniumum value of Y is one Xi from Xi’s:

Assume the distribution function P(Y=z) = min{X1,X2,X3….Xi}

Case 1: Assumption: Y=1, which is minimum sample Xi (Select one sample from 10 samples) x = {1,2,3,4,5} Size of all sample x = {1,2,3,4,5} : \(5^{10}\) Size of non-sample x = {1,2,3,4} : \((5-1)^{10}\) \(P(Y=1)= ((5-0)^{10}-(5-1)^{10} )/ 5 ^{10}\)

Case 2: Assumption: (Select 2 sample from 10 samples) x = {1,2,3,4,5} Size of all sample: \(5^{10}\) Size of non-sample = \((5^{10}-4^{10})+3^{10}\) \(P(Y=1)= (5^{10}-(5^{10}-4^{10})-3^{10})/ 5 ^{10}\)

Using avariables: \[k^{n} - (k^{n} - (k-1)^{n}) - (k-2)^{n} \] \[= (k-1)^{n}-(k-2)^{n} \]

When m=2; \[=((k+m-1)^{n} - (k-m)^{n})/k^{n} \]

2. Your organization owns a copier (future lawyers, etc.) or MRI (future doctors). This machine has a manufacturer’s expected lifetime of 1 0 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..)

Using geometric distribution: \(p(X=n) = (1-p)^{n-1}*p\) P(failure) = 1/10 =0.1 P(Success) = 0.9

\[P(X < 9)= 0.1+0.1*0.9+0.1*0.9^{2}+....+0.1*0.9^{7} =0.6125 \]

\[P(X\geqslant 9)= 1-0.6125 = 0.3874\]

1-pgeom(8,0.1)
## [1] 0.3874205

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.

Exponential density:

\(\mu = 10\)

\(\lambda = \frac{1}{\mu}\)

\(\lambda = 0.1\)

\[P(T \leq 8) = 1-e^{-0.1*8} = 0.5506\]

\[P(T > 8) = 1-0.5506 = 0.4493\]

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

Expected value

\(\lambda = 0.1\)

Exp <- 1/0.1
Exp
## [1] 10

Standard deviation

\(\lambda = 0.1\)

var <- 1/(0.1^2)
sd <- sqrt(var)
sd
## [1] 10

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)

p=0.1 and q=0.9

\[P(X \leq 8) = 0.1^00.9^8 = 0.9^8 = 0.4304\]

pbinom(0,8,0.1)
## [1] 0.4304672

Expected value:

n=8
p=0.1
Exp1 <- n*p
Exp1
## [1] 0.8

Standard Deviation:

q=0.9
var1 <- n*p*q
sd1 <- sqrt(var1)
sd1
## [1] 0.8485281

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.

n <- 8        
p <- 1 / 10 
#lambda
ld <- n * p

# success
x <- 0

p0 <- ((ld^x * ((exp(1))^(-1*ld)))/factorial(x))
p0
## [1] 0.449329
ppois(0, ld)
## [1] 0.449329

Expected value: \(E[X] =\lambda = 0.8\)

Standard Deviation:

var2 <- ld
sd2 <- sqrt(var2)
sd2
## [1] 0.8944272