Data Science Notebooks without math are lame.

Thankfully Jupyter Notebooks support LatEx

This cheatsheet is neither comprehensive nor complete. For now, it is only a placeholder. My plans are to grow it over time to be a most useful stuff in one place with cut and paste snapshots, but without explicitly spending much time in its development

Here are some references:

http://bebi103.caltech.edu.s3-website-us-east-1.amazonaws.com/2015/tutorials/t0c_intro_to_latex.html

https://jupyter-notebook.readthedocs.io/en/stable/examples/Notebook/Typesetting%20Equations.html

https://oeis.org/wiki/List_of_LaTeX_mathematical_symbols

Inline as follows 
Joint Probability is the probability ofntersection of two or more events. Written as $ P(A \cap B) , P(A,B), P(A\ and\ B)$

Block equation as follows

\begin{align*}
\text{good: } P(A \cap B) =  P(B)\,P(A \mid B)
\end{align*}

\begin{align*}
\text{not good: } P(A \cap B) =  P(B) P(A | B)
\end{align*}

Multiline as follows. Presence of align* messes up *sometimes*. Just align

\begin{align}
\text{good: } P(A \cap B) =  P(B)\,P(A \mid B) \\
\text{not good: } P(A \cap B) =  P(B) P(A | B)
\end{align}

Another example of multi line equations
\begin{align}
\dot{x} & = \sigma(y-x) \\ 
\dot{y} & = \rho x - y - xz \\ 
\dot{z} & = -\beta z + xy
\end{align}

Multi functions
\begin{align*}
\min_{x \in R^{n}}\ f(x)\ subject\ to\  \left\{\begin{array}{lll}
                c_{i}(x)\ = \ 0,\  i \ \in \varepsilon, \\
                c_{i}(x)\ \geq \ 0,\  i\in \iota 
            \end{array}\right.
\end{align*}

Bolded equation
\begin{equation*},
\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right) \end{equation*}

Providing equation number on right

\begin{equation}
\begin{aligned}
&x = 1 \\
&y = 2 + 2x^2
\end{aligned}
\tag{fun system}
\end{equation}


```python

```

5f1797eb64395e34cf1224f152fa059e440f9ee4
ipynb
Jupyter Notebook
Latex_Notebook_Cheatsheet.ipynb
datavector-io/datascience
b1de0cd1c563b3c90d3f4382f0130c77e18308f9
MIT
Latex_Notebook_Cheatsheet.ipynb
datavector-io/datascience
b1de0cd1c563b3c90d3f4382f0130c77e18308f9
MIT
Latex_Notebook_Cheatsheet.ipynb
datavector-io/datascience
b1de0cd1c563b3c90d3f4382f0130c77e18308f9
MIT
Qwen/Qwen-72B
1. YES
2. YES