



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
CS109 LaTeX Cheat Sheet. Created by Derek Chong for CS109 during Spring 2020. This cheat sheet assumes you have done an introductory tutorial and have a ...
Typology: Study Guides, Projects, Research
1 / 7
This page cannot be seen from the preview
Don't miss anything!




\geq \leq \neq \approx \sim \Rightarrow \sqrt{42} \infty \lambda \mu, \sigma \Phi(0) \Sigma \theta \bar{X}, \hat{X} A,B,\dots,Z 1,2,\cdots,n \verb|my_function() | \frac{42 \textrm{ units} \times 42 \textrm{ units}}{ \textrm{ units} \times 42 \textrm{ units}} \sum_{i=0}^{n} \frac{a}{b} \prod_{i=0}^{n} \frac{a}{b}
P(A \cap B) P(A \cup B) \binom{n}{k} P(A_1|B^C)
P(\textrm{text } | \textrm{ text}) P(\textrm{cond} \leq 5.0) \frac{P(\textrm{a } | \textrm{ b}) \times P(\textrm{b})}{P(\t extrm{a})} \frac{P(\textrm{a } | \textrm{ b}) \times P(\textrm{b})}{P(\t extrm{a } | \textrm{ b})P(\textrm{b}) + P(\textrm{a } | \textrm{ b}^C)P(\textrm{b}^C )}
X \sim \textrm{Ber}(p) X \sim \textrm{Bin}(n,p) X \sim \textrm{Poi}(\lambd a=0) X \sim \textrm{Exp}(\lambd a=0) X \sim \mathcal{N}(\mu = 0, \sigma^2 = 1) \theta \sim \textrm{Beta}(a,b)
\int_{-1}^{1} x^2 - 2x + 1 dx \left[ x - \frac{1}{2}x^ \right]{-1}^ \iint{0<y<x<1} \frac{x}{y} dy dx \left. \frac{2}{3}y
\textrm{Var}(X) \textrm{Cov}(X,Y) \begin{bmatrix} a & b \ c & d \end{bmatrix} \rho
Useful Structures Groups of Equations
\begin{align} P(X=x|Y=1,W=P_1) &= \frac{P(X=x,Y=1 | W=P_1)}{P(Y=1|W=P_1)} \ &= P(X=x|W=P_1) \ &= \binom{5}{x}(0.1)^x(0.9)^{5-x} \ P(X=x|Y=1,W=P_2) &= \frac{P(X=x,Y=1 | W=P_2)}{P(Y=1|W=P_2)} \ &= P(X=x|W=P_2) \ &= \binom{5}{x}(0.1)^x(0.9)^{5-x} \end{align} Venn Diagrams You may have to install the venndiagram package (and include \usepackage{venndiagram}) \begin{venndiagram3sets}[labelA={Foo},labelB={Bar},labelC ={Baz}, labelOnlyA={1},labelOnlyB={2},labelOnlyC={3}, labelOnlyAB={4},labelOnlyAC={5},labelOnlyBC={6},labelABC= {7}, labelNotABC={8}] \begin{center} \begin{venndiagram3sets}[labelA={Foo},labelB={Bar},labelC ={Baz}, labelOnlyA={1},labelOnlyB={2},labelOnlyC={3}, labelOnlyAB={4},labelOnlyAC={5},labelOnlyBC={6},labelABC= {7},labelNotABC={8},shade={yellow}] \fillOnlyB\end{venndiagram3sets} \end{center}
\begin{center} \begin{venndiagram2sets}[labelA={Foo},labelB={Bar}, labelOnlyA={$x$},labelOnlyB={$z$}, labelAB={$y$}, shade={white}] \fillAll \end{venndiagram2sets} \end{center} Full package documentation is available here: https://ctan.math.illinois.edu/macros/latex/contrib/venndiagram/venndiagram.pdf Plotting Graphs \begin{tikzpicture} \begin{axis}[ axis lines = center, xlabel = {$p$}, ] \addplot [domain=-0.05:1.5, samples=100, color=blue]{x}; \addlegendentry{$p$} \addplot [domain=-0.05:1.5, samples=100, color=red]{x*x}; \addlegendentry{$q = p^2$} \end{axis} \end{tikzpicture} Probability Trees \tikzstyle{level 1}=[level distance=3.5cm, sibling distance=3cm] \tikzstyle{level 2}=[level distance=3.5cm, sibling distance=3.3cm] \tikzstyle{bag} = [text width=4em, text centered] \tikzstyle{end} = [circle, minimum width=3pt,fill, inner sep=0pt] \begin{tikzpicture}[grow=right] \node[bag] {Foo} child { node[bag] {Bar} child { node[end, label=right:{Baz}] {} edge from parent node[above] {$X$} node[below] {$x$} } child { node[end, label=right:{Xyzzy}] {} edge from parent node[above] {$X$} node[below] {$x$} }
General Tips