How to write a series and formulae#
Part of a series: Template series.
Follow reading here
Formulae#
General information about formulae in jupyter books can be found here. In general, formulae can be written in the classical eqution
environment:
$$
()#\[\begin{equation}
y = ax +b \\
a,b \in \mathbb{R} \\
x \sim N(\mu,\sigma)
\end{equation}\]
\[However, if you want to align lines of your equations, the `align` environment might be a good choice:\]
()#\[\begin{align}
p &\sim \text{Dir}(a\cdot \theta_0) \\
\Rightarrow f(p|a,\theta_0) &= \frac{\Gamma(a\theta_{0,1}+\dots+a\theta_{0,G})}{\Gamma(a\theta_{0,1})\dots\Gamma(a\theta_{0,G})} x_1^{a\theta_{0,1}-1}\dots x_{G-1}^{a\theta_{0,G-1}-1}\left(1-\sum_{i=1}^{G-1} x_i\right)^{a\theta_{0,G}-1}\\
\Rightarrow \mathbb{E}(p)&=\frac{a\theta_0}{a\sum_g \theta_{0,g}} = \theta_0 \\ \Rightarrow \mathbb{V}(p_g)&=\frac{\theta_{0,g}(1-\theta_{0,g})}{a+1}
\end{align}\]
$$