Re: Calculating Standard Deviation
- From: israel@xxxxxxxxxxx (Robert Israel)
- Date: 21 Mar 2006 23:52:01 GMT
In article <442068A6.8020108@xxxxxxxxx>,
Jentje Goslinga <goslinga@xxxxxxxxx> wrote:
Robert Israel wrote:
Squares have much nicer properties than absolute values. For example,
there's a nice formula for the variance of a sum, but not for the
mean absolute deviation of a sum. You can solve least-squares problems
using linear algebra, but the corresponding mean-absolute-deviation
problems require linear programming.
However, I think the OP has a point here: mathematicians
like to reach out for the L2 norm (the sum of squares),
since it has nicer properties, where the user may have
valid reasons to minimize absolute values.
Consider the common problem of trying to fit a line to
some cloud of points in the plane with the requirement of
minimizing the absolute distances, the projections of the
points upon to the line.
Note that there are two points of difference here: (1)
the use of distance rather than ordinate and (2) the use
of absolute values.
I think that the use of absolute values does not lead to
a LP problem: at each iteration of the non-linear
approximation problem when the parameters of the line are
modified you check all the points to see if their position
with respect to the line (same side as the origin) has
changed and flip the sign of the projection as required.
Maybe that is some kind of a LP problem, I am not sure.
Given data points (x_j, y_j), j=1..n, to minimize
sum_j abs(y_j - (a x_j + b)),
you solve the linear programming problem (with variables
a, b and t_j for j=1..n):
minimize sum_j t_j
subject to
t >= y_j - (a x_j + b) for each j
t >= a x_j + b - y_j for each j
If you want distances rather than ordinates, I think it becomes
a nonlinear programming problem.
Robert Israel israel@xxxxxxxxxxx
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia Vancouver, BC, Canada
.
- References:
- Calculating Standard Deviation
- From: sunburned . surveyor
- Re: Calculating Standard Deviation
- From: Robert Israel
- Re: Calculating Standard Deviation
- From: Jentje Goslinga
- Calculating Standard Deviation
- Prev by Date: Need suggestions for Numerical Analysis project
- Next by Date: Re: Calculating Standard Deviation
- Previous by thread: Re: Calculating Standard Deviation
- Next by thread: Re: Calculating Standard Deviation
- Index(es):
Relevant Pages
|