Q. 1
Let’s assume \[ k^n \] represents the total number of combinations.
Therefore, \[ (k-1)^n \] will be the combinations where none of the Xi are equal to 1.
\[ P(X=1) = k^n-(k-1)^n/k^n \]
For X =2 and 3, we have these:
\[ P(X=2) = (k-2+1)^n-(k-2)^n/k^n \] \[ P(X=3) = (k-3+1)^n-(k-3)^n/k^n \]
In conclusion, we get:
\[ P(X=m) = (k-m+1)^n-(k-m)^n/k^n \]
Q. 2
#a
#we know that P(success)=0.9 and p(failure)=0.1.
1-pgeom(8,0.1)
## [1] 0.3874205
#b
#we know lambda should be 1/mu, and mu is 10.
1-pexp(8,0.1)
## [1] 0.449329
#c
#we know p=0.1 and 1-p = 0.9.
pbinom(0,8,0.1)
## [1] 0.4304672
#d
#We know,
n <- 8
p <- 1/10
#lambda
lambda <- n * p
# success
x <- 0
poisson_p <- ((lambda^x * ((exp(1))^(-1*lambda)))/factorial(x))
poisson_p
## [1] 0.449329
#compare
ppois(0, lambda)
## [1] 0.449329