-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy path06-math.Rmd
116 lines (58 loc) · 2.67 KB
/
06-math.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# Useful Math Facts {#math}
## Exponents and Logarithms
for positive constants $a$ and $b$:
$a^0 = 1$
$a^{-n}=\frac{1}{a^n}$ for positive integer $n$
$a^{x+y}=a^x a^y$
$a^{x-y}=\frac{a^x}{a^y}$
$(a^x)^y=a^{xy}$
$(ab)^x=a^xb^x$
$\log_a(x) = y$ implies $a^{y} = x$
If you're working in statistics it's usually a safe bet that $\log(x)$ means $\log_e(x)$ not $\log_{10}(x)$.
$\log(1) = 0$
$\log(e) = 1$
$\log(xy)=\log(x) + \log(y)$
$\log(x/y)=\log(x)-\log(y)$
## Sequences and Series
### Monotonicity
A sequence of numbers $\{x_1,x_2,\ldots\}$ is *monotone increasing* if $x_n \le x_{n+1}$ for all $n$. If $x_n \ge x_{n+1}$ for all $n$, the sequence is *monotone decreasing*
### Geometric series
$\sum\limits_{k=0}^{n} a^k =\frac{1- a^{n+1}}{1-a}$
for $|a|<1$ $\sum\limits_{k=0}^{\infty} a^k =\frac{1}{1-a}$
### Taylor series
$e^x=\sum\limits_{n=0}^{\infty}\frac{x^n}{n!}$
### Binomial Theorem
$(x+y)^n = \sum\limits_{k=0}^{n}\binom{n}{k}x^{k}y^{n-k}$
## Calculus - Derivatives
$f(x)=c \;(\text{constant}) \qquad f'(x)=0$
$f(x) = x^{r},\, r \in \mathbb{R} \qquad f'(x) = rx^{r-1}$ (Power Rule)
$f(x) = e^x \qquad f'(x) = e^x$
$f(x)=\log(x) \qquad f'(x) =\frac{1}{x}$
$f(x)=g(x)\pm h(x) \qquad f'(x)=g'(x) \pm h'(x)$
$f(x)=g(x)h(x) \qquad f'(x)= g(x)h'(x)+g'(x)h(x)$ (Product Rule)
$f(x) =\frac{g(x)}{h(x)} \qquad f'(x)=\frac{g'(x)h(x)-g(x)h'(x)}{[h(x)]^{2}}\,$ (Quotient Rule)
$f(x)=g \circ h(x) = g(h(x)) \qquad f'(x) = g'(h(x))h'(x)$ (Chain Rule)
### Maxima and Minima
$f(x)$ has a *minimum* at $c$ if $f'(c)=0$ and $f''(c)>0$
$f(x)$ has a *maximum* at $c$ if $f'(c)=0$ and $f''(c)<0$
## Calculus - Integrals
$f(x) = c \qquad \int f(x)\,dx = cx$
$f(x) = x^r \qquad \int f(x)\,dx = \frac{x^{r+1}}{r+1},\,r \ne -1$
$f(x) = \frac{1}{x} \qquad \int f(x)\,dx = \log(x)$
$f(x) = e^x \qquad \int f(x)\,dx = e^x$
$f(x) = cg(x) \qquad \int f(x)\,dx = c \int g(x)\, dx$
$f(x) = g(x)\pm h(x) \qquad \int f(x)\,dx = \int g(x)\, dx \pm \int h(x)\, dx$
### Integration by Parts
$\int_{a}^{b} f(x)g'(x)\, dx = f(x) g(x)|_{a}^{b} - \int_{a}^{b} f'(x)g(x)\, dx$
Equivalently, let $u=f(x)$ and $dv= g'(x)\, dx$ then $\int u\, dv = uv -\int v du$
## Miscellaneous
### Gamma function
The Gamma function is defined as $\Gamma(\alpha) =\int\limits_{0}^{\infty}x^{\alpha-1}e^{-x}\, dx$ for $\alpha > 0$
$\Gamma(1)=1$
$\Gamma(\alpha)=(\alpha-1)\Gamma(\alpha-1)$
$\alpha\Gamma(\alpha)=\Gamma(\alpha+1)$
$\Gamma(n)=(n-1)!$ for integer $n>0$
### Beta Function
The Beta function is defined as $B(\alpha, \beta)=\int_{0}^{1}x^{\alpha-1}(1-x)^{\beta-1}\,dx$ for $\alpha, \beta > 0$
$B(\alpha, \beta) = B(\beta, \alpha)$
$B(\alpha, \beta) = \frac{\Gamma(\alpha)\Gamma(\beta)}{\Gamma(\alpha + \beta)}$