Skip to main content
edited tags
Link
kjetil b halvorsen
  • 82.8k
  • 32
  • 201
  • 663
Tweeted twitter.com/StackStats/status/787261430076702720
Tried to explain better the example
Source Link

I was reading Think Bayes book and chapter about Approximate Bayesian Computation where the author is usinguses a sample of heights (n=154000)bayesian approach to compute the likelihood that the a sample "like this" was drawn from a normally distributed population withcalculate mean $\mu$ and stddevstandard deviation $\sigma$, of height in US population $\mathcal N(\mu,\sigma)$(which is assumed to be normally distributed). Where "like this" means a sample

It starts with this meana uniform prior of hypotheses $m$$(\mu_1,\sigma_1),(\mu_2,\sigma_2),...$ and standard deviation $s$ instead ofcomputes a the posterior distribution from a large sample with theseof 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 valuessample.

For each hypothesis $(\mu_i,\sigma_i)$ it computes the likelihood thatof observing a sample ofwith mean $m$ comes from a hypotheticalunder that hypothesis as $\mathcal N(\mu,\sigma)$ the author uses$f(m)$ where $f$ is the PDF of a normal distribution $\mathcal N\left(\mu, {\sigma \over \sqrt n}\right)$$\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.

ButNow for the part that I don't understand, for each hypothesis it computes the likehood thatof a sample of stddevwith that sample standard deviation $s$ comes from a hypothetical $\mathcal N(\mu,\sigma)$ he usesas $g(s)$ where $g$ is the PDFpdf of $\mathcal N\left(\sigma, {\sigma \over \sqrt{2(n-1)}}\right)$$\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^2\right)$$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?

I was reading Think Bayes book and chapter about Approximate Bayesian Computation the author is using a sample of heights (n=154000) to compute the likelihood that the a sample "like this" was drawn from a normally distributed population with mean $\mu$ and stddev $\sigma$, $\mathcal N(\mu,\sigma)$. Where "like this" means a sample with this mean $m$ and standard deviation $s$ instead of a sample with these exact values.

For the likelihood that a sample of mean $m$ comes from a hypothetical $\mathcal N(\mu,\sigma)$ the author uses the PDF of a normal distribution $\mathcal N\left(\mu, {\sigma \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.

But for the likehood that a sample of stddev $s$ comes from a hypothetical $\mathcal N(\mu,\sigma)$ he uses the PDF of $\mathcal N\left(\sigma, {\sigma \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^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?

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?

fix missing \ in \mathcal X^2
Source Link

I was reading Think Bayes book and chapter about Approximate Bayesian Computation the author is using a sample of heights (n=154000) to compute the likelihood that the a sample "like this" was drawn from a normally distributed population with mean $\mu$ and stddev $\sigma$, $\mathcal N(\mu,\sigma)$. Where "like this" means a sample with this mean $m$ and standard deviation $s$ instead of a sample with these exact values.

For the likelihood that a sample of mean $m$ comes from a hypothetical $\mathcal N(\mu,\sigma)$ the author uses the PDF of a normal distribution $\mathcal N\left(\mu, {\sigma \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.

But for the likehood that a sample of stddev $s$ comes from a hypothetical $\mathcal N(\mu,\sigma)$ he uses the PDF of $\mathcal N\left(\sigma, {\sigma \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^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$$\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?

I was reading Think Bayes book and chapter about Approximate Bayesian Computation the author is using a sample of heights (n=154000) to compute the likelihood that the a sample "like this" was drawn from a normally distributed population with mean $\mu$ and stddev $\sigma$, $\mathcal N(\mu,\sigma)$. Where "like this" means a sample with this mean $m$ and standard deviation $s$ instead of a sample with these exact values.

For the likelihood that a sample of mean $m$ comes from a hypothetical $\mathcal N(\mu,\sigma)$ the author uses the PDF of a normal distribution $\mathcal N\left(\mu, {\sigma \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.

But for the likehood that a sample of stddev $s$ comes from a hypothetical $\mathcal N(\mu,\sigma)$ he uses the PDF of $\mathcal N\left(\sigma, {\sigma \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^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?

I was reading Think Bayes book and chapter about Approximate Bayesian Computation the author is using a sample of heights (n=154000) to compute the likelihood that the a sample "like this" was drawn from a normally distributed population with mean $\mu$ and stddev $\sigma$, $\mathcal N(\mu,\sigma)$. Where "like this" means a sample with this mean $m$ and standard deviation $s$ instead of a sample with these exact values.

For the likelihood that a sample of mean $m$ comes from a hypothetical $\mathcal N(\mu,\sigma)$ the author uses the PDF of a normal distribution $\mathcal N\left(\mu, {\sigma \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.

But for the likehood that a sample of stddev $s$ comes from a hypothetical $\mathcal N(\mu,\sigma)$ he uses the PDF of $\mathcal N\left(\sigma, {\sigma \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^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?

Source Link
Loading