Math & ScienceBad math environment delimiter

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
APOCooter
Posts: 2
Joined: Thu Oct 17, 2013 4:05 am

Bad math environment delimiter

Post by APOCooter »

Here is my MWE

Code: Select all

\documentclass[letterpaper]{article}  

\usepackage{amsmath}


\begin{document}


Using the invariance property of the MLE, we have:
\begin{align}
\begin{math}
\phi = f(\hat{\theta})Pr(Y_1 = 1) &= Pr(X_i > 0) \\
&= 1 - Pr(X_i < 0) \\
&= 1 - Pr(X_i - \theta< -\theta) \\
&= 1 - Pr(\frac{X_i - \theta}{1} < \frac{-\theta}{1}) \\
&= 1 - Pr(Z < -\theta) \\
&= 1 = Pr(Z < - \frac{\sum_{i=1}^n X_i}{n})
\end{math}
\end{align}

\end{document}
I have no idea why I'm getting the bad delimiter error. I don't think I have any extra or missing braces. I also removed \begin{math} and used $ around each individual argument that used math environment commands. I'm sure the fix is incredibly simple; however, I'm new to latex so I don't know what it is. Any help would be greatly appreciated.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Bad math environment delimiter

Post by Johannes_B »

The environment align already switches to math-mode. Just comment out the math-environment.

Code: Select all

\documentclass{article}  
\usepackage{amsmath}
\begin{document}

Using the invariance property of the MLE, we have:
\begin{align}
\phi = f(\hat{\theta})Pr(Y_1 = 1) &= Pr(X_i > 0) \\
&= 1 - Pr(X_i < 0) \\
&= 1 - Pr(X_i - \theta< -\theta) \\
&= 1 - Pr(\frac{X_i - \theta}{1} < \frac{-\theta}{1}) \\
&= 1 - Pr(Z < -\theta) \\
&= 1 = Pr(Z < - \frac{\sum_{i=1}^n X_i}{n})
\end{align}
\end{document}
Once again, thank you for the nice minimal example. That already made my day.

Best regards
Johannes

PS: if you have a single letter exponent or index, you don't need curly braces, but if you always set them, you will (most likely) never get in trouble.
\sum_{i=1}^{n}
Just as a small tip.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply