54 votes

Choosing between uninformative beta priors

First of all, there is no such a thing as uninformative prior. Below you can see posterior distributions resulting from five different "uninformative" priors (described below the plot) given different ...
Tim's user avatar
  • 136k
31 votes
Accepted

Is the Gaussian distribution a specific case of the Beta Distribution?

They are both symmetric and more or less bell shaped, but the symmetric beta (whether at 4,4 or at any other specific value) is not actually Gaussian. You can tell this even without looking at the ...
Glen_b's user avatar
  • 277k
28 votes

How to implement a mixed model using betareg function in R?

The package glmmTMB may be helpful for anyone with a similar question. For example, if you wanted to include pond from the above question as a random effect, the following code would do the trick: <...
Kori K's user avatar
  • 406
21 votes
Accepted

Beta distribution on flipping a coin

The quotation is a "logical sleight-of-hand" (great expression!), as noted by @whuber in comments to the OP. The only thing we can really say after seeing that the coin has an head and a tail, is that ...
DeltaIV's user avatar
  • 17.4k
21 votes
Accepted

Why exactly can't beta regression deal with 0s and 1s in the response variable?

Because the loglikelihood contains both $\log(x)$ and $\log(1-x)$, which are unbounded when $x=0$ or $x=1$. See equation (4) of Smithson & Verkuilen, "A Better Lemon Squeezer? Maximum-Likelihood ...
Kevin Wright's user avatar
21 votes

Whence the beta distribution?

Thomas Bayes (1763) derived the Beta distribution [without using this name] as the very first example of posterior distribution, predating Leonhard Euler (1766) work on the Beta integral pointed out ...
Xi'an's user avatar
  • 103k
20 votes
Accepted

What is the relationship between the Beta distribution and the logistic regression model?

Beta is a distribution of values in $(0,1)$ range that is very flexible in it's shape, so for almost any unimodal empirical distribution of values in $(0,1)$ you can easily find parameters of such ...
Tim's user avatar
  • 136k
16 votes
Accepted

Efficiently sampling a thresholded Beta distribution

The simplest way, and most general way, that applies to any truncated distribution (it can be also generalized to truncation on both sides), is to use inverse transform sampling. If $F$ is the ...
Tim's user avatar
  • 136k
16 votes
Accepted

Limit of $n$ times Beta$(1,n)$ variables when $n$ goes to infinity

First, let's get a sense why this should be true. The density of a Beta$(1,n)$ variable which has been multiplied by $n$ should be proportional to $$\left(\frac{x}{n}\right)^{1-1}\left(1 - \frac{x}{n}...
whuber's user avatar
  • 316k
15 votes
Accepted

Pdf of $y = - \log(X)$ when $X$ is beta distributed The expected value of $Y$

Let $Y=-\ln X,\quad X \sim Beta(\alpha,\beta)$ then $$ F_Y(y)=P(Y<y)=P(-\ln X < y)=P(X > e^{-y})=\int_{e^{-y}}^1\frac{\Gamma(\alpha+\beta)}{\Gamma(\alpha)\Gamma(\beta)}x^{\alpha-1}(1-x)^{\...
gerhard's user avatar
  • 316
15 votes
Accepted

How to implement a mixed model using betareg function in R?

The current capabilities of betareg do not include random/mixed effects. In betareg() you can only include fixed effect, e.g., ...
Achim Zeileis's user avatar
15 votes

Uniform vs Beta(1,1) prior

They both are equivalent. $P(\theta) = { \Gamma(\alpha + \beta) \over \Gamma(\alpha)\Gamma(\beta)} \theta^{\alpha-1}(1-\theta)^{\beta-1}$ if $\alpha = \beta = 1$ $P(\theta) = { \Gamma(\alpha + \...
carlos's user avatar
  • 191
15 votes

Why is the Beta Distribution Called the Beta Distribution?

Florian Cajori, in History of Mathematical Notations Vol. II (1928), wrote ... in the same paper of 1730 Euler gave what we now call the "beta function." ... About a century after Euler's first ...
whuber's user avatar
  • 316k
15 votes
Accepted

Square root of a Beta(1,1) random variable

If $X^{2}\sim\operatorname{Beta}(1,1)$ (which is a uniform distribution), then $X^p\sim\operatorname{Kumaraswamy}(1/p, 1)$ (see the Wikipedia page). The PDF of the resulting Kumaraswamy distribution ...
COOLSerdash's user avatar
  • 29.4k
15 votes
Accepted

Distribution of argmax of beta-distributed random variables

When the $x_i$ are independent for $1\le i \le d$ with distribution functions $F_i$ and density functions $f_i,$ respectively, the chance that $x_j$ is the largest is (by the very definition of the ...
whuber's user avatar
  • 316k
14 votes

How to calculate the PDF of the 'difference' between two Beta distributions?

I know this is a bit of an old question but for what it's worth there is an established closed-form solution to this problem, found by Pham-Gia, Turkkan, and Eng in 1993. It's a piecewise solution ...
Adam Kern's user avatar
  • 241
14 votes

Distribution of the exponential of an exponentially distributed random variable?

First, note that the range of $\DeclareMathOperator{\P}{\mathbb{P}} Y$ is $(1, \infty)$. First find the cumulative distribution function of $Y$ in the usual way: $$\begin{align} F_Y(t) & = \...
kjetil b halvorsen's user avatar
13 votes
Accepted

Why is there -1 in beta distribution density function?

This is a story about degrees of freedom and statistical parameters and why it is nice that the two have a direct simple connection. Historically, the "$-1$" terms appeared in Euler's studies of the ...
whuber's user avatar
  • 316k
13 votes
Accepted

Jeffreys' prior for Beta distribution

As indicated in this paper by Yang and Berger (1999) that provides a list of Jeffreys priors, the Jeffreys prior associated with the Beta distribution is the determinant of a $2\times 2$ matrix that ...
Xi'an's user avatar
  • 103k
13 votes
Accepted

How to plot $x^{1700}(1-x)^{300}$?

Stephan's answer about floating point is correct. As a work-around, you could plot the data on a logarithmic scale. Instead of plotting $$ x ^{1700} (1-x)^{300} $$ you would plot $$ 1700\log(x) + 300\...
Sycorax's user avatar
  • 89k
13 votes
Accepted

Is there a "beta distribution" over the entire real line?

One way to make a "real-valued beta distribution" would be to transform the interval $(0,1)$ onto the real line. One way of doing that is the logistic function $$ \text{logit}(x)= \log(\frac{...
kjetil b halvorsen's user avatar
12 votes

What is the intuition behind beta distribution?

So far the preponderance of answers covered the rationale for Beta RVs being generated as the prior for a sample proportions, and one clever answer has related Beta RVs to order statistics. Beta ...
AdamO's user avatar
  • 60.5k
12 votes

Do two quantiles of a beta distribution determine its parameters?

The answer is yes, provided the data satisfy obvious consistency requirements. The argument is straightforward, based on a simple construction, but it requires some setting up. It comes down to an ...
whuber's user avatar
  • 316k
12 votes
Accepted

Can cosine kernel be understood as a case of Beta distribution?

The cosine kernel is not a beta distribution. Note that the following things are all true of the standard cosine density: $f(0)=1$ $f(0.5)=0.5$ The right half of this density is rotationally ...
Glen_b's user avatar
  • 277k
12 votes
Accepted

Expected value of $1/x$ when $x$ follows a Beta distribution

First note that the pdf of a Beta$(\alpha, \beta)$ distribution is only defined for $\alpha, \beta > 0$. Which means that for when $\alpha \leq 0$ or $\beta \leq 0$ $$\int_0^1 \dfrac{x^{\alpha - 1}...
Greenparker's user avatar
  • 15.1k
12 votes

Why does dbeta not sum to 1?

The relevant property of a probability density is not that it sums (for evaluation on some particular $x$ values) to one, but that it integrates to one. If you evaluate a density $f$ at $x$ values ...
Stephan Kolassa's user avatar
11 votes
Accepted

Understanding the Beta conjugate prior in Bayesian inference about a frequency

The point is that we know what the posterior is proportional to and it so happens that we do not need to do the integration to get the (constant) denominator, because we recognise that a distribution ...
Björn's user avatar
  • 30.4k
11 votes

Square root of a Beta(1,1) random variable

You ask for a general method. Here is one. When $X^p$ has a Beta$(\alpha,\beta)$ distribution for $p\gt 0,$ this means for all $0\lt y \lt 1$ that $$F_X(y^{1/p}) = \Pr(X \le y^{1/p}) = \Pr(X^p \le y) ...
whuber's user avatar
  • 316k
11 votes
Accepted

Distribution of i.i.d. random variables $X$ and $Y$ if $XY \sim \text{Beta}(\alpha, \beta)$

In the case of $Z=XY\sim \text{Beta}(\alpha,1)$, the moment generating function (mgf) of $-\ln(XY)=-\ln X-\ln Y$ is \begin{align} M_{-\ln(XY)}(t) &= E(e^{-t\ln Z}) \\ &=E(Z^{-t}) \\ &=\...
Jarle Tufto's user avatar
  • 10.5k
10 votes
Accepted

Distribution of the ratio of dependent chi-square random variables

This post elaborates on the answers in the comments to the question. Let $X = (X_1, X_2, \ldots, X_n)$. Fix any $\mathbf{e}_1\in\mathbb{R}^n$ of unit length. Such a vector may always be completed ...
whuber's user avatar
  • 316k

Only top scored, non community-wiki answers of a minimum length are eligible