We first, find the class mark xi of each class and then proceed as follows
Marks Classmarks (xi) Frequency (fi)fixi10−201523020−3025410030−4035724540−5045627050−6055155∑fi=20∑fixi=700
Therefore, mean(¯x)=∑fixi∑fi=70020=35
Hence, the mean of scores of 20 students in mathematics test is 35.