I have numbers: $1, 2, 3, 4, 6, 7, 8, 9, 10$
Number of int $= 9$
Total $= 50$
Mean $= \frac{50}{9} = 5.55555\cdots$
If I were to add the number 5 to the list, I get:
Number of int $= 10$
Total $= 55$
Mean $= \frac{55}{10} = 5.5$
However, $5.5$ is not equal to $5.$
What number do I add to the list that is also equal to the mean?
I tried Brute forcing it with Python. No luck:
main = 50
numbers = 10
magic = 5
for each in range(100000):
x = (main + magic)/numbers
if(x == magic):
print('********************', magic)
magic = magic + 0.00001
The closest I get is: $5.555549999978968$
Let the number be $x$ .
Then ,the new mean $ = \frac{\text{Total Sum}}{\text{Total Numbers}} = \dfrac{50+x}{10}$. Since this must be equal to the number , We have:
$$\dfrac{50+x}{10} = x \implies 50 =9x \implies x=\dfrac{50}9$$
So the required number is $\dfrac{50}9$.