Skip to content

Commit

Permalink
Consistently use Gamma & Exponential distribution
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mavam committed Feb 17, 2016
1 parent 43a133d commit 37b6c98
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.3
0.1.4
2 changes: 1 addition & 1 deletion probstat.tex
Original file line number Diff line number Diff line change
Expand Up @@ -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)}
Expand Down
22 changes: 14 additions & 8 deletions stat-cookbook.tex
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
\usepackage{multicol}
\usepackage{rotating}
\usepackage{tikz}
\usepackage{threeparttable}
\usepackage{url}
\usepackage{xspace}

Expand Down Expand Up @@ -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}}}
Expand Down Expand Up @@ -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 &
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit 37b6c98

Please sign in to comment.