Equations
These are formulas that appear with an equation number.
Basic Equation
The names of equations can not include . or _ but it can include -
\begin{equation}
1 + 1 = 2
(\#eq:eq99-1)
\end{equation}
Which appears as:
1+1=2
The reference to the equation is (13.1) which comes from this code \@ref(eq:eq99-1)
Case-When Equation (Large Curly Brace)
Case when formula:
y={0,if a=11,otherwiseWhich comes from this code:
\begin{equation}
y =
\begin{cases}
0, & \text{if}\ a=1 \\
1, & \text{otherwise}
\end{cases}
(\#eq:eq99-2)
\begin{equation}
The reference to equation is (13.2) which comes from this code \@ref(eq:eq99-2)
Alligned with Underbars
E(Y−ˆY)2=E[f(X)+ϵ−ˆf(X)]2=[f(X)−ˆf(X)]2⏟Reducible+var(ϵ)⏟Irreducible
Comes from this code:
\begin{equation}
\begin{aligned}
\mathrm{E}(Y-\hat{Y})^2 & = \mathrm{E}[f(X) + \epsilon -\hat{f}(X)]^2 \\
& = \underbrace{[f(X) -\hat{f}(X)]^2}_{\mathrm{Reducible}} + \underbrace{\mathrm{var}(\epsilon)}_{\mathrm{Irreducible}} \\
\end{aligned}
(\#eq:eq99-3)
\end{equation}