This note list commands for creating mathematics formulas in RMarkdown.
Symbol | Script |
---|---|
\(\alpha\) | \alpha |
\(A\) | A |
\(\beta\) | \beta |
\(B\) | B |
\(\gamma\) | \gammma |
\(\Gamma\) | \Gamma |
\(\pi\) | \pi |
\(\Pi\) | \Pi |
\(\phi\) | \phi |
\(\Phi\) | \Phi |
\(\varphi\) | \varphi |
\(\theta\) | \theta |
Symbol | Script |
---|---|
\(\cos\) | \cos |
\(\sin\) | \sin |
\(\lim\) | \lim |
\(\exp\) | \exp |
\(\to\) | \to |
\(\infty\) | \infty |
\(\equiv\) | \equiv |
\(\bmod\) | \bmod |
\(\times\) | \times |
Symbol | Script |
---|---|
\(k_{n+1}\) | k_{n+1} |
\(n^2\) | n^2 |
\(k_n^2\) | k_n^2 |
Symbol | Script |
---|---|
\(\frac{n!}{k!(n-k)!}\) | \frac{n!}{k!(n-k)!} |
\(\binom{n}{k}\) | \binom{n}{k} |
\(\frac{\frac{x}{1}}{x - y}\) | \frac{\frac{x}{1}}{x - y} |
\(^3/_7\) | ^3/_7 |
Symbol | Script |
---|---|
\(\sqrt{k}\) | \sqrt{k} |
\(\sqrt[n]{k}\) | \sqrt[n]{k} |
Symbol | Script |
---|---|
\(a^{\prime}\) | a^{\prime} |
\(a^{\prime\prime}\) | a^{\prime\prime} |
\(\hat{a}\) | \hat{a} |
\(\bar{a}\) | \bar{a} |
\(\grave{a}\) | \grave{a} |
\(\acute{a}\) | \acute{a} |
\(\dot{a}\) | \dot{a} |
\(\ddot{a}\) | \ddot{a} |
\(\not{a}\) | \not{a} |
\(\mathring{a}\) | \mathring{a} |
\(\overrightarrow{AB}\) | \overrightarrow{AB} |
\(\overleftarrow{AB}\) | \overleftarrow{AB} |
\(a^{\prime\prime\prime}\) | a^{\prime\prime\prime} |
\(\overline{aaa}\) | \overline{aaa} |
\(\check{a}\) | \check{a} |
\(\vec{a}\) | \vec{a} |
\(\underline{a}\) | \underline{a} |
\(\color{red}x\) | \color{red}x |
\(\pm\) | \pm |
\(\mp\) | \mp |
\(\int y \mathrm{d}x\) | \int y \mathrm{d}x |
\(,\) | , |
\(:\) | : |
\(;\) | ; |
\(!\) | ! |
\(\int y, \mathrm{d}x\) | \int y, \mathrm{d}x |
\(\dots\) | \dots |
\(\ldots\) | \ldots |
\(\cdots\) | \cdots |
\(\vdots\) | \vdots |
\(\ddots\) | \ddots |
Symbol | Script |
---|---|
\((a)\) | (a) |
\([a]\) | [a] |
\(\{a\}\) | \{a\} |
\(\langle f \rangle\) | \langle f \rangle |
\(\lfloor f \rfloor\) | \lfloor f \rfloor |
\(\lceil f \rceil\) | \lceil f \rceil |
\(\ulcorner f \urcorner\) | \ulcorner f \urcorner |
$$
X_{m,n} =
\begin{pmatrix}
x_{1,1} & x_{1,2} & \cdots & x_{1,n} \\
x_{2,1} & x_{2,2} & \cdots & x_{2,n} \\
\vdots & \vdots & \ddots & \vdots \\
x_{m,1} & x_{m,2} & \cdots & x_{m,n}
\end{pmatrix}
$$
produces
\[ X_{m,n} = \begin{pmatrix} x_{1,1} & x_{1,2} & \cdots & x_{1,n} \\ x_{2,1} & x_{2,2} & \cdots & x_{2,n} \\ \vdots & \vdots & \ddots & \vdots \\ x_{m,1} & x_{m,2} & \cdots & x_{m,n} \end{pmatrix} \]
$$
M =
\begin{bmatrix}
\frac{5}{6} & \frac{1}{6} & 0 \\[0.3em]
\frac{5}{6} & 0 & \frac{1}{6} \\[0.3em]
0 & \frac{5}{6} & \frac{1}{6}
\end{bmatrix}
$$
produces
\[ M = \begin{bmatrix} \frac{5}{6} & \frac{1}{6} & 0 \\[0.3em] \frac{5}{6} & 0 & \frac{1}{6} \\[0.3em] 0 & \frac{5}{6} & \frac{1}{6} \end{bmatrix} \]
$$
\begin{aligned}
Bias(\hat{\theta}) &= E(\hat{\theta}) - \theta \\
Bias(\hat{\theta}) &= E(2 \bar{X} -1) - \theta \\
Bias(\hat{\theta}) &= \frac{2}{n}\sum_{i=1}^n E(X_i) -1 -\theta \\
Bias(\hat{\theta}) &= 2E(X) - 1 - \theta \\
Bias(\hat{\theta}) &= 2 \cdot \frac{\theta+1}{2} - 1 - \theta \\
Bias(\hat{\theta}) &= 0 \\
\end{aligned}
$$
Produces the following system of equations
\[ \begin{aligned} Bias(\hat{\theta}) &= E(\hat{\theta}) - \theta \\ Bias(\hat{\theta}) &= E(2 \bar{X} -1) - \theta \\ Bias(\hat{\theta}) &= \frac{2}{n}\sum_{i=1}^n E(X_i) -1 -\theta \\ Bias(\hat{\theta}) &= 2E(X) - 1 - \theta \\ Bias(\hat{\theta}) &= 2 \cdot \frac{\theta+1}{2} - 1 - \theta \\ Bias(\hat{\theta}) &= 0 \\ \end{aligned} \]
$$ f(x) = \begin{cases} \frac{1}{b-a} \\ 0 \end{cases} $$
produces the following piece-wise function
\[ f(x) = \begin{cases} \frac{1}{b-a} \\ 0 \end{cases} \]
while not convergence:
compute \(\nabla(J)\)
\(\theta_0 := \theta_0 - \alpha\nabla(J)_0\)
\(\theta_1 := \theta_1 - \alpha\nabla(J)_1\)
end while