Mean and Variance of the Geometric Distribution
📂Probability DistributionMean and Variance of the Geometric Distribution
X∼Geo(p) Area
E(X)=p1Var(X)=p21−p
Derivation
The mean and variance of the Geometric Distribution are not as easily calculated as one might think. This post introduces two interesting and useful proofs.
The discrete probability distribution that has the following probability mass function is called a Geometric Distribution, according to the definition of Geometric Distributionp∈(0,1]:
p(x)=p(1−p)x−1,x=1,2,3,⋯
First Method
Strategy: Use the formula for a geometric series and differentiation.
Mean
E(X)=x=1∑∞xp(1−p)x−1
Let f(p):=x=0∑∞(1−p)x be
f(p)=1−(1−p)1=p1
Differentiating p, according to the formula for a geometric series,
f′(p)=−p21
On the other hand, differentiating the geometric series directly gives
f′(p)=x=1∑∞−x(1−p)x−1
Therefore,
⟹⟹−p21=−x=1∑∞x(1−p)x−1p1=px=1∑∞x(1−p)x−1p1=x=1∑∞xp(1−p)x−1=E(X)
Thus E(X)=p1
■
Variance
V(X)=E(X2)−E(X)2=x=1∑∞x2p(1−p)x−1−p21
Therefore, it suffices to find E(X2)=x=1∑∞x2p(1−p)x−1.
Likewise, let f(p):=x=0∑∞(1−p)x be
f(p)=1−(1−p)1=p1f′(p)=−p21f′′(p)=p32
On the other hand, f′′(p)=x=1∑∞x(x−1)(1−p)x−2 also serves,
⟹⟹⟹⟹⟹⟹p32=x=1∑∞x(x−1)(1−p)x−2p32=x=1∑∞x2(1−p)x−2−x=1∑∞x(1−p)x−2pp32=px=1∑∞x2(1−p)x−2−px=1∑∞x(1−p)x−2p22=x=1∑∞x2p(1−p)x−2−x=1∑∞xp(1−p)x−2p22=1−p1x=1∑∞x2p(1−p)x−1−1−p1x=1∑∞xp(1−p)x−1p22(1−p)=E(X2)−p1E(X2)=p22−p
Therefore, V(X)=p21−p
■
Second Method
Strategy: Use the forgetfulness of the geometric distribution. In a way, it feels like skipping complex formulas and explaining with words, but it might feel more difficult for some people.
Mean
E(X)=1⋅P( 첫번째 시행에서 성공 )+E(Y+1)⋅P(첫번째 시행에서 실패)
According to the definition of expectation, the expectation E(X) is the sum of the product of the probability that the first trial is successful and the number of trials in that case, 1, and the product of the probability that the first trial fails and the expectation in that scenario, E(Y+1). Of course, the mentioned Y follows the same rule as X, which in turn is based on Geo(p). Whether the first trial is successful or not, the geometric distribution is forgetful, so it starts from the beginning, and Y has an added correction of 1 separately. If we state it cleanly again, it goes as follows.
E(X)=1⋅p+E(Y+1)⋅(1−p)
But E(Y+1) can be represented by E(Y+1)=E(Y)+E(1)=E(Y)+1, and since X∼Geo(p) and Y∼Geo(p),
E(Y)=E(X)
Organizing E(X)=p+E(X)+1(1−p) with respect to E(X) gives:
E(X)=p1
■
Variance
E(X2)=1⋅p+E((Y+1)2)⋅(1−p)=p+E(X2)+2E(X)+1(1−p)=p+E(X2)+2E(X)+1−pE(X2)−2pE(X)−p
To neatly arrange,
0=2E(X)+1−pE(X2)−2pE(X)
Binomially scaling the 2th moment gives
pE(X2)==2(1−p)E(X)+1=2(1−p)p1+1p2−p
Dividing both sides by p gives
E(X2)=p22−p
Therefore, V(X)=p21−p
■