Find a set A of five numbers that satisifies average(A) = 10 and median(A) = 9

6.7k Views Asked by At

Problem

Find a set A of five numbers that satisifies mean(A) = 10 and median(A) = 9.

Progress

The only method I can think of here is brute force, which hasn't yielded any results for me yet. I could probably write a small script that does it, but I have a feeling there's a more elegant way of doing it.

Any tips and/or solution appreciated!

5

There are 5 best solutions below

0
On BEST ANSWER

easiest approach - let median be one of the numbers, then you have $a,b,9,x,y$ where $a \le b < 9 < x \le y$. Note that the average constraint means that $$ a + b + x + y = 41 $$ and now pick any 4 subject to above constraints...

0
On

There are many solutions. We can even set the two smallest numbers to $0$ and $1$, let $9$ be the middle number, and let other numbers be $a$ and $b$, with the condition that both of those must exceed $9$. Then the average of these five numbers is $(10+a+b)/5$. For the average to equal $10$ we need $a+b=40$.

0
On

One solution satisfying the requirements of the problem are: $$7,9,9,12,13$$ (we need $5$ numbers whose sum is $50$ and median is $9$)

0
On

We know that 9 must be the middle number when the 5 numbers are sorted, by definition of the median. So two numbers must be less than 9: say they are 7 and 8, for example; and two numbers must be more than 9: say they are 10 and $x$. So by definition of the mean, $\frac{\sum x_i}{n} = \frac{7+8+9+10+x}{5} = \frac{34+x}{5} = 10$; hence, $34+x = 50 \Rightarrow x = 16$.

0
On

While the outpour of replies rolled in, I also found one (possibly the easiest method), which hasn't been said yet, so I'll just throw it in.

I started with any ol' set that satisfies 10 as average, for instance $\{6, 8, 10, 12, 14\}$ came to mind.

Now, if I want 9 to be in the middle, I can subtract 1 from 10, so long as I add 1 to one of the other elements, conserving the sum of 50.

So $\{6, 8, 9, 13, 14\}$ would be one solution.