4.3 - Fitting distributions to frequency data
A probability model predicts proportions, but a frequency table records counts. You will turn a prescribed distribution into expected frequencies, estimate a parameter when required, and keep complete tails when combining small classes for a chi-squared test.
Expected frequencies
If a model predicts a rare outcome, can we delete its class when nobody in the sample has that outcome? The model still assigns it a probability, so its expected count must remain somewhere in the table.
First consider a familiar binomial experiment. If each observation is the number of successes in two independent trials with success probability , the model probabilities for zero, one and two successes are . In independent observations, the corresponding expected counts are .
Observed and expected frequencies
An observed frequency, , is the number of sample observations in class . Its expected frequency, , is the count predicted by the hypothesised model for a sample of the same size.
Expected does not mean guaranteed. The observed table usually differs from the predicted table because of random variation. We will later ask whether that difference is unusually large.
From probabilities to counts
For independent observations and exhaustive, non-overlapping classes with model probabilities ,
The count rule is not in the formula booklet: learn it. The booklet gives the binomial, geometric and Poisson probability formulae used to find the .
For a continuous model, find each class probability by integrating its density over that class, then multiply by . For example, on gives . A sample of therefore has expected counts below and at least .
Worked example 1: a specified binomial model
Question. A model specifies . Find the expected frequencies of in independent observations.
Plan. Find the three binomial probabilities, then multiply each by .
Thus
Answer. The expected frequencies are .
Check. The model has mean . The predicted table has mean , and its counts total .
Change only the success probability. The distribution is still binomial with two trials, but symmetry between zero and two successes disappears.
Worked example 2: unequal probabilities
Question. For independent observations from the model , find the expected frequencies of .
Plan. Use the new success probability in each binomial probability.
Answer. The expected frequencies are .
Check. In individual Bernoulli trials the model predicts successes. The frequency table predicts , agreeing by a different count.
Expected frequencies may be fractional: changing the sample size in the second example to gives . Keep sufficient precision; rounding each expected count to an integer changes the model.
Watch out
Use the probabilities specified by the hypothesis. Replacing them by the observed proportions makes every expected count equal its observed count and removes the comparison we want to make.
Apply the same method to a different specified success probability.
Estimating permitted parameters
A hypothesis may prescribe a distribution family while leaving a parameter to be estimated from the sample.
For instance, “a binomial distribution with three trials” fixes the number of trials, but does not give the success probability. We need an estimate before we can calculate its expected frequencies. Estimate only what the question leaves unknown: a numerical parameter already specified by the hypothesis stays fixed.
Fitting from the sample mean
For exact values with observed frequencies ,
For a prescribed family with known , equate to , giving . For a prescribed family, equate to , giving .
The frequency mean and these distributions' means are in the formula booklet. The fitting step is to equate the model mean to the sample mean.
The hat identifies an estimate from this sample. The family itself must come from the hypothesis or the stated modelling instructions; matching a mean does not establish which family is suitable.
Worked example 3: fitting a binomial probability
Question. The table summarises independent observations. Fit the prescribed model by estimating from the sample mean, and find its expected frequencies.
| Value | ||||
|---|---|---|---|---|
| Observed frequency |
Plan. Find the weighted mean, divide by three, then use the fitted binomial probabilities.
For ,
Answer. , with expected frequencies .
Check. The expected number of successes in the table is . There were observed successes in trials, so the direct success proportion is also .
Keep the same observations but change the prescribed family to Poisson. Both models use the same sample mean; the mean determines a different parameter in each family.
Continue this lesson.
You’re previewing NovaLearn without an account. Create a free account to read the rest.
Create free account