6 Calculating risk or measures of association
Measures of risk or association are calculated by epidemiologists to quantify the likelihood or size of an outcome, based on the evidence available.
Attack rate

A measure of the proportion of people exposed to a pathogen who got sick, often during an outbreak. It is calculated as the number of cases in the outbreak (numerator) divided by the number of people who could have been cases (population at risk) during the outbreak (denominator). The result is expressed as a percentage (%).
Example:

During a large measles outbreak in a village of 300 people (denominator) there were 60 people (numerator) with suspected measles.
The attack rate of measles in this outbreak is 20%.
Incidence
A measure of the frequency of new cases of a disease as a proportion of the population at a set point in time. It is calculated as the number of new cases of a disease in a specified time (numerator) divided by the number of people in the population at risk at that time (denominator). Technically, the population at risk does not include existing cases of the disease or people who are immune (e.g those who are vaccinated). However, in practice usually the population is used, especially when it is difficult to determine who is and is not at risk.
Incidence is usually expressed as a rate in relation to a standard sized population as the denominator (e.g., per 100,000 population) to allow the comparison of different populations.

Example:

There are 5 people newly diagnosed with TB during 2020 in Province X that has a population of 10,000 people.
Prevalence
The proportion of a population who have a specific disease or condition at a set point in time regardless of when they first developed the condition (includes new and existing cases). Prevalence is a particularly useful measure for diseases that results in chronic (ongoing) symptoms or diseases of longer duration (such as non-communicable diseases – NCDs) where we want to measure the proportion of a population who has a condition at any one time.
It can still be useful to calculate the incidence of chronic infectious diseases and NCDs, to understand who is newly unwell and how much the problem is growing (or not). But prevalence is useful to understand the total size of the problem and can be used for tings like health service planning. If we only calculated incidence of diabetes (or other chronic disease) in a village, for example, we would only count the newly-diagnosed cases in the village during that time period, so we would miss the people who were diagnosed many years ago and continue to live with diabetes. The prevalence shows us the total number of people living with diabetes in that time period and who need ongoing health care.
Prevalence is calculated as the number of existing cases of a disease in a population on a particular date (numerator), divided by the number of people in the population on that date (denominator). Prevalence may be reported as a percentage (5%, or 5 people out of 100), or as the number of cases per 100,000 population.

Example:
There were 40 people living with TB in Province X (population 10,000 people) in 2020.

This can also be expressed as a percentage. To express this as a percentage of the population living with TB, we take the original calculation and multiply by 100.

Expressing a prevalence per 100,000 population does not mean there are really 100,000 people. It helps us to meaningfully compare rates across different sized populations as though the populations were the same.
Example:
There are 24 cases of TB in Province A, which has a population of 25,000 people. There are 30 cases of TB in Province B which has a population of 80,000 people. We would like to compare what the burden of TB is like in each of these two places. To do this, we consider the number of cases in each place as though they both have a population of 100,000 people.
Province A: |
Province B: |
|---|---|
![]() |
![]() |
If we simply look at the number of cases for both Province A (n=24) and Province B (n=30), Province B has a larger number of cases. However, these two provinces have a different number of people in their populations, so we cannot truly compare these numbers meaningfully.
When we calculate the prevalence per 100,000 population (i.e., We calculate as though both places have a population of 100,000 people), then we can see that Province A has a much higher prevalence (96 per 100,000) compared with Province B (38 per 100,000).
Two-by-two table (contingency table)
A two-by-two (2×2) table is a two-variable table in with two main rows and two main columns that shows how many people have a ‘yes’ or ‘no’ value for each variable and how they overlap. It is also referred to as a contingency table because it shows how the variables relate to each other (or how they are contingent on each other). The table is used to investigate the relationship between two variables in a study. Usually, the outcome variable is displayed at the top of the table in columns (this is also called the dependent variable because we are investigating how much it depends on the other variable) and the exposure or treatment variables are represented across the table in rows (also called the independent variable).
To calculate measures of association such as odds ratios and risk ratios, the cells are labelled A-D as shown below:
| Exposure or treatment or intervention | Disease or Outcome | |||
|---|---|---|---|---|
| With Disease | Without Disease | TOTAL | ||
| Had exposure | A | B | A+B | |
| Did not have exposure | C | D | C+D | |
| Total | A+C | B+D | A+B+C+D | |
A and B (shaded green) includes counts of people who had exposure to the item being studied (e.g. a pathogen).
C and D (shaded orange) includes counts of people who were not exposed to the item being studied.
| Exposure or treatment or intervention | Disease or Outcome | |||
|---|---|---|---|---|
| With Disease | Without Disease | TOTAL | ||
| Had exposure | A | B | Total exposed (A+B) | |
| Did not have exposure | C | D | Total not exposed (C+D) | |
| Total | A+C | B+D | A+B+C+D | |
A and C (shaded green) includes counts of people who have the disease or outcome being studied (cases).
B and D (shaded orange) includes counts of people who do not have the disease or outcome.
| Exposure or treatment or intervention | Disease or Outcome | |||
|---|---|---|---|---|
| With Disease | Without Disease | TOTAL | ||
| Had exposure | A | B | Total exposed (A+B) | |
| Did not have exposure | C | D | Total not exposed (C+D) | |
| Total | Total with disease (A+C) | Total without disease (B+D) | A+B+C+D | |
Relative risk/Risk Ratio
Relative risk or Risk Ratio (RR) compares the risk of a health event in one group with the risk of the event in another group. Often the groups differ in their exposure to a certain item (e.g., did or did not eat a food item) or they could differ by other factors (e.g., males compared with females). It helps us to understand how much greater risk of a health event one group has compared to the other. This means we can estimate to what extent the defining characteristic of that group (e.g. exposure to a pathogen) is associated with the health event (e.g. getting the disease).
Relative risk can only be used in a study in which groups are selected based on a certain exposure and the total number exposed are known (e.g., cohort study).
To calculate the relative risk, the attack rate of the disease in both groups needs to be calculated.

Using a 2×2 table this equates to:

Interpreting relative risk
- If RR = 1 there is no difference in risk of the outcome in those exposed compared with the risk of the outcome in those who were not exposed.
- If RR <1 there is a decreased risk of the outcome for the exposed group compared with the risk of the outcome in those who were not exposed. This indicates that the exposure may have protected the group from getting the outcome being studied.
- If RR >1 there is an increased risk of the outcome for the exposed group compared with the risk of the outcome in those who were not exposed indicating there is likely an association between the exposure and getting the disease.
Example:
Field epidemiologists were alerted to a cluster of people with gastroenteritis symptoms who all attended a workshop dinner. After some initial investigations, the epidemiologists think that the sickness might be related to chicken eaten at the dinner.
They got the full guest list for the dinner which had 40 people. Because they were able to identify all the people who attended the dinner, the field epidemiologists were able to conduct a cohort study. They asked each person whether they became unwell with gastroenteritis (outcome) and what they ate (exposures). The epis could then calculate a relative risk.
16 of these 40 people developed gastroenteritis over the 24 hours following the workshop dinner. Of the 16 people with gastroenteritis, 14 had eaten chicken for dinner and 2 had not eaten chicken.
The 2×2 table to measure the association between exposure with chicken and outcome (gastroenteritis) is presented below.
| Consumed chicken | Gastroenteritis | |||
|---|---|---|---|---|
| With Disease | Without Disease | TOTAL | ||
| Had exposure | 14 | 6 | 20 | |
| Did not have exposure | 2 | 18 | 20 | |
| Total | 16 | 24 | 40 | |
In this 2×2, the interpretation of each cell is as follows:
- A = there were 14 people who ate chicken and also had gastroenteritis
- B = there were 6 people who ate chicken but did not have gastroenteritis
- C = there were 2 people who did not eat chicken but did have gastroenteritis
- D = there were 18 people who did not eat chicken and who also did not have gastroenteritis
To calculate the relative risk use the numbers in the 2×2 table in the RR formula:

Relative risk = 7
Interpretation: The risk of gastroenteritis among those who attended the workshop dinner and ate chicken was 7 times higher than the risk of gastroenteritis among those who attended the workshop dinner and did not eat chicken.
Lay interpretation: In this cohort, people who attended the workshop dinner and ate chicken were 7 times more likely to develop gastroenteritis than those who attended the workshop dinner and did not eat chicken.
Odds Ratio
An odds ratio (OR) is a measure of association between two variables comparing the ratio of odds of the event in one group with the odds of the event in the other group. It is used in studies where the groups are selected based on the outcome being studied (e.g., cases of a disease, unsupervised deliveries), for example case control studies and cross-sectional studies. The total number of people exposed can rarely be measured at a population level, so a direct measure of risk is not possible to calculate. So, we instead compare the odds of “exposure” between those with the outcome and those without the outcome.

Using a 2×2 table, this equates to:

Interpreting Odds Ratios
- If OR = 1 there is no difference between the odds of exposure in those with the outcome compared with those without the outcome.
- If OR <1 the odds of exposure in those with the outcome is less for the odds of exposure in those without the outcome.
- If OR >1 the odds of exposure in those with the outcome is higher compared with the odds of exposure in those without the outcome.
- If the condition we are studying is rare, then an OR calculation is a good estimate of RR calculation.
Example:
The 2×2 to calculate the odds ratio for this study would be completed as follows, where the exposure is overseas travel in the week prior to falling ill, and the outcome/disease is influenza infection.
| Overseas Travel | Influenza | |||
|---|---|---|---|---|
| With Disease | Without Disease | TOTAL | ||
| Had exposure | 134 | 17 | 151 | |
| Did not have exposure | 511 | 239 | 750 | |
| Total | 645 | 256 | 901 | |
In this 2×2, the interpretation of each cell is as follows:
A = there were 134 people who had influenza infection who also travelled overseas in the week prior to becoming ill
B = there were 17 people who did not have influenza who did travel in the week prior to becoming ill
C = there were 511 people who had influenza and did not travel overseas in the week prior to becoming ill
D = there were 239 people who did not have influenza and did not travel
To calculate the odds ratio in this example, we would then calculate:

Odds ratio = 3.69
Interpretation: The odds of having travelled overseas among people with influenza were 3.69 times higher than the odds of having travelled overseas among people without influenza.
Lay interpretation: There was a higher chance of having travelled overseas the week prior to falling ill among people with influenza when compared with people who did not have influenza. This suggests there may be an association between travelling overseas and getting influenza.
Confidence intervals
When it is not possible to study a whole population, we usually select a sample of that population to study. We understand that by chance, our sample may not perfectly represent the population.
We do our best to select a sample that represents the whole population but we understand that by chance, there may be some differences between the characteristics of our sample and the population.
When we study a sample of the population, we calculate a confidence interval for the estimates of our study (e.g. measure of association between variables, incidence rate) to show the uncertainty of our estimate compared to what is the true value in the population (which we don’t know). The confidence interval calculates the range of values that we would get if we repeated the same study over and over using different samples from the population.
In field epidemiology, typically we estimate a 95% confidence interval. If we repeated the study 100 times, we would get an estimate within that interval in 95 of the studies. This means that we think it is very likely that the true population value lies within this range.
Interpreting confidence intervals
- In general, the confidence interval becomes narrower, the bigger your sample size (the closer your sample comes to being the whole population).
- A narrow confidence interval indicates high levels of certainty about the true value, whilst a wide confidence interval indicates lower levels of certainty.
- For odds ratios and risk ratios, if the interval crosses 1 then we generally conclude there is no difference between the groups (see diagram below) because we are not certain if there is a positive or negative (or no) association between the exposure and the outcome (our interval includes estimates that represent each type of association).
- If we are comparing another measure between groups such as the “average distance from the health centre” when the interval crosses zero we generally conclude that there is no difference between the groups.

Example:
An early study of the COVID-19 case fatality rate among the 15–44 year age group in March 2020 was estimated to be 0.5% (95% CI: 0.1%–1.3%). We estimate that the case fatality for those aged 15 to 44 years, was 0.5%. It may, however, have been as low as 0.1% or as high as 1.3%.
P-values
A p-value is a measure that tells us if there is statistical evidence from our data to support the hypothesis we were testing with our study. It is a measure of probability (chance) and ranges between 0 (no chance) and 1 (certainty).
A p-value is the probability of getting a value the same as or larger than the study estimate we observed if the null hypothesis was true. The null hypothesis is true when:
- There is no actual difference between the two groups being compared or
- There is no association between an exposure and an outcome (i.e., RR or OR = 1), or
- There has been no effect of an intervention on an outcome (in intervention studies)
A p-value shows the strength of evidence for us to reject that the null hypothesis is true (as illustrated below):

In other words, the p-value gives an idea of the strength of evidence of our study estimate is a true estimate of what is happening in the population, whether that’s an association between two groups (e.g., exposed and unexposed), an estimate of a population mean, or an estimate effect size of an intervention.
It is most common to use a significance level of 0.05. This means that we assume that p-values <0.05 are statistically significant, and those >0.05 are not statistically significant, with a lower p-value indicating stronger evidence against the null hypothesis. It is important to note that just because a study estimate is statistically significant (or not), doesn’t mean that it is clinically significant. Our study might estimate an association between an exposure and outcome that is statistically significant, but the association could be so small that it is not meaningful in the real
world. It is important to interpret the p-value together with the estimate itself and the confidence interval for the estimate to understand if our study has found something meaningful that requires any action or change.

