The median is the middle most value of a set of observations arranged in order. It divides the observations into exactly two parts. In all the given data set, there are odd number of observations. Hence the median will be the middle term.
Let's arrange the data:
1, 2, 5, 7, 8 ---- 5 is in the middle; median = 5
2, 2, 3, 4, 5 ---- 3 is in the middle; median = 3
1, 1, 4, 5, 9 ---- 4 is in the middle; median = 4
7, 7, 8, 9, 9 ---- 8 is in the middle; median = 8