# Median > Mode > Mean > Range

My question is: Is there a set of data which allow the median to be larger than the mode, the mode to be larger than the mean and the mean to be larger than the range? If so, is there a pattern, or a specific characteristic of a dataset to allow this situation (skewness of some kind maybe…)?

P.S I have corrected my typo mistake. Some of the answers already given relate to the opposite situation for which median

The question has already been answered in the affirmative, but let’s approach this from the point of view of construction — how do we make a set of data that does this?

First, note that we can always make all three location-measures greater than the range. Simply construct a preliminary data set that has median > mode > mean and compute the range. Now add (range-mean) + $\epsilon$ (for some small positive $\epsilon$) to all of the data values to get the final data set, whereupon the three location-measures will all exceed the range.

So we have now reduced the problem to one of finding a data set where median > mode > mean .

Imagine we already had some data with a suitable median and mode. To make the mean smaller than the median and mode, you simply place a single value far enough below the bulk of the data that the mean is pulled down; we can place a second value just above the bulk of the data to keep the median where it was, without changing the mode. So now we can modify an existing data set that simply has median > mode and obtain one which has the mean where we want.

So let us create one with median > mode. We can do this by having one value repeated (if it’s the only value that occurs twice, it’s the sample mode) and then adding enough other values to make the median larger. This is an example:

 21, 21, 22, 23, 24


The median is 22 but the mode is 21.

Now let’s add the two points as previously described, in such a way to make the mean 20 without changing the median or mode. The present points sum to 111, so we need two points that add to 140-111 = 29, and one of them should be just larger that 24. Let’s make it 25. Then the smaller point is 29-25 = 4.

So now our data set is:

4, 21, 21, 22, 23, 24, 25


It has mean 20, mode 21 and median 22.

Now let’s fix the relationship of those with the range. What’s the range? It’s 25-4=21, which is presently larger than the mean. We need simply add something to every data value to make the mean larger than 21, which leaves the range unaltered. Adding 2 will suffice. (Note that range-mean+1=2, so we can see that we took $\epsilon=1$)

So our final data set is

6, 23, 23, 24, 25, 26, 27


The range is still 21, the mean is now 22, the mode is 23, the median is 24

So this step by step approach is quite easy to use. In summary:

1. Make a small data set with median > mode by repeating the smallest value and having all the larger values distinct (it’s easiest to use sorted values). Having 5 points is convenient (since it lets you specify the median by moving the middle value) but 4 is feasible if needed.

2. Obtain a mean below the median by adding two points that don’t alter the median or mode (i.e. two distinct/singleton values will not disturb the mode, and placing them one either side the previous data will preserve the median; place the larger value just above all the present data and then compute the smallest so that the overall mean comes out just below the mode. This takes us to 7 data points.

3. Compute the range. Add a constant (range – mean + $\epsilon$) to all the data values, which guarantees that the mean exceeds the range. This is the final data set.

Checking those calculations in R:

x <- c(6, 23, 23, 24, 25, 26, 27)
data.frame(
range=diff(range(x)),
mean=mean(x),
mode=max(as.numeric(names(table(x))[table(x)==max(table(x))])),
median=median(x)
)

range mean mode median
1    21   22   23     24


(note that if we somehow happened to generate more than one mode, this calculation tries to find the largest of them)