basic statistics question:(adsbygoogle = window.adsbygoogle || []).push({});

i have two variables, M1 and M2. i want to calculate how similar these two variables are using the odds ratio. M1 and M2 are lists of things, with some elements present in both lists. i also have a background list containing the things in M1 and M2, plus more. is this how i calculate the odds ratio? (in a 2x2 table from left to right and top to bottom):

1) a = # of common elements in M1 and background / # elements in background

2) b = 1 - a

3) c = # of common elements in M2 and background / # elements in background

4) d = 1 - c

odds ratio = a*d / b*c, where a is the upper left element of the 2x2 matrix and d is the bottom right.

does this look correct? how would i go about creating a 2x2 table for the fisher exact test? just use the number of common elements without doing the division by the background in the cells?

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Calculate odds ratio and fisher's exact text

**Physics Forums | Science Articles, Homework Help, Discussion**