← Module 15 overview
Module 15 · Project 7 · Due the date on Canvas · Synthesis Portfolio & Evidence Workshop · adaptive competency DV23

Concept review — Regression, Bayesian updating and dimension reduction

Correlation and Regression

Covariance
Measures how two variables move together: \( \mathrm{Cov}(X,Y)=E[(X-\mu_X)(Y-\mu_Y)] \). Positive covariance means they tend to increase together; negative means one rises as the other falls. It is unstandardized, so its magnitude depends on units.
Pearson Correlation Coefficient
Population correlation is \(\rho=\mathrm{Cov}(X,Y)/(\sigma_X\sigma_Y)\), and sample correlation is \(r=s_{XY}/(s_Xs_Y)\). These require finite, nonzero variances and lie in \([-1, 1]\). They measure linear association; zero correlation does not imply independence. Correlation alone does not establish causation (Holland, 1986).
Ordinary Least Squares (OLS) Regression
Fits \(\hat y=\hat\beta_0+\hat\beta_1x\) by minimizing squared residuals. In simple regression with an intercept and nonzero predictor variation, \(\hat\beta_1=s_{XY}/s_X^2\) and \(\hat\beta_0=\bar y-\hat\beta_1\bar x\). When both sample SDs are positive, the slope also equals \(r(s_Y/s_X)\). Computing a line does not establish the assumptions needed for inference or causal interpretation.
Residual
The observed value minus its fitted value: \(e_i=y_i-\hat y_i\). Curvature or changing spread in diagnostic plots can challenge the specified mean or variance model. A patternless plot is not proof of independence, correct specification or causal validity; unusual observations require investigation, not automatic deletion.
Leverage
Measures an observation’s position in predictor space. In simple regression with an intercept, \(h_{ii}=1/n+(x_i-\bar x)^2/\sum_j(x_j-\bar x)^2\). High leverage creates the potential for influence; actual influence also depends on the residual. A high-leverage point is not automatically erroneous.
Heteroscedasticity
Non-constant variance of residuals across the range of \(x\). It makes conventional homoscedastic standard errors unreliable—they may be too small or too large—so confidence intervals and p-values require a defensible variance model or robust standard errors. A changing residual spread can suggest it; a diagnostic plot alone can neither establish nor exclude it.

Bayesian Statistics

Bayes’ Theorem
\( P(\theta\mid\text{data})=P(\text{data}\mid\theta)P(\theta)/P(\text{data}) \). It updates a prior belief with observed evidence to produce a posterior, and it is the basis of the Bayesian updating in Module 9.
Prior Distribution
The belief about a parameter before the data are observed. It can be informative, weakly informative, or a stated reference prior; a flat prior is not universally “uninformative” because flatness depends on parameterization. Under regular conditions, as compatible data accumulate, the likelihood often dominates provided the prior gives support to the relevant parameter region.
Likelihood
The probability mass or density assigned to the observed data as a function of a specific parameter value: \( L(\theta;\text{data}) \propto P(\text{data}\mid\theta) \). It is not a probability distribution over \( \theta \) and need not integrate to 1 over the parameter. Ratios of likelihood values compare the support that the data give to different parameter values.
Posterior Distribution
The updated belief after combining prior and likelihood. It is the quantity that a Bayesian analysis reports and visualizes. The posterior mean is a common point estimate; credible intervals make posterior-probability statements and therefore have a different interpretation from frequentist confidence intervals.
Conjugate Prior
A prior chosen so that the posterior falls in the same distribution family. A Beta prior with a binomial likelihood gives \( \mathrm{Beta}(\alpha,\beta) \to \mathrm{Beta}(\alpha+k,\beta+n-k) \). Conjugacy makes Bayesian updating tractable without simulation.
Posterior Predictive Check
Draws parameter values from the posterior, then simulates replicated data under the observation model. A stated statistic or graphical feature of the replicates is compared with its observed counterpart, using the same sample size and design (Gabry et al., 2019). A mismatch is a reason to investigate model assumptions or data quality. Agreement on selected features does not prove that the model is correct.

Linear Algebra and Dimension Reduction

Covariance Matrix
A square matrix where entry \( (i,j) \) is the covariance between variables \(i\) and \(j\). Diagonal entries are variances. PCA operates on this matrix (or its correlation-based equivalent) to find directions of maximum spread.
Eigenvalue and Eigenvector
A nonzero vector \(v\) is an eigenvector of \(A\) if \(Av=\lambda v\) for some scalar \(\lambda\). In covariance-based PCA, unit eigenvectors define principal directions and their nonnegative eigenvalues give the variance of the corresponding scores. A principal-component score is a linear combination of centered variables, not the eigenvector itself. These directions need not represent underlying causes.
Principal Component Analysis (PCA)
Uses orthogonal linear directions to maximize retained variance for a chosen dimension and scaling. Variables are centered, and the decision whether to standardize them must be justified (Jolliffe & Cadima, 2016); constant variables cannot be standardized to unit variance. High explained variance does not establish predictive usefulness, causation or preservation of every meaningful feature. Nonlinear patterns require separate investigation.
Scree Plot
A bar or line chart showing the variance explained by each principal component. The “elbow”, the point after which each remaining component explains little additional variance, informs the number of components to retain. There is no single correct cutoff; the decision depends on interpretability and downstream use.
Loadings
The coefficients defining principal directions; in R’s prcomp(), they are the columns of rotation. Compare signs and relative magnitudes within the stated centering, scaling and biplot convention. Reversing an entire component’s sign changes its orientation, not its information. A large coefficient alone does not establish a variable’s causal importance.
Projection
Maps a centered, and possibly scaled, observation onto a chosen linear subspace. The resulting coordinates are scores. For PCA fitted to that data, score columns have zero sample covariance. Uncorrelated scores need not be independent, and discarded directions may retain information relevant to a later question.