For grouped data, use the formula $\frac{\sum f \cdot x}{\sum f}$ to find the mean, where $f$ is the frequency and $x$ is the midpoint of each class interval.
The formula to calculate the mean for grouped data is:
\[
\text{Mean} = \frac{\sum f \cdot x}{\sum f}
\]
Where $f$ is the frequency and $x$ is the midpoint of each class interval.
Step 1: Calculate the midpoints of the class intervals.
For each class interval, the midpoint $x$ is calculated as:
\[
x = \frac{\text{Lower limit} + \text{Upper limit}}{2}
\]
Step 2: Calculate $f \cdot x$ for each class.
Now, multiply the frequency $f$ by the midpoint $x$ for each class:
\[
f \cdot x = \text{Frequency} \times \text{Midpoint}
\]
\[
4 \times 5 = 20, \quad 5 \times 15 = 75, \quad 6 \times 25 = 150, \quad 4 \times 35 = 140, \quad 1 \times 45 = 45
\]
Step 3: Sum the values of $f \cdot x$ and $f$.
\[
\sum f \cdot x = 20 + 75 + 150 + 140 + 45 = 430
\]
\[
\sum f = 4 + 5 + 6 + 4 + 1 = 20
\]
Step 4: Calculate the mean.
\[
\text{Mean} = \frac{\sum f \cdot x}{\sum f} = \frac{430}{20} = 21.5
\]
Step 5: Conclusion.
Therefore, the mean of the data is $22$.