In order of least affected by the outliers to most affected by the outliers, the rank is as follows:
Median, Mean, Range
As we know, the outlier is a value in a data set that is not typical of the rest of the set. It is usually distant from the rest of the set
The median is the least affected by outliers because it is always in the center of the data and the outliers are usually on the ends of data. By definition, the median is the middle value on a set when the values have been arranged in ascending or descending order
The mean is affected by the outliers since it includes all the values in the distribution and the outlier can increase or decrease the mean value but it is not as susceptible as the range. By definition, the mean is the sum of the value of each observation in a dataset divided by the number of observations.
The range is the most affected by the outliers because it is always at the ends of data where the outliers are found. By definition, the range is the difference between the smallest value and the biggest value in a dataset. In the following dataset: 2, 8,8,9,9,10,11 the range is 9. If we remove 2, the range will be equal to 3. Which shows that 2 as an outlier it largely influenced the range