So I can understand, what is wrong?
Do you believe that Mathematica gives the wrong result when evaluating:
Sum[(x - Sum[x, {x, 1, 9}]/9), {x, 1, 9}]
If so, what result do you expect from it? This will help clarify what you expect.
As a general rule, you should not nest Sums inside each other when they have the same independant variable. You should change the independant variable so that it reads:
Sum[(x - Sum[i, {i, 1, 9}]/9), {x, 1, 9}]
If this isn't the forumula you are looking for, then please write out (maybe with TeX or something) what summation you want to put into Mathematica. Mathematica is evaluating your code correctly.