# Analysis question

1. Apr 11, 2007

### kreil

1. The problem statement, all variables and given/known data

Show that the calculation of an arithmetic mean for a given set of values y1,y2....yn is equivalent to fitting the line y=y_av to the data under the least square criterion

2. Relevant equations

distance between the data points and the best fit curve:
$$d(y_n,f(x))= \Sigma_{i=1}^{n}(y_i-f(x_i,a_1,a_2,...,a_n))^2$$

arithmetic mean of a set of values y_n:
$$y_av= \frac{1}{n} \Sigma_{i=1}^{n}y_i$$

3. The attempt at a solution

I need help getting started please!

2. Apr 11, 2007

### Dick

In your distance formula, just put f=y_av. Now how would you minimize d with respect to y_av?

3. Apr 11, 2007

### kreil

set the partial derivative of d equal to zero?

Last edited: Apr 11, 2007
4. Apr 11, 2007

### Dick

Absolutely. What do you get?

5. Apr 11, 2007

### kreil

$$\frac{d(R^2)}{dy_{av}}= -2 \Sigma_{i=1}^n(y_i-y_{av})=0$$

6. Apr 11, 2007

### Dick

What's your next move?

7. Apr 11, 2007

### kreil

i was thinking maybe distribute the sum, but i dont know how the -2 helps, since im trying to get the formula in the form of the arithmetic mean

8. Apr 11, 2007

### Dick

-2*x=0 means x=0, doesn't it?

9. Apr 11, 2007

### kreil

how is this:

$$\frac{d(R^2)}{dy_{av}}= -2 \Sigma_{i=1}^n(y_i-y_{av})=0 \implies \Sigma_{i=1}^n(y_i-y_{av})=0 \implies \Sigma_{i=1}^ny_i=\Sigma_{i=1}^ny_{av}=y_{av}$$

10. Apr 11, 2007

### Dick

The sum from 1 to n of y_av is NOT = y_av.

11. Apr 11, 2007

### kreil

oh ok that sum is n y_av, so the sum of 1/ny_i is y_av correct?

12. Apr 11, 2007

### Dick

That's what you are trying to prove, right?

13. Apr 11, 2007

### kreil

right! thanks a lot man