Putting these numbers in ascending numerical oreder, we get.
1 2 3 4 7 89
The median is the middle value.
It is simplle to work out the middle value when the list has an odd number of elements.
When the list has an even number of elements, as we have here, then the median is the average, or mean, of the two middle values.
We have 6 elemsnts. The middle two are 3 and 4.
Thus, the median is M = (3 + 4)/2 = 3.5