Difference between revisions of "Hypothesis tests"
Line 8: | Line 8: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
− | | Disease status || Exposed || Unexposed || Total | + | | '''Disease status''' || '''Exposed''' || '''Unexposed''' || '''Total''' |
|- | |- | ||
− | | Diseased || a<sub>1</sub> || a<sub>0</sub> || m<sub>1</sub> | + | | '''Diseased''' || a<sub>1</sub> || a<sub>0</sub> || m<sub>1</sub> |
|- | |- | ||
− | | Non-diseased || b<sub>1</sub> || b<sub>0</sub> || m<sub>0</sub> | + | | '''Non-diseased''' || b<sub>1</sub> || b<sub>0</sub> || m<sub>0</sub> |
|- | |- | ||
− | | Total || n<sub>1</sub> || n<sub>0</sub> || n | + | | '''Total''' || n<sub>1</sub> || n<sub>0</sub> || n |
|} | |} | ||
A chi-square test could also be used to investigate whether the body condition score of a horse was associated its lameness score, for example: | A chi-square test could also be used to investigate whether the body condition score of a horse was associated its lameness score, for example: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
− | | Lameness score || Body condition score 1-3 || Body condition score 4-6 || Body condition score 7-9 || Total | + | | '''Lameness score''' || '''Body condition score 1-3''' || '''Body condition score 4-6''' || '''Body condition score 7-9''' || '''Total''' |
|- | |- | ||
− | | 0 || a<sub>1</sub> || a<sub>2</sub> || a<sub>3</sub> || m<sub>a</sub> | + | | '''0''' || a<sub>1</sub> || a<sub>2</sub> || a<sub>3</sub> || m<sub>a</sub> |
|- | |- | ||
− | | 1 || b<sub>1</sub> || b<sub>2</sub> || b<sub>3</sub> || m<sub>b</sub> | + | | '''1''' || b<sub>1</sub> || b<sub>2</sub> || b<sub>3</sub> || m<sub>b</sub> |
|- | |- | ||
− | | 2 || c<sub>1</sub> || c<sub>2</sub> || c<sub>3</sub> || m<sub>c</sub> | + | | '''2''' || c<sub>1</sub> || c<sub>2</sub> || c<sub>3</sub> || m<sub>c</sub> |
|- | |- | ||
− | | 3 || d<sub>1</sub> || d<sub>2</sub> || d<sub>3</sub> || m<sub>d</sub> | + | | '''3''' || d<sub>1</sub> || d<sub>2</sub> || d<sub>3</sub> || m<sub>d</sub> |
|- | |- | ||
− | | 4 || e<sub>1</sub> || e<sub>2</sub> || e<sub>3</sub> || m<sub>e</sub> | + | | '''4''' || e<sub>1</sub> || e<sub>2</sub> || e<sub>3</sub> || m<sub>e</sub> |
|- | |- | ||
− | | 5 || f<sub>1</sub> || f<sub>2</sub> || f<sub>3</sub> || m<sub>f</sub> | + | | '''5''' || f<sub>1</sub> || f<sub>2</sub> || f<sub>3</sub> || m<sub>f</sub> |
|- | |- | ||
− | | 6 || g<sub>1</sub> || g<sub>2</sub> || g<sub>3</sub> || m<sub>g</sub> | + | | '''6''' || g<sub>1</sub> || g<sub>2</sub> || g<sub>3</sub> || m<sub>g</sub> |
|- | |- | ||
− | | Total | n<sub>1</sub> || n<sub>2</sub> || n<sub>3</sub> || | + | | '''Total''' | n<sub>1</sub> || n<sub>2</sub> || n<sub>3</sub> || n |
|} | |} | ||
Revision as of 09:25, 24 May 2011
This page is intended as an introduction to some commonly used basic hypothesis tests. Before using any of these, it is important that the concepts behind hypothesis testing are understood. These concepts are explained on this page.
Hypothesis tests are very commonly used in epidemiological investigations, and a wide number of tests are available. These can be classified into groups according to the data types in question, according to whether a specific underlying distribution is assumed when performing the test (in which case, the test is known as a parametric test), and according to whether or not the data are matched or independent (i.e. whether comparisons are being made at the individual level or the group level). As described earlier, qualitative data are not numerical in nature, and include categorical and ordinal data (such as the breed of dog, or the body condition score of a cow). Quantitative data are numerical, and include variables such as weight, age and height.
Comparing a qualitative variable between different groups
Chi-square test
The chi-square test is one of the most commonly used hypothesis tests, and allows the comparison of any qualitative exposure with any qualitative outcome (given that certain assumptions are met). As a simple example, it may be used to investigate the effect of previous exposure to substance x on disease experience amongst a group of animals - as shown in the table below:
Disease status | Exposed | Unexposed | Total |
Diseased | a1 | a0 | m1 |
Non-diseased | b1 | b0 | m0 |
Total | n1 | n0 | n |
A chi-square test could also be used to investigate whether the body condition score of a horse was associated its lameness score, for example:
Lameness score | Body condition score 1-3 | Body condition score 4-6 | Body condition score 7-9 | Total |
0 | a1 | a2 | a3 | ma |
1 | b1 | b2 | b3 | mb |
2 | c1 | c2 | c3 | mc |
3 | d1 | d2 | d3 | md |
4 | e1 | e2 | e3 | me |
5 | f1 | f2 | f3 | mf |
6 | g1 | g2 | g3 | mg |
n1 | n2 | n3 | n |