P(Y≤y) = 1 − P(Y>y) P(Y≤y)= 1 − P(min(X1, X2,…, Xn) > y) P(Y≤y)= 1 − P(X1 > y, X2 > y,…, Xn > y) P(Y≤y)= 1 − ((k-y)/k) ^n
Then: P(Y≤y-1)=1-((k-y+1)/k) ^n
We can subtract like so to find the distribution of Y: P(Y≤y)-P(Y≤y-1)=(1 − ((k-y)/k) ^n)-(1-((k-y+1)/k) ^n)
And simplify:
=(((k-y+1) ^n - (k-y) ^n )) / k^n
Because the probability is equivalent to not failing during the first 8 years, I first found the probability of one failure in 10 years, or 1/10, and worked from there:
p <-1/10 #p(failure 1/10 years)
p_failing_after_8 <-1-pgeom(8-1,p) #complement
expected<-1/p
std <-sqrt((1-p)/(p^2))
cat("Probability of failing after 8 years:", round(p_failing_after_8,2), "\n")
## Probability of failing after 8 years: 0.43
cat("Expected value of geometric distribution:", expected, "\n")
## Expected value of geometric distribution: 10
cat("Standard deviation of geometric distribution:", round(std,2), "\n")
## Standard deviation of geometric distribution: 9.49
p_failing_after_8_exp<-1-pexp(8,1/p)
cat("Probability of failing after 8 years:", round(p_failing_after_8, 2), "\n")
## Probability of failing after 8 years: 0.43
cat("Expected value of exponential distribution:", expected, "\n")
## Expected value of exponential distribution: 10
cat("Standard deviation of exponential distribution:", round(std, 2), "\n")
## Standard deviation of exponential distribution: 9.49
q <-1-p #p(no failure)
n <-8 #8yrs
k <-0 #0 success
p_0_failures_in_8_years <-choose(n,k) * (q^k) * ((1-q)^(n-k))
p_failing_after_8_years_binom <- 1 - p_0_failures_in_8_years
expected_binom <- n * p
std_binomial <- sqrt(n * p * q)
cat("Probability of failing after 8 years:", round(p_failing_after_8_years_binom, 2), "\n")
## Probability of failing after 8 years: 1
cat("Expected value of binomial distribution:", round(expected_binom, 2), "\n")
## Expected value of binomial distribution: 0.8
cat("Standard deviation of binomial distribution:", round(std_binomial, 2), "\n")
## Standard deviation of binomial distribution: 0.85
lambda <- 8 / 10
p_failing_after_8_poisson <- 1 - ppois(0, lambda)
expected_poisson <- lambda
std_poisson <- sqrt(lambda)
cat("Probability of failing after 8 years:", round(p_failing_after_8_poisson, 2), "\n")
## Probability of failing after 8 years: 0.55
cat("Expected value of Poisson distribution:", round(expected_poisson, 2), "\n")
## Expected value of Poisson distribution: 0.8
cat("Standard deviation of Poisson distribution:", round(std_poisson, 2), "\n")
## Standard deviation of Poisson distribution: 0.89