problem solving - stats

The maximum mark in an examination is 100 and the minimum is 0. The average mark of seven students such that no two of them have scored the same marks is 88. If the median score is 92 and all the marks are integers, what is the maximum possible difference between the largest and the smallest mark obtained by these seven students?

Answer: 54
Explanation:

Average mark of seven students is 88. Hence the total mark of seven students is 616.
Let the scores be arranged in ascending order with the median as 92.

S1, S2, S3, 92, S5, S6, S7.
Since the marks are arranged in ascending order, the largest mark is S7 and the smallest is S1. The difference S7 – S1 can be maximized when S7 is maximum and S1 is minimum.

Now, each of S5, S6 and S7 should be greater than 92. But the maximum possible mark is only 100 and the marks should be distinct. So S7 = 100, S6 = 99, S5 = 98.
So, S1 + S2+ S3 + 92 + 98 + 99 + 100 = 616

S1 + S2 + S3 = 227.
Now S1 should be minimized. Hence S2+S3 should be maximized. However, S2,S3 cannot exceed or be equal to 92. Hence S3 = 91 and S2 = 90.

So, S1 + 90 + 91 = 227
S1 = 46.

Therefore, S7 – S1 = 100 – 46 = 54.