1

How could I correct the alignment

\begin{align*}
    &1 \text{ stg } = 0.5 \quad 
    P(A \mid A) = a \quad 
    P(B \mid B) = b \\
    &P(B \mid A) = (1-a) \quad 
    P(A \mid B) = 1-b
\end{align*}

I desire '1 stg = 0.5' to be on the same line but aligned left

1
  • 2
    Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Nov 11, 2023 at 10:28

1 Answer 1

3

Probably you want something along these lines:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation*}
1\,\text{stg} = 0.5 \qquad
\begin{alignedat}[t]{2}
    P(A \mid A) &= a     &\qquad P(B \mid B) &= b \\
    P(B \mid A) &= (1-a) &\qquad P(A \mid B) &= 1-b
\end{alignedat}
\end{equation*}

\end{document}

enter image description here

1
  • 1
    +1 :-) For the unitiated reader(s) of this answer: Technically, only one of the two instances of \qquad within the alignedat environment is really needed; the other is redundant. Of course, having two instances of \qquad doesn't doesn't hurt, and it arguably makes the code easier to read and understand.
    – Mico
    Nov 11, 2023 at 19:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .