Chi-Square Goodness-of-Fit Test
The chi-square goodness-of-fit-test is used to test whether the observed proportions for a categorical variable differ from hypothesized proportions. It is based on the principle, that two variables are not related. For example, let's suppose that students of some university have a choice of four elective foreign languages to study. The faculty predicts that Spanish, German, French and Chinese would have equal popularity of 25% each. After running this test, a p value will justify whether to reject the predicted null hypothesis. A chi-square goodness-of-fit test will evaluate whether the observed results differ from these hypothesized proportion.
In comparison to the chi-square test, the independent t-test compares the means of a normally distributed interval dependent variable for two independent groups. For example, the independent t-test can be used, when we want to find out the differences in test grades of male and female students in a class. An example of a null hypothesis for this test would be: grades of two unrelated groups are equal. The result of t-value calculations will give an answer whether gender influences on the performance of students in a class.
In order to know what approach to use, we, first of all need to know our objective of the research and what variables are given. Chi-square tests usually deals with categorical values and t-test with interval and normal. A categorical variable has two or more categories, such as gender (male and female), languages (Spanish, German, French, Chinese) etcetera. Categorical variables usually cannot be put in order, meaning there is order between female and male, they are equal. The independence t-test would usually be applied when there are intervals given, for examples grades or an annual income. A choice of statistical test depends on what pattern of data is collected to analyze.
Chi-Square Test of Independence
The chi-square test of independence analyzes whether two independent variables are related and whether there is significant association between them. It is used when there are two categorical variables from a single population are given. In some ways, it is similar with the independent t-test, but uses different approach and calculations. Another conditions, that should be met for this test are frequency for each table is at least 5, each population is at least 10 times higher than the sample and the sampling method is random. For example, if we need to find out whether there is relation between certain preferences of people and their location, a chi-square test of independence would solve it.
The major difference is that a test of goodness-of-fit compares frequencies of one nominal variable to theoretical expectation and a test of independence compares frequencies of one nominal variable for different values of a second nominal variable. Null hypothesis for the test of independence is “variables A and B are independent” and for the goodness-of-fit us “observed and expected variables are significantly different”. Arithmetical basics of those chi-square tests are the same, however the calculations differ. Another distinction is in the purpose of running the test. The goodness-of-fit is primarily used to evaluate whether theoretical and observed values are the same, while test of independence proves assumption regarding association between two or more variables.
When presented with non-parametric data the main factor is the purpose of a test. Both of these tests are distribution free, so it doesn’t matter what kind of data is presented as long as cell frequency is met. However, usually the results of the goodness-of-fit test would not be interesting if the data is non-parametric.
References
What statistical analysis should I use?,
AP Statistics Tutorial: Chi-Square Goodness-of-Fit Test < http://stattrek.com/ap-statistics-4/goodness-of-fit.aspx>
AP Statistics Tutorial: Chi-Square Test for Independence < http://stattrek.com/ap-statistics-4/independence.aspx>