# Perform a chi-square goodness-of-fit test manually

The following example will walk you though the process of performing a chi-square goodness-of-fit test manually.

Suppose you took a sample of 200 units from a large population, and each response was classified as one of 4 categories; 54 were classified as category "A", 30 were classified as category "B", 38 as "C", and 78 as "D". You want to test if pA = pB = pC = pD = 1/4, where pA is the population proportion in category "A", pB is the population proportion in category "B", and so forth.

1. Open a new Minitab worksheet.
2. Name an empty column Observed and enter the following values in the column: 54 30 38 78.
3. Name a second empty column Expected that will contain the expected values. Because there are 200 units, if the null hypothesis were true (that is, if there were no difference between the proportions of each category), you would expect 50 units, on average, in each category (that is, 50 classified as "A", 50 as "B", 50 as "C", and 50 as "D").
###### Note

A chi-square test compares the observed counts to what you would expect to see if the null hypothesis were true in order to determine whether the differences between the observed and expected counts are "too large" to occur by chance.

4. Type the following values in the column Expected: 50 50 50 50.
5. Choose Calc > Calculator.
6. In Store result in variable, type Chisquare. This puts the results in the next available blank column with the name Chisquare.
7. In Expression, type SUM((Observed - Expected)**2 / Expected). Click OK.