3

My code is:

\begin{numcases}{ P(X_1=x_1,...,X_K=x_)=}
   \frac{N!}{x_1!...x_k!}p_1^{x_1}p_2^{x_2}...p_k^{x_k},& \text{when} \sum_{i=1}^kx_i=N 
    \label{multinomial}
    \\
    0 & \text{otherwise,} \label{negative}
\end{numcases}

which results in

enter image description here

Is there any way of having equations 3.6a and 3.6b instead of 3.6 and 3.7?

5

Use subnumcases: (See texdoc cases for full documentation)

\documentclass{article}
\usepackage{amsmath}
\usepackage{cases}
\begin{document}
\begin{subnumcases}{ P(X_1=x_1,\dots,X_K=x_K)=\label{eq}}
   \frac{N!}{x_1!\dotsm x_k!}p_1^{x_1}p_2^{x_2}\dotsm p_k^{x_k},& when $\sum_{i=1}^kx_i=N$ \label{multinomial}\\
    0 & otherwise, \label{negative}
\end{subnumcases}
\eqref{multinomial} and \eqref{negative} are part of \eqref{eq}.
\end{document}

enter image description here

| improve this answer | |
  • 1
    +1. Do please replace the first instance of ... with \dots and the second and third instances with \dotsb (or \cdots). – Mico Apr 4 at 9:54
  • 1
    @Mico Thank you. Done (With \dotsm instead of \dotsb) – Marcel Krüger Apr 4 at 9:57
  • @MarcelKrüger how do you reference this equation? – Ng123 Apr 4 at 11:04
4

You can use the subnumcases environment. Note that the part after & is in text mode, so any formula requires a pair$ ... $. I also added some improvements: : medsize commands from nccmath for the fractional coefficient and the sum symbol, and smashing the upperpart of the latter for a better symmetry of the brace:

\documentclass{article}
\usepackage{amsmath, nccmath}
\usepackage{cases} 

\begin{document}

\begin{subnumcases}{ P(X_1=x_1,\dots,X_K=x_k)=}
   \mfrac{N!}{x_1!\dots x_k!}\,p_1^{x_1}p_2^{x_2}\dots p_k^{x_k},& when $ \smash[t]{\medop\sum\limits_{i=1}^k}x_i=N $
    \label{multinomial}
    \\
    0 & otherwise, \label{negative}
\end{subnumcases}

\end{document} 

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.