1.1 Events
One go = one card, one roll: the same moment, no next roll. Deck = 52 cards, 4 suits × 13, one card has one suit
Mutually exclusive (ME): can A and B both be yes at the same moment?
- Yes: not ME, $P(A \cap B) \ne 0$. Then $P(A \cup B) = P(A) + P(B) - P(A \cap B)$
- No: ME, $P(A \cap B) = 0$. Then $P(A \cup B) = P(A) + P(B)$
Independent: told A is yes, does B’s chance change?
- Yes: dependent, $P(A)P(B) \ne P(A \cap B)$
- No: independent, $P(A)P(B) = P(A \cap B)$
ME means dependent (unless $P(A)$ or $P(B) = 0$). True: “If A and B are ME, they are dependent”. False: “… ME, they are independent”, “… independent, they are ME”. 1 roll, 3 & 4: ME, dependent. 2 dice, 6 & 6: independent
Trees: × along a path, + across paths. Each point’s branches add to 1
1.2 Counting
- n = how many to choose from (digits 0 to 9: $n = 10$). r = how many picked (gold, silver, bronze: $r = 3$)
- Order matters? Swap two picked: a different result?
- Yes: ${}^nP_r$ (rank, arrange, 1st/2nd/3rd)
- No: $\binom{n}{r}$ (team, committee, hand)
| Keywords | Do |
|---|---|
| how many ways | a count: a whole number, never ÷ |
| probability, P(…) | ways it happens ÷ all ways |
| and (2 men and 3 women) | multiply: $\binom{5}{2}\binom{6}{3}$. Example ♥7 ♥2 ♥K: suit (4) × which 3 of it $\binom{13}{3}$ |
| or (all red or all blue) | add if they can’t both happen. Else heart or king: 13 + 4 − 1 |
| exactly 2 red, a prize = exactly 1 | 2 of the red × the rest from the others |
| at least one | 1 − none (die 3 times: ${1 - (5/6)^3}$) |
| all different | 3 dice: 6 × 5 × 4, not 1 − all same |
| at most 2 | add 0, 1 and 2 |
| at once, without replacement | no repeats: $\binom{n}{r}$ |
| put back, with replacement, PIN | repeats: $n^r$, $n$ = results each (4 coins $2^4$, 3 dice $6^3$). How many: Binomial, not C |
| only right (East) or up (North) on a grid | $a$ rights and $b$ ups in any order: $\binom{a+b}{a}$. Avoid point W: total − (start to W) × (W to end) |
2.1 f, F, E, V, SD, joint pmf
| F | cumulative distribution function | $P(X \le x)$, a staircase |
| f | probability distribution | steps: $x$ where it steps up, $f(x)$ = height |
| E(X), $\mu$ | expected value / number of …, mean, 1st moment | $\sum x\, f(x)$. Named $X$: 2.2 |
| E(X²) | 2nd moment | $\sum x^2 f(x)$ |
| V(X), $\sigma^2$ | variance | $E(X^2) - [E(X)]^2$, after both above |
| SD, $\sigma$ | standard deviation | $\sqrt{V(X)}$, never $\sqrt{E(X)}$, and ≤ (max − min)/2 |
| E[g(X)] | g = inside E[ ]: $x$, $x^2$, $xy$ | $\sum g(x) f(x)$, no ÷ |
| $x$ (also $g$ for $E(X)$): the values | 0 | 1 | 2 |
|---|---|---|---|
| $f(x)$: chance 0 to 1, adds to 1 | 0.1 | 0.6 | 0.3 |
| $F(x)$: running total | 0.1 | 0.7 | 1 |
| $g = x^2$, for $E(X^2)$ | 0 | 1 | 4 |
| Worked: $E(X)$ = 0(0.1) + 1(0.6) + 2(0.3) = 1.2 $E(X^2)$ = 0(0.1) + 1(0.6) + 4(0.3) = 1.8 $V$ = 1.8 − 1.44 = 0.36, SD = 0.6 $F(x)$ = 0 ($x \lt 0$), 0.1 ($0 \le x \lt 1$), 0.7 ($1 \le x \lt 2$), 1 ($x \ge 2$) | |||
| Joint table given ($X$ across, $Y$ down) | |
|---|---|
| $f(x, y)$ | one cell |
| $f_X$, $f_Y$ | column sums, row sums |
| $P(X = Y)$ | add the cells where $x = y$ |
| $E(XY)$ | $xy$ × every cell, then add |
| Independent? | EVERY cell = its column sum × its row sum. One cell off → dependent. Cov 0 proves nothing |
2.2 Name it, mean, variance, chance
| Keywords | Name, what $X$ is | E(X) | V(X) |
|---|---|---|---|
| Discrete, $X$ = a count. $P(X = 3)$: put 3 for every $x$ below, never the box size | |||
| $n$ tries, put back, with replacement | Binomial$(n, p)$: $X$ = successes $n$ = draws, not the box | $np$ | $npq$ |
| at once, not put back, without replacement | Hypergeo$(S, F, n)$: $X$ = count in hand $P(X = x) = \binom{S}{x}\binom{F}{n-x}/\binom{N}{n}$ $N = S + F$ (THIS box), $n$ = hand. Tops add to $N$, bottoms to $n$ | $nS/N$ | $n \dfrac{S}{N} \dfrac{F}{N}$$\times \dfrac{N-n}{N-1}$ |
| until the 1st | Geometric$(p)$: $X$ = draw of the 1st success $P(X = x) = q^{x-1}p$, $P(X > x) = q^x$ | $1/p$ | $q/p^2$, $q = 1 - p$ |
| until the 3rd | NegBin$(k, p)$: $k$ = successes waited for, $X$ = draw of the $k$th $P(X = x) = \binom{x-1}{k-1}p^k q^{x-k}$ | $k/p$ | $kq/p^2$ |
| per hour, next 5 min | Poisson$(\lambda)$: $X$ = count in a window $\lambda$ = rate × window (2 per 10 min → 12 per hour) | $\lambda$ | $\lambda$ |
| Continuous, $X$ = a time or a measurement. A chance is an area under the curve: get it from the formulas below, never by putting a number into the pdf $f(x)$ (only the curve's height). Point = 0, so $\lt$ same as $\le$ | |||
| wait, lifetime | Exponential(rate): $X$ = a time Bracket = rate = $1/\mu$, $\mu$ = minutes ÷ count pdf $\frac{1}{\mu}e^{-x/\mu}$: read $\mu$ off it, nothing else | $\mu$ | $\mu^2$ |
| More than or at least $x$: $P(X \gt x) = e^{-x/\mu}$ Within or at most $x$: $F(x) = P(X \le x) = 1 - e^{-x/\mu}$ Between: $P(a \lt X \lt b) = e^{-a/\mu} - e^{-b/\mu}$ Given: $P(X \gt b \mid X \gt a) = e^{-(b-a)/\mu}$ | |||
| equally likely | Uniform$(a, b)$: $X$ = a point $P(X \gt c) = (b - c)/(b - a)$ $P(X \lt c) = (c - a)/(b - a)$ $P(c \lt X \lt d) = (d - c)/(b - a)$ | $\dfrac{a+b}{2}$ | $\dfrac{(b-a)^2}{12}$ |
| mean and SD | Normal$(\mu, \sigma^2)$: $X$ = a measurement Write $X \sim N(\mu, \sigma^2)$ first, $\sigma^2$ second, $\mu, \sigma$ from THIS question Chance, one $X$: $z = (x - \mu)/\sigma$, then the z table (3.2) | $\mu$ | $\sigma^2$ |
2.3 Approximations
| Only if approximate: Binomial to | Check | Then |
|---|---|---|
| Poisson, discrete | $n \ge 20$, $p \le 0.05$ (or $n \ge 100$, $np \le 10$) | $\lambda = np$ |
| Normal, continuous | $npq \ge 5$ | $N(np, npq)$, then $z = \dfrac{\text{edge} - np}{\sqrt{npq}}$ |
| Normal only: edge = halfway between last wanted and first unwanted. At most 110: Y < 110.5, at least 110: Y > 109.5 | ||
3.2 Tables
- z table (right tail): edges = $z$, inside = share ABOVE. Backward: share inside, $z$ off the edges
- Shaded includes the mean? yes: 1 − table. No: table. Negative $z$ mirrors
- Between: opposite sides: 1 − both tails. Same side: bigger − smaller. Outside a range: left tail + right tail
- Value = $\mu + z\sigma$. Bottom group (lightest, lowest): $z$ negative, so the answer is below $\mu$. Top group: above $\mu$
- Common z (else the closest cell, a tie takes the middle): top 10% 1.28, 5% 1.645, 2.5% 1.96 (row 1.9, column .06), 1% 2.326
- t table: rows = df ($n - 1$), heads = share above, cells = $t$.
3.3 Mean of a sample
X̄ (mean amount of a group of $n$): $E(\bar X) = \mu$, $V(\bar X) = \sigma^2/n$, SD = SE = $\sigma/\sqrt{n}$. Total = $n$ × average. Two means: variances add
| If possible: $X$ is | Write |
|---|---|
| normal, any $n$ (even $n = 2$) | Possible: $X$ is normal, so $\bar X$ is normal |
| not normal (uniform, exponential, …) or not stated, $n \ge 30$ | Possible: $n \ge 30$, so by the CLT $\bar X$ is approx. normal |
| not normal or not stated, $n \lt 30$ | Not possible: $X$ is not normal (or unknown) and $n \lt 30$, so no CLT |
| Possible, then: $\bar X \sim N(\mu, \sigma^2/n)$, so $z = (\bar x - \mu)/(\sigma/\sqrt{n})$, then the z table | |
3.4 Confidence intervals, SE = standard error
| CI | estimate ± multiplier × SE (one mean: the CI row of 4.2). $\alpha = 1 -$ level, $\alpha/2$ in each tail |
| Level → z | 90% 1.645, 95% 1.96, 96% 2.054, 98% 2.326, 99% 2.576. Else α/2 in the z table (97%: 0.015 → 2.17) |
| Certain? | No, 95% of such intervals capture $\mu$ |
| Size $n$, round UP | $E$ = margin of error = multiplier × SE. Mean $(z\sigma/E)^2$, proportion $\hat p(1-\hat p)(z/E)^2$. Width = $2E$ |
| Proportion, always z | proportion of …: $\hat p = x/n$. Check $n\hat p(1-\hat p) \ge 5$ (then Normal). CI $\hat p \pm z\sqrt{\hat p(1-\hat p)/n}$ |
| Proportion test | $z = (\hat p - p_0)/\sqrt{p_0(1-p_0)/n}$, $p_0$ in the SE |
4.1 z or t?
| $\sigma$ known: normal, or $n \ge 30$ | $\sigma$ unknown, normal, $n < 30$ | $\sigma$ unknown, $n \ge 30$ | not normal, $n < 30$ |
|---|---|---|---|
| z | t, df $n - 1$ | z with $s$ | neither, not possible (3.3) |
4.2 CI or test
| Step | Write | |||
|---|---|---|---|---|
| 1. givens | $\mu_0$, $\bar x$ (this sample's mean, never $\mu$), $n$, α ("at 5%" = 0.05). $\sigma$ = SD of ALL, or $s$ = SD of the sample | |||
| z: $\sigma$ given (or $n \ge 30$) | t: $\sigma$ not given, $n \lt 30$, normal Extra: $s$ in place of $\sigma$, df $n - 1$ | paired: same people twice Extra: $d$ = one minus the other, per pair. $\mu_0 = 0$, never given | two groups: separate people Extra: Check same spread, then $S_p^2$. No $\mu_0$ (H0 is $\mu_1 = \mu_2$) Check: write both, larger $s^2$ ÷ smaller $s^2$ and larger $s$ ÷ smaller $s$. Both ≤ 2: "Yes, both ratios are not more than 2", pool, $S_p^2$. Both over 2: No, "unknown, unequal", $n \ge 30$. Only $s^2$ over 2: follow the $s$ ratio. Told "equal variances": just pool | |
| CI (asked for an interval: stop here) | ${\bar x \pm z_{\alpha/2}\dfrac{\sigma}{\sqrt{n}}}$ $z_{\alpha/2}$ (list in 3.4): 95% = 1.96 | ${\bar x \pm t\,\dfrac{s}{\sqrt{n}}}$ t: row $n - 1$, column α/2 | ${\bar d \pm t\,\dfrac{s_d}{\sqrt{n}}}$ t: row $n - 1$ | ${(\bar x_1 - \bar x_2) \pm t\sqrt{S_p^2\left(\tfrac{1}{n_1}+\tfrac{1}{n_2}\right)}}$ t: row $n_1 + n_2 - 2$, column α/2 (all t rows) Both $n \ge 30$: z in place of t |
| 2. H0, H1 | H0: $\mu = \mu_0$, always "=" (it gives $z$ its number). $\mu$ = mean of ALL, never $\bar x$ $\mu_0$: one mean = the claimed number. Paired = 0 (no change). Two groups: H0 is $\mu_1 = \mu_2$ H1 = the question translated: "differs" $\ne$, "less" $\lt$, "more" $\gt$ (paired: in $d$'s order, two groups: $\mu_1$ against $\mu_2$) "Is there evidence?" is step 5, not $\ne$ | |||
| 3. statistic | ${z = \dfrac{\bar x - \mu_0}{\sigma/\sqrt{n}}}$ | ${t = \dfrac{\bar x - \mu_0}{s/\sqrt{n}}}$ df $n - 1$ | ${t = \dfrac{\bar d - 0}{s_d/\sqrt{n}}}$ df $n - 1$, $n$ = pairs e.g. ${\dfrac{-1.2 - 0}{1.5/\sqrt{10}}}$ | df $n_1 + n_2 - 2$ ${S_p^2 = \dfrac{(n_1-1)s_1^2 + (n_2-1)s_2^2}{n_1+n_2-2}}$ ${t = \dfrac{\bar x_1 - \bar x_2}{\sqrt{S_p^2\left(\frac{1}{n_1}+\frac{1}{n_2}\right)}}}$ |
| 4. p-value | z table, exact (never $z$ or ${P(Z = z)}$) H1 $\lt$: ${P(Z \lt z)}$ H1 $\gt$: ${P(Z \gt z)}$ H1 $\ne$: 2 × tail | t table, row = df: the two columns around $|t|$ (heads printed "α" = one tail, a and b) H1 $\lt$, $\gt$: a < p < b, smaller first H1 $\ne$: 2a < p < 2b (0.01 to 0.025 gives 0.02 < p < 0.05) | ||
| Double only when H1 is ≠ (z and t alike). H1 > or <: one tail, as read | ||||
| 5. decide | p < α: Reject H0. There is evidence that [H1 in words]. CI vs test: $\mu_0$ outside the CI = reject p > α: Do not reject H0. Not enough evidence that [H1 in words]. Never "accept" t: the whole p range vs α. The ends are never included, so $|t|$ past the α column (H1 $\ne$: the α/2 column) means p < α | |||
4.4 Errors and power
| Verdict | H0 really true | H0 really false ($\alpha$ down → $\beta$ up) |
|---|---|---|
| Reject H0 (only Type I) | Type I (chance α) | correct (power = $1 - \beta$) |
| Do not reject (only Type II) | correct | Type II (chance β) |