6
\textbf{Question 2}

    a) 
    \begin{align*}
    P(a<\mu<b|\mathbf{y}) & = P(a<\mu|\mathbf{y}<b) \\
    & = \int_{a}^b p(\mu|\mathbf{y}) d\mu  \ \ \text{where} \ \ p(\mu|\mathbf{y}) \ \ \text{is a Student \textit{t} pdf.} \\
    & = \int_{\mu} I_{(a<\mu|\mathbf{y}<b)} p(\mu|\mathbf{y}) d\mu
    \end{align*}
    \begin{align*}
    \text{where} \ \ I_{(a<\mu|\mathbf{y}<b)} = \begin{cases} 1 & \text{if} \ a<\mu|\mathbf{y}<b \\ 0 & \text{otherwise}  \end{cases}
    \end{align*}

produces:

enter image description here

But I want it to look like:

enter image description here

ie, the first line of the align starts on the same line as a)

How can I adjust the code to do this?

Moriambar
  • 11,466
TrueTears
  • 1,617
  • 2
    Possible duplictate of http://tex.stackexchange.com/questions/58141/equations-inside-enumerate-aligned-on-items-number – Ruben Aug 25 '13 at 18:48
  • 2
    Off-topic hint: don't use | to denote the "given" or "conditional on" symbol. There's a command called \mid that inserts a vertical bar, but with thin spaces on either end. I think you'll like the resulting look. – Mico Aug 25 '13 at 19:39
  • @Mico Thanks for that, I will start using it from now on :) – TrueTears Aug 25 '13 at 20:07

1 Answers1

7

I believe you may want the aligned environment

% arara: pdflatex
% !arara: indent: {overwrite: yes}
\documentclass{article}
\usepackage{amsmath}

\begin{document}
\begin{enumerate}
    \item 
    $\begin{aligned}[t]
        P(a<\mu<b|\mathbf{y}) & = P(a<\mu|\mathbf{y}<b)                                                                                             \\
                              & = \int_{a}^b p(\mu|\mathbf{y}) d\mu  \ \ \text{where} \ \ p(\mu|\mathbf{y}) \ \ \text{is a Student \textit{t} pdf.} \\
                              & = \int_{\mu} I_{(a<\mu|\mathbf{y}<b)} p(\mu|\mathbf{y}) d\mu                                                        
    \end{aligned}$
\end{enumerate}
\end{document}
ShreevatsaR
  • 45,428
  • 10
  • 117
  • 149
cmhughes
  • 100,947