STATS81
when we have found the maximum of the largest, we have effectively minimized all the other values, the smallest value too!
so when we want to find the maximum range, we just have to find the maximum of the largest. how do we do that?
just take into consideration that we have to minimize the values before and after the median.
the values before the median are minimized when they are equal to a value S (PAY ATTENTION TO THIS!! IT IS NOT ALWAYS THE CASE). NORMALLY WE WOULDN'T say that because obviously the range is maximized when the lowest value is as small as possible (example -10.000) but we MUST find a value that is the minimum AND must also meet the condition imposed by the problem.
the values above the median are minimized when equal to the median.
and the largest value will be named L
so we set the first 2 values to be the smallest values S, the largest value will be L while the third and fourth values will be equal to the MEDIAN.
thus we have
n=5
mean = 55
median = 55 (we call it M)
L = 3S+20
now we know that the mean will be 55
so we have
(S + S + M + M + L)/5= MEAN = 55
substitute and we obtain
2S+L = 165
the problem also tells us that
L = 3S+20
thus by solving the linear system:
2S+L = 165
L = 3S+20
we obtain that the maximum of the largest value is L = 107, while the minimum of the smaller value is S = 29
the range will be 107-29 = 78
so now notice this:
X1 X2 X3 X4 X5
29 29 55 55 107
range = 78
we can surely increase the range by decreasing the value of the lowest and still respecting the "AVERAGE" condition:
2S+L = 165
example:
X1 X2 X3 X4 X5
0 0 55 55 165
range = 165!
but in that case we no longer respect the other condition imposed by the problem:
L = 3S+20
in fact, if we plug S = 0 and L = 165 we get 165 = 20 that is obviously false.
IN GENERAL we have most of the times, 2 conditions to solve it:
--> average condition
--> condition imposed by the problem statement