




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





When to use a Chi-Square test: Usually in psychological research, we aim to obtain one or more scores from each subject. However, sometimes data consist merely of the frequencies with which certain categories of event occurred. Instead of each subject providing a score, subjects contribute to a "head count": they fall into one category or another. In these circumstances, where one has categorical data, one of the family of Chi-Squared tests is the appropriate test to use. To make this clear, let's consider a concrete example. Imagine that you were interested in the type of transport used by people to arrive at the university. Do people prefer some forms of transport rather than others? One way to tackle this question might be to provide people with a set of alternatives (car, bus, motorcycle, bicycle, etc) and ask them which method of transport they habitually used. Out of 100 people, you might end up with 60 who said they used their car, 20 who said they came by bus, 10 who came by motorcycle and 10 who came by bicycle. Each person asked would therefore fall into one of these categories. We would now have a set of observed frequencies of certain things happening. We might now ask: are these observed frequencies similar to what we might expect to find by chance, or is there some non-random pattern to them? In the example above, do people show no particular preference for one form of transport over another, or are some forms of transport preferred and others disliked? In this particular case, it's pretty clear-cut: just looking at the frequencies would enable us to claim that most people come by car and that other forms of transport are relatively unpopular. But what if the frequencies had been 30, 22, 23, 25? Given these obtained frequencies, we might not be as confident that cars were the most popular form of transport. The Chi-Square test helps us to decide whether or not our observed frequencies are due to chance, by comparing our observed frequencies to the frequencies that we might expect to obtain purely by chance. Chi-Square is a very versatile statistic that crops up in lots of different circumstances. We will concentrate on two applications of it.
(a) Chi-Square "Goodness of Fit" test: This is used when you want to compare an observed frequency-distribution to a theoretical frequency-distribution. The most common situation is where your data consist of the observed frequencies for a number of mutually-exclusive categories, and you want to know if they all occur equally frequently (so that our theoretical frequency-distribution contains categories that all have the same number of individuals in them). Our example above would be appropriate for this test: we have one independent variable ("type of transport habitually used"), and a number of different levels of it (car, bus, bike, etc). We wanted to know if some forms of transport were preferred over others, or whether there were no preferences. In this context, "no preferences" means "all categories occurred with equal frequencies". Another example might involve applications to study psychology at Sussex: we might want to see if certain schools of study are more popular with applicants than others. The independent variable might be "school of study", and the levels of this variable would be the different schools - SOC, BIOLS, COGS, AFRAS and CCS. Our data would consist of the number of applicants to each school. Again, we would be comparing these observed frequencies to those that would occur if all schools were equally popular. A third example: we might be interested in the relationship between age of driver and likelihood of being involved in an accident. We could obtain the records of 1000 accidents, and see how many of the drivers involved fell into each of the following age-categories: 21-30, 31-40, 41-50, 51-60, 61-70, and 71-80. If there is no relationship between accident-rate and age, then there should be similar numbers of drivers in each category (all categories should occur with equal frequency). If on the other hand, younger drivers are more likely to have accidents, then there would be a large number of accidents in the younger age-categories and a low number of accidents in the older age-categories.
Chi-Square Goodness of Fit test - a worked example:
We select a random sample of 100 UCAS psychology applicants to Sussex, and find that they are distributed across five Schools of Study in the following way (fictional data, I hasten to add!)
School of Study:
CCS SOC AFRAS COGS BIOLS total Observed frequency: 40 35 5 10 10 100
Are all Schools equally popular, as far as psychology applications are concerned? Or do some Schools attract more applications than others? Looking at the observed frequencies, it appears that CCS and SOC are much more popular than the other Schools. We can perform a Chi-Square test on these data to find out if this is true, i.e. to see the pattern of applications deviates significantly from what we might expect to obtain if all schools were equally popular with applicants.
Our statistical hypothesis: As with most statistical tests, we are faced with two possibilities. One is that there is no difference between the Schools in terms of application rate; any differences between our observed frequencies and those which we would expect to obtain, are just minor discrepancies which are due to chance. The alternative possibility is that there is a real difference between Schools in the application rates; the observed discrepancies are so large that they are unlikely to have arisen merely by chance - it is more likely that they reflect some "real" phenomenon, in this case the fact that some Schools are truly preferred over others. We start off by assuming that the former possibility is true: this is the so-called "null hypothesis", that any discrepancies between our observed frequencies and those frequencies which we would expect to get, are due merely to chance. Only if the evidence is strong enough, will we reject the null hypothesis in favour of the alternative hypothesis - that our data really are different from the expected pattern of frequencies. What we mean by "evidence" in the context of the Chi-Square test, is that the discrepancies between the observed and expected frequencies are so large that they cannot be "explained away" as having occurred merely due to random variation.
Here is the Chi-Square formula:
Step 1: calculate the "expected frequencies" (the frequencies which we would expect to obtain if there were no School preferences).
total number of instances Expected frequency = ----------------------------------------- number of categories
We have 100 applications and 5 categories, so the Expected Frequency for each category is 20 (i.e., 100/5):
CCS SOC AFRAS COGS BIOLS total: Observed frequency: 40 35 5 10 10 100
Expected frequency: 20 20 20 20 20 100
probability level: d.f. 0.05 0.01 0. 1 3.84 6.63 10. 2 5.99 9.21 13. 3 7.81 11.34 16. 4 9.49 13.28 18. 5 11.07 etc. etc. 6 12. 7
(d) The values in each column are "critical" values of Chi-Square. These values would be expected to occur by chance with the probabiity shown at the top of the column. We are interested in the values in the 4 d.f. row, since our obtained Chi-Square has 4 d.f..(If we had a different number of d.f., we would use a different row of the table: so, with 5 d.f., you use the 5 d.f. row, 10 d.f. you use the 10 d.f. row, and so on)). With 4 d.f., obtained values of Chi-Square as large as 9.49 will occur by chance with a probability of 0.05: in other words, you would expect to get a Chi-Square value of 9.49 or more, only 5 times in a hundred Chi-Squared tests. Thus, values of Chi-Square that are this large do occur by chance, but not very often. Looking along the same row, we find that Chi-Square values of 13.28 are even more uncommon: they occur by chance once in a hundred times (0.01). Values of Chi-Square as large as 18.46 are extremely unlikely to crop up by chance: the probability of them doing so is less than once in a thousand Chi-Square tests. (e) We compare our obtained Chi-Square to these tablulated values. If our obtained Chi- Square is larger than a value in the table, it implies that our obtained value is even less likely to occur by chance than is the value in the table. Our obtained value of 52.5 is much bigger than the critical value of 18.46; and so we can conclude that the chances of our obtained Chi-Squared value having occurred by chance are less than one in a thousand (written formally, "p<0.001"). We can therefore be relatively confident in concluding that our observed frequencies are significantly different from the frequencies that we would expect to obtain if all categories were equally popular. In other words, not all Schools are equally popular with UCAS applicants.
(2) Why we do it - the Sampling Distribution of Chi-Square: In essence, our obtained Chi-Square value represents the sum of the discrepancies between the obtained and expected frequencies. In interpreting it, our problem is that our data come from a random sample which has been taken from a population. Random variation in our sample means that our observed pattern of category frequencies may or may not be a good reflection of what's going on in the parent population. In the present example, we have a sample of 100 UCAS applicants, and the pattern within that sample may or may not be a good reflection of the pattern of preferences within the whole population of UCAS applicants to Sussex. In short, there is a "true" state of affairs within the population. We are trying to work out on the basis of our sample, what that state of affairs is - but our sample is all we actually have to work with. Suppose for the moment that the expected frequencies are the true ones within the population
The following graph shows what values of Chi-Square you get, when you take repeated random samples from a population in which the expected frequencies are true (i.e., when in fact there is no preference at all in the parent population for some categories rather than others).
high
relative frequency of obtaining a particular value of Ļ^2 :
low 0 4 6 10 20
Ļ^2
The first thing to note is that the sampling distribution of Chi-Square looks rather different depending on the number of degrees of freedom. When we have 4 d.f., we are most likely to get a value of Chi-Square that is close to 4; sometimes Chi-Square will be much larger than 4 and sometimes it will be much smaller. The larger (or smaller) the value of Chi-Square, the less likely it is to occur. When we have 10 d.f., we are most likely to get a value of Chi-Square that is about 10; again, smaller and larger values are progressively less likely to be obtained. These distributions reflect the fact that very small and very large discrepancies between the observed and expected frequencies are unlikely to occur by chance. Note that, with small d.f., the Chi-Square distribution becomes progressively more asymmetrical, or "skewed": for example, with 4 d.f., large values of Chi-Square are much easier to obtain than very small values. The graph shows that in assessing the size of our obtained Chi-Square, we need to take account of how many d.f. we have. The graph also shows that, for a given value of d.f., large Chi- Square values are unlikely to arise by chance - although the possibility always remain that they can do so! In other words, if we get a large value of Chi-Square, there are two possibilities: (a) it reflects the true state of affairs in the parent population: hence there is a difference between the categories in terms of how many instances occur in each, and our theoretical frequency distribution is not a good description of the population; (b) the observed discrepancies between the observed and expected frequencies in our sample are just due to sampling variation; we have no reason to suspect that the theoretical frequency distribution is not a good description of the population. It seems more likely that our sample poorly reflects the characteristics of the population from which it was taken. We can never entirely be sure which of these two possibilities is true. However, the larger the value of Chi-Square, the more likely (a) becomes and the less likely (b) becomes. Very large Chi- Square values (and hence large discrepancies between obsrved and expected frequencies) are highly unlikely to have arisen by chance, although the possibility always remains that they have done so and are merely freak results. This fits in with our intuitions: the more marked the discrepancy betwen the frequencies which we actually obtain (from our sample), and the frequencies we expected to obtain (based on our ideas of what the parent population is like), then the more confident we would be in concluding that the discrepancy was not simply due to chance. If the discrepancies were small, we could dismiss them as being due to random variation, and maintain a belief that the charactristics of the populationn were being imperfectly reflected in our particular sample ; but there comes a point at which the discrepancies are so great that we cannot explain them away in this manner. Instead we have to accept that our sample does reflect the characteristics of the parent population; it's just that the population has different characteristics (a diffrent frequency distibruiotn) to those we originally thought it had.
applying to BIOLS) divided by the grand total (100). (30 (^) * 23)/100 = 6.9. And so on for the rest of the table. Note that the expected frequencies should add up to the same total as the observed frequencies (100 in this case), give or take a small rounding error; if they do not, you have made a mistake in the arithmetic somewhere.
Step 2: subtract, from each observed frequency, its associated expected frequency (i.e., work out (O-E) ):
Step 3: square each value of (O-E):
(NB: It's just a coincidence that for this particular example, the (O-E) 2 values are identical for the Arts and Science students; there's no reason why they should be).
Step 4: divide each of the values obtained in step 3, by its associated expected frequency:
(( (( ))))
2
(((( ))))
E
O E
2 āāāā 1.44/4.8^ 4.84/4.2^ 0.64/1.8^ 171.61/6.9^ 127.69/12.
Step 5: add together all of the values obtained in step 4, to get your value of Chi-Square:
Ļ^2 = 0.123 + 0.494 + 0.152 + 10.659 + 4.449 + 0.300 + 1.152 + 0.356 + 24.871 + 10.
Ļ^2 = 52. This is our obtained value of Chi-Square; it is a single-number summary of the discrepancy between our obtained frequencies, and the frequencies which we would expect if there was no association between our two variables.The bigger our obtained Chi-Square, the greater the difference between the observed and expected frequencies.
Interpreting Chi-Square: To assess whether this value represents a "real" departure of our obtained frequencies from the expected frequencies, we compare our obtained Chi-Square value to the appropriate "critical" value of Chi-Square obtained from the same table as we used before. To do this, we need to know how many degrees of freedom we have. The d.f. are given by the following formula:
d.f. = (number of rows - 1) (^) * (number of columns - 1)
In the present example, we have two rows and five columns, so we have (2-1) (^) * (5-1) = 4 d.f.
If our obtained Chi-Square is larger than a value in the table, it implies that our obtained value is even less likely to occur by chance than is the value in the table. Our obtained value of 52.94 is much bigger than the critical value of 18.46; and so we can conclude that the chances of our obtained Chi-Squared value having occurred by chance are less than one in a thousand (written formally, "p<0.001"). We can therefore be relatively confident in concluding that our observed frequencies are significantly different from the frequencies that we would expect to obtain if there were no association between the two variables. In other words, the pattern of applications to various Schools is different for Arts and Science students. Note that the Chi-Square test merely tells you that there is some relationship between the two variables in question: it does not tell you what that relationship is, and most importantly, it does not tell you anyhting about the causal relationship between the two variables. In the present example, it would be tempting to interpret the results as showing that possession of an Arts or Science background causes people to apply to different Schools of Study. However, the direction of causality could equally well go the other way: possibly students begin by choosing a preferred School of Study, and then pick A-levels which will be most apporopriate for that School. Chi-Square merely tells you that the two variables are associated in some way: precisely what that association is, and what it means, is for you to decide - the test does not do it for you. Another problem in interpreting Chi-Square is that the test tells you only that the observed frequencies are different from the expected frequencies in some way: the test does not tell you where this difference comes from. Sometimes, it might be that all of the observed frequencies are significantly discrepant from the expected frequencies, whereas on other occasions it might be that the significant Chi-Square value has arisen because of one particular marked discrepancy between the observed and expected frequencies. Usually, you can get some idea of why the Chi-Square was significant by looking at the size of the discrepancies between the observed and expected frequencies. In the present example, the discrepancies between observed and expected frequencies are relatively minor for Arts and Science students applying to COGS, SOC and AFRAS; about as many students apply to these Schools as you would expect if there were no differences between Arts and Science students in application-preference. The major discrepancies occur for CCS and BIOLS: inspection of the O-E discrepancies suggests that Arts students apply to CCS much more often than one would expect, and apply to BIOLS much less often than one would expect.For example, one would expect 16 applications to BIOLS by the Arts students, but in practice there wre only three. The Science students show the opposite pattern with their CCS and BIOLS preferences. In many cases, however, Chi- Square contingency tables are not so easy to interpret!
Assumptions of the Chi-Square test: For a Chi-Square test to be used, the following assumptions must hold true: