# Hmm. help with a tiny statistics question please

This isn't homework, I am boggling my head over it though.

I got all sorts of answers, just not the answer my book demands.

For what value of $x$ the mean of the given observations $2x - 5, x + 3, 7 - x, 5-x$ and $x + 9$ with frequencies $2,3,4,6$ and $1$ respectively is $4$?

I seriously cant solve this, help would be MUCH appreciated. Note: Please don't use any advanced statistics formula, we are still on the basics. Sum of $f_ix_i$ over sum of $f_i$ is all I can use.

-
Hint: Think about what $2(2x-5)+3(x+3)+4(7-x)+6(5-x)+1(x+9)$ means. –  Dilip Sarwate Sep 10 '12 at 16:03
I already went there, took their sum and divided it by the sum of fi, then used single variable algebra to get the value of x, but my answer isnt coming right. –  Aayush Agrawal Sep 10 '12 at 16:08
@aayush Maybe you can post your algebra in an edit to your question so that somebody can tell you where you're going wrong –  Sean Eberhard Sep 10 '12 at 16:14
I think theres some sort of mistake in the book, mathematica doesnt give the right answer either :/ Answer accepted however –  Aayush Agrawal Sep 11 '12 at 9:18

Hint: $$\text{mean = }\frac{\sum_{i=1}^n f_ix_i}{\sum_{i=1}^n f_i}$$ where $f_i$ is the frequency of $x_i$ event.
$$\frac{2(2x-5) + 3(x+3) + 4(7-x) +6(5-x) + (x+9)}{16}=4$$ $$4x-10+3x+9+28-4x+30-6x+x+9=64$$ $$-2x+66=64$$ $$x=1$$
@aayush may be book's ans is wrong or you have copied it wrongly. You can check by putting $x=1$ in that the equation. –  Saurabh Sep 10 '12 at 16:26