Question: Find the median.
x f
10 5
20 8
30 2
40 1
50 12
Median =
1. **State the problem:** We are given a frequency distribution with values $x$ and their frequencies $f$. We need to find the median of this data.
2. **List the data:**
| $x$ | $f$ |
|-----|-----|
| 10 | 5 |
| 20 | 8 |
| 30 | 2 |
| 40 | 1 |
| 50 | 12 |
3. **Calculate the total frequency $N$:**
$$N = 5 + 8 + 2 + 1 + 12 = 28$$
4. **Find the median position:**
The median is the value at position $$\frac{N+1}{2} = \frac{28+1}{2} = 14.5$$th item when data is ordered.
5. **Calculate cumulative frequencies:**
| $x$ | $f$ | Cumulative Frequency ($CF$) |
|-----|-----|-----------------------------|
| 10 | 5 | 5 |
| 20 | 8 | 5 + 8 = 13 |
| 30 | 2 | 13 + 2 = 15 |
| 40 | 1 | 15 + 1 = 16 |
| 50 | 12 | 16 + 12 = 28 |
6. **Locate the median class:**
The median position $14.5$ lies between cumulative frequencies $13$ and $15$, so the median corresponds to $x = 30$.
7. **Conclusion:**
The median of the data is **30**.
**Final answer:**
$$\boxed{30}$$