Steps to find the distribution of \(Y\):
Define the Probability Mass Function (PMF) of \(Y\):
The PMF of \(Y\), denoted as \(P(Y = y)\), where \(y\) ranges from 1 to \(k\), represents the probability that \(Y\) takes on each possible value.
Calculate \(P(Y = y)\) for \(y = 1\):
For \(y = 1\), the probability that \(Y\) is equal to 1 is given by:
\[ P(Y = 1) = 1 - \left(1 - \frac{1}{k}\right)^n \]
Calculate \(P(Y = y)\) for \(1 < y \leq k\):
For \(1 < y \leq k\), the probability that \(Y\) is equal to \(y\) is given by:
\[ P(Y = y) = \left(1 - \frac{y - 1}{k}\right)^n - \left(1 - \frac{y}{k}\right)^n \]
This represents the probability that at least one of the \(X_i\)’s equals \(y\), multiplied by the probability that all other \(X_i\)’s are greater than \(y - 1\).
p <- 1/10
n <- 8
prob_of_fail <- pgeom(n - 1, prob = p, lower.tail = FALSE)
prob_of_fail
## [1] 0.4304672
Expected value
print(1/p)
## [1] 10
Standard deviation
standard_deviation <- sqrt((1 - p) / p^2)
standard_deviation
## [1] 9.486833
p <- 1/10
prob_fail_after_8_years <- 1 - pexp(8, rate = p)
print(prob_fail_after_8_years)
## [1] 0.449329
Expected value
print(1/p)
## [1] 10
Standard deviation
standard_deviation <- 1/p
standard_deviation
## [1] 10
dbinom(0, size = 8, prob=p)
## [1] 0.4304672
Expected value
expected_value <- n * p
expected_value
## [1] 0.8
Standard deviation
standard_deviation <- sqrt(n * p * (1 - p))
standard_deviation
## [1] 0.8485281
avg <- 8 * (1/10)
prob <- 1 - ppois(0,avg)
prob
## [1] 0.550671
Expected value(same as mean)
avg
## [1] 0.8
Standard deviation(sqrt of the avg)
standard_deviation <- sqrt(avg)
standard_deviation
## [1] 0.8944272