I was reading Think Bayes book and chapter about Approximate Bayesian Computation where the author uses a bayesian approach to calculate mean $\mu$ and standard deviation $\sigma$ of height in US population (which is assumed to be normally distributed).

It starts with a uniform prior of hypotheses $(\mu_1,\sigma_1),(\mu_2,\sigma_2),...$ and computes a the posterior distribution from a large sample of heights.

The argument given for using ABC is that the likelihood of observing that specific sample is very very low and that it's more sensible to compute the likelihood of any sample like this than the likelihood of this exact sample.

For each hypothesis $(\mu_i,\sigma_i)$ it computes the likelihood of observing a sample with mean $m$ under that hypothesis as $f(m)$ where $f$ is the PDF of a normal distribution $\mathcal N\left(\mu_i, {\sigma_i \over \sqrt n}\right)$ using scipy.stats.norm.logpdf(m, mu, sigma/math.sqrt(n)) which I understand since that is the sampling distribution of the sample means.

Now for the part that I don't understand, for each hypothesis it computes the likehood of a sample with that sample standard deviation $s$ as $g(s)$ where $g$ is the pdf of $\mathcal N\left(\sigma_i, {\sigma_i \over \sqrt{2(n-1)}}\right)$ using scipy.stats.norm.logpdf(s, sigma, sigma/math.sqrt(2*(n-1))). I don't understand where this comes from, the sampling distribution of the sample stddev seems to be a more complex calculation.

Is the pdf of a $\mathcal N\left(\sigma, {\sigma \over \sqrt{2(n-1)}}\right)$ a good approximation of the pdf of the sampling distribution of sample standard deviation?

Is not more appropiate to use the sampling distribution of sample variances? I would say that the likelihood of seeing a sample with standard deviation $s$ is proportional to $f\left((n-1)s^2\over \sigma_i^2\right)$ where $f$ is the probability density function of $\mathcal X^2(n-1)$ (chi squared).

So, the question really is am I right in my intuition that using the pdf of $\mathcal X^2$ would be more accurate and that the author is just using the pdf of $\mathcal N\left(\sigma, {\sigma \over \sqrt{2(n-1)}}\right)$ as an approximation? And when it's safe to use that approximation?

  • $\begingroup$ It is hard to comment without reading the book and since the example is strange -- especially because this has nothing to do with ABC, since ABC is used when you are dealing with untraceable likelihood and as I understand it, in this case likelihood is normal distribution... $\endgroup$ – Tim Oct 2 '16 at 17:24
  • $\begingroup$ I edited the OP to give more context to the example. The guy in the books uses ABC as an speed optimization and too avoid numerical errors due to very small likelihood of that specific sample. So he uses the sample statistics instead of sample itself to compute likelihood to avoid these problems. But the my question is really about the validity of method to compute the likelihood of a sample with a given standard deviation, not the ABC itself. $\endgroup$ – ecerulm Oct 2 '16 at 20:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.