This page is/will be a collection of tips on how to accomplish a few things in LaTeX that it took me some work to figure out.

# Symbol for "asymptotically or approximately distributed as"

In statistics, you occasionally run across things like or , meaning "X is approximately Normally distributed" or "X is asymptotically Normally distributed". As far as I know, there's no LaTeX command to generate either of these symbols. Here's some code I used to create them:

\newcommand*{\approxdist}{\mathrel{\vcenter{\offinterlineskip
\vskip-.25ex\hbox{\hskip.55ex$\cdot$}\vskip-.25ex\hbox{$\sim$}
\vskip-.5ex\hbox{\hskip.55ex$\cdot$}}}}
\newcommand*{\asympdist}{\mathrel{\vcenter{\offinterlineskip
\hbox{$\sim$}\vskip-.2ex\hbox{\hskip.55ex$\cdot$}}}}

And here's an example in use (what I used to create the images above):

$X \approxdist N$
$X \asympdist N$

# Professional looking tables

It can be a pain to make nice looking tables in LaTeX. I pretty much start with the following code whenever I want to make a table and modify it to suit my needs. This table used a couple of different methods to align the decimals in each column - you could just pick one. (I originally created this table for an assignment - I've changed the numbers here just to demonstrate the table structure without posting the answer online.)

In the preamble, use 2 packages:

\usepackage{booktabs}
\usepackage{array}

And here's the code to create the table:

\begin{table}
\caption{ANOVA for First Order Model}
\begin{tabular} {l r@{.}l c r@{.}l r@{}l r@{}l}
\toprule
\multicolumn{1}{b{3.5cm}}{\begin{center}Source of Variation\end{center}} &
\multicolumn{2}{b{1.7cm}}{\begin{center}Sum of Squares\end{center}} &
\multicolumn{1}{b{2cm}}{\begin{center}Degrees of Freedom\end{center}} &
\multicolumn{2}{b{1.7cm}}{\begin{center}Mean Square\end{center}} &
\multicolumn{2}{b{1.7cm}}{\begin{center}F\end{center}} &
\multicolumn{2}{b{1.7cm}}{\begin{center}p-value\end{center}} \\
\midrule
Regression($\beta_{1}$, $\beta_{2}$) & 745 & 1234 & 2 & 345 & 5678 & 142. &
1234 & 0. & 098765 \\
Residual & 12 & 3456 & 5 & 3 & 6789 & & & & \\
Interaction & 0 & 1234 & 2 & 0 & 4321 & 6. & 2345 & 1. & 0987 \\
Pure Quadratic & 11 & 1111 & 2 & 23 & 7654 & 345. & 6789 & 2. & 98765 \\
Pure Error & 1 & 7676 & 3 & 9 & 9898 & & & & \\
Total & 555 & 2323 & 7 & 777 & 8765 & & & & \\
\bottomrule
\end{tabular}
\end{table}


Here's what the result looks like:

For more information about making tables in LaTeX, the Wikibooks article on the subject is pretty good.