2

Can somebody explain why equation (6.3) and (6.4) are shown in the book and what the author is trying to say?

It feels to me that I am reading the text but I don't think I getting the true meaning that the author is trying to say.

I am reading the book, "Doing Bayesian Data Analysis" and the page is "127".

enter image description here

StoryMay
  • 2,273
  • 9
  • 25
  • 2
    The beta distribution is commonly used in bayesian analysis as a prior distribution when the parameter of the model is a probability. See https://stats.stackexchange.com/search?q=beta+prior – periwinkle Dec 18 '19 at 16:45

1 Answers1

9

In plain English:

  • The Beta distribution family is a set of continuous probability distributions.
  • It describes random variables that can take values anywhere between 0 and 1.
  • One example of a beta distribution is the uniform distribution on [0, 1].
  • A beta distribution has density proportional to $x^{a-1}(1-x)^{b-1}$ where $a$ and $b$ are parameters. Setting $a=b=1$ yields a uniform, since the density is constant.
  • Like all PDF's, these ones must have a total probability of 1. To get this to work, you have to divide $x^{a-1}(1-x)^{b-1}$ by its own integral between 0 and 1. This integral, seen as a function of $a, b$, has a name because it has other uses in mathematics. It is called the Beta Function.
eric_kernfeld
  • 4,828
  • 1
  • 16
  • 41
  • 1
    Here's a fun fact to help develop intuitions about the beta distribution. If you simulate $n$ iid random variables from a uniform distribution on [0,1], then retain the $k$th smallest one, it has a Beta distribution with parameters $k$ and $n+1-k$. If $n$ is 5 and $k$ is 4, the density is proportional to $x^4(1-x)^2$, so it's bigger at 0.999 than it is at 0.001, and generally biased toward big values. This makes sense because you took one of the bigger numbers from your list. This type of theory can be used to study properties of the sample median, which is a commonly-used robust estimator. – eric_kernfeld Dec 18 '19 at 16:52
  • Trying to follow but don't really get what you are saying. Somehow it sounds helpful to me to further understand about the Beta distribution, could you please try to explain it in other words? – StoryMay Dec 18 '19 at 17:08
  • Where does it stop making sense? Do you understand the first point? – eric_kernfeld Dec 18 '19 at 17:39
  • I have read your sentences repeatedly but I get stuck even with the first thing, "If you simulate n iid random variables from a uniform distribution on [0, 1], then retain the $ k_{th} $ smallest one, it has a Beta distribution with parameters k and $ n+1-k $. I don't know what you mean by "simulate n iid random variables", it is a "beta distribution", and what do you mean by $ k $ parameters and $ n+1-k $. Did you mean "observations(data)" by "variables"?And why it is bigger than "0.999"? Apologies for my ignorance. – StoryMay Dec 18 '19 at 17:56
  • Yes, "simulate n iid random variables" means draw $n$ observations, as with the R command `runif(n)`. "Retain the kth largest" means `y = sort(runif(n))[k]`. When I say it has a Beta distribution, I mean that doing the simulation `y[i] = sort(runif(n))[k]` for many `i` yields a vector whose entries are *not* approximately uniformly distributed, due to the selection bias. They are Beta distributed. In other words, `hist(y)` starts to look like a Beta PDF. Which Beta PDF does it look like? For that, we have to give the parameters $a$ and $b$. We can compute them as $k$ and $n+1-k$. – eric_kernfeld Dec 18 '19 at 18:40
  • There is more information related to this fun fact in many places: the general concept is called an *order statistic*, and we are discussing the *order statistics of the uniform distribution on [0,1]*. https://en.wikipedia.org/wiki/Order_statistic#Order_statistics_sampled_from_a_uniform_distribution – eric_kernfeld Dec 18 '19 at 18:44
  • Why is $ n + 1 - k $ there? I mean where did it come from? – StoryMay Dec 18 '19 at 20:48
  • 1
    That's a separate question, but any tutorial or book chapter on order statistics can explain the details for an arbitrary continuous distribution, and you can plug in the PDF and CDF of the uniform wherever those are required. – eric_kernfeld Dec 18 '19 at 21:44
  • Order statistics is one that I overglanced long ago. It's time to look at it with eagle eyes. Thank you for the deliberate explanations. – StoryMay Dec 19 '19 at 10:12