Running statistical tests online

In Chapter 2, we explain why “statistical tests” such as the chi-squared test can be useful. If you use R (or other statistical software), it will routinely run such tests. It is very cumbersome (impossible for some tests) to run them in a spreadsheet editor. Fortunately, you can still use these tests without installing or learning how to use statistical software: there are dedicated websites that run the test (in fact, run the statistical software) for you.

Of course, you should not use these sites without understanding what the tests do. We give an intuitive presentation in our Chapter 2; it might be sufficient to allow you to use a chi-squared or Fisher test so as to assess the significance of differences in contingency tables. We strongly advocate for a more widespread use of these tests in the humanities: as long as contingency tables are published (and we think that those tables are the most robust, useful way to explore data), the tests might avoid overinterpretation. If you want a longer, and more visual, explanation of the logics behind the chi-squared text, here is a good one (you can skip the few formulas – and you can find many other similar explanations online.

(in the future, we will add pointers to further readings/tutorials on other tests)

Now, how do you run a statistical test online? We liked the presentation of tests on Social Science Statistics (but there are many other similar websites, also in languages other than English). You can first use their “wizard” to determine which test you need. If you click on “click for an explanation” whenever you need to, everything should be quite clear. Then, you can run a chi-squared test here. All steps are presented quite clearly.

On this website, you cannot have a table larger than 5 rows and 5 columns; but it is never a good idea anyway to run a test on such a large table. The risk is to lose a significant correlation between one category and another in an ocean of non-correlations between the other categories. You should always first have a good look at your original table, in row or column percentages; if the table is large and you suspect that you have found correlations, but only between specific categories, you should create a simpler table for this purpose, then run your test on it. For example, we have supervised students who worked on the French Parliament in 1946. At that time, many parties were represented in Parliament. The students wondered if some occupations were over-represented in some parties and came up with a coding scheme including six categories of occupations. Most occupations were evenly spread between most parties (which was in itself an interesting result), but workers seemed clearly clustered in the Communist Party (not surprisingly, of course). To assess this type of correlation, you don’t want to run a test on a table describing 5 parties and 6 occupations. You create a 2×2 table: worker or other occupation, Communist or other party, then you run your test.

This strategy solves another problem that occurs regularly with historical data: the chi-squared test does not work on very small samples, when some “expected frequencies” are less than 5. (and the website above, for no good reason, refuses to run the chi-squared test when one observed frequency is 0) In this case, you have to use Fisher’s “exact test.” The results are interpreted in the same way, but the test only works on 2×2 tables.

Author: Claire Lemercier

CNRS research professor of history in Paris / Directrice de recherche au CNRS en histoire, au Centre de sociologie des organisations

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.