Is there a way for you to know the value of a single missing $x$ inside of a sequence of numbers, given that you know the average and the median of this sequence are the same?

For instance:

Take the following sequence defined in the set of Real numbers: $5, x, 2, 6, 5, 2, 8$

And you know beforehand that the average and the median of such sequence are supposed to be exactly the same value, but you don't know the actual value of it.

It feels to me that it should be possible to tell the value of $x$ but I couldn't get to it.

Or maybe, if you were to sort that sequence from lower to higher values, could you tell at least where $x$ would lie in the sorted sequence?

I know I could run a loop through possible values and check if they turn the average and the median to be the same, which is what I'm doing right now, but I am wondering if you could get to it in a more direct fashion.

Any thoughts on this would be appreciated.

  • 1
    $\begingroup$ Note: confirm that, for this data, the median is always $5$ regardless of $x$. $\endgroup$ – lulu Sep 11 '18 at 20:52

The average is $\frac {28+x}7=4+\frac x7$
The median is always $5$ because if $x \lt 5$ the ordered list is $x,2,2,5,5,6,8$ or $2,2,x,5,5,6,8$ while if $x \gt 5$ the ordered list is something like $2,2,5,5,x,6,8$. In either case $5$ is the median. $$4+\frac x7=5\\x=7$$ If the numbers had not been chosen carefully, the median could depend on $x$. You would have to divide into cases based on which interval $x$ fit into, then solve it for each one and find which was consistent.

  • $\begingroup$ I fixed a small typo. Hope you don't mind. $\endgroup$ – InterstellarProbe Sep 11 '18 at 20:59
  • $\begingroup$ @InterstellarProbe: thanks $\endgroup$ – Ross Millikan Sep 11 '18 at 21:00
  • $\begingroup$ Thanks. That makes a lot of sense now. $\endgroup$ – Delta Sep 11 '18 at 21:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.