when we come across a problem like this, where we can use your method it will save a lot of time, versus calculating a weighted mean, or just calculating a total sum for both sets using n and the mean (ex. 60x2.7 + 60x7.1) and then dividing to find the aggregate mean ( [60x2.7 + 60x7.1]/120 = 4.9).
This is also a good time to remind people that the median is the (n+1)/2 th value
. what I mean by this is:
. when whole number result: the median is that number in the list
. when decimal number result: the median is the average of the number at that place and the next place
in this case (120+1)/2 --> 60.5th value --> means the median is the average of the 60th and 61st value, in this case 5 and 6, so 5+6/2 = 5.5
I think this is more obvious if you think of the frequency table as shown in the attached graphic.
You can see there are 10 values that are 1, up to the 30th value is 2, up to the 48th value is 3, up to the 60th value is 5, up to the 84th value is 24...
So, you can see that 60th value is 5 and the 61st value is 6, so again, the median is 5+6/2 = 5.5