Let \(X_1, X_2, \ldots, X_n\) 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 \(X_i\)’s. We want to find the distribution of \(Y\).
\[ P(Y = y) = \left(\frac{y}{k}\right)^n - \left(\frac{y-1}{k}\right)^n \]
for \(y = 1, 2, \ldots, k\).
Geometric distribution:
\[ P(X = k) = (1-p)^{k-1} \cdot p \]
The probability of not failing during the first 8 years is:
\[ P(X > 8) = (1-p)^7 \]
p <- 1/10
prob_not_failure_8_years <- (1 - p)^7
prob_failure_after_8_years <- 1 - prob_not_failure_8_years
prob_failure_after_8_years
## [1] 0.5217031
Expected value:
expected_value <- 1 / p
expected_value
## [1] 10
Standard deviation
standard_deviation <- sqrt((1 - p) / p^2)
standard_deviation
## [1] 9.486833
Exponential distribution:
\[ f(x; \lambda) = \lambda e^{-\lambda x} \]
\(\lambda = \frac{1}{10}\).
The probability of failure after 8 years is:
\[ P(X > 8) = 1 - P(X \leq 8) = 1 - \int_{0}^{8} \lambda e^{-\lambda x} dx \]
lambda <- 1/10
prob<- 1 - pexp(8,rate=lambda)
prob
## [1] 0.449329
Expected value:
expected_value <- 1/lambda
expected_value
## [1] 10
Standard deviation:
standard_deviation <- 1/lambda
standard_deviation
## [1] 10
\[ P(X = k) = \binom{n}{k} p^k (1-p)^{n-k} \]
where \(n\) is the number of trials, \(k\) is the number of successes, and \(p\) is the probability of success.
\[ P(X = 0) = \binom{8}{0} \left(\frac{1}{10}\right)^0 \left(\frac{9}{10}\right)^8 \]
p <- 1/10
prob <- dbinom(0, size = 8, prob=p)
prob
## [1] 0.4304672
Expected value:
expected_value <- 8 * p
expected_value
## [1] 0.8
Standard deviation:
standard_deviation <- sqrt(8 * p * (1 - p))
standard_deviation
## [1] 0.8485281
\[ P(X = k) = \frac{e^{-\lambda} \lambda^k}{k!} \]
where \(\lambda\) is the average rate of events per interval.
\(\lambda = \frac{1}{10}\), and \(k = 0\) represents the probability of 0 failures in 8 years.
lambda <- 8 * (1/10)
prob <- dpois(0, lambda)
prob
## [1] 0.449329
Expected value:
expected_value <- lambda
expected_value
## [1] 0.8
Standard deviation:
standard_deviation <- sqrt(lambda)
standard_deviation
## [1] 0.8944272