First step! Arrange the numerals {40, 7, 2, 35, 12, 23, 18, 28} in ascending order: {2, 7, 12, 18, 23, 28, 35, 40}
Count these numerals: there are 8 (an even number)
To find the median of this set of numerals, take the middle 2 values {18, 23} and average them: median = (18+23)/2 = 41/2
Now, on the left of 41/2, we have the subset {2, 7 , 12, 18}. The median of this subset is found in the same way as was 41/2 (above):
(7+12)/2 = 19/2 (First quartile)
The median of the right subset {23, 28, 35, 40} is (28+35)/2, or 63/2. This is the 3rd quartile.
The max. is 40 (this is the largest numeral given).