Exam code: 9FM0
1/230Still learning
Know0
Define a goodness of fit test.
A goodness of fit test measures how well observed data from real life matches the frequencies that a proposed theoretical model would predict.
It is a hypothesis test, and the chi-squared distribution is what turns the comparison into a decision.

Join for free to unlock a full flashcard set, track what you know,
and turn revision into real progress.
What are the null and alternative hypotheses for a goodness of fit test?
says there is no difference between the observed and the expected distribution, and
says the observed distribution cannot be modelled by the expected one.
Both must be stated in the context of the question rather than in general terms.
Complete the alternative form of the goodness of fit statistic, in which is the sum of the observed frequencies:
The completed formula is:
It is often quicker than working with because no differences have to be found, and the two always give the same value.
Was this flashcard helpful?
Define a goodness of fit test.
A goodness of fit test measures how well observed data from real life matches the frequencies that a proposed theoretical model would predict.
It is a hypothesis test, and the chi-squared distribution is what turns the comparison into a decision.
What are the null and alternative hypotheses for a goodness of fit test?
says there is no difference between the observed and the expected distribution, and
says the observed distribution cannot be modelled by the expected one.
Both must be stated in the context of the question rather than in general terms.
Complete the alternative form of the goodness of fit statistic, in which is the sum of the observed frequencies:
The completed formula is:
It is often quicker than working with because no differences have to be found, and the two always give the same value.
Where do the expected frequencies in a goodness of fit test come from?
From the theoretical model being tested: work out the probability of each outcome under that model, then multiply each one by the total number of observations .
Because every probability is used, the expected frequencies always sum to , the same total as the observed frequencies.
What must you do if an expected frequency is less than 5?
Combine that class with an adjacent one, and keep combining until every expected frequency is above 5.
The observed frequencies for the combined classes are added together too, and the number of classes drops, which changes the degrees of freedom.
True or False?
Every chi-squared goodness of fit test is one-tailed.
True.
Only a large value of counts as evidence against the model, because it means the observed and expected frequencies are far apart.
A small value means they agree closely, which supports the model rather than casting doubt on it, so there is no lower tail to test.
How do you find the degrees of freedom for a goodness of fit test?
Take the number of classes after any combining and subtract 1, then subtract a further 1 for each parameter estimated from the observed data.
The subtraction counts the constraints: one always comes from making the expected total match the observed total, and one more from each estimate.
You have calculated and found the critical value. How do you reach a decision?
If is greater than the critical value there is sufficient evidence to reject
, so the model is not a good fit for the data.
If it is smaller there is insufficient evidence to reject , so the model is a suitable one.
What does the -value of a chi-squared test represent?
The -value is the probability of obtaining a chi-squared value of
or more, assuming the model is correct.
If the result is critical and
is rejected, which is the same decision the critical value gives.
How do you find the expected frequencies for a discrete uniform goodness of fit test?
Divide the total frequency by the number of possible outcomes
, giving every class the same expected frequency.
Each outcome is equally likely under the model, so no individual probabilities have to be worked out at all.
For observations of
with frequencies
, complete the estimate for
:
The completed estimate is:
The numerator is the total number of successes and the denominator is the total number of trials, since each of the observations consists of
trials.
How do you estimate for a Poisson goodness of fit test?
The estimate is simply the sample mean, .
That is easier than the binomial and geometric cases because is itself the mean of the distribution.
For observations of
with frequencies
, complete the estimate for
:
The completed estimate is:
Each of the observations ends in exactly one success, so
is the total number of successes, while
is the total number of trials.
A Poisson or geometric model has no largest value, but a table of observations does. How are the end classes handled?
Put all the remaining probability into them: the top class takes for the largest observed value
, and the bottom class takes
for the smallest value
.
Without that the expected frequencies would not total , and the test would be comparing two incomplete distributions.
True or False?
A chi-squared test on a discrete uniform model can lose a degree of freedom to an estimated parameter.
False.
A discrete uniform distribution has no parameter to estimate, because every outcome is equally likely and the expected frequencies follow from the number of classes alone.
Its degrees of freedom are therefore always , unlike the binomial, Poisson and geometric cases where a parameter may have to be estimated.
When a question gives you the value of , what extra detail should the hypotheses carry?
State the precise distribution, such as , rather than only naming the family it belongs to.
Where no value is given the hypotheses name the family alone, because the parameter is about to be estimated from the data.
A chi-squared test on a Poisson model rejects . What do you conclude?
That a Poisson distribution is not a suitable model for the variable, stated in the context of the question.
Rejecting says the observed frequencies differ from the model's predictions by more than chance alone would explain.
Define a contingency table.
A contingency table is a two-way table showing the observed frequencies for every combination of two variables.
An contingency table has
rows and
columns, not counting any row or column used to record totals.
What does a chi-squared test on a contingency table actually test?
The test asks whether the two variables are independent of each other, for example whether favourite music genre is independent of the listener's age group.
It is a goodness of fit test in which the model being tested is the assumption of independence itself.
Complete the expected frequency for one cell of a contingency table, assuming the two variables are independent:
The completed formula is:
It follows straight from independence, since the proportion falling in a row multiplied by the proportion falling in a column gives the proportion expected in that cell.
For an contingency table, complete the degrees of freedom:
The completed formula is:
Once all but one entry in each row and each column is known the totals force the rest, so that is the minimum number of expected values you actually have to work out.
An expected frequency in a contingency table is below 5. What do you do, and how do you choose?
Combine that row or column with an adjacent one in the table of observed values, then recalculate the expected frequencies for the new table.
Choose whichever combination makes sense in context: merging two age groups is reasonable where merging two music genres would not be.
A contingency table test rejects . What does that mean?
The two variables are not independent, so there is an association between them, and that should be stated in the context of the question.
Failing to reject instead means the data is consistent with the two variables being independent.
By signing up you agree to our Terms and Privacy Policy