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?
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.