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 .
Y = min(X1, X2,…Xn)
Since all variables are randomly independent with uniformly distrubtion, no variable is overlapped and repeated, the distribution of Y is always count as 1 or probablity of 1/n
Sample:
k = 20
sample <- runif(k, min = 1, max = k)
summary(sample)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1.255 8.201 10.700 10.640 14.020 19.830
Y = min(sample)
(Y)
## [1] 1.254658
plot(sample)
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.).
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..)
P(T = n) = q^(n−1) * p
the probablity of not failing during the first 8 years = fail at 9th year
n = 9 p = 0.5 for chance that machine fails and q = 1 - 0.5 that machine doesn’t not fail
n=9
p = 0.5
P_fail_9th_Yr = ((1-p)^(n-1)) * p
(P_fail_9th_Yr)
## [1] 0.001953125
Expected value for Geometric Distribution: E(X) = 1/p
p = 0.5
Expected_Value = 1/ p
(Expected_Value)
## [1] 2
Standard Deviation for Geometric Distribution:
Var(X) = (1-p) / p^2
p = 0.5
Standard_dev_geom = sqrt((1-p)/p^2)
(Standard_dev_geom)
## [1] 1.414214
What is the probability that the machine will fail after 8 years?. Provide also the expected value and standard deviation. Model as an exponential.
The machine has expected’s lifetime = 10 yrs
λ = probablity that the machine will fail = 1/10 = 0.1
PDF function : f(x) = λ e^(−λx) CDF function : F(x) = 1 - e^(−λx)
For probablity that the machine will fail after 8 years
P (T > 8) = 1 - F(8) = 1 - (1 - e^(−(0.1)*8)) = e^(-0.8)
(exp(-0.8))
## [1] 0.449329
Expected Value: E(x) = 1/λ, E(x) = 1/0.1 = 10
Standard Deviation: Var(x) = 1/λ^2, Standard deviation = sqrt(1/λ^2) = 1/λ = 1/0.1 = 10
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.5 that is not fail x = number of sucuess not to fail n = 10
The probablity that the machine is not failed in first 8 yers P(x) = (nCx) * p^x * (1 - p) ^ (n - x) and P(8)
The probablity that the machine will fail after 8 years = 1 - P(8)
p = 0.5
x = 8
n = 10
prob_that_the_machine__not_failed = choose(n,10) * (p^x) * (1-p)^(n-x)
(1 - prob_that_the_machine__not_failed)
## [1] 0.9990234
Expected VAlue E(x) = np
(n*p)
## [1] 5
Standard deviation:
Var(x) = np(1-p), sqrt(Var(x))
(sqrt(n*p*(1-p)))
## [1] 1.581139
What is the probability that the machine will fail after 8 years?. Provide also the expected value and standard deviation. Model as a Poisson.
expected life time of machine is 10 yr, λ = 10, assume it is constant
we are interested in the machine fail, a success is machine fail, x = 8
P(x) = ( λ^(x) * e^(-λ) )/x!
Probablity that we fail happen after 8 years = P(x=8)
( (( 10^(8) * exp(-10) )/factorial(8)) )
## [1] 0.112599
Expected Value:
E(x) = λ = 10
Standard Deviation: Var(x) = λ, standard deviation = sqrt(VAr(x)) = sqrt(10)
(sqrt(10))
## [1] 3.162278