Re: Weighted linear fitting? [message #11878] |
Wed, 27 May 1998 00:00 |
rosentha
Messages: 23 Registered: November 1994
|
Junior Member |
|
|
On 27 May 1998 16:30:37 GMT,
Marcus E Engdahl <mengdahl@alpha.hut.fi> wrote:
>
> weights = 1/ystd^2 = [1426.78, 143.309, 72.5688, 574.851]
>
> It seems that the weights for the first and last data point are very much
> bigger than for the middle data points and the line fit practically almost
> ignores the middle observations. Is this a characteristic of the Gaussian
> weighing scheme or am I determining the weights incorrectly?
This sounds correct to me. Remember that this is least _squares_ so
you're actually minimizing [abs(y-y_i)/sigma]^2, so somehow you're trying
to minimize abs(y-y_i) scaled by sigma. Hence you're not ignoring the
middle points as completely as you might imagine from looking at the
values of 1/ystd^2.
--
Colin Rosenthal
High Altitude Observatory
Boulder, Colorado
rosentha@hao.ucar.edu
|
|
|