The following example will show you how to perform a chi-square goodness-of-fit test manually.

Suppose you take a sample of 200 units and classify each response as one of 4 categories: 54 as category "A", 30 as category "B", 38 as category "C", and 78 as category "D". You want to test whether pA = pB = pC = pD = 0.25, where pA is the population proportion in category "A", pB is the population proportion in category "B", and so on.

- Open a new Minitab project.
- Name an empty column Observed and enter the following values in the column:
`54 30 38 78`. - Name a second empty column Expected to 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 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.

- Type the following values in the Expected column:
`50 50 50 50`. - Open the Formula dialog box.
- Mac:
- PC:

- In Expression, type
`SUM((Observed - Expected)**2 / Expected)`. Click OK. - In Name for result, type
`Chisquare`. This step puts the results in the next available blank column with the name Chisquare. - Open the Cumulative Distribution Function (CDF) dialog box.
- Mac:
- PC:

- In Form of input, select A column of values.
- In Values in, enter
`Chisquare`. - In Distribution, select Chi-Square.
- In Degrees of freedom, type
`3`.The degrees of freedom is the number of categories minus one. - In Output, select Store cumulative probabilities in a column. Click OK. For this example, the cumulative probability is 0.99999.
- Open the Formula dialog box.
- Mac:
- PC:

- In Store result in variable, type
`Pvalue`. This step puts the result in the next available blank column with the name Pvalue. - In Expression, type
`1 - Chi-Square CDF for Chisquare`. Click OK.For this example, the p-value is 0.0000062. Therefore, you can reject the null hypothesis and conclude that at least one proportion does not equal 0.25.