How can I find the average stem length, Median stem length and Mode stem length?

Given,
The data of the length of the stem and frequency is,
Length Frequency
25 2
26 9
27 10
28 12
29 20
30 19
31 13
32 15
Required:
The mean, median and mode of the stem.
The mean of the stem is calculated as,
[tex]undefined[/tex]