Skip to content
AD-302 · Probability and Statistics for Data Science/Quick Revision Short Notes

Probability and Statistics for Data Science (AD-302) - Unit 2 Short Notes

How unit 2 is examined

Moments, skewness and kurtosis (all the moment numericals) and probability with Bayes' theorem carry the marks; the dice, ball-drawing, Bowley and binomial MGF questions are the other repeats.

Skewness

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. <mark>Skewness is the lack of symmetry of a frequency distribution: it measures the direction and degree to which the distribution is stretched to one side of its centre.</mark>

Key points.

  1. In a symmetric distribution mean, median and mode coincide and skewness is zero.
  2. In a positively skewed distribution the long tail is on the right and Mean > Median > Mode.
  3. In a negatively skewed distribution the long tail is on the left and Mean < Median < Mode.
  4. Karl Pearson's coefficient is $S_k = \dfrac{\text{Mean}-\text{Mode}}{\sigma}$; Bowley's is $\dfrac{Q_3+Q_1-2M}{Q_3-Q_1}$.

Kurtosis

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. <mark>Kurtosis is the degree of peakedness or flatness of a frequency curve relative to the normal curve.</mark>

Key points.

  1. A normal curve is mesokurtic, with $\beta_2 = 3$.
  2. A leptokurtic curve is more peaked than normal with heavier tails, and has $\beta_2 > 3$.
  3. A platykurtic curve is flatter than normal, and has $\beta_2 < 3$.
  4. Kurtosis is measured by $\beta_2 = \mu_4/\mu_2^2$ or $\gamma_2 = \beta_2 - 3$.

Moments

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">High weight</span>

Definition. ==The $r$th moment about the mean is $\mu_r = \dfrac{1}{N}\sum f(x-\bar{x})^r$; the $r$th raw moment about a point $A$ is $\mu_r' = \dfrac{1}{N}\sum f(x-A)^r$.==

Key points.

  1. Moments describe a distribution completely: $\mu_2$ gives spread, $\mu_3$ gives skewness and $\mu_4$ gives kurtosis.
  2. The first central moment is always zero, $\mu_1 = 0$, and the second is the variance, $\mu_2 = \sigma^2$.
  3. The mean is $\bar{x} = A + \mu_1'$.
  4. For a symmetric distribution all odd central moments vanish, so $\mu_3 = 0$.
  5. Moments about any point are converted to central moments by the formulas below (they follow from expanding $(x-A-\mu_1')^r$ binomially).

Formula.

$$\mu_2 = \mu_2' - \mu_1'^2,\qquad \mu_3 = \mu_3' - 3\mu_2'\mu_1' + 2\mu_1'^3$$

$$\mu_4 = \mu_4' - 4\mu_3'\mu_1' + 6\mu_2'\mu_1'^2 - 3\mu_1'^4$$

$$\beta_1 = \frac{\mu_3^2}{\mu_2^3},\qquad \beta_2 = \frac{\mu_4}{\mu_2^2}$$

Example. Moments about 4 are $-1.5, 17, -30, 108$.

Quantity Working Value
Mean $4 + (-1.5)$ 2.5
$\mu_2$ $17 - 2.25$ 14.75
$\mu_3$ $-30 - 3(17)(-1.5) + 2(-1.5)^3 = -30 + 76.5 - 6.75$ 39.75
$\mu_4$ $108 - 4(-30)(-1.5) + 6(17)(2.25) - 3(1.5)^4 = 108 - 180 + 229.5 - 15.1875$ 142.3125
$\beta_1$ $39.75^2/14.75^3$ 0.492
$\beta_2$ $142.3125/14.75^2$ 0.654

Answer: $\mu_2 = 14.75$, $\mu_3 = 39.75$, $\mu_4 = 142.3125$, $\beta_1 \approx 0.492$, $\beta_2 \approx 0.654$. Positive $\mu_3$ means positively skewed; $\beta_2 < 3$ means platykurtic.

Second version (about 5: $2, 20, 40, 50$): mean $= 7$, $\mu_2 = 20-4 = 16$, $\mu_3 = 40-120+16 = -64$, $\mu_4 = 50-320+480-48 = 162$, so $\beta_1 = 4096/4096 = 1$ and $\beta_2 = 162/256 \approx 0.633$: negatively skewed (as $\mu_3<0$) and platykurtic.

Answer frame. Open with the definition of raw and central moments; write the conversion formulas; substitute in a table $\mu_2, \mu_3, \mu_4$ in that order; then $\beta_1, \beta_2$; close with the comment on skewness (sign of $\mu_3$) and kurtosis ($\beta_2$ against 3). For a frequency table, see the next topic for the direct method.

Pitfall: Forgetting to add $A$ to get the mean, or using $\mu_3'$ in place of $\mu_3$; the $\mu_r$ formulas apply only when the given moments are about a point, not the mean.

Asked: [14 marks] (Dec 2023, Dec 2024) First four moments about the value 4 are $-1.5, 17, -30, 108$; find the moments about the mean, $\beta_1$ and $\beta_2$. (Also: moments about 5 are 2, 20, 40, 50; find the central moments and comment on skewness and kurtosis.) Asked: [7 marks] (Dec 2025) Calculate the first four moments about the mean of the distribution (x = 0 to 8, f = 1, 8, 28, 56, 70, 56, 28, 8, 1) and hence $\beta_1$ and $\beta_2$.

Measure of skewness and kurtosis

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">High weight</span>

Definition. ==Skewness is measured by $\beta_1 = \mu_3^2/\mu_2^3$ (or $\gamma_1 = \sqrt{\beta_1}$, with the sign of $\mu_3$) and kurtosis by $\beta_2 = \mu_4/\mu_2^2$.==

Key points.

  1. $\beta_1 = 0$ (or $\mu_3 = 0$) means a symmetric distribution; the sign of $\mu_3$ gives the direction.
  2. Karl Pearson's coefficient is $\dfrac{\text{Mean}-\text{Mode}}{\sigma}$, or $\dfrac{3(\text{Mean}-\text{Median})}{\sigma}$ when the mode is ill-defined.
  3. Bowley's coefficient is $\dfrac{Q_3+Q_1-2M}{Q_3-Q_1}$ and lies between $-1$ and $+1$.
  4. $\beta_2 = 3$ is mesokurtic, $\beta_2 > 3$ leptokurtic and $\beta_2 < 3$ platykurtic.
  5. The coefficient of quartile deviation is $\dfrac{Q_3-Q_1}{Q_3+Q_1}$.
  6. For a table, find $\bar{x}$ first, then $\mu_r = \sum f(x-\bar{x})^r/N$ for $r = 1$ to $4$.

Example 1 (Bowley). Given $S_k = -0.56$, $Q_1 = 16.4$, $M = 24.2$.

$$-0.56 = \frac{Q_3 + 16.4 - 48.4}{Q_3 - 16.4} \Rightarrow -0.56(Q_3 - 16.4) = Q_3 - 32 \Rightarrow 1.56\,Q_3 = 41.184 \Rightarrow Q_3 = 26.4$$

Coefficient of quartile deviation $= \dfrac{26.4-16.4}{26.4+16.4} = \dfrac{10}{42.8} \approx 0.2336$.

Example 2 (table x = 0 to 8). $N = 256$, $\sum fx = 1024$, so $\bar{x} = 4$.

$x$ 0 1 2 3 4 5 6 7 8
$f$ 1 8 28 56 70 56 28 8 1
$x-4$ -4 -3 -2 -1 0 1 2 3 4
$f(x-4)^2$ 16 72 112 56 0 56 112 72 16
$f(x-4)^4$ 256 648 448 56 0 56 448 648 256

$\sum f(x-4)^2 = 512$, $\sum f(x-4)^4 = 2816$. The odd powers cancel by symmetry, so $\mu_1 = \mu_3 = 0$.

Answer: $\mu_1 = 0$, $\mu_2 = 512/256 = 2$, $\mu_3 = 0$, $\mu_4 = 2816/256 = 11$, $\beta_1 = 0$, $\beta_2 = 11/4 = 2.75$ (slightly platykurtic, symmetric). This is the Binomial(8, ½) table, and $\mu_4 = 3(npq)^2 + npq(1-6pq) = 12 - 1 = 11$ confirms it.

Answer frame. For Bowley, open with the formula, substitute, solve for $Q_3$, close with the coefficient. For moments, open with $N$ and $\bar{x}$, draw the table of $x-\bar{x}$, $f(x-\bar{x})^2$ and $f(x-\bar{x})^4$, then $\mu_1$ to $\mu_4$, $\beta_1$, $\beta_2$, and close by reading skewness and kurtosis from them.

Pitfall: Some answer keys print $\mu_4 = 11.5$ and $\beta_2 = 2.875$ for the x = 0 to 8 table; direct addition gives 2816/256 = 11, so trust your own sums.

Asked: [7 marks] (Nov 2022, Dec 2025) Bowley's coefficient of skewness is $-0.56$, $Q_1 = 16.4$, Median $= 24.2$; what is the coefficient of quartile deviation? Asked: [7 marks] (Jun 2023, Dec 2024) Calculate the first four moments about the mean (x = 0 to 8, f = 1, 8, 28, 56, 70, 56, 28, 8, 1), hence $\beta_1$ and $\beta_2$. (Variant: x = 2, 2.5, 3, 3.5, 4, 4.5, 5 with f = 5, 38, 65, 92, 70, 40, 10; also find skewness and kurtosis: $\bar{x} = 3.5375$, $\mu_2 = 0.4533$, $\mu_3 = 0.0099$, $\mu_4 = 0.5021$, $\beta_1 = 0.001$, $\beta_2 = 2.44$.)

Theory of probability: introduction and definition

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Medium weight</span>

Definition. ==Probability is a numerical measure of the chance that an event occurs; under the classical (Laplace) approach $P(A) = \dfrac{m}{n}$, the number of cases favourable to $A$ divided by the total number of equally likely cases.==

Key points.

  1. Probability always lies between 0 and 1: $0 \le P(A) \le 1$, with 0 for an impossible and 1 for a certain event.
  2. The classical definition needs the outcomes to be mutually exclusive, exhaustive and equally likely.
  3. $P(\bar{A}) = 1 - P(A)$, and the probabilities of all outcomes add up to 1.
  4. Its limitation is that it fails when outcomes are not equally likely or are infinite in number, where the statistical (relative-frequency) definition $\lim m/n$ is used.
  5. The axiomatic definition (Kolmogorov) requires $P(A) \ge 0$, $P(S) = 1$ and additivity for mutually exclusive events.
  6. Example: for a fair die, $P(\text{even}) = 3/6 = 1/2$.

Example. A box has 6 red, 4 white and 5 black balls; 4 are drawn. Total ways $\binom{15}{4} = 1365$. At least one of each colour means one colour appears twice:

Split Ways Count
2R, 1W, 1B $\binom62\binom41\binom51$ 300
1R, 2W, 1B $\binom61\binom42\binom51$ 180
1R, 1W, 2B $\binom61\binom41\binom52$ 240

Answer: $P = \dfrac{720}{1365} = \dfrac{48}{91} \approx 0.5275$.

Answer frame. For the explain question, open by defining probability, state $P = m/n$ with its three assumptions, give the die example, and close with the limitation. For the ball problem, write total ways, the three splits in a table, then favourable over total.

Asked: [7 marks] (Nov 2022) What is probability? Explain the calculation of probability under the classical approach. Asked: [7 marks] (Jun 2023) A box has 6 red, 4 white and 5 black balls; 4 are drawn at random. Find the probability that there is at least one ball of each colour.

Event

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. <mark>An event is any subset of the sample space, that is, a collection of outcomes of a random experiment.</mark>

Key points.

  1. A simple (elementary) event has a single outcome, while a compound event has more than one.
  2. Mutually exclusive events cannot occur together, so $A \cap B = \emptyset$.
  3. Exhaustive events together cover the whole sample space, and equally likely events have the same chance.
  4. The complement $\bar{A}$ occurs when $A$ does not.

Sample Space

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>

Definition. ==The sample space $S$ is the set of all possible outcomes of a random experiment; $P(E) = n(E)/n(S)$.==

Key points.

  1. Two dice: $n(S) = 36$ ordered pairs.
  2. Sum $>8$ means sums 9, 10, 11, 12 with $4+3+2+1 = 10$ ways, so $P = 10/36 = 5/18$.
  3. Sum 7 has 6 ways and sum 11 has 2, so $P(7\text{ or }11) = 8/36$ and P(neither) $= 1 - 2/9 = 7/9$.

Asked: [7 marks] (Jun 2023) Two dice are thrown; find the probability that the sum is (i) greater than 8 (ii) neither 7 nor 11.

Law of addition and multiplication of Probabilities

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>

Definition. ==Addition law: $P(A \cup B) = P(A) + P(B) - P(A \cap B)$; multiplication law: $P(A \cap B) = P(A)\,P(B|A)$.==

Key points.

  1. For mutually exclusive events, $P(A\cup B) = P(A) + P(B)$.
  2. For independent events, $P(A\cap B) = P(A)\,P(B)$.
  3. Dice question: 10 of 36 sums exceed 8 and 8 of 36 are 7 or 11 (addition law: $6/36 + 2/36$), giving $5/18$ and $7/9$.

Asked: [7 marks] (Dec 2025) Two dice are thrown; find the probability that the sum is (i) greater than 8 (ii) neither 7 nor 11.

Conditional Probability

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. ==The conditional probability of $A$ given that $B$ has occurred is $P(A|B) = \dfrac{P(A\cap B)}{P(B)}$, with $P(B) > 0$.==

Key points.

  1. Knowing $B$ shrinks the sample space to $B$.
  2. Rearranged, it gives the multiplication law $P(A\cap B) = P(B)\,P(A|B)$.
  3. Example: from a die, $P(\text{6}\mid\text{even}) = (1/6)/(1/2) = 1/3$.

Independent and Dependent events

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. ==Events $A$ and $B$ are independent if the occurrence of one does not change the probability of the other, that is $P(A\cap B) = P(A)P(B)$.==

Key points.

  1. For independent events $P(A|B) = P(A)$.
  2. Events are dependent when $P(A\cap B) \ne P(A)P(B)$, as in drawing cards without replacement.
  3. Independent events are not the same as mutually exclusive events; exclusive events with nonzero probability are dependent.

Bayes' theorem

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Medium weight</span>

Definition. ==If $E_1,\dots,E_n$ are mutually exclusive and exhaustive events and $D$ is an event that has occurred, then $P(E_i|D) = \dfrac{P(E_i)P(D|E_i)}{\sum_j P(E_j)P(D|E_j)}$.==

Key points.

  1. $P(E_i)$ are the prior probabilities, $P(D|E_i)$ the likelihoods and $P(E_i|D)$ the posterior probabilities.
  2. The denominator is the total probability $P(D) = \sum P(E_j)P(D|E_j)$.
  3. The posteriors sum to 1, which is a check on the answer.
  4. It reverses conditioning, from "cause gives effect" to "effect points to cause".

Steps.

Step 1: List the priors P(Ei) and likelihoods P(D|Ei).
Step 2: Find products P(Ei)P(D|Ei) and add them to get P(D).
Step 3: Divide each product by P(D).

Example 1 (bolts). Priors 0.25, 0.35, 0.40; defective 0.05, 0.04, 0.02.

Machine Prior Likelihood Product
A 0.25 0.05 0.0125
B 0.35 0.04 0.0140
C 0.40 0.02 0.0080

$P(D) = 0.0345$. Answer: $P(A|D) = 25/69 \approx 0.362$, $P(B|D) = 28/69 \approx 0.406$, $P(C|D) = 16/69 \approx 0.232$.

Example 2 (urns). Priors $1/3$ each; the event is one white and one red ball out of two.

Urn Likelihood Value
I (1W,2B,3R) $\frac{1\cdot3}{\binom62}$ $1/5$
II (2W,1B,1R) $\frac{2\cdot1}{\binom42}$ $1/3$
III (4W,5B,3R) $\frac{4\cdot3}{\binom{12}{2}}$ $2/11$

Since the priors are equal, they cancel: $P(E) \propto 1/5 + 1/3 + 2/11 = 118/165$. Answer: $P(\text{I}|E) = 33/118$, $P(\text{II}|E) = 55/118$, $P(\text{III}|E) = 30/118 = 15/59$.

Answer frame. Open with the statement of the theorem; list priors and likelihoods in a table; compute $P(D)$ by total probability; then each posterior; close by checking that the posteriors add to 1.

Asked: [7 marks] (Jun 2023, Dec 2024) Machines A, B, C make 25%, 35%, 40% of bolts, with 5%, 4%, 2% defective; a defective bolt is drawn; find the probability it came from A, B and C (variant: from B). Asked: [7 marks] (Dec 2023) Urns I (1W,2B,3R), II (2W,1B,1R), III (4W,5B,3R); one urn is chosen and two balls drawn, white and red; find the probability they came from urns I, II, III.

Mathematical Expectations

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Not asked since 2022</span>

Definition. ==The expectation of a random variable is its probability-weighted mean, $E(X) = \sum x\,p(x)$ for a discrete variable and $\int x f(x)\,dx$ for a continuous one.==

Key points.

  1. $E(aX+b) = aE(X)+b$, and $E(X+Y) = E(X)+E(Y)$.
  2. For independent $X, Y$, $E(XY) = E(X)E(Y)$.
  3. $\text{Var}(X) = E(X^2) - [E(X)]^2$.
  4. The $r$th raw moment is $E(X^r)$.

Moment generating functions

<span style="display:inline-block;padding:.16em .6em;border:1.5px solid currentColor;border-radius:999px;font-size:.68em;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75">Low weight</span>

Definition. ==The moment generating function of $X$ is $M(t) = E(e^{tX})$, and $\mu_r' = \dfrac{d^r M}{dt^r}\Big|_{t=0}$.==

Key points.

  1. For the binomial: $M(t) = \sum_x e^{tx}\binom nx p^x q^{n-x} = \sum_x \binom nx (pe^t)^x q^{n-x} = (q+pe^t)^n$.
  2. $M'(0) = n(q+pe^t)^{n-1}pe^t\big|_0 = np$, so the mean is $np$.
  3. $\mu_2' = M''(0) = np + n(n-1)p^2$, hence $\mu_2 = \mu_2' - (np)^2 = npq$ (variance).
  4. The first central moment is $\mu_1 = 0$ and the second is $\mu_2 = npq$.

Asked: [7 marks] (Dec 2024) Find the moment generating function of the binomial distribution $P(x) = {^nC_x}p^xq^{n-x}$ and the first and second moments about the mean.

Last-minute revision

  • $\mu_1 = 0$, $\mu_2 = \sigma^2$; central from raw: $\mu_2 = \mu_2'-\mu_1'^2$, $\mu_3 = \mu_3'-3\mu_2'\mu_1'+2\mu_1'^3$.
  • $\mu_4 = \mu_4'-4\mu_3'\mu_1'+6\mu_2'\mu_1'^2-3\mu_1'^4$; mean $= A+\mu_1'$.
  • $\beta_1 = \mu_3^2/\mu_2^3$, $\beta_2 = \mu_4/\mu_2^2$; $\beta_2 = 3$ meso, $>3$ lepto, $<3$ platy.
  • Bowley $= (Q_3+Q_1-2M)/(Q_3-Q_1)$; coefficient of QD $= (Q_3-Q_1)/(Q_3+Q_1)$.
  • Bowley $-0.56$, $Q_1 = 16.4$, $M = 24.2$ gives $Q_3 = 26.4$ and coefficient $0.2336$.
  • Binomial(8) table x = 0 to 8: $\mu_2 = 2$, $\mu_3 = 0$, $\mu_4 = 11$, $\beta_2 = 2.75$.
  • Classical $P(A) = m/n$; two dice $n(S) = 36$; P(sum $>8$) $= 5/18$, P(neither 7 nor 11) $= 7/9$.
  • Balls 6R, 4W, 5B, draw 4, one of each colour: $720/1365 = 48/91$.
  • $P(A\cup B) = P(A)+P(B)-P(A\cap B)$; $P(A|B) = P(A\cap B)/P(B)$.
  • Bolts: $P(D) = 0.0345$, posteriors $25/69$, $28/69$, $16/69$; urns: $33/118$, $55/118$, $15/59$.
  • Binomial MGF $(q+pe^t)^n$, mean $np$, variance $npq$.

Memory hooks

  • Moments: 1 zero, 2 spread, 3 tilt, 4 tail (peak).
  • Positive skew: tail Right, Mean is biggest (Mean > Median > Mode).
  • "Lepto leaps" above 3; "platy is flat" below 3.
  • Bayes: prior times likelihood, divided by the total.
  • MGF: differentiate and set $t = 0$ to get raw moments.

Coverage checklist

  • Skewness: definition, direction, coefficients.
  • Kurtosis: meso, lepto and platykurtic, $\beta_2$.
  • Moments: Dec 2023, Dec 2024 (14 marks); Dec 2025 (7 marks).
  • Measure of skewness and kurtosis: Nov 2022, Dec 2025 (Bowley); Jun 2023, Dec 2024 (moment tables).
  • Theory of probability: Introduction and definition of Probability: Nov 2022 (classical), Jun 2023 (balls).
  • Event: definition and types.
  • Sample Space: Jun 2023 (two dice).
  • Law of addition and multiplication of Probabilities: Dec 2025 (two dice).
  • Conditional Probability: definition and formula.
  • Independent and Dependent events: definition and test.
  • Bayes' theorem: Jun 2023, Dec 2024 (bolts); Dec 2023 (urns).
  • Mathematical Expectations: $E(X)$ and properties.
  • Moment generating functions: Dec 2024 (binomial MGF).
Go to where you left off?

Quick Add to Notes

Save questions, your own notes and screenshots into notes filed by unit. It takes a free account.

Create free account

Have an account? Log in