= How do I compare a list of observed frequencies with a list of my own expected frequencies? = This can be done in three ways: This [[attachment:choe.xls|spreadsheet]] will perform a Pearson's chi-square test. Make sure you have no ''zero'' expected frequencies! If you have a total sample size which is less than 20 you can use this [[attachment:chi+exact.xls|spreadsheet]] to obtain an exact p-value (using [[FAQ/mcrationale| Monte-Carlo]] simulations). A chi-square calculator may also be found [[http://www.graphpad.com/quickcalcs/chisquared1.cfm|here.]] __Note__ : There have been instances where this software incorrectly claims the total of the observed and expected frequencies are not equal when, in fact, they are. Alternatively this may be performed in SPSS. The observed frequencies need to be entered in the spreadsheet using two columns: the first column specifying the category and the second the observed frequency. Input the observed frequency into the ''weight cases'' box using ''Data:weight cases'' . We are now ready to use the chi-square procedure located under ''nonparametric tests>chi-square.'' The columns containing the observed ''categories'' is entered in the ''test variables'' window. The expected frequencies may be entered in the menu window by clicking ''values'' under ''expected frequencies'' and entering the list of expected frequencies in the window. __Note__ : SPSS cannot handle zero observed frequencies for a category even when the analogous expected frequency is non-zero. For the chi-square analysis to be valid it is suggested you need ''a total'' sample size of at least 20.