 Go to procedure

# Fisher 2 by 5

### Input.

Fill the values in the table. Are considered to be integer values, whole positive numbers without decimals. You are free to input a smaller table.

A faster windows version of this procedure is available here.

### Explanation.

This table program is a generalization of the Fisher exact test and it calculates an exact probability value for the relationship between two variables, as found in a two by five crosstable. The procedure will handle smaller tables too. The program calculates the difference between the data observed and the data expected, considering the given marginals and the assumptions of the model of independence. It works exactly the same as the Chi-square test for independence, however, the Chi-square gives only an estimate of the true probability value, an estimate which might not be very good in the case of the marginals being very uneven or with a small value (less than five) in one of the cells. In that case the Fisher is a good alternative for the Chi-square. However, with a large number of cases the Chi-square is preferred as the Fisher is difficult to calculate.

The situation in a table like this is really complicated and two reliable statistics are offered. The point probability, the probability of this unique single table, and the two-sided probability. For the two-sided probability all possible tables given the marginals are evaluated and the p-values of the more extreme tables are summed. The Pearson Chi square and the likelihood ratio Chi square is also presented. Actually, what the program shows is that the Chi-square is rather robust, even in extreme cases. See the Fisher helpfile for further comments. Tables of which the number of cases is larger than 300 in a 2*3 table, 150 in a 2*4 and 75 in a 2*5 table, are not advised.

### Technical Explanation.

The algorithm works with four loops, one for each degree of freedom. Three loops are 'dumb' and one, the last, loop is 'smart'. The algorithm can be extended to handle any size 2*n contingency table, contact SISA if you require that. Precision is a problem with JavaScript and this procedure is particularly vulnerable. Speed can also be a problem. For each additional row speed will decrease with an additional factor determined by the size of the additional margin. Tables of which the number of cases is larger than 300 in a 2*3 table, 150 in a 2*4 and 75 in a 2*5 table, are not advised. 