Geometric random variable
- Definition: Let X be a geometric random variable, then:
- pX(k)=(1−p)k−1p, where p is a fixed value in (0,1) called the geometric parameter and k is a positive integer.
- Notation: X∼Geometric(p)
- Theorem: Let X∼Geometric(p), then:
- E[X]=1/p
- E[X2]=2/p2−1/p
- Var[X]=1−pp2
n <- 20
states <- 1:n
p <- 0.4
plot(
states, dgeom(states, p), type = 'h',
ylim = c(0, 1), main = "Geom(p)",
xlab = "States", ylab = "Probabilities"
)