How to calculate relative frequency
Relative frequency expresses a count as a proportion of the total sample size. A relative frequency table supports comparisons across categories or class intervals and is the natural scale for bar charts, histograms, and empirical probability.
Core definition
For a category or class \(i\), let \(f_i\) be its frequency (count) and let \(n\) be the total number of observations. The relative frequency \(r_i\) is:
\[ r_i = \frac{f_i}{n} \]
Percentage frequency uses the same proportion scaled by 100:
\[ \text{percent}_i = 100 \cdot r_i = 100 \cdot \frac{f_i}{n}\% \]
For a complete partition of the data into non-overlapping classes, the proportions satisfy:
\[ \sum_i r_i = 1 \]
Relative frequency in frequency tables
Frequency tables typically include \(f_i\) and \(r_i\). For ordered classes (such as numeric bins), cumulative measures are often added.
- Cumulative frequency: \(F_i = \sum_{j \le i} f_j\)
- Cumulative relative frequency: \(R_i = \sum_{j \le i} r_j = \frac{F_i}{n}\)
Numerical interpretation remains consistent across contexts:
- Proportion form: \(r_i = 0.24\) means 24% of observations fall in class \(i\).
- Probability link: \(r_i\) is an empirical probability estimate for the event “observation falls in class \(i\)”.
Worked example with a complete table
A sample of \(n = 25\) observations is summarized into four categories. The counts are \(f_A = 9\), \(f_B = 6\), \(f_C = 7\), and \(f_D = 3\).
| Category | Frequency \(f_i\) | Relative frequency \(r_i = f_i/n\) | Percent \(100 \cdot r_i\) |
|---|---|---|---|
| A | 9 | \(\frac{9}{25} = 0.36\) | 36% |
| B | 6 | \(\frac{6}{25} = 0.24\) | 24% |
| C | 7 | \(\frac{7}{25} = 0.28\) | 28% |
| D | 3 | \(\frac{3}{25} = 0.12\) | 12% |
| Total | 25 | \(0.36 + 0.24 + 0.28 + 0.12 = 1.00\) | 100% |
Visualization: relative frequency bar chart
Grouped quantitative data and class intervals
For grouped data (such as class intervals \([a_i, b_i)\)), the frequency \(f_i\) counts observations in the interval, and the same definition applies:
\[ r_i = \frac{f_i}{n} \quad\text{and}\quad R_i = \frac{F_i}{n} \]
A relative frequency histogram uses \(r_i\) on the vertical axis rather than raw counts, making distributions comparable across different sample sizes.
Precision and rounding behavior
- Exactness in fractions: \(\frac{f_i}{n}\) is exact; decimals depend on rounding.
- Sum check: \(\sum_i r_i = 1\) exactly in fraction form; rounded decimals may sum to \(0.99\) or \(1.01\).
- Interpretation stability: percent form improves readability for audiences that prefer percentages over proportions.
Relative frequency is a proportion; percentage frequency is that proportion multiplied by 100. Cumulative relative frequency equals cumulative frequency divided by \(n\).