From 37b6c986316bafc37c05cd32aafdb67b5bbbfe58 Mon Sep 17 00:00:00 2001 From: Matthias Vallentin Date: Wed, 17 Feb 2016 13:56:47 -0800 Subject: [PATCH] Consistently use Gamma & Exponential distribution Textbooks use the beta parameter with different semantics. Some use it as rate parameter and some as inverse scale. This commit switches Gamma and Expoential distribution over to the rate parameterization, and adds a footnote to clarify this notational inconsistency. Closes #13. --- VERSION | 2 +- probstat.tex | 2 +- stat-cookbook.tex | 22 ++++++++++++++-------- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/VERSION b/VERSION index b1e80bb..845639e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.3 +0.1.4 diff --git a/probstat.tex b/probstat.tex index e68994f..ded13d4 100644 --- a/probstat.tex +++ b/probstat.tex @@ -286,7 +286,7 @@ % Gamma \newcommandx\gam[1][1={\alpha,\beta}]{\textrm{Gamma}\left({#1}\right)} \newcommandx\dgamma[3][1=x,2=\alpha,3=\beta]% -{\frac{1}{\Gamma\left( #2 \right) #3^{#2}} #1^{#2 -1}e^{- #1 / #3}} +{\frac{#3^{#2}}{\Gamma\left( #2 \right)} #1^{#2-1}e^{-#3#1}} % InverseGamma \newcommandx\invgamma[1][1={\alpha,\beta}]{\textrm{InvGamma}\left({#1}\right)} diff --git a/stat-cookbook.tex b/stat-cookbook.tex index 9545270..d524006 100644 --- a/stat-cookbook.tex +++ b/stat-cookbook.tex @@ -25,6 +25,7 @@ \usepackage{multicol} \usepackage{rotating} \usepackage{tikz} +\usepackage{threeparttable} \usepackage{url} \usepackage{xspace} @@ -185,7 +186,7 @@ \subsection{Discrete Distributions} \subsection{Continuous Distributions} -\begin{center} +\begin{threeparttable} \small %\newcolumntype{L}{>{\varwidth[c]{\linewidth}}l<{\endvarwidth}} \newcolumntype{M}{>{\begin{math}\displaystyle}c<{\end{math}}} @@ -244,14 +245,14 @@ \subsection{Continuous Distributions} & \frac{2d_2^2(d_1+d_2-2)}{d_1(d_2-2)^2(d_2-4)} %\; d_2 > 4 & \\[3ex] - Exponential & \ex & \pex & \dex & + Exponential\tnote{$\ast$} & \ex & \pex & \dex & \beta & \beta^2 & - \frac{1}{1-\beta s} \left(s < 1/\beta \right) \\[3ex] + \frac{1}{1-\frac{s}{\beta}} \left(s<\beta\right) \\[3ex] - Gamma & \gam & - \frac{\gamma(\alpha,x/\beta)}{\Gamma(\alpha)} & \dgamma & - \alpha\beta & \alpha\beta^2 & - \left( \frac{1}{1-\beta s} \right)^\alpha \left( s < 1/\beta \right)\\[3ex] + Gamma\tnote{$\ast$} & \gam & + \frac{\gamma(\alpha,\beta x)}{\Gamma(\alpha)} & \dgamma & + \frac{\alpha}{\beta} & \frac{\alpha}{\beta^2} & + \left(\frac{1}{1-\frac{s}{\beta}} \right)^\alpha \left(s<\beta\right)\\[3ex] Inverse Gamma & \invgamma & \pinvgamma & \dinvgamma & \frac{\beta}{\alpha-1} \; \alpha>1 & @@ -284,7 +285,12 @@ \subsection{Continuous Distributions} \bottomrule \end{tabular} -\end{center} +\begin{tablenotes} +\item[$\ast$] We use the \emph{rate} parameterization where + $\beta=\frac{1}{\lambda}$. Some textbooks use $\beta$ as \emph{scale} + parameter instead~\cite{Wasserman03}. +\end{tablenotes} +\end{threeparttable} \begin{figure}[H] \includegraphics[scale=0.35]{figs/uniform-pdf.pdf}