The median is the value in the middle when the data are sorted from smallest to largest.
If the number of data is odd, there is only one value in the middle, so it will be the median value.
If the number of data is even, there are exactly two values in the middle, so the median is the average obtained by adding the two and dividing by 2.
Since the median value takes only the middle value, it has the advantage of being less affected by extreme values, contrary to the average value.
However, since values other than the middle are not reflected, there is also a disadvantage that it is difficult to see the whole.