Salta al contenuto
Note per Studenti Geometric Random Variable Report

Geometric Random Variable

In questa pagina 5

Definition and density

The context is that of binary trials with the events [ei=1][e_i = 1] forming an independent family, each with P([ei=1])=pP([e_i=1]) = p. The total number nn of trials is not fixed in advance; rather the experiment continues until, for the first time, the outcome is 11. Let XX be the number of the trial at which the first 11 is observed. The alphabet of XX is X={1,2,… }=N.\mathcal{X} = \{1, 2, \dots\} = \mathbb{N}. Density of XX (a sequence of k−1k-1 zeros followed by a one): pX(1)=P(1)=p,pX(2)=P(01)=(1−p)p,pX(3)=P(001)=(1−p)2p,…p_X(1) = P(1) = p, \quad p_X(2) = P(01) = (1-p)p, \quad p_X(3) = P(001) = (1-p)^2p, \quad \dots pX(k)=P(00…0⏟k−1 times1)=(1−p)k−1p.p_X(k) = P(\underbrace{00\dots0}_{k-1\ \text{times}}1) = (1-p)^{k-1}p. Verification that pX(k)p_X(k) is a density (geometric series with ratio 1−p1-p): ∑k=1∞pX(k)=∑k=1∞(1−p)k−1p=p∑k=0∞(1−p)k=p 11−(1−p)=1.\sum_{k=1}^\infty p_X(k) = \sum_{k=1}^\infty (1-p)^{k-1}p = p\sum_{k=0}^\infty(1-p)^k = p\,\frac{1}{1-(1-p)} = 1.

Definition. The r.v. XX with alphabet X=N\mathcal{X} = \mathbb{N} and density pX(k)=(1−p)k−1pp_X(k) = (1-p)^{k-1}p, k∈Nk \in \mathbb{N}, is said to be a geometric r.v. with parameter pp, and is denoted X∼G(p)X \sim G(p). Its stem plot has stems of height pp at 11, (1−p)p(1-p)p at 22, and so on, decreasing geometrically.

Tail probabilities

P(X>n)=∑k=n+1∞pX(k)=∑k=n+1∞(1−p)k−1p=(1−p)np+(1−p)n+1p+(1−p)n+2p+…P(X > n) = \sum_{k=n+1}^\infty p_X(k) = \sum_{k=n+1}^\infty (1-p)^{k-1}p = (1-p)^np + (1-p)^{n+1}p + (1-p)^{n+2}p + \dots =(1−p)np[1+(1−p)+(1−p)2+…]=(1−p)np 11−(1−p)=(1−p)n.= (1-p)^np\big[1 + (1-p) + (1-p)^2 + \dots\big] = (1-p)^np\,\frac{1}{1-(1-p)} = (1-p)^n.

Example. The probability of passing the exam of Probability Theory is 0.60.6. Let XX = "the trial at which you pass the exam". Then P(X>3)=(1−0.6)3=0.43=0.064.P(X > 3) = (1-0.6)^3 = 0.4^3 = 0.064.

Distribution function

Complementing P(X>n)=(1−p)nP(X>n) = (1-p)^n we get F(n)=P(X≤n)=1−(1−p)n,F(n) = P(X \le n) = 1 - (1-p)^n, and for all n≤x<n+1n \le x < n+1, F(x)=F(n)F(x) = F(n). A compact formula valid for all xx is F(x)=[1−(1−p)⌊x⌋]1(x),F(x) = \Big[1 - (1-p)^{\lfloor x\rfloor}\Big]\mathbb{1}(x), where ⌊x⌋\lfloor x \rfloor is the integer part of xx and the factor 1(x)\mathbb{1}(x) is there because F(x)=0F(x) = 0 for x<0x < 0. The graph is a staircase starting with a jump of height 1−(1−p)=p1-(1-p) = p at x=1x=1, then jumping at x=2,3,4,…x = 2, 3, 4, \dots and approaching 11 (see Distribution FunctionThe distribution function F_X(x) = P(X <= x) is an alternative to the discrete density; for a discrete random variable it is a right-continuous non-decreasing step function whose jumps are the values of the density.Distribution Function →).

Expectation and variance

E(X)=∑k=1∞k(1−p)k−1p=∑k=0∞k(1−p)k−1p=−p∑k=0∞ddp(1−p)k=−p ddp(∑k=0∞(1−p)k)E(X) = \sum_{k=1}^\infty k(1-p)^{k-1}p = \sum_{k=0}^\infty k(1-p)^{k-1}p = -p\sum_{k=0}^\infty \frac{d}{dp}(1-p)^k = -p\,\frac{d}{dp}\Big(\sum_{k=0}^\infty(1-p)^k\Big) =−p ddp[11−(1−p)]=−p ddp(1p)=1p.= -p\,\frac{d}{dp}\Big[\frac{1}{1-(1-p)}\Big] = -p\,\frac{d}{dp}\Big(\frac1p\Big) = \frac1p. (The k=0k=0 term of the sum vanishes, and ddp(1−p)k=−k(1−p)k−1\frac{d}{dp}(1-p)^k = -k(1-p)^{k-1}.)

The variance is (stated on the page without derivation) var⁡(X)=1−pp2.\operatorname{var}(X) = \frac{1-p}{p^2}. See Expected ValueThe expected value E(X) is the sum of the values of a discrete random variable weighted by their probabilities; it is linear, lies between the smallest and the largest value, and equals the barycenter of the density.Expected Value → and VarianceThe variance is the expected squared deviation from the expected value and measures how spread out a random variable is; it is non-negative, zero only for constants, scales with the square of a multiplier, ignores shifts, and equals E(X^2) minus the square of E(X).Variance → for the definitions.

Memoryless property

This property of the geometric r.v. refers to the (unexpected) fact that P(X>h+k∣X>h)=P(X>k).P(X > h + k \mid X > h) = P(X > k). In words: having waited more than hh trials for the first success does not change the probability of having to wait more than kk trials starting from now. After each failure the process starts anew.

Proof. Since [X>h+k]⊂[X>h][X > h+k] \subset [X > h], P(X>h+k∣X>h)=P([X>h+k]∩[X>h])P(X>h)=P(X>h+k)P(X>h)=(1−p)h+k(1−p)h=(1−p)k=P(X>k).□P(X > h+k \mid X > h) = \frac{P([X>h+k]\cap[X>h])}{P(X>h)} = \frac{P(X > h+k)}{P(X>h)} = \frac{(1-p)^{h+k}}{(1-p)^h} = (1-p)^k = P(X > k). \quad\square

Remark. It is not too difficult to prove that the geometric is the only r.v. on N\mathbb{N} with this property.

Versione ripasso

  • XX = index of the first success in independent trials with success probability pp; X=N\mathcal{X}=\mathbb{N}; X∼G(p)X\sim G(p): pX(k)=(1−p)k−1pp_X(k)=(1-p)^{k-1}p. It sums to 1 (geometric series).
  • Tail: P(X>n)=(1−p)nP(X>n)=(1-p)^n (sum of the series from n+1n+1). Example: pass probability 0.60.6: P(X>3)=0.43P(X>3)=0.4^3.
  • DF: F(n)=1−(1−p)nF(n)=1-(1-p)^n; for all real xx: F(x)=[1−(1−p)⌊x⌋]1(x)F(x)=\big[1-(1-p)^{\lfloor x\rfloor}\big]\mathbb{1}(x).
  • E(X)=∑kk(1−p)k−1p=−pddp∑k(1−p)k=−pddp1p=1pE(X)=\sum_k k(1-p)^{k-1}p=-p\frac{d}{dp}\sum_k(1-p)^k=-p\frac{d}{dp}\frac1p=\frac1p; var⁡(X)=1−pp2\operatorname{var}(X)=\frac{1-p}{p^2}.
  • Memoryless: P(X>h+k∣X>h)=(1−p)h+k(1−p)h=(1−p)k=P(X>k)P(X>h+k\mid X>h)=\frac{(1-p)^{h+k}}{(1-p)^h}=(1-p)^k=P(X>k); the geometric is the only r.v. on N\mathbb{N} with this property.
  • Typical mistake: confusing the geometric (number of trials until the first success) with the binomial (number of successes in fixed nn trials).

Teoria collegata