In epidemiology, the Attack Rate Ratio is a measure used to determine the strength of association between an exposure (like eating a specific food item) and an outcome (like developing food poisoning). It compares the frequency of disease in a group that was exposed to a specific factor versus a group that was not exposed.
The Attack Rate Formula
Before calculating the ratio, we must first calculate the Attack Rate (AR) for each group:
Attack Rate = (Number of New Cases / Total Population at Risk) × 100
Calculating the Attack Rate Ratio
Once you have both rates, the formula for the Attack Rate Ratio (ARR) is:
ARR = 1.0: The risk of disease is identical in both groups. The exposure has no association with the illness.
ARR > 1.0: The risk of disease is higher in the exposed group. This suggests the exposure may be a "risk factor" for the illness.
ARR < 1.0: The risk of disease is lower in the exposed group. This suggests the exposure may have a protective effect.
Practical Example
Imagine 100 people attended a dinner. 50 people ate the potato salad (Exposed), and 40 of them got sick. 50 people did not eat the potato salad (Unexposed), and 5 of them got sick.
Exposed Attack Rate: (40 / 50) = 80%
Unexposed Attack Rate: (5 / 50) = 10%
ARR: 80% / 10% = 8.0
This means those who ate the potato salad were 8 times more likely to get sick than those who did not.
function calculateARR() {
var eIll = parseFloat(document.getElementById('expIll').value);
var eTotal = parseFloat(document.getElementById('expTotal').value);
var uIll = parseFloat(document.getElementById('unexpIll').value);
var uTotal = parseFloat(document.getElementById('unexpTotal').value);
if (isNaN(eIll) || isNaN(eTotal) || isNaN(uIll) || isNaN(uTotal) || eTotal <= 0 || uTotal eTotal || uIll > uTotal) {
alert('Number of cases cannot exceed the total population in the group.');
return;
}
var arExposed = (eIll / eTotal) * 100;
var arUnexposed = (uIll / uTotal) * 100;
var arrResult;
var interpretationText = "";
if (arUnexposed === 0) {
arrResult = "Undefined (Zero division)";
interpretationText = "Because the attack rate in the unexposed group is 0, the ratio cannot be calculated mathematically, suggesting a very strong association.";
} else {
var ratio = arExposed / arUnexposed;
arrResult = ratio.toFixed(2);
if (ratio > 1) {
interpretationText = "Individuals in the exposed group were " + ratio.toFixed(2) + " times more likely to become ill compared to the unexposed group.";
} else if (ratio < 1) {
interpretationText = "Individuals in the exposed group were " + (1/ratio).toFixed(2) + " times less likely to become ill, suggesting a protective factor.";
} else {
interpretationText = "There is no difference in risk between the two groups.";
}
}
document.getElementById('resExpAR').innerText = arExposed.toFixed(2) + "%";
document.getElementById('resUnexpAR').innerText = arUnexposed.toFixed(2) + "%";
document.getElementById('resARR').innerText = arrResult;
document.getElementById('interpretation').innerText = interpretationText;
document.getElementById('arr-result-area').style.display = 'block';
}