mean of frequency distribution

How is the mean of frequency distribution is calculated? Given the following frequency distribution: Interval Frequency 10 up to 30 5 30 up to 50 10 50 up to 70 15 70 up to 90 5

for each interval multiply the frequency by the midpoint, sum it all up and divide by the total number of occurences [(20*5) + (40*10) + (60*15) + (80*5)]/35 = 51.43

supersharpshooter, You explained very well. thanks a lot