Fitting a Binomial Distribution 🧩
Fitting means calculating the Theoretical (Expected) Frequencies for a given observed frequency distribution. We assume the data follows a Binomial law and calculate what the frequencies should be.
Steps to Fit 🚶
- Find Mean: Calculate the actual arithmetic mean (
X̄) of the given data.Mean = ∑ fX / ∑ f(for frequency data). - Estimate Parameters:
- Set
Mean = n * p. - Find
p = Mean / n. - Find
q = 1 - p.
- Set
- Calculate Probabilities: Use
P(r) = nCr p^r q^(n-r)for r = 0, 1, 2... n. - Expected Frequencies: Multiply each probability by total frequency
N.Expected Freq = N * P(r)
Example 📝
Given: 4 coins are tossed 80 times. Number of heads (X) and Frequency (f) are given. X: 0, 1, 2, 3, 4 f: 4, 18, 30, 20, 8 (N=80)
Fit a Binomial Distribution.
Step 1: Find Mean
Mean = (0*4 + 1*18 + 2*30 + 3*20 + 4*8) / 80
Mean = (0 + 18 + 60 + 60 + 32) / 80
Mean = 170 / 80 = 2.125
Step 2: Find p and q
n = 4 (4 coins).
Mean = np => 2.125 = 4p
p = 2.125 / 4 = 0.53
q = 1 - 0.53 = 0.47
Step 3 & 4: Calculate Expected Frequencies
Using N * nCr * p^r * q^(n-r).
- r=0:
80 * 4C0 * (0.53)^0 * (0.47)^4 - r=1:
80 * 4C1 * (0.53)^1 * (0.47)^3 - ...and so on.
Note: For perfect unbiased coins, we assume p = 0.5 directly. Usually questions specify if coins are unbiased.
Recurrence Formula (Shortcut) ⚡
To avoid calculating nCr every time:
P(r+1) = [ (n-r) / (r+1) ] * (p/q) * P(r)
Loading quiz…