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 probability that \(Y\) takes on any specific value \(y\) (where \(1 \leq y \leq k\)) can be found by considering the complement, that is, the probability that all \(X_i\)’s are greater than \(y\), and then subtracting this value from 1.
The probability that a single \(X_i\) is greater than \(y\) is \(\frac{k-y}{k}\), given that \(X_i\) is uniformly distributed from 1 to \(k\).
So the probability that all \(X_i\)’s are greater than \(y\) (since they are independent) is \(\left(\frac{k-y}{k}\right)^n\). Then we can say that the probability that the minimum \(Y \geq y\) is \(1 - \left(\frac{k-y}{k}\right)^n\).
The probability mass function (PMF) for \(Y = y\) is the difference in probabilities \(P(Y \geq y) - P(Y \geq y + 1)\), which simplifies to:
\[P(Y = y) = \left(\frac{k-y}{k}\right)^n - \left(\frac{k-y-1}{k}\right)^n\]
calculate_pmf_Y <- function(k, n, y) {
p_y = (k-y)^n/k^n - (k-y-1)^n/k^n
return(p_y)
}
# example
k <- 6
n <- 3
y <- 1
pmf_Y <- calculate_pmf_Y(k, n, y)
pmf_Y
## [1] 0.2824074
The geometric distribution models the number of trials until the first success. In this context, “success” is the failure of the machine, and the probability of success in any given year is \(p = \frac{1}{10}\).
p <- 1/10
prob_after_8 <- (1 - p)^8
expected_value_geom <- 1 / p
std_dev_geom <- sqrt((1 - p) / p^2)
prob_after_8
## [1] 0.4304672
expected_value_geom
## [1] 10
std_dev_geom
## [1] 9.486833
The exponential distribution models the time until an event occurs and is a continuous distribution. The rate \(\lambda\) is the inverse of the expected lifetime, \(\lambda = \frac{1}{10}\).
lambda <- 1/10
prob_after_8_exp <- exp(-lambda * 8)
expected_value_exp <- 1 / lambda
std_dev_exp <- 1 / lambda
prob_after_8_exp
## [1] 0.449329
expected_value_exp
## [1] 10
std_dev_exp
## [1] 10
Modeling as a binomial distribution involves discrete trials with a success/failure outcome in each trial. If we consider a “trial” to be a year and “success” to be the failure of the machine, we’re essentially looking for the probability of 0 successes in 8 trials, with each trial having a success probability of \(p = \frac{1}{10}\).
size <- 8 # years
p <- 1/10 # p failure/year
# P of no failure
prob_no_failure_8_years <- dbinom(0, size, p)
expected_value_bin <- size * p
std_dev_bin <- sqrt(size * p * (1 - p))
prob_no_failure_8_years
## [1] 0.4304672
expected_value_bin
## [1] 0.8
std_dev_bin
## [1] 0.8485281
The Poisson distribution can model the number of events in a fixed interval of time, given a constant rate of occurrence. With an expected lifetime of 10 years, the rate \(\lambda\) for 8 years is \(0.8\), assuming a linear scale.
lambda <- 0.8 # expected failures in 8 years
# P of no failure
prob_no_failure_8_poisson <- dpois(0, lambda)
expected_value_pois <- lambda
std_dev_pois <- sqrt(lambda)
prob_no_failure_8_poisson
## [1] 0.449329
expected_value_pois
## [1] 0.8
std_dev_pois
## [1] 0.8944272
It does indeed seem that the results across the different approaches are approximate to each other.