library(knitr)
\(k^n\) = total number of options to assign the values to Xi
\((k???1)^n\) will represent the combinations where none of the Xi are equal to 1.
so: \(P(X=1) = (k^n ??? (k ??? 1)^n)/k^n\)
\(P(x=2) = ((k ??? 2+ 1)^n ??? (k ??? 2)^n)/kn\)
\(P(X=3) = ((k ??? 3 +1 )^n ??? (k ??? 3)^n)/k^n)\)
``````````````` Therefore, the probability distribution of can be represented as: \(P(X=m) = ((k???m+1)^n???(k???m)^n)/k^n\)
p = 1/10
q = 1-p
n <- 8
round(pgeom(8,p,lower.tail = F), 3)
## [1] 0.387
The probability that the machine will fail after 8 years is 0.387.
Expected value: 1/p = 1/0.1 = 10 years(agrees with exepcted value in the problem description)
#standard deviation
sqrt(q/p^2)
## [1] 9.486833
lambda <- 1/10
k = 8
exp(-lambda*k)
## [1] 0.449329
Probability is 0.449.
1/lambda#expected value
## [1] 10
sqrt(1/lambda^2)#standard deviation
## [1] 10
#probabiliy of fail after yr8
n <- 8
p <- 1/10
q <- 1-p
k <- 0
dbinom(k, n, p)
## [1] 0.4304672
#expected value
n*p
## [1] 0.8
#standard deviaion
sqrt(n*p*q)
## [1] 0.8485281
#probability
lambda <- 8/10
ppois(0, lambda = 0.8)
## [1] 0.449329
Expected value 0.8
#standard deviation
sqrt(0.8)
## [1] 0.8944272