Chi-square for fit

 

The chi-square test is one of many “nonparametric” statistical tests.  This means that it is not designed to estimate “parameters” or the characteristics of populations.  Instead it is used to tell you something about the sample a researcher has taken.

 

The Chi-square test is a simple and useful statistic that relates the frequency of counts to a theory.  For example, if a fair coin is thrown, the theory says that it should come up on each side half of the time.  So if a coin was thrown 100 times, we would “expect” it to come up 50 times on one side and 50 times on the second side.  Doing this, we may “observe” that it actually came up 45 times on side A and 55 times on side B.  Is the coin still fair?  The Chi-square is designed to answer that type of question.

 

The Chi-square test has the following formula:

 

 

 

where o is the observed count and e is the expected count.  The sum sign indicates that this equation has to be done for all possible outcomes and then added.  In the coin example above,

 

chi-sq  = (45 – 50)2/50  + (55 – 50)2/50   or  ½ + ½ = 1.0

 

 Every Chi-square has “degrees of freedom.”  That is the number of possible outcomes you would have to know before you knew all other outcomes.  With the coin, if I know how many times side A came up, I also know how many times side B came up out of 100 throws, so the degrees of freedom (df) is equal to one.

 

With every value of Chi-square and with any value of df, there is a certain probability that the coin is fair.  In this case it is about 30%.  The computer will print this value for you under a column or row called “sig.” which stands for “significance.”

 

If sig. is larger than .95, the fit between theory and observation is considered to be almost perfect.  If sig. is .05 or lower, then the fit is said to be “significantly” outside of the theory.  Consequently for the coin above, we do not have significant evidence that it is not a fair coin, therefore it is accepted as a fair coin.  

 

 

 

 

Assignment:

 

1. Ask 24 people the following question:

 

6. “The last time you traveled out of the state of Iowa, was your destination   ___________ from Iowa?

 

a) west    b) north   c) east    d) south

 

 

Assume that they will pick each answer equally often.  Use you data and calculate the Chi-square by hand.  Record your work and your answer on your assignment sheet.

 

Record the data on an SPSS spreadsheet.  Call west 1, north 2, east  3, and south 4.

Go to the bottom left hand corner of the spreadsheet, find a tab that says “variable view,” click that tab.  Name your variable “direct.” Go left until you find a column called “values.”  Click the space, and then click the key that comes up.  Input the value labels in the value box.

 

Do the following:

 

Analyze

            Nonparametric

                        Chi-square

 

Run the statistic, paste both frequencies and test statistics into assignment sheet.

 

Explain your answer.  Do people pick the directions to travel at random.  Yes or No, and Why?