From dev-return-135596-apmail-commons-dev-archive=commons.apache.org@commons.apache.org Sun May 6 22:09:59 2012
Return-Path:
X-Original-To: apmail-commons-dev-archive@www.apache.org
Delivered-To: apmail-commons-dev-archive@www.apache.org
Received: from mail.apache.org (hermes.apache.org [140.211.11.3])
by minotaur.apache.org (Postfix) with SMTP id BE52EC672
for ; Sun, 6 May 2012 22:09:59 +0000 (UTC)
Received: (qmail 87739 invoked by uid 500); 6 May 2012 22:09:59 -0000
Delivered-To: apmail-commons-dev-archive@commons.apache.org
Received: (qmail 87660 invoked by uid 500); 6 May 2012 22:09:59 -0000
Mailing-List: contact dev-help@commons.apache.org; run by ezmlm
Precedence: bulk
List-Help:
List-Unsubscribe:
List-Post:
List-Id:
Reply-To: "Commons Developers List"
Delivered-To: mailing list dev@commons.apache.org
Received: (qmail 87651 invoked by uid 99); 6 May 2012 22:09:59 -0000
Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136)
by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 May 2012 22:09:59 +0000
X-ASF-Spam-Status: No, hits=1.5 required=5.0
tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS
X-Spam-Check-By: apache.org
Received-SPF: pass (athena.apache.org: domain of ted.dunning@gmail.com designates 209.85.214.171 as permitted sender)
Received: from [209.85.214.171] (HELO mail-ob0-f171.google.com) (209.85.214.171)
by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 May 2012 22:09:55 +0000
Received: by obfk16 with SMTP id k16so10285369obf.30
for ; Sun, 06 May 2012 15:09:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:in-reply-to:references:from:date:message-id:subject:to
:content-type;
bh=O6P26rXnFdvTBPzdgFTcS3FJkL6LRFnK4T3qMaNIYqM=;
b=zImgT32Kmn42Kd3SckzETqFISIQcFjtyiqOouSugzYJbgFXIYk3/5MhliCgFOSrtbt
K2qHoA3OXhoq3xQBt4hXKe5iQTGubNgasKnkz+ix9bRdPghQTrjIigFXeHetDN6x1BgH
dGiwzHhRZQEu9HrFBN+7OA9lY3czDc9YeivXUy+IIfOueTmht9JOTxeNV7pXzIRBpt4m
YwpEjSKsWKkMDuD6OVObOYcxEztp0t/PpNvbP2jVEOSCo9JAYGUr4ayt+1VyYZcBN+eP
i3ZTx+S4212/q4zT3EWQEXImgsCawFfaipHdjl/IfqMDQQmgywCBkXm5KD2EzzlptLWx
ZlOA==
Received: by 10.60.13.196 with SMTP id j4mr5217231oec.14.1336342174291; Sun,
06 May 2012 15:09:34 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.182.166.100 with HTTP; Sun, 6 May 2012 15:09:04 -0700 (PDT)
In-Reply-To:
References:
<20120503214452.GK9599@dusk.harfang.homelinux.org>
From: Ted Dunning
Date: Sun, 6 May 2012 15:09:04 -0700
Message-ID:
Subject: Re: [math] Deprecating
To: Commons Developers List
Content-Type: multipart/alternative; boundary=e89a8ff253d498d61504bf656812
X-Virus-Checked: Checked by ClamAV on apache.org
--e89a8ff253d498d61504bf656812
Content-Type: text/plain; charset=UTF-8
This sort of problem can often be approached from a Bayesian point of view
with a result that is a bit more intuitive.
The basic idea for this is that the data are measurements that come from
some process that is parameterized. These parameters are sampled from some
very non-specific distribution. The question then is given what we have
observed, what can we conclude about the likelihood of different parameter
values given our knowledge. This leads to a very natural definition of
confidence bounds and estimation. The entire approach is anathema to some,
but makes lots of intuitive sense vis a vis how normal humans use
probability as a concept and has very deep mathematical roots.
The philosophical problem can be illustrated easily. If I flip a coin and
hold it in my closed hand, you and I would both declare the probability of
heads to be 0.5 even though the physics of the situation make it clear that
the coin has a single state that simply happens to be unknown to us. If I
peek in my hand and we estimate the probabilities again, you will still say
0.5 and I will say 0 or 1, but definitely will not say 0.5. The only
change has been that I have gained information and thus probability as we
have been using it is clearly a subjective concept. Further, it is
admissible to use a probability distribution to describe a physical process
that actually only has a single value.
This can be extended to some more complex measurement of a physical state
where I cannot as easily open my hand. In such a system, each measurement
that we make decreases our uncertainty about the unknown state, but does
not necessarily eliminate that uncertainty. Treating that unknown state as
having a distribution makes no statement about whether the state has a
single value. Instead, it merely allows us to quantify our own state of
ignorance or, more hopefully, our knowledge.
One additionally important point, regardless of whether we want to admit a
definition of probability that is a measure of subjective knowledge, with
the very weak constraint of exchangeability, it can be shown that we can
behave *as*if* this were true and get optimal estimates that can be framed
in terms acceptable to frequentists who do not accept probability as
subjective.
Operationally, this leaves us with the question of how to implement this.
Whether the implementation involves sampling or not has no bearing on
whether it is correct. If sampling is convenient computationally to
provide numerical estimates, then so be it.
Likewise, if sampling is convenient for the purposes of testing an approach
to see who well the resulting estimates conform to something that we know
to be true, then sampling is a great thing.
These two kinds of sampling are separate questions from each other and
separate questions from how various kinds of estimates are computed and
what they mean.
So that is where I come from. Now to the problem at hand.
The problem of least squares fitting can be described as estimating the
parameters of a data generation process given observations.
The data generation process in question has a linear relationship between
the predictor (independent variables) and the target (dependent) variable.
In addition to this linear relationship, there is additive Gaussian noise
of unknown magnitude that perturbs the ideal value of the target variable
to be the observed value. Generally, we have little preconceived notions
about either the linear process or the noise process, but in some cases it
is useful to introduce domain knowledge here as a form of regularization.
To relate this formulation to commonly used terminology, the accuracy of
our estimation of the linear process is referred to as "standard error" and
the magnitude of the noise process is referred to as "standard deviation".
The accuracy of our estimate is nicely determined by the width of the
posterior estimate of the linear process and the magnitude of the noise
process is well described by the mean of that parameter over the posterior
distribution. For Gaussian noise processes, the values in formulae 34 and
35 are useful estimates of the former in the absence of regularization.
For multi-variate problems, it can be very dangerous to estimate the
covariance matrix or the inverse of the same by the maximum likelihood
estimate since you have an excessive chance of catastrophically bad
estimates. There is an extensive literature on Bayesian approaches to this
problem.
I hope that this description doesn't rub folks the wrong way for being too
elementary. I thought it might help to get basic terms in the open since
it sounds like there are unstated assumptions in the current discussion.
On Sun, May 6, 2012 at 6:15 AM, Dimitri Pourbaix
wrote:
> Sebastien,
>
> Hi Dimitri,
>> I'm obviously missing something in my litterature review. I did a new
>> MC simulation, with a much smaller number of observation points
>> (namely 3, to fit a straight line!!!). It turns out that the formula
>> you are advocating for is the best estimate of the standard deviation
>> of the parameters. Could you please explain why this fomula differs
>> from formulas (34) and (35) in
>> http://mathworld.wolfram.com/**LeastSquaresFitting.html
>> ?
>>
>
> First thing worth noting is Worlfram is wise enough to call 34 and 35
> standard error ... and not standard deviation!
>
> As Gilles and you have shown with your MC simulations, the standard
> deviation (sigma_i=sqrt(cov[i][i])) approximates by how much the fitted
> parameter can vary when several sets of 'observations' are sampled with
> the same error distribution. I wrote 'approximate' because the true
> standard deviation is not accessible, instead it is approximated as the
> inverse of Fisher information matrix which is directly related to the
> Hessian matrix. The relation between Fisher and the variance of the
> parameter is known as the Rao-Cramer bound.
>
> In the case of the standard error, the sample of observations is fixed
> and one wonders by how much one can change the parameters without
> changing the resulting normalized chi square too much. That is the
> role of s (eq. 32 on Wolfram). It should be noted that nowhere on
> that page there is the notion of error on the observations: the data
> are what they are and no alternative sampling should be considered.
>
> Please, have a look at
>
> http://en.wikipedia.org/wiki/**Standard_deviation
> http://en.wikipedia.org/wiki/**Standard_error
>
> for further details, especially the last section of the Standard_error
> page as it compares std. error and deviation.
>
> Regards,
> Dim.
> ------------------------------**------------------------------**
> ----------------
> Dimitri Pourbaix * Don't worry, be happy
> Institut d'Astronomie et d'Astrophysique * and CARPE DIEM.
> CP 226, office 2.N4.211, building NO *
> Universite Libre de Bruxelles * Tel : +32-2-650.35.71
> Boulevard du Triomphe * Fax : +32-2-650.42.26
> B-1050 Bruxelles * NAC: HBZSC RG2Z6
> http://sb9.astro.ulb.ac.be/~**pourbaix * mailto:
> pourbaix@astro.ulb.ac.**be
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: dev-unsubscribe@commons.**apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>
--e89a8ff253d498d61504bf656812--