The odds are the number of times an event or exposure happens within a group, divided by the number of times is does not. As an example, let us consider a clinical trial involving 40 subjects. Of these subjects 20 consume a placebo and 20 consume a magnesium supplement. In the treatment group, 5 subjects have a myocardial infarction and 15 do not. The odds of having a myocardial infarction are therefore 5/15 = 0.33. In the placebo group, 8 subjects have a myocardial infarction and 12 do not. The odds of having a myocardial infarction are therefore 8/12 = 0.66. The odds differ from the absolute risk, in that the former uses the number of subject who have an event divided by the number that do not, whereas the latter uses the number of subjects who have an event divided by the total subjects in the group. For example the absolution risk of a myocardial infarction in the treatment group of the above trial would be 5/20=0.25.
The odds ratio is the odds of the event occurring in the treatment group divided by the odds of the event occurring in the placebo group. In our case, the odds for a myocardial infarction in the treatment and control groups were 0.33 and 0.66, respectively. The odds ratio in this case is therefore 0.33/0.66 = 0.50. Therefore the odds of having a myocardial infarction while taking magnesium were about 0.5 (or 50 %) of the odds of having a myocardial infarction while not talking magnesium. An odds ratio < 1 indicates a reduced odds of an event, and an odds ratio > 1 indicates in increased odds of an event. In most cases, the odds ratio and the relative risk will give a similar value and can in most cases be considered as interchangeable. For example, if the treatment and control groups have the same number of events (i.e. the treatment effect is small), the odds ratio and relative risk will both be the same (1). In contrast, as the treatment effect increases, the odds ratio and relative risk will diverge.