Skip to the content
How to use this manual: In the lab, copy the blank working table (the one with only headings) at the start of each experiment's Calculation and fill it in yourself from the given data. The Calculation section then shows the completed table and the substitution so you can check your work.

List of Practical Experiments (Official Syllabus)

  1. Fitting of Binomial distribution — Direct method.
  2. Fitting of Binomial distribution — Recurrence relation method.
  3. Fitting of Poisson distribution — Direct method.
  4. Fitting of Poisson distribution — Recurrence relation method.
  5. Fitting of Negative Binomial distribution — Direct method.
  6. Fitting of Negative Binomial distribution — Recurrence relation method.
  7. Fitting of Geometric distribution — Direct method.
  8. Fitting of Geometric distribution — Recurrence relation method.
  9. Fitting of Hypergeometric distribution.
WHAT DOES "FITTING A DISTRIBUTION" MEAN?
  1. Record the observed frequencies \(f_x\) of \(x = 0, 1, 2, \ldots\) and the total \(N = \sum f_x\).
  2. Estimate the parameters from the data (e.g. \(\hat p = \bar x / n\) for Binomial, \(\hat\lambda = \bar x\) for Poisson).
  3. Compute the theoretical probabilities \(p(x)\).
  4. Obtain the expected frequencies \(\hat f_x = N\,p(x)\).
  5. Compare observed and expected frequencies (qualitatively, or by a \(\chi^2\) goodness-of-fit test).

Experiment 1 — Fitting a Binomial Distribution (Direct Method)

1. Problem

Eight coins are tossed and the number of heads \(X\) is recorded; the experiment is repeated 256 times:

x012345678
f263052675632101

Fit a Binomial distribution and obtain the expected frequencies.

2. Aim

To fit a Binomial distribution to observed data by the direct method and compare expected with observed frequencies.

3. Formula

\[ \bar x = n\hat p, \qquad p(x) = \binom{n}{x}\hat p^{\,x}\hat q^{\,n-x}, \qquad \hat f_x = N\,p(x) \]

Applying it:

  1. Find \(N = \sum f\) and the mean \(\bar x = \dfrac{\sum f x}{N}\).
  2. Estimate \(\hat p = \bar x / n\) (here \(n = 8\)) and \(\hat q = 1 - \hat p\).
  3. Compute \(p(x)\) for each \(x\) and the expected frequency \(\hat f_x = N\,p(x)\).

4. Calculation

Blank working table (compute p(x) and the expected frequencies):

xp(x)Expected f = 256 p(x)Observed f
02
16
230
352
467
556
632
710
81
Total1.000256256

\(N = 256\); \(\sum f x = 0+6+60+156+268+280+192+70+8 = 1040\); \(\bar x = 1040/256 = 4.0625\).

\(\hat p = 4.0625/8 = 0.5078\), \(\hat q = 0.4922\).

xp(x)Expected fObserved f
00.00340.882
10.02847.286
20.102726.2830
30.211854.2352
40.273269.9367
50.225557.7256
60.116329.7732
70.03438.7810
80.00441.131
Total1.000256.0256

5. Result

The fitted distribution is \(B(8,\ 0.5078)\). The expected frequencies (0.9, 7.3, 26.3, 54.2, 69.9, 57.7, 29.8, 8.8, 1.1) are close to the observed values, so the Binomial model fits the data well.

Experiment 2 — Fitting a Binomial Distribution (Recurrence Method)

1. Problem

For the same coin-tossing data as Experiment 1, obtain the Binomial probabilities using the recurrence relation instead of computing each \(\binom{n}{x}\) separately.

2. Aim

To fit a Binomial distribution using the recurrence relation, which avoids repeated factorial computation.

3. Formula

\[ P(x+1) = \frac{n - x}{x + 1}\cdot\frac{\hat p}{\hat q}\cdot P(x), \qquad P(0) = \hat q^{\,n} \]

Applying it:

  1. Use \(\hat p = 0.5078,\ \hat q = 0.4922\) (from Experiment 1); compute the ratio \(\hat p/\hat q = 1.0317\).
  2. Start from \(P(0) = \hat q^{\,n} = \hat q^{8}\).
  3. Generate each successive probability by the recurrence, then multiply by \(N\) for expected frequencies.

4. Calculation

Blank working table (fill in each probability from the recurrence):

xMultiplier (n−x)/(x+1) · p/qP(x)
0—
1
2
3
4

\(P(0) = 0.4922^{8} = 0.0034\).

5. Result

The recurrence reproduces exactly the probabilities of Experiment 1 (0.0034, 0.0284, 0.1027, 0.2118, 0.2732, …) with far less arithmetic, confirming the direct-method fit.

Experiment 3 — Fitting a Poisson Distribution (Direct Method)

1. Problem

The number of accidents per day at a junction over 100 days:

x012345
f463812310

Fit a Poisson distribution.

2. Aim

To fit a Poisson distribution to observed count data by the direct method.

3. Formula

\[ \hat\lambda = \bar x, \qquad p(x) = \frac{e^{-\hat\lambda}\hat\lambda^{x}}{x!}, \qquad \hat f_x = N\,p(x) \]

Applying it:

  1. Find \(N = \sum f\) and \(\bar x = \dfrac{\sum f x}{N}\); take \(\hat\lambda = \bar x\).
  2. Compute \(p(x) = e^{-\hat\lambda}\hat\lambda^{x}/x!\) and \(\hat f_x = N\,p(x)\).

4. Calculation

Blank working table (compute p(x) and the expected frequencies):

xp(x)Expected f = 100 p(x)Observed f
046
138
212
33
41
5+0
Total1.000100100

\(N = 100\); \(\sum f x = 0+38+24+9+4+0 = 75\); \(\hat\lambda = 0.75\); \(e^{-0.75} = 0.4724\).

xp(x)Expected fObserved f
00.472447.2446
10.354335.4338
20.132913.2912
30.03323.323
40.00620.621
5+0.00100.100
Total1.000100.0100

5. Result

The fitted distribution is Poisson with \(\hat\lambda = 0.75\). Expected and observed frequencies agree closely, so the data follow a Poisson law.

Experiment 4 — Fitting a Poisson Distribution (Recurrence Method)

1. Problem

For the same accident data as Experiment 3, obtain the Poisson probabilities using the recurrence relation.

2. Aim

To fit a Poisson distribution using the recurrence relation.

3. Formula

\[ P(x+1) = \frac{\hat\lambda}{x+1}\,P(x), \qquad P(0) = e^{-\hat\lambda} = 0.4724 \]

Applying it:

  1. Take \(\hat\lambda = 0.75\) and \(P(0) = e^{-0.75}\).
  2. Generate each successive probability by the recurrence and multiply by \(N\).

4. Calculation

Blank working table (fill in each probability from the recurrence):

xMultiplier λ/(x+1)P(x)
0—
1
2
3
4

5. Result

The recurrence gives the same probabilities as the direct method (0.4724, 0.3543, 0.1329, 0.0332, 0.0062), confirming the Poisson fit with \(\hat\lambda = 0.75\).

Experiment 5 — Fitting a Negative Binomial Distribution (Direct Method)

1. Problem

The number of claims \(X\) filed per policy-holder in a year, recorded over 200 policy-holders:

x012345678910
f253840312316117432

Fit a Negative Binomial distribution (\(X\) = number of failures before the \(r\)-th success).

2. Aim

To fit a Negative Binomial distribution by the method of moments, appropriate when the data are over-dispersed (variance > mean).

3. Formula

\[ \hat p = \frac{\bar x}{s^2}, \qquad \hat r = \frac{\bar x^2}{s^2 - \bar x}, \qquad p(x) = \binom{x + r - 1}{x}\,p^{\,r} q^{\,x}, \qquad \hat f_x = N\,p(x) \]

Applying it:

  1. Compute the sample mean \(\bar x\) and variance \(s^2\). If \(s^2 > \bar x\), the NB model is appropriate.
  2. Method of moments: \(\hat p = \bar x / s^2\) and \(\hat r = \bar x^2 / (s^2 - \bar x)\); round \(\hat r\) to the nearest positive integer and re-estimate \(\hat p = r / (r + \bar x)\).
  3. Compute \(p(x)\) and \(\hat f_x = N\,p(x)\).

4. Calculation

Blank working table (compute p(x) and the expected frequencies):

xp(x)Expected f = 200 p(x)Observed f
025
138
240
331
423
516
611
77
84
93
102

\(N = 200\); \(\sum f x = 577\), so \(\bar x = 577/200 = 2.885\).

\(\sum f x^2 = 2683\), so \(s^2 = 2683/200 - 2.885^2 = 13.415 - 8.323 = 5.092\). Since \(s^2 = 5.09 > \bar x = 2.89\), the data are over-dispersed and NB is appropriate.

Method of moments: \(\hat p = 2.885/5.092 = 0.567\), \(\hat r = 2.885^2/(5.092 - 2.885) = 8.323/2.207 = 3.77\). Rounding, \(r = 4\); re-estimate \(p = 4/(4 + 2.885) = 0.581\), \(q = 0.419\).

xp(x)Expected fObserved f
00.113922.7925
10.191038.1938
20.200040.0140
30.167633.5331
40.122924.5923
50.082416.4816
60.051810.3611
70.03106.207
80.01793.574
90.01002.003
100.00541.092

(The remaining probability, \(P(X \ge 11) \approx 0.006\), accounts for the small difference from 200.)

5. Result

The fitted distribution is Negative Binomial with \(r = 4,\ p = 0.581\). The expected frequencies track the observed values well, confirming that the over-dispersed claim data follow a Negative Binomial law.

Experiment 6 — Fitting a Negative Binomial Distribution (Recurrence Method)

1. Problem

For the claim data of Experiment 5 (fitted \(r = 4,\ p = 0.581,\ q = 0.419\)), obtain the Negative Binomial probabilities using the recurrence relation.

2. Aim

To fit a Negative Binomial distribution using the recurrence relation.

3. Formula

\[ P(x+1) = \frac{(r + x)\,q}{x + 1}\,P(x), \qquad P(0) = p^{\,r} \]

Applying it:

  1. Start from \(P(0) = p^{\,r}\).
  2. Generate each successive probability by the recurrence and multiply by \(N\).

4. Calculation

Blank working table (fill in each probability from the recurrence):

xMultiplier (r+x)q/(x+1)P(x)
0—
1
2
3

5. Result

The recurrence reproduces the direct-method probabilities of Experiment 5 (0.1139, 0.1910, 0.2000, 0.1676, …), confirming the Negative Binomial fit with \(r = 4,\ p = 0.581\).

Experiment 7 — Fitting a Geometric Distribution (Direct Method)

1. Problem

The number of failures \(X\) before the first success of a marketing call, over 100 call-sequences:

x012345+
f4024141075

Fit a Geometric distribution.

2. Aim

To fit a Geometric distribution (number of failures before the first success) to observed data.

3. Formula

\[ \hat p = \frac{1}{1 + \bar x}, \qquad p(x) = \hat q^{\,x}\hat p, \qquad \hat f_x = N\,p(x) \]

Applying it:

  1. Find \(N\) and \(\bar x = \dfrac{\sum f x}{N}\).
  2. For this form, mean \(= q/p\); hence \(\hat p = \dfrac{1}{1 + \bar x}\), \(\hat q = 1 - \hat p\).
  3. Compute \(p(x) = \hat q^{\,x}\hat p\) and \(\hat f_x = N\,p(x)\).

4. Calculation

Blank working table (compute p(x) and the expected frequencies):

xp(x)Expected f = 100 p(x)Observed f
040
124
214
310
47
5+5

\(N = 100\); \(\sum f x = 0+24+28+30+28+25 = 135\); \(\bar x = 1.35\).

\(\hat p = 1/(1 + 1.35) = 1/2.35 = 0.4255\), \(\hat q = 0.5745\).

xp(x)Expected fObserved f
00.425542.5540
10.244524.4524
20.140414.0414
30.08078.0710
40.04634.637
5+0.06266.265

5. Result

The fitted Geometric distribution has \(\hat p = 0.4255\). The fit is reasonable, though the observed right tail (\(x = 3, 4\)) is a little heavier than the Geometric predicts.

Experiment 8 — Fitting a Geometric Distribution (Recurrence Method)

1. Problem

For the marketing-call data of Experiment 7 (\(\hat p = 0.4255,\ \hat q = 0.5745\)), obtain the Geometric probabilities using the recurrence relation.

2. Aim

To fit a Geometric distribution using the recurrence relation.

3. Formula

\[ P(x+1) = \hat q\,P(x), \qquad P(0) = \hat p = 0.4255 \]

Applying it:

  1. Start from \(P(0) = \hat p\).
  2. Each successive probability is simply \(\hat q\) times the previous one.

4. Calculation

Blank working table (fill in each probability from the recurrence):

xP(x) = q · P(x−1)
0
1
2
3

5. Result

The recurrence gives the same probabilities as the direct method (0.4255, 0.2445, 0.1404, 0.0807, …), confirming the Geometric fit with \(\hat p = 0.4255\).

Experiment 9 — Fitting a Hypergeometric Distribution

1. Problem

Lots of size \(N_L = 50\) each contain \(M = 10\) defective items. From each lot a sample of \(n = 5\) items is drawn without replacement and the number of defectives \(X\) is observed, over 500 lots:

x012345
f155225952050

Fit a Hypergeometric distribution.

2. Aim

To fit a Hypergeometric distribution to sampling-without-replacement data whose parameters are known from the sampling scheme.

3. Formula

\[ p(x) = \frac{\dbinom{M}{x}\dbinom{N_L - M}{n - x}}{\dbinom{N_L}{n}} = \frac{\dbinom{10}{x}\dbinom{40}{5 - x}}{\dbinom{50}{5}}, \qquad \binom{50}{5} = 2\,118\,760 \]

Applying it:

  1. The parameters \(N_L = 50,\ M = 10,\ n = 5\) are fixed by the problem.
  2. Compute \(p(x)\) from the Hypergeometric formula and the expected frequency \(\hat f_x = 500\,p(x)\).

4. Calculation

Blank working table (compute p(x) and the expected frequencies):

xp(x)Expected f = 500 p(x)Observed f
0155
1225
295
320
45
50
Total1.000500500
xp(x)Expected fObserved f
00.3105155.3155
10.4313215.7225
20.2098104.995
30.044222.120
40.00402.05
50.00010.050
Total1.000500.0500

Recurrence (optional): \(P(x+1) = \dfrac{(M - x)(n - x)}{(x + 1)(N_L - M - n + x + 1)}\,P(x)\).

5. Result

The fitted Hypergeometric distribution (\(N_L = 50,\ M = 10,\ n = 5\)) gives expected frequencies in strong agreement with the observed ones, so the Hypergeometric is the correct model for this without-replacement sampling.

Lab Record Format (to be followed for every experiment)

  1. Problem — the observed frequency data and the distribution to be fitted.
  2. Aim — the objective of the experiment.
  3. Formula — the formula(e) used, then the steps that apply them.
  4. Calculation — parameter estimation, the completed table of expected frequencies, and the substitution.
  5. Result — the fitted distribution and a comment on the goodness of fit.