Let \(k^n\) be the combinations for \(Xi\) for integers \(1\) to \(k\)
Let \(j\) be the combinations for minimum \(k^n\)
\(Y = 1 \le j \le k, \frac{(k - j + 1)^n - (k - j)^n}{k^n}\)
The expected value is given: \(E(X) = 10\) The probability is given: \(p = \frac{1}{10} = 0.1\) Standard deviation = \(\frac{\sqrt{1-p}}{p}\)
p <- 0.1 #probability
std <- round((1-p)**0.5/p,2)
print(paste("Standard Deviation:",std))
## [1] "Standard Deviation: 9.49"
The probability function for a geometric distribution: \(P(X = x) = (1 - p)^{x-1} * p =>\)
With X = 8 (years): \(P(X = 8) = (1 - p)^{8-1} * p\)
in R:
x <- 8 #number of years
pgeom(x, p)
## [1] 0.6125795
= the probability the machine will fail after 8 years (will not fail in first 8 years) as a geometric distribution.
pexp(x, p)
## [1] 0.550671
The standard deviation in an exponential distribution is equal to the expected value: 10.
pbinom(0, x, p, lower.tail=FALSE)
## [1] 0.5695328
Computing the expected value and standard deviation:
exp <- x * p
var <- x * p * (1-p)
std <- round(sqrt(var),2)
print(paste("Expected value:",exp))
## [1] "Expected value: 0.8"
print(paste("Standard deviation:",std))
## [1] "Standard deviation: 0.85"
lambda <- 10 #expected value
st_d <- round(sqrt(lambda),2) #standard deviation
prob <- round(ppois(x, lambda, lower.tail=FALSE),2)
print(paste("Expected value:",lambda))
## [1] "Expected value: 10"
print(paste("Standard deviation",st_d))
## [1] "Standard deviation 3.16"
print(paste("Probability of failure after 8 years:",prob))
## [1] "Probability of failure after 8 years: 0.67"