Discrete random variable

Hypergeometric distribution

The hypergeometric distribution 𝑋 ∼HGeom(𝑠,𝑓,𝑛) describes the probability of a sample of size 𝑛 containing π‘₯ successes, drawn from a pool consisting of 𝑠 successes and 𝑓 failures, without replacement. #m/def/prob It has the probability mass function

β„™(𝑋=π‘₯)=(𝑠π‘₯)(π‘“π‘›βˆ’π‘₯)(𝑠+𝑓𝑛)
Proof

We draw 𝑛 times from a pool of size 𝑠 +𝑓, so the total number of outcomes is (𝑠+𝑓𝑛). Using the naΓ―ve definition of probability, the number of outcomes with 𝑋 =π‘₯ will be equal to the number of ways of choosing π‘₯ of 𝑠 successes and 𝑛 βˆ’π‘₯ of 𝑓 failures, giving (𝑠π‘₯)(π‘“π‘›βˆ’π‘₯).

Properties

Let 𝑋 ∼HGeom(𝑠,𝑓,𝑛). Let 𝑁 =𝑠 +𝑓, 𝑝 =𝑠/𝑁, and π‘ž =𝑓/𝑁.

  1. Expectation: 𝔼⁑[𝑋] =𝑛𝑠𝑠+𝑓 =𝑛𝑝
  2. Variance: Var⁑[𝑋] =π‘βˆ’π‘›π‘βˆ’1π‘›π‘π‘ž
Proof of 1–2

Let 𝐼𝑗 be the indicator random variable for the 𝑗th draw being a success, so that 𝑋 =βˆ‘π‘›π‘—=1𝐼𝑗. It follows 𝔼⁑[𝐼𝑗] =𝑝 and hence 𝔼⁑[𝑋] =βˆ‘π‘›π‘—=1𝔼⁑[𝐼𝑗] =𝑛𝑝, proving ^P1. We also have Var⁑[𝐼𝑗] =π‘π‘ž. Notice that by symmetry, Cov⁑[𝐼𝑖,𝐼𝑗] =Cov⁑[𝐼1,𝐼2] for 𝑖 ≠𝑗. Now

Var⁑[𝑋]=Var⁑[π‘›βˆ‘π‘—=1𝐼𝑗]=π‘›βˆ‘π‘—=1Var⁑[𝐼𝑗]+π‘›βˆ‘π‘–=1π‘›βˆ‘π‘—=1(1βˆ’π›Ώπ‘–π‘—)Cov⁑[𝐼𝑖,𝐼𝑗]=π‘›π‘π‘ž+𝑛(π‘›βˆ’1)Cov⁑[𝐼1,𝐼2]

where

Cov⁑[𝐼1,𝐼2]=𝔼⁑[𝐼1𝐼2]βˆ’π”Όβ‘[𝐼1]𝔼⁑[𝐼2]=π‘ π‘π‘ βˆ’1π‘βˆ’1βˆ’π‘2=𝑝(π‘ βˆ’1π‘βˆ’1βˆ’π‘)

so

Var⁑[𝑋]=π‘›π‘π‘ž+𝑛(π‘›βˆ’1)𝑝(π‘ βˆ’1π‘βˆ’1βˆ’π‘)=π‘βˆ’π‘›π‘βˆ’1π‘›π‘π‘ž

proving ^P2.

Furthermore

  1. HGeom(𝑠,𝑓,𝑛) ∼HGeom(𝑛,𝑠 +𝑓 βˆ’π‘›,𝑓)

See also


#state/develop | #lang/en | #SemBr