4. In a math test, the average score of a class is 78 points, and the average scores of boys and girls are 75.5 points and 81 points, respectively. What is the ratio of the number of boys to girls in the class?
4. The ratio of boys to girls is $6: 5$
4.【Solution】It is known that the average score of the whole class is 78 points, and the average score of boys is 75.5 points, so each boy scores $(78-75.5)$ points less than the average, while each girl scores (81-78) points more than the average.

The total points that boys score less should equal the total points that girls score more, so we have $(78-75.5) \times$ number of boys $=(81-78) \times$ number of girls,

Therefore, the ratio of boys to girls $=(81-78):(78-75.5)=6: 5$
Answer: The ratio of boys to girls is $6: 5$
【Another Solution】Let the number of boys and girls be $\mathrm{a}$ and $\mathrm{b}$, respectively, then $75.5 \times \mathrm{a}+81 \times \mathrm{b}=78 \times(\mathrm{a}+\mathrm{b})$

So $(81-78) \times \mathrm{b}=(78-75.5) \times \mathrm{a}$
$$
\frac{a}{b}=\frac{81-78}{78-75.5}=\frac{6}{5}
$$

Answer: The ratio of boys to girls is $6: 5$