Skip to content

Commit c990112

Browse files
authored
Merge pull request #88 from tomfaulkenberry/master
add wald and wald-pdf
2 parents 72089ac + 5671e29 commit c990112

3 files changed

Lines changed: 82 additions & 2 deletions

File tree

D/wald.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
layout: definition
3+
mathjax: true
4+
5+
author: "Thomas J. Faulkenberry"
6+
affiliation: "Tarleton State University"
7+
e_mail: "faulkenberry@tarleton.edu"
8+
date: 2020-09-04 12:00:00
9+
10+
title: "Wald distribution"
11+
chapter: "Probability Distributions"
12+
section: "Univariate continuous distributions"
13+
topic: "Wald distribution"
14+
definition: "Definition"
15+
16+
sources:
17+
- authors: "Anders, R., Alario, F. -X., and van Maanen, L."
18+
year: 2016
19+
title: "The Shifted Wald Distribution for Response Time Data Analysis"
20+
in: "Psychological Methods"
21+
pages: "vol. 21, no. 3, pp. 309-327"
22+
url: "https://dx.doi.org/10.1037/met0000066"
23+
doi: "10.1037/met0000066"
24+
25+
def_id: "D95"
26+
shortcut: "wald"
27+
username: "tomfaulkenberry"
28+
---
29+
30+
31+
**Definition**: Let $X$ be a [random variable](/D/rvar). Then, $X$ is said to follow a Wald distribution with drift rate $\gamma$ and threshold $\alpha$
32+
33+
$$ \label{eq:wald}
34+
X \sim \mathrm{Wald}(\gamma, \alpha) \; ,
35+
$$
36+
37+
if and only if its [probability density function](/D/pdf) is given by
38+
39+
$$ \label{eq:wald-pdf}
40+
\mathrm{Wald}(x; \gamma, \alpha) = \frac{\alpha}{\sqrt{2\pi x^3}}\exp\Bigl(-\frac{(\alpha-\gamma x)^2}{2x}\Bigr)
41+
$$
42+
43+
where $\gamma > 0$, $\alpha > 0$, and the density is zero if $x \leq 0$.

P/bf-ep.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ $$
6464
Now, both the constrained model $m_1$ and the [encompassing model](/D/encm) $m_e$ contain the same parameter vector $\theta$. Choose a specific value of $\theta$, say $\theta'$, that exists in the support of both models $m_1$ and $m_e$ (we can do this, because $m_1$ is nested within $m_e$). Then, for this parameter value $\theta'$, we have $p(y \mid \theta',m_1)=p(y \mid \theta',m_e)$, so the expression for the Bayes factor in equation \eqref{eq:bayesfactor} reduces to an expression involving only the priors and posteriors for $\theta'$ under $m_1$ and $m_e$:
6565

6666
$$ \label{eq:bayesfactor2}
67-
B_{1e} = \frac{p(\theta' \mid m_1) / p(\theta' \mid y,m_1)}{p(\theta' \mid m_e) / p(\theta' \mid y,m_e)}.
67+
\text{BF}_{1e} = \frac{p(\theta' \mid m_1) / p(\theta' \mid y,m_1)}{p(\theta' \mid m_e) / p(\theta' \mid y,m_e)}.
6868
$$
6969

7070
Because $m_1$ is nested within $m_e$ via an inequality constraint, the prior $p(\theta' \mid m_1)$ is simply a truncation of the encompassing prior $p(\theta' \mid m_e)$. Thus, we can express $p(\theta' \mid m_1)$ in terms of the encompassing prior $p(\theta' \mid m_e)$ by multiplying the encompassing prior by an indicator function over $m_1$ and then normalizing the resulting product. That is,
@@ -91,7 +91,7 @@ $$
9191
Plugging \eqref{eq:prior} and \eqref{eq:posterior} into \eqref{eq:bayesfactor2}, this gives us
9292

9393
$$ \label{eq:bayesfactor3}
94-
B_{1e} = \frac{c \cdot p(\theta' \mid m_e) / d \cdot p(\theta' \mid y,m_e)}{p(\theta' \mid m_e) / p(\theta' \mid y,m_e)} = \frac{c}{d} = \frac{1/d}{1/c},
94+
\text{BF}_{1e} = \frac{c \cdot p(\theta' \mid m_e) / d \cdot p(\theta' \mid y,m_e)}{p(\theta' \mid m_e) / p(\theta' \mid y,m_e)} = \frac{c}{d} = \frac{1/d}{1/c},
9595
$$
9696

9797
which completes the proof. Note that by definition, $1/d$ represents the proportion of the posterior distribution for $\theta$ under the [encompassing model](/D/encm) $m_e$ that agrees with the constraints imposed by $m_1$. Similarly, $1/c$ represents the proportion of the prior distribution for $\theta$ under the [encompassing model](/D/encm) $m_e$ that agrees with the constraints imposed by $m_1$.

P/wald-pdf.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
layout: proof
3+
mathjax: true
4+
5+
author: "Thomas J. Faulkenberry"
6+
affiliation: "Tarleton State University"
7+
e_mail: "faulkenberry@tarleton.edu"
8+
date: 2020-09-04 12:00:00
9+
10+
title: "Probability density function of the Wald distribution"
11+
chapter: "Probability Distributions"
12+
section: "Univariate continuous distributions"
13+
topic: "Wald distribution"
14+
theorem: "Probability density function"
15+
16+
sources:
17+
18+
proof_id: "P162"
19+
shortcut: "wald"
20+
username: "tomfaulkenberry"
21+
---
22+
23+
24+
**Theorem:** Let $X$ be a positive [random variable](/D/rvar) following a [Wald distribution](/D/wald):
25+
26+
$$ \label{eq:wald}
27+
X \sim \mathrm{Wald}(\gamma, \alpha) \; .
28+
$$
29+
30+
Then, the [probability density function](/D/pdf) of $X$ is
31+
32+
$$ \label{eq:wald-pdf}
33+
f_X(x) = \frac{\alpha}{\sqrt{2\pi x^3}}\exp\Bigl(-\frac{(\alpha-\gamma x)^2}{2x}\Bigr) \; .
34+
$$
35+
36+
37+
**Proof:** This follows directly from the [definition of the Wald distribution](/D/wald).

0 commit comments

Comments
 (0)