[Tex/LaTex] How to write a branch function correctly

math-mode

I tried to write a branch function as follows:

 $Pr{NC|\alpha}=$ \[ \left\{
\begin{array}{ll}
      (1-p)^{n-1}(1-p+p(\alpha + \beta)^{2})^{n-1} & 0\leq x \leq \beta \\
      (1-p)^{n-1}(1-p+4p\alpha\beta)^{n-1} & \beta\leq x\leq \beta-1\\
      (1-p)^{n-1} (1-p(\alpha - \beta)^{2})^{n-1} & 1-\beta\leq x\leq 1 \\

\end{array} 
\right. \]

but the Pr{NC|\alpha}= appears a lone while the function on the second line, How I can put them on the same line?

Best Answer

The version of parentheses for probability is not obvious. A suggestion (one displaymath in \[...\]):

\documentclass{article}

\begin{document} 

\[ 
\Pr\{\mathrm{NC}|\alpha\}= \left\{
\begin{array}{ll}
      (1-p)^{n-1}(1-p+p(\alpha + \beta)^{2})^{n-1} & 0\leq x \leq \beta \\
      (1-p)^{n-1}(1-p+4p\alpha\beta)^{n-1} & \beta\leq x\leq \beta-1\\
      (1-p)^{n-1} (1-p(\alpha - \beta)^{2})^{n-1} & 1-\beta\leq x\leq 1 \\
\end{array} 
\right. 
\]
\end{document}

enter image description here