[Tex/LaTex] I don’t know what is wrong: cases and itemize

casesitemize

I don't know what is wrong, because I can see the output but it is compiling with error.

\documentclass{tufte-book}

\usepackage{amsmath}

\begin{document}
\begin{itemize}
\item \begin{tabular}{cc}
\[
\begin{cases}
& x=0.99 \\ & y=0.99
\end{cases} \]
& $\rightarrow$ \qquad $P\left( B | A \right) = 0.33$.
\end{tabular}
\item \begin{tabular}{cc}
\[
\begin{cases}
& x=0.99 \\ & y=0.995
\end{cases} \]
& $\rightarrow$ \qquad $P\left( B | A \right) = 0.498$.
\end{tabular}
\item \begin{tabular}{cc}
\[
\begin{cases}
& x=0.99 \\ & y=0.999
\end{cases} \]
& $\rightarrow$ \qquad $P\left( B | A \right) = 0.83$.
\end{tabular}
\end{itemize}
\end{document}

Any ideas?

Best Answer

You might be interested in the following implementation, which is a little cleaner:

enter image description here

\documentclass{tufte-book}% http://ctan.org/pkg/tufte-latex
\usepackage{amsmath,array}% http://ctan.org/pkg/{amsmath,array}
\newcommand{\probability}[2]{%
  \left\{\begin{array}{@{}l<{\kern-\nulldelimiterspace}@{}}
    #1
    \end{array}\right. \qquad \rightarrow \qquad P\bigl( B \bigm| A \bigr) = #2
}  
\begin{document}
\begin{itemize}
  \item $\probability{x = 0.99 \\ y = 0.99\phantom{0}}{0.33}$
  \item $\probability{x = 0.99 \\ y = 0.995}{0.498}$
  \item $\probability{x = 0.99 \\ y = 0.999}{0.83}$
\end{itemize}
\end{document}