Changes

Jump to navigation Jump to search
378 bytes added ,  11:22, 31 March 2012
no edit summary
Line 33: Line 33:  
| '''Total''' || n<sub>1</sub> || n<sub>2</sub> || n<sub>3</sub> || n
 
| '''Total''' || n<sub>1</sub> || n<sub>2</sub> || n<sub>3</sub> || n
 
|}
 
|}
In either case, the chi-square test is based upon the comparison of the '''observed''' results, with those results which would be '''expected''' if there was no association between the exposure and outcome of interest. For each individual cell, this 'expected' value is calculated, is subtracted from the observed value and the answer is squared. This is then divided by the expected value and the process is repeated for all other cells. These results are then summed to give a '''test statistic''', which can be interpreted using a table of the chi-squared distribution (or by using a computer program) in order to give a p-value. The number of cells involved in the calculation of the test statistic will have an impact upon its magnitude, and this is accounted for in the calculation in the form of 'degrees of freedom' (which can be a difficult concept to understand, but relate in this context to the number of cells which are free to take any value, given that the test statistic is known). The number of degrees of freedom can be calculated by subtracting 1 from the number of rows, subtracting 1 from the number of columns, and multiplying these together - meaning that a 2x2 table has one degree of freedom.
+
In either case, the chi-square test is based upon the comparison of the '''observed''' results, with those results which would be '''expected''' if there was no association between the exposure and outcome of interest. For each individual cell, this 'expected' value is calculated, is subtracted from the observed value and the answer is squared. This is then divided by the expected value and the process is repeated for all other cells. These results are then summed to give a '''test statistic''', which can be interpreted using a table of the chi-squared distribution (or by using a computer program) in order to give a p-value. The number of cells involved in the calculation of the test statistic will have an impact upon its magnitude, and this is accounted for in the calculation in the form of 'degrees of freedom' (which can be a difficult concept to understand, but relate in this context to the number of cells which are free to take any value, given that the test statistic is known). The number of degrees of freedom can be calculated by subtracting 1 from the number of rows, subtracting 1 from the number of columns, and multiplying these together - meaning that a 2x2 table has one degree of freedom.<br>
 +
 
 +
The main assumptions of a chi-square test are:
 +
* the data are derived from a simple random sample
 +
* observations are independent of each other (i.e. there are no repeated measures etc...)
 +
* at least 80% of all cells (i.e. all cells in a 2x2 table, or eight cells in a 2x5 table) have '''expected values''' of greater than 5, with no cells having an expected value of zero.
    
===Fisher's exact test===
 
===Fisher's exact test===
700

edits

Navigation menu