Curriculum Matrix Lecture Notes

Foundations of Statistical Science and AI Concepts: Master Study Guide

Module 1: Descriptive Statistics and Data Basics

Statistics is the science of learning from data by exploring, summarizing, modelling, estimating, and testing information. Descriptive statistics summarize raw data through tabular and graphical representations, and compute central tendency and variability measures.

Scales of Measurement

Data are categorized into multiple scales:

  • Nominal: Unordered categorical data (e.g., gender, colour).
  • Ordinal: Categories with a meaningful order but unquantifiable distances (e.g., school grades).
  • Metric (Quantitative): Contains exact numeric values. Can be interval (arbitrary zero, e.g., dates) or ratio scale (absolute zero, enabling multiplication/division). Can be discrete (countable) or continuous (infinite precision).

Measures of Location (Central Tendency)

Location parameters summarize the "middle" or "average" of a dataset.

  • Arithmetic Mean: The sum of values divided by population size. It is not robust to outliers or scale-invariant.
    xˉ=1N∑i=1Nxi\bar{x} = \frac{1}{N}\sum_{i=1}^N x_i

  • Geometric Mean: Used for averaging growth factors (like interest rates). It is the N-th root of the product of N numbers.
    xˉgeo=∏i=1NxiN\bar{x}_{geo} = \sqrt[N]{\prod_{i=1}^N x_i}

  • Harmonic Mean: Used when averaging rates or ratios defined in relation to a unit (e.g., speeds).
    xˉh=N∑i=1N1xi\bar{x}_h = \frac{N}{\sum_{i=1}^N \frac{1}{x_i}}

  • Weighted Arithmetic Mean: Applied when certain data points contribute more to the average.
    xˉweighted=∑i=1Nwixi∑i=1Nwi\bar{x}_{weighted} = \frac{\sum_{i=1}^N w_i x_i}{\sum_{i=1}^N w_i}

  • Median: The middle value separating the higher and lower halves of ordered data, highly robust against outliers.

  • For an odd NN:
    x~0.5=x(N+12)\tilde{x}_{0.5} = x_{( \frac{N+1}{2} )}

  • For an even NN:
    x~0.5=12(x(N2)+x(N2+1))\tilde{x}_{0.5} = \frac{1}{2}(x_{( \frac{N}{2} )} + x_{( \frac{N}{2} + 1 )})

  • Mode: The most frequent value in a dataset.

Measures of Variability (Dispersion)

Variability defines the extent to which values differ from each other.

  • Variance: The average squared deviation from the arithmetic mean. Empirical variance of a population is given by:
    Var(X)=1N∑i=1N(xi−xˉ)2Var(X) = \frac{1}{N}\sum_{i=1}^N (x_i - \bar{x})^2
    Using Steiner's theorem, this simplifies to:
    Var(X)=1N∑i=1Nxi2−xˉ2Var(X) = \frac{1}{N}\sum_{i=1}^N x_i^2 - \bar{x}^2
  • Standard Deviation ( SD(X)SD(X) ): The square root of variance, reverting to the original unit of measurement.
    SD(X)=Var(X)SD(X) = \sqrt{Var(X)}
  • Coefficient of Variation: A standardized, unitless measure of relative variation compared to the mean.
    v=sxˉ⋅100%v = \frac{s}{\bar{x}} \cdot 100\%
  • Kurtosis: Measures the "peakedness" or tailedness of a distribution. It computes the fourth central moment:
    w=1N∑i=1N(xi−xˉSD(X))4−3w = \frac{1}{N}\sum_{i=1}^N \left(\frac{x_i - \bar{x}}{SD(X)}\right)^4 - 3

Module 2: Bivariate Data, Correlation, and Linear Regression

Bivariate data involves pairs of variables (xi,yi)(x_i, y_i) visualized via scatterplots.

Correlation

  • Covariance: Measures the monotonic relationship between two variables.
    Cov(x,y)=1N∑i=1N(xi−xˉ)⋅(yi−yˉ)=1N∑i=1Nxiyi−xˉyˉCov(x, y) = \frac{1}{N}\sum_{i=1}^N (x_i - \bar{x}) \cdot (y_i - \bar{y}) = \frac{1}{N}\sum_{i=1}^N x_i y_i - \bar{x}\bar{y}
    For a sample, the estimator uses n−1n-1:
    sxy=1n−1∑i=1n(xi−xˉ)⋅(yi−yˉ)s_{xy} = \frac{1}{n-1}\sum_{i=1}^n (x_i - \bar{x}) \cdot (y_i - \bar{y})
  • Bravais-Pearson Correlation Coefficient ( r_xyr\_{xy} ): Normalizes covariance by the product of the standard deviations, returning a dimensionless value between -1 and +1.
    rxy=Cov(x,y)SD(x)⋅SD(y)r_{xy} = \frac{Cov(x, y)}{SD(x) \cdot SD(y)}
  • Spearman's Rank Correlation: Used for ordinal data or skewed metric data, computing Pearson correlation on the sorted ranks of the data to capture general monotonic trends.

Linear Regression

Linear regression models a response variable YY based on an explanatory variable XX.

  • Regression Line: y^i=a+b⋅xi\hat{y}_i = a + b \cdot x_i.
  • Residuals ( eie_i ): The deviation between observed values and predictions, ei=yi−y^ie_i = y_i - \hat{y}_i.
  • Goodness of Fit ( R2R^2 ): The coefficient of determination partitions the total variation:
    • Sum of Squares Total (SQT): ∑i=1n(yi−yˉ)2\sum_{i=1}^n (y_i - \bar{y})^2
    • Sum of Squares Explained (SQE): ∑i=1n(y^i−yˉ)2\sum_{i=1}^n (\hat{y}_i - \bar{y})^2
    • Sum of Squares Residual (SQR): ∑i=1n(yi−y^i)2\sum_{i=1}^n (y_i - \hat{y}_i)^2
      R2=SQESQTR^2 = \frac{SQE}{SQT}

Module 3: Probability Theory and Combinatorics

Probability theory provides the mathematical foundation for inductive statistics.

Combinatorics (Counting Rules)

  • Permutation without repetition: Arrangement of nn distinct objects.
    Pn=n!P_n = n!
  • Permutation with repetition: Arrangement of nn objects containing duplicate groups.
    Pn1,n2,...,nrn=n!n1!⋅n2!⋅...⋅nr!P_{n_1,n_2,...,n_r}^n = \frac{n!}{n_1! \cdot n_2! \cdot ... \cdot n_r!}
  • Combination without repetition: Selection of kk objects from nn without order and without replacement.
    Cnk=n!k!(n−k)!=(nk)C_n^k = \frac{n!}{k!(n-k)!} = \binom{n}{k}
  • Combination with repetition: Selection of kk objects from nn without order, but with replacement.
    RCnk=(n+k−1k)RC_n^k = \binom{n+k-1}{k}
  • Variation without repetition: Selection of kk objects from nn where order matters, without replacement.
    Vnk=n!(n−k)!V_n^k = \frac{n!}{(n-k)!}
  • Variation with repetition: Selection of kk objects from nn where order matters, with replacement.
    RVnk=nkRV_n^k = n^k

Probability Rules and Bayes' Theorem

  • Additive Rule: For the union of events.
    P(A∪B)=P(A)+P(B)−P(A∩B)P(A \cup B) = P(A) + P(B) - P(A \cap B)
  • Multiplicative Rule: For the intersection of events. If dependent:
    P(A∩B)=P(A)⋅P(B∣A)P(A \cap B) = P(A) \cdot P(B|A)
  • Conditional Probability: P(A∣B)=P(A∩B)P(B)P(A|B) = \frac{P(A \cap B)}{P(B)}.
  • Law of Total Probability: Computes an overall probability via disjoint sub-events.
    P(B)=∑i=1nP(Ai)⋅P(B∣Ai)P(B) = \sum_{i=1}^n P(A_i) \cdot P(B|A_i)
  • Bayes' Theorem: Reverses conditional probabilities.
    P(Ai∣B)=P(Ai)⋅P(B∣Ai)∑j=1nP(Aj)⋅P(B∣Aj)P(A_i|B) = \frac{P(A_i) \cdot P(B|A_i)}{\sum_{j=1}^n P(A_j) \cdot P(B|A_j)}

Module 4: Random Variables and Probability Distributions

A random variable transforms experimental outcomes into real numbers ( X:Ω→RX: \Omega \rightarrow \mathbb{R} ).

Discrete vs. Continuous

  • Discrete Random Variables: Utilize a Probability Mass Function (PMF), f(x)=P(X=x)f(x) = P(X = x). Expected value and variance are:
    μ=E(X)=∑i=1kxi⋅f(xi)\mu = E(X) = \sum_{i=1}^k x_i \cdot f(x_i)
    σ2=V(X)=∑i=1k(xi−μ)2⋅f(xi)\sigma^2 = V(X) = \sum_{i=1}^k (x_i - \mu)^2 \cdot f(x_i)
  • Continuous Random Variables: Utilize a Probability Density Function (PDF) where areas under the curve equal probabilities. The Cumulative Distribution Function (CDF) is:
    F(x)=∫−∞xf(x)dx=P(X≤x)F(x) = \int_{-\infty}^x f(x) dx = P(X \leq x)
    Expected value and variance are:
    μ=E(X)=∫−∞∞x⋅f(x)dx\mu = E(X) = \int_{-\infty}^{\infty} x \cdot f(x) dx
    σ2=V(X)=∫−∞∞(x−μ)2⋅f(x)dx\sigma^2 = V(X) = \int_{-\infty}^{\infty} (x - \mu)^2 \cdot f(x) dx

Key Distributions

  1. Binomial Distribution: Models the number of successes in nn independent Bernoulli trials with replacement.
    f(x)=(nx)⋅px⋅(1−p)n−xf(x) = \binom{n}{x} \cdot p^x \cdot (1-p)^{n-x}
    E(X)=n⋅pE(X) = n \cdot p, Var(X)=n⋅p⋅qVar(X) = n \cdot p \cdot q (where q=1−pq = 1-p ).
  2. Hypergeometric Distribution: Models successes in nn draws without replacement from population NN containing MM successes.
    f(x)=(Mx)(N−Mn−x)(Nn)f(x) = \frac{\binom{M}{x} \binom{N-M}{n-x}}{\binom{N}{n}}
  3. Poisson Distribution: Models the frequency of rare events over a fixed interval ( n→∞n \rightarrow \infty, p→0p \rightarrow 0 ).
    f(x)=λxx!⋅e−λf(x) = \frac{\lambda^x}{x!} \cdot e^{-\lambda}
  4. Normal (Gaussian) Distribution: Symmetric, bell-shaped continuous distribution defined by μ\mu and σ2\sigma^2.
    f(x)=12πσe−12(x−μσ)2f(x) = \frac{1}{\sqrt{2\pi}\sigma} e^{-\frac{1}{2} \left(\frac{x-\mu}{\sigma}\right)^2}
  5. Standard Normal Distribution: Mean μ=0\mu = 0, Variance σ2=1\sigma^2 = 1. Computed via Z-transformation:
    z=x−μσz = \frac{x-\mu}{\sigma}
  6. Chi-Square Distribution: Formed by the sum of nn squared independent Standard Normal variables.
    ∑i=1nZi2∼χn2\sum_{i=1}^n Z_i^2 \sim \chi_n^2

Central Limit Theorem

The sum (or mean) of nn independent, identically distributed random variables converges to a normal distribution for sufficiently large nn ( n>30n > 30 ).
Zn=∑i=1nXi−nμnσ∼N(0,1)Z_n = \frac{\sum_{i=1}^n X_i - n\mu}{\sqrt{n}\sigma} \sim N(0,1)

Module 5: Inductive Statistics and Hypothesis Testing

Inductive statistics estimates population parameters based on sample data. Point estimators should be unbiased (expected value converges to true parameter) and consistent (precision increases with sample size).

Confidence Intervals

A range bounding the true parameter with a specific probability.

  • Mean, Known Variance:
    μ∈[xˉ−u1−α/2⋅σn;xˉ+u1−α/2⋅σn]\mu \in \left[\bar{x} - u_{1-\alpha/2} \cdot \frac{\sigma}{\sqrt{n}} ; \bar{x} + u_{1-\alpha/2} \cdot \frac{\sigma}{\sqrt{n}}\right]
  • Mean, Unknown Variance: Uses the t-distribution with n−1n-1 degrees of freedom.
    μ∈[xˉ−tn−1,1−α/2⋅sn;xˉ+tn−1,1−α/2⋅sn]\mu \in \left[\bar{x} - t_{n-1, 1-\alpha/2} \cdot \frac{s}{\sqrt{n}} ; \bar{x} + t_{n-1, 1-\alpha/2} \cdot \frac{s}{\sqrt{n}}\right]

Statistical Significance Testing

Hypothesis tests challenge a null hypothesis ( H0H_0 ) against an alternative hypothesis ( H1H_1 ).

  • One-Sample Gauss Test (z-Test): Compares mean to reference μ0\mu_0 with known variance.
    T(x)=xˉ−μ0σ/nT(x) = \frac{\bar{x} - \mu_0}{\sigma / \sqrt{n}}
  • Two-Sample t-Test (Independent): Compares two means assuming homogeneous variances.
    T(x,y)=xˉ−yˉspn⋅mn+mT(x, y) = \frac{\bar{x} - \bar{y}}{s_p \sqrt{\frac{n \cdot m}{n+m}}}
    Where pooled variance sp2s_p^2 is:
    sp2=(n−1)sx2+(m−1)sy2n+m−2s_p^2 = \frac{(n-1)s_x^2 + (m-1)s_y^2}{n+m-2}
  • F-Test for Homoscedasticity: Tests variance equality.
    F(x,y)=sx2sy2F(x,y) = \frac{s_x^2}{s_y^2}
  • Categorical Tests:
    • Chi-Square Goodness-of-Fit: Tests a distribution against reference frequencies pip_i.
χ2=∑i=1k(oi−ei)2ei\chi^2 = \sum_{i=1}^k \frac{(o_i - e_i)^2}{e_i}
  • McNemar's Change Test: Analyzes paired/dependent categorical data.
χMcNemar2=(b−c)2b+c\chi_{McNemar}^2 = \frac{(b-c)^2}{b+c}