1 Set

1.1 Properties

  • \(U^c = \varnothing\)

  • \(\varnothing^c = U\)

  • \((A^c)^c = A\)

  • \(A \cup A^c = U\)

  • \(A \cap A^c = \varnothing\)

  • \(A \cup B = B \cup A\)

  • \(A \cap B = B \cap A\)

  • \(A \cup (B \cup C) = (A \cup B) \cup C\)

  • \(A \cap (B \cap C) = (A \cap B) \cap C\)

  • \(A \cap (B \cup C) = (A \cup B) \cap (A \cup C)\)

  • \(A \cup (B \cap C) = (A \cap B) \cup (A \cap C)\)

  • \(A \cup \varnothing = A\)

  • \(A \cap U = A\)

  • \(A \cup U = U\)

  • \(A \cap \varnothing = \varnothing\)

  • \(A \cup A = A\)

  • \(A \cap A = A\)

  • \(A \cup (A \cap B) = A\)

  • \(A \cap (A \cup B) = A\)

1.1.1 De Morgan’s Law

  • \((A \cup B)^c = A^c \cap B^c\)
  • \((A \cap B)^c = A^c \cup B^c\)

1.2 Element counting

  • If A and B are disjoin sets, then \(n(A\cup B) = n(A) + n(B)\).

  • If A and B are finite sets, then \(n(A\cup B) = n(A) + n(B) - n(A \cap B)\).

2 Function

2.1 Operations

  • The result of a function can become the input to another function.

  • \(y = f(x)\), \(z = g(y)\), then \(z = g(f(x))\)

2.2 Inverse function

  • If \(y = f(x)\) then its inverse function is \(f^-1(y)\).

  • If \(g(x) = f^-1(x)\) and \(f(x) = g^-1(x)\) then \(f(x)\) and \(g(x)\) are inverses of each other.

2.2.1 Distance between 2 points

Applying Pythagorean theorem: \(d = \sqrt{(x_2-x_1)^2 + (y_2-y_1)^2}\)

3 Linear equation

3.1 Form

  • Slope-intercept form: \(y = mx + b\)

  • General form: \(Ax + By + C = 0\)

3.2 Least-squares line

  • The system of normal equations:

\[ \begin{array}{lcl} nb + \left(\sum x_i\right)m = \sum y_i \\ \left(\sum x_i\right)b + \left(\sum x_i^2\right)m = \sum x_iy_i \end{array} \]

  • Solving them yields:

\[ m = \dfrac{n \sum x_i y_i - \sum x_i \sum y_i}{n \sum x_i^2 - \left(\sum x_i\right)^2}\\ b = \dfrac{\sum y_i - m\sum x_i}{n} = \bar{y} - m\bar{x} \]

4 Matrix

4.1 Matrix product

  • \(A_{n \times m} \cdot B_{m \times p} = AB_{n \times p}\)

4.2 Transpose

  • \(A_{n \times m} \rightarrow A^T = B_{m \times n}\)

4.3 Identity matrix

  • \(I_nA = A\) for every \(n \times p\) matrix A.

  • \(BI_n = B\) for every \(m \times n\) matrix B.

  • \(I_nA = AI_n = A\) for every \(n \times n\) matrix A.

4.4 Inverse

  • \(A^{-1}\) or \(A'\) is the inverse of matrix \(A_{n \times n}\) if \(A^{-1}A = AA^{-1} = I_n\).

  • A \(n \times m\) matrix may have an \(m \times n\) left inverse if \(A^{-1}A = I_n\).

  • A \(n \times m\) matrix may have an \(m \times n\) right inverse if \(AA^{-1} = I_m\).

5 Permutation

5.1 Permutation with distinct objects

  • Permutations of n distinct objects taken r at a time:

\(P(n,r) = _nP_r = P_r^n = P_{n,r} = \dfrac{n!}{(n-r)!}\)

  • where \(n! = n(n-1)(n-2) \cdot \ldots \cdot 3 \cdot 2 \cdot 1\).

5.2 Permutation with non-distinct objects

  • Permutations of n objects, not all distinct taken n at a time:

\(\dfrac{n!}{n_1!n_2! \ldots n_m!}\)
- where \(n_1 + n_2 + \ldots + n_m = n\)

5.3 Circular permutation

\(P(n) = (n-1)!\)

6 Combination

\(C(n,r) = _nC_r = C_r^n = C_{n,r} = \dfrac{n!}{r!(n-r)!}\)

  • where \(r \leq n\)

7 Probability

  • \(P(E) = \dfrac{n(E)}{n(S)}\)

7.1 Properties

  • \(0 \leq P(E) \leq 1\)

  • \(P(E) = 0\) means impossible event.

  • \(P(E) = 1\) means certainty of event.

  • if E and F are any 2 events of an experiment, then \(P(E \cup F) = P(E) + P(F) - P(E \cap F)\)

  • If E and F are mutually exclusive, then \(P(E \cup F) = P(E) + P(F)\)

  • If \(S = \{e_1,e_2,e_3,...,e_n\}\), then \(P(e_1) + P(e_2) + P(e_3) + \ldots + P(e_n) = P(S) = 1\)

  • If \(E = \{s_1,s_2,s_3,...,s_n\}\), where \(\{s_1\}\), \(\{s_2\}\), \(\{s_3\}\), …, \(\{s_n\}\) are simple events, then \(P(E) = P(s_1) + P(s_2) + P(s_3) + \ldots + P(s_n)\)

  • \(P(E^c) = 1 - P(E)\)

7.2 Conditional probability

  • \(P(B|A) = \dfrac{P(B \cap A)}{P(A)}\)

  • \(P(B \cap A) = P(A) \cdot P(B|A)\)

  • If A and B are independent events, then \(P(B|A) = P(B)\) and \(P(A|B) = P(A)\). In other words, \(P(A \cap B) = P(A) \cdot P(B)\).

7.3 Bayes’ Theorem

7.3.1 Variance, Standard deviation

  • Variance of population

\[ Var(x) = \sigma^2 = \dfrac{\sum(x - \mu)^2}{N} \]

  • Standard deviation of population

\[ \sigma = \sqrt{Var(x)} = \sqrt{\dfrac{\sum(x - \mu)^2}{N}} \]

  • Standard deviation of sample

\[ \delta = \sqrt{Var(x)} = \sqrt{\dfrac{\sum(x - \bar{x})^2}{n-1}} \]