Probabilistic Methods

Danylo Bevziuk
Index 45564 · Basic

List 3Probability Distributions

Binomial, hypergeometric, geometric, Poisson, multinomial models

Task 1 — Binomial (Quality Control)

A batch of screws has defect probability pp. Three screws are drawn independently. Let XX be the number of defective screws, XBin(3,p)X \sim \text{Bin}(3, p). Describe the sample space, compute key probabilities, and identify the binomial structure.

PMF
CDF
Sample space

Each screw is Good (G) or Defective (D), giving 23=82^3 = 8 equally structured outcomes:

Ω={GGG,GGD,GDG,DGG,GDD,DGD,DDG,DDD}\Omega = \{GGG,\, GGD,\, GDG,\, DGG,\, GDD,\, DGD,\, DDG,\, DDD\}
P(no defects)

All three screws are good. Since trials are independent:

P(GGG)=(1p)3P(GGG) = (1-p)^3
P(exactly 1 defect)

There are (31)=3\binom{3}{1}=3 positions for the defective screw (GGD, GDG, DGG):

P(X=1)=(31)p1(1p)2=3p(1p)2P(X=1) = \binom{3}{1}p^1(1-p)^2 = 3p(1-p)^2
Binomial model

The three draws are independent, each with constant success probability pp (finding a defective screw). This is a fixed number of Bernoulli trials → binomial distribution.

XBin(3,p),P(X=k)=(3k)pk(1p)3k,k=0,1,2,3X \sim \text{Bin}(3,\, p),\quad P(X=k) = \binom{3}{k}p^k(1-p)^{3-k},\quad k=0,1,2,3
Illustration with p = 0.2

For p=0.2p=0.2: P(X=0)=(0.8)3=0.512P(X=0)=(0.8)^3=0.512; P(X=1)=30.2(0.8)2=0.384P(X=1)=3\cdot0.2\cdot(0.8)^2=0.384; P(X=2)=3(0.2)20.8=0.096P(X=2)=3\cdot(0.2)^2\cdot0.8=0.096; P(X=3)=(0.2)3=0.008P(X=3)=(0.2)^3=0.008.

P(X=0)=0.512,P(X=1)=0.384,P(X=2)=0.096,P(X=3)=0.008P(X=0)=0.512,\quad P(X=1)=0.384,\quad P(X=2)=0.096,\quad P(X=3)=0.008
Answer
P(X=1)=3p(1p)2;XBin(3,p)P(X=1)=3p(1-p)^2;\quad X\sim\text{Bin}(3,p)
Explanation tip: The binomial model applies whenever: (1) fixed number of trials, (2) each trial is independent, (3) each trial has the same success probability pp.

Task 2 — Hypergeometric (Component Sampling)

A lot contains N=20N=20 components: K=5K=5 defective and 1515 functional. A sample of n=4n=4 is drawn without replacement. Let XX be the number of defective components in the sample.

PMF
CDF
Model

Sampling without replacement from a finite population with two types → hypergeometric distribution.

XHypergeometric(N=20,K=5,n=4),P(X=k)=(5k)(154k)(204)X \sim \text{Hypergeometric}(N=20,\, K=5,\, n=4),\quad P(X=k) = \frac{\binom{5}{k}\binom{15}{4-k}}{\binom{20}{4}}
Total combinations

The denominator counts all ways to choose 4 from 20:

(204)=20!4!16!=4845\binom{20}{4} = \frac{20!}{4!\,16!} = 4845
P(X = 0)

No defective: choose 0 from 5 defective and all 4 from 15 functional.

P(X=0)=(50)(154)4845=1136548450.2817P(X=0) = \frac{\binom{5}{0}\binom{15}{4}}{4845} = \frac{1 \cdot 1365}{4845} \approx 0.2817
P(X = 1)

Exactly 1 defective: choose 1 from 5 and 3 from 15.

P(X=1)=(51)(153)4845=54554845=227548450.4696P(X=1) = \frac{\binom{5}{1}\binom{15}{3}}{4845} = \frac{5 \cdot 455}{4845} = \frac{2275}{4845} \approx 0.4696
P(X = 2)

Exactly 2 defective: choose 2 from 5 and 2 from 15.

P(X=2)=(52)(152)4845=101054845=105048450.2168P(X=2) = \frac{\binom{5}{2}\binom{15}{2}}{4845} = \frac{10 \cdot 105}{4845} = \frac{1050}{4845} \approx 0.2168
P(X = 3)

Exactly 3 defective: choose 3 from 5 and 1 from 15.

P(X=3)=(53)(151)4845=10154845=15048450.0309P(X=3) = \frac{\binom{5}{3}\binom{15}{1}}{4845} = \frac{10 \cdot 15}{4845} = \frac{150}{4845} \approx 0.0309
P(X = 4)

All 4 defective: choose 4 from 5 and 0 from 15.

P(X=4)=(54)(150)4845=514845=548450.0010P(X=4) = \frac{\binom{5}{4}\binom{15}{0}}{4845} = \frac{5 \cdot 1}{4845} = \frac{5}{4845} \approx 0.0010
Verification

All probabilities must sum to 1:

1365+2275+1050+150+54845=48454845=1\frac{1365+2275+1050+150+5}{4845} = \frac{4845}{4845} = 1 \checkmark
Answer
P(X=0)0.2817,P(X=1)0.4696,P(X=2)0.2168,P(X=3)0.0309,P(X=4)0.0010P(X=0)\approx0.2817,\quad P(X=1)\approx0.4696,\quad P(X=2)\approx0.2168,\quad P(X=3)\approx0.0309,\quad P(X=4)\approx0.0010
Explanation tip: Unlike the binomial, the hypergeometric model accounts for sampling without replacement — drawing one component changes the composition of the remaining lot.

Task 3 — Geometric (First Error on a Page)

A document is proofread page by page. Each page independently contains an error with probability pp. Let XX be the page number on which the first error is found. Derive the PMF and CDF of XX.

PMF
CDF
Model

We perform independent Bernoulli trials (each page either has an error or not) and wait for the first success → geometric distribution.

XGeom(p),X{1,2,3,}X \sim \text{Geom}(p),\quad X \in \{1, 2, 3, \ldots\}
PMF derivation

For the first error to appear on page kk, the first k1k-1 pages must be error-free and page kk must have an error:

P(X=k)=(1p)k1p,k=1,2,3,P(X=k) = (1-p)^{k-1}\cdot p,\quad k = 1, 2, 3, \ldots
CDF derivation

The probability that the first error appears on or before page kk equals 1 minus the probability of no errors in the first kk pages:

P(Xk)=1(1p)kP(X \le k) = 1 - (1-p)^k
Expected value and variance

Key properties of the geometric distribution:

E[X]=1p,Var(X)=1pp2E[X] = \frac{1}{p},\qquad \text{Var}(X) = \frac{1-p}{p^2}
Memoryless property

The geometric distribution is memoryless: given that no error was found in the first mm pages, the distribution of remaining pages until the first error is the same as the original.

P(X>m+kX>m)=P(X>k)=(1p)kP(X > m+k \mid X > m) = P(X > k) = (1-p)^k
Illustration with p = 0.2

For p=0.2p=0.2: P(X=1)=0.2P(X=1)=0.2; P(X=2)=0.80.2=0.16P(X=2)=0.8\cdot0.2=0.16; P(X=3)=0.640.2=0.128P(X=3)=0.64\cdot0.2=0.128; E[X]=1/0.2=5E[X]=1/0.2=5.

P(X=k)=(0.8)k10.2,E[X]=5P(X=k) = (0.8)^{k-1}\cdot 0.2,\qquad E[X] = 5
Answer
P(X=k)=(1p)k1p;P(Xk)=1(1p)kP(X=k)=(1-p)^{k-1}p;\quad P(X\le k)=1-(1-p)^k
Explanation tip: The geometric distribution is the discrete analogue of the exponential distribution and shares the memoryless property. It models the number of trials until the first success.

Task 4 — Poisson (Error Reports per Hour)

A software system receives error reports at an average rate of λ=3\lambda = 3 per hour. Assume reports arrive independently and at a constant rate. Let XX be the number of error reports in one hour, XPoisson(3)X \sim \text{Poisson}(3).

PMF
CDF
Model

Events (error reports) occur independently at a constant average rate λ\lambda per unit time → Poisson distribution.

XPois(λ),P(X=k)=eλλkk!,k=0,1,2,X \sim \text{Pois}(\lambda),\quad P(X=k) = \frac{e^{-\lambda}\lambda^k}{k!},\quad k = 0, 1, 2, \ldots
PMF with λ = 3

Substituting λ=3\lambda = 3:

P(X=k)=e33kk!P(X=k) = \frac{e^{-3} \cdot 3^k}{k!}
Key probabilities

Computing the first few values (e30.0498e^{-3} \approx 0.0498):

P(X=0)=e30.0498,P(X=1)=3e30.1494,P(X=2)=92e30.2240,P(X=3)=92e30.2240P(X=0)=e^{-3}\approx 0.0498,\quad P(X=1)=3e^{-3}\approx 0.1494,\quad P(X=2)=\frac{9}{2}e^{-3}\approx 0.2240,\quad P(X=3)=\frac{9}{2}e^{-3}\approx 0.2240
Mean and variance

A key property of the Poisson distribution is that the mean equals the variance:

E[X]=λ=3,Var(X)=λ=3E[X] = \lambda = 3,\qquad \text{Var}(X) = \lambda = 3
Poisson as a limit

The Poisson distribution approximates Bin(n,p)\text{Bin}(n, p) when nn is large, pp is small, and np=λnp = \lambda is moderate. Here λ=3\lambda = 3 means 3 expected events per hour.

Bin(n,p)n,  npλPois(λ)\text{Bin}(n,p) \xrightarrow{n\to\infty,\; np\to\lambda} \text{Pois}(\lambda)
Answer
P(X=k)=e33kk!;E[X]=Var(X)=3P(X=k)=\frac{e^{-3}\cdot 3^k}{k!};\quad E[X]=\text{Var}(X)=3
Explanation tip: The Poisson model is appropriate when: events occur independently, the average rate λ\lambda is constant over time, and two events cannot occur simultaneously.

Task 5 — Multinomial (Die with Three Categories)

A fair die is rolled n=5n=5 times. Outcomes are grouped into three categories: Small (1–2), Medium (3–4), Large (5–6), each with probability 13\frac{1}{3}. Let (N1,N2,N3)(N_1, N_2, N_3) be the counts in each category. Describe the multinomial model and compute a specific probability.

Model

We have n=5n=5 independent trials, each resulting in one of 3 categories with constant probabilities p1=p2=p3=13p_1=p_2=p_3=\frac{1}{3}. The joint distribution of counts is multinomial.

(N1,N2,N3)Multinomial ⁣(5;13,13,13)(N_1, N_2, N_3) \sim \text{Multinomial}\!\left(5;\, \tfrac{1}{3}, \tfrac{1}{3}, \tfrac{1}{3}\right)
Multinomial PMF

For non-negative integers n1,n2,n3n_1, n_2, n_3 with n1+n2+n3=5n_1+n_2+n_3=5:

P(N1=n1,N2=n2,N3=n3)=5!n1!n2!n3!(13)5P(N_1=n_1, N_2=n_2, N_3=n_3) = \frac{5!}{n_1!\, n_2!\, n_3!} \cdot \left(\frac{1}{3}\right)^5
Multinomial coefficient

The factor 5!n1!n2!n3!\frac{5!}{n_1!\,n_2!\,n_3!} counts the number of arrangements of the 5 rolls into the given category counts. For example, (n1,n2,n3)=(2,2,1)(n_1,n_2,n_3)=(2,2,1):

5!2!2!1!=120221=30\frac{5!}{2!\,2!\,1!} = \frac{120}{2\cdot2\cdot1} = 30
P(2 Small, 2 Medium, 1 Large)

Probability of exactly 2 small, 2 medium, 1 large outcome:

P(N1=2,N2=2,N3=1)=30(13)5=302430.1235P(N_1=2,N_2=2,N_3=1) = 30 \cdot \left(\frac{1}{3}\right)^5 = \frac{30}{243} \approx 0.1235
P(all in one category)

Probability all 5 rolls fall in the same category (any of the 3):

P(all same)=3135=3243=1810.0123P(\text{all same}) = 3 \cdot \frac{1}{3^5} = \frac{3}{243} = \frac{1}{81} \approx 0.0123
Marginal distributions

Each marginal NiBin(5,13)N_i \sim \text{Bin}(5, \frac{1}{3}), so E[Ni]=531.667E[N_i] = \frac{5}{3} \approx 1.667 and Var(Ni)=51323=1091.111\text{Var}(N_i) = 5\cdot\frac{1}{3}\cdot\frac{2}{3} = \frac{10}{9} \approx 1.111.

E[Ni]=npi=53,Var(Ni)=npi(1pi)=109E[N_i] = np_i = \frac{5}{3},\quad \text{Var}(N_i) = np_i(1-p_i) = \frac{10}{9}
Answer
P(N1=n1,N2=n2,N3=n3)=5!n1!n2!n3!(13)5P(N_1=n_1,N_2=n_2,N_3=n_3)=\frac{5!}{n_1!n_2!n_3!}\left(\frac{1}{3}\right)^5
Explanation tip: The multinomial is a generalization of the binomial to more than 2 categories. There is no single-chart visualization for the joint multinomial distribution, so no interactive chart is attached.

Task 6 — Binomial (Defective Items)

A machine produces items with defect probability p=0.04p=0.04. In a sample of n=10n=10 items, let XX be the number of defective items, XBin(10,0.04)X \sim \text{Bin}(10, 0.04). Find P(X=2)P(X=2) and P(X1)P(X \ge 1).

PMF
CDF
Model

Fixed n=10n=10 independent trials, each with constant defect probability p=0.04p=0.04 → binomial distribution.

P(X=k)=(10k)(0.04)k(0.96)10kP(X=k) = \binom{10}{k}(0.04)^k(0.96)^{10-k}
P(X = 2)

Substitute k=2k=2, n=10n=10, p=0.04p=0.04, 1p=0.961-p=0.96:

P(X=2)=(102)(0.04)2(0.96)8=450.00160.72140.0519P(X=2) = \binom{10}{2}(0.04)^2(0.96)^8 = 45 \cdot 0.0016 \cdot 0.7214 \approx 0.0519
P(X ≥ 1) via complement

The complement of "at least one defect" is "no defects":

P(X1)=1P(X=0)=1(0.96)1010.6648=0.3352P(X \ge 1) = 1 - P(X=0) = 1 - (0.96)^{10} \approx 1 - 0.6648 = 0.3352
Answer
P(X=2)0.0519,P(X1)0.3352P(X=2)\approx 0.0519,\quad P(X\ge 1)\approx 0.3352
Explanation tip: Binomial fits because trials are independent with a fixed success probability; use the complement for "at least one".

Task 7 — Hypergeometric (Drawing Defective Units)

A batch contains 15 items: 12 working and 3 defective. A quality inspector draws 5 items without replacement. Let XX be the number of defective items in the sample. Find P(X=2)P(X=2).

PMF
CDF
Model

Sampling without replacement from a finite population: N=15N=15 total, K=3K=3 defective, n=5n=5 drawn → hypergeometric distribution.

XHypergeometric(N=15,K=3,n=5),P(X=k)=(3k)(125k)(155)X \sim \text{Hypergeometric}(N=15,\, K=3,\, n=5),\quad P(X=k) = \frac{\binom{3}{k}\binom{12}{5-k}}{\binom{15}{5}}
Total combinations

Number of ways to choose 5 items from 15:

(155)=15!5!10!=3003\binom{15}{5} = \frac{15!}{5!\,10!} = 3003
Favorable outcomes for X = 2

Choose 2 defective from 3, and 3 working from 12:

(32)(123)=3220=660\binom{3}{2}\binom{12}{3} = 3 \cdot 220 = 660
P(X = 2)

Divide favorable by total:

P(X=2)=66030030.2198P(X=2) = \frac{660}{3003} \approx 0.2198
Other probabilities for context

Completing the distribution:

P(X=0)=(30)(125)3003=79230030.2638,P(X=1)=33303003=99030030.3297,P(X=3)=1843003=8430030.0280P(X=0)=\frac{\binom{3}{0}\binom{12}{5}}{3003}=\frac{792}{3003}\approx 0.2638,\quad P(X=1)=\frac{3\cdot 330}{3003}=\frac{990}{3003}\approx 0.3297,\quad P(X=3)=\frac{1\cdot 84}{3003}=\frac{84}{3003}\approx 0.0280
Answer
P(X=2)=66030030.2198P(X=2)=\frac{660}{3003}\approx 0.2198
Explanation tip: With only 3 defective items in 15, P(X=1)0.33P(X=1)\approx 0.33 is the most likely outcome; drawing all 3 defective items (P(X=3)0.028P(X=3)\approx 0.028) is rare.

Task 8 — Geometric (First Compilation Error)

Each compilation attempt independently fails (produces an error) with probability p=0.1p=0.1. Let XX be the attempt number on which the first error occurs. Find the probability the first error occurs on the 4th attempt, and the probability that an error occurs by the 3rd attempt.

PMF
CDF
Model

Independent Bernoulli trials with constant error probability p=0.1p=0.1; waiting for the first error → geometric distribution.

XGeom(0.1),P(X=k)=(0.9)k10.1X \sim \text{Geom}(0.1),\quad P(X=k) = (0.9)^{k-1} \cdot 0.1
P(first error on 4th attempt)

The first 3 attempts must succeed (no error) and the 4th must fail:

P(X=4)=(0.9)30.1=0.7290.1=0.0729P(X=4) = (0.9)^3 \cdot 0.1 = 0.729 \cdot 0.1 = 0.0729
P(error by 3rd attempt)

Use the CDF: probability of first error on attempt 1, 2, or 3. Equivalently, 1 minus the probability of no errors in 3 attempts:

P(X3)=1(0.9)3=10.729=0.271P(X \le 3) = 1 - (0.9)^3 = 1 - 0.729 = 0.271
Expected attempt number

On average, the first error is expected after:

E[X]=1p=10.1=10 attemptsE[X] = \frac{1}{p} = \frac{1}{0.1} = 10 \text{ attempts}
Answer
P(X=4)=(0.9)30.1=0.0729;P(X3)=1(0.9)3=0.271P(X=4)=(0.9)^3\cdot0.1=0.0729;\quad P(X\le 3)=1-(0.9)^3=0.271
Explanation tip: The geometric distribution models waiting time to the first success/failure in a sequence of independent trials. With p=0.1p=0.1, errors are rare and one expects to wait 10 attempts on average.

Task 9 — Poisson (Server Requests)

A server receives requests at an average rate of λ=5\lambda = 5 per minute. Assume requests arrive independently at a constant rate. Let XX be the number of requests in one minute, XPois(5)X \sim \text{Pois}(5). Find P(X=3)P(X=3) and P(X1)P(X \ge 1).

PMF
CDF
Model

Events (requests) arrive independently at constant rate λ=5\lambda=5 per minute → Poisson distribution.

P(X=k)=e55kk!,k=0,1,2,P(X=k) = \frac{e^{-5} \cdot 5^k}{k!},\quad k = 0, 1, 2, \ldots
P(X = 3)

Substitute k=3k=3, λ=5\lambda=5 (e50.006738e^{-5} \approx 0.006738):

P(X=3)=e5533!=e512560.00673812560.1404P(X=3) = \frac{e^{-5} \cdot 5^3}{3!} = \frac{e^{-5} \cdot 125}{6} \approx \frac{0.006738 \cdot 125}{6} \approx 0.1404
P(X ≥ 1) via complement

The complement of "at least one request" is "no requests":

P(X1)=1P(X=0)=1e510.0067380.9933P(X \ge 1) = 1 - P(X=0) = 1 - e^{-5} \approx 1 - 0.006738 \approx 0.9933
Mean and variance

For Poisson, mean equals variance:

E[X]=λ=5,Var(X)=λ=5,SD(X)=52.236E[X] = \lambda = 5,\qquad \text{Var}(X) = \lambda = 5,\qquad \text{SD}(X) = \sqrt{5} \approx 2.236
Answer
P(X=3)=e512560.1404;P(X1)=1e50.9933P(X=3)=\frac{e^{-5}\cdot 125}{6}\approx 0.1404;\quad P(X\ge 1)=1-e^{-5}\approx 0.9933
Explanation tip: With λ=5\lambda=5, receiving at least one request in a minute is almost certain (99.33%99.33\%). The most likely counts are near the mean: P(X=4)=P(X=5)0.1755P(X=4)=P(X=5)\approx 0.1755.

Task 10 — Multinomial (Candy Flavor Selection)

A candy machine dispenses three flavors: Strawberry with probability p1=0.4p_1=0.4, Lemon with probability p2=0.35p_2=0.35, and Mint with probability p3=0.25p_3=0.25. Six candies are dispensed independently. Find the probability of getting exactly 3 Strawberry, 2 Lemon, and 1 Mint.

Model

n=6n=6 independent trials, each resulting in one of 3 outcomes with fixed probabilities p1=0.4p_1=0.4, p2=0.35p_2=0.35, p3=0.25p_3=0.25 (note p1+p2+p3=1p_1+p_2+p_3=1) → multinomial distribution.

(N1,N2,N3)Multinomial(6;0.4,0.35,0.25)(N_1,N_2,N_3)\sim\text{Multinomial}(6;\,0.4,\,0.35,\,0.25)
Multinomial PMF

For counts (n1,n2,n3)(n_1, n_2, n_3) with n1+n2+n3=6n_1+n_2+n_3=6:

P(N1=n1,N2=n2,N3=n3)=6!n1!n2!n3!p1n1p2n2p3n3P(N_1=n_1,N_2=n_2,N_3=n_3) = \frac{6!}{n_1!\,n_2!\,n_3!}\cdot p_1^{n_1}\cdot p_2^{n_2}\cdot p_3^{n_3}
Multinomial coefficient

Count the arrangements of 3 Strawberry, 2 Lemon, 1 Mint among 6 positions:

6!3!2!1!=720621=60\frac{6!}{3!\,2!\,1!} = \frac{720}{6 \cdot 2 \cdot 1} = 60
Probability factors

Compute each flavor's contribution:

(0.4)3=0.064,(0.35)2=0.1225,(0.25)1=0.25(0.4)^3 = 0.064,\quad (0.35)^2 = 0.1225,\quad (0.25)^1 = 0.25
Final computation

Multiply the multinomial coefficient by the probability factors:

P(N1=3,N2=2,N3=1)=600.0640.12250.25=600.001960.1176P(N_1=3,N_2=2,N_3=1) = 60 \cdot 0.064 \cdot 0.1225 \cdot 0.25 = 60 \cdot 0.00196 \approx 0.1176
Expected counts

The expected number of each flavor in 6 draws:

E[N1]=60.4=2.4,E[N2]=60.35=2.1,E[N3]=60.25=1.5E[N_1]=6\cdot0.4=2.4,\quad E[N_2]=6\cdot0.35=2.1,\quad E[N_3]=6\cdot0.25=1.5
Answer
P(N1=3,N2=2,N3=1)=60(0.4)3(0.35)2(0.25)0.1176P(N_1=3,N_2=2,N_3=1)=60\cdot(0.4)^3(0.35)^2(0.25)\approx 0.1176
Explanation tip: The multinomial coefficient 6060 accounts for all orderings of the 6 candies; the probability factors account for the likelihood of each specific ordering. No distribution chart is attached for multinomial tasks.