Re: ANALYZE sampling is too good - Mailing list pgsql-hackers

From Florian Pflug
Subject Re: ANALYZE sampling is too good
Date
Msg-id 848AB714-0DF8-493C-BA8F-7F49102B4E10@phlo.org
Whole thread Raw
In response to Re: ANALYZE sampling is too good  (Claudio Freire <klaussfreire@gmail.com>)
List pgsql-hackers
On Dec10, 2013, at 15:32 , Claudio Freire <klaussfreire@gmail.com> wrote:
> On Tue, Dec 10, 2013 at 11:02 AM, Greg Stark <stark@mit.edu> wrote:
>>
>> On 10 Dec 2013 08:28, "Albe Laurenz" <laurenz.albe@wien.gv.at> wrote:
>>>
>>>
>>> Doesn't all that assume a normally distributed random variable?
>>
>> I don't think so because of the law of large numbers. If you have a large
>> population and sample it the sample behaves like a normal distribution when
>> if the distribution of the population isn't.
>
> No, the large population says that if you have an AVERAGE of many
> samples of a random variable, the random variable that is the AVERAGE
> behaves like a normal.

Actually, that's the central limit theorem, and it doesn't hold for all
random variables, only for those with finite expected value and variance.

The law of large numbers, in contrast, only tells you that the AVERAGE of
n samples of a random variable will converge to the random variables'
expected value as n goes to infinity (there are different versions of the
law which guarantee different kinds of convergence, weak or strong).

best regards,
Florian Pflug




pgsql-hackers by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: Why the buildfarm is all pink
Next
From: Kohei KaiGai
Date:
Subject: Re: Custom Scan APIs (Re: Custom Plan node)