Past exam of the mathematics course of the University of Cambridge 2006 iii Paper 46 3 a Solution Created 2026-10-03 Updated 2026-10-14
Principal component analysis replaces the original coordinates by orthogonal linear combinations, ordered so that the first few retain as much variance as possible. It gives a lower-dimensional summary for visualization or compression and reveals the main directions of variation. A direction of large variance need not be the direction most useful for classification.
Write . For a unit vector , the centered score has varianceMaximizing this Rayleigh quotient with a Lagrange multiplier givesThus a maximizing direction must be an eigenvector of the covariance matrix. To identify the maximum, use the spectral theorem for real symmetric matrices to choose an orthonormal basis of eigenvectors , with eigenvalues . Writing givesEquality is attained at . Consequently the first population principal component isFor each subsequent principal component, maximize the same variance over unit coefficient vectors orthogonal to all the previously chosen ones. Restricting the expansion above to the remaining eigenvectors gives , then , and so on. ThusThe principal components are uncorrelated; they need not be independent unless additional distributional assumptions, such as joint Gaussianity, hold. Their total variance is . Signs of eigenvectors are arbitrary, and a repeated eigenvalue permits any orthonormal basis in its eigenspace. In sample principal component calculations, replace by the sample mean and by the sample covariance matrix.
Past exam of the mathematics course of the University of Cambridge 2006 iii Paper 46 3 b ii Solution Created 2026-10-03 Updated 2026-10-14
Let be the three supplied coefficient vectors, in their displayed order. Multiplication by the sample covariance matrix givesThe four vectors are pairwise orthogonal, with norms , , and . Hence form an orthonormal basis of eigenvectors. The variance of the principal component with unit coefficient vector is its eigenvalue . Using unnormalized coefficient vectors would instead give variances and would not produce the desired proportions.
The total variance isTherefore the explained variance of a principal component isThe first two principal components together account for , and the first three account for of the total variance.
Past exam of the mathematics course of the University of Cambridge 2006 iii Paper 46 3 b i Solution Created 2026-10-03 Updated 2026-10-14
For , direct multiplication by the sample covariance matrix givesIt is therefore an eigenvector, with eigenvalue . Normalization gives , so the corresponding sample principal component isIts coefficients are proportional to the required vector. The remaining eigenvalues calculated in (ii) are smaller, confirming that this is the first principal component.
Past exam of the mathematics course of the University of Cambridge 2006 iii Paper 46 3 b iv Solution Created 2026-10-03 Updated 2026-10-14
If the change is purely a rescaling of the physics mark, write , where . The sample covariance matrix transforms asThe physics variance is multiplied by , becoming approximately . Each covariance between physics and another subject is multiplied by , and all other entries stay unchanged. Principal component analysis on this new sample covariance matrix maximizes variance in the new numerical units, so its eigenvectors and explained variance of a principal component generally change. Physics receives disproportionately greater influence simply because its unit has changed.
One solution is to convert the physics marks back to the original scale before doing principal component analysis. Alternatively, use principal component analysis on a correlation matrix: standardize every subject byA positive change of units multiplies both a centered variable and its standard deviation by the same factor. Thus it leaves and the sample correlation matrix unchanged.
Correlation-based principal component analysis is invariant under positive changes of units; covariance-based principal component analysis is not. Standardizing gives each subject unit variance, which is a different weighting choice and can emphasize relatively low-variance subjects. If the revised assessment changes the scores themselves rather than just their units, its sample correlation matrix may also change, and mere standardization cannot recover the original analysis.
Past exam of the mathematics course of the University of Cambridge 2006 iii Paper 46 4 a Solution Created 2026-10-03 Updated 2026-10-14
Write for two rows of the data matrix and . Three possible dissimilarities for continuous variables are the following.
The Euclidean distance isIt is simple and has the usual geometric interpretation when coordinates have comparable units. Its disadvantage is sensitivity to the numerical scales: a change of units or a high-variance variable can dominate it. Strongly correlated coordinates can also give repeated weight to essentially the same information. Squared Euclidean distance is useful in some methods, but is not itself a metric because it need not satisfy the triangle inequality.
The standardized Euclidean distance iswhere is the sample variance of coordinate across individuals. It measures differences in standard-deviation units and is invariant under positive coordinate rescalings when the scales are estimated consistently. It is useful for differently measured variables, but requires nonzero sample variances, ignores correlations between coordinates and can give excessive influence to a low-variance noisy variable. With fixed positive scales it is a Euclidean distance after a diagonal change of coordinates, so it is a metric.
The Mahalanobis distance iswhere is the pooled sample covariance matrix of all individuals. If is its Cholesky decomposition, then : it is Euclidean distance in whitened coordinates. It adjusts for both scales and correlations, avoiding duplicate weight for highly correlated variables, and is invariant under nonsingular affine transformations when the sample covariance matrix is transformed accordingly. No multivariate normal distribution assumption is required merely to define the distance. However, must be a positive-definite matrix; when there are too few observations or dependent coordinates, its inverse is unavailable. Estimation of can also be unstable and sensitive to outliers. These trade-offs determine whether covariance adjustment is preferable to the simpler distances.
Past exam of the mathematics course of the University of Cambridge 2007 iii Paper 47 1 a Solution Created 2026-10-03 Updated 2026-10-14
Use the unbiased sample covariance matrixand assume is positive-definite and , so is invertible almost surely. For a nonzero fixed direction , the observations have mean and variance . Their squared Student t-test statistic for the projected null mean isPut . The Cauchy-Schwarz inequality giveswith equality when is proportional to , if . For every projected statistic is zero. Maximizing the squared discrepancy over directions therefore gives Hotelling's T-squared statistic:This uses the squared generalized Rayleigh quotient. The preliminary formula on the printed cover has an unsquared numerator and is not valid as written: setting makes that ratio for , so it is unbounded. The displayed Cauchy-Schwarz argument supplies the needed corrected identity independently.
Under the null, let and . Then , , and are independent. To see these sample properties, apply an orthogonal transformation to the observation indices with first row . Its first centered row is ; its other rows are independent residual contrasts, independent of the first. Their outer products sum to , establishing the Wishart distribution and independence.
Since , use the supplied Gaussian-Wishart quadratic-form law with to obtainThus a level- test rejects when this scaled statistic exceeds the quantile of the F-distribution. The Gaussian-Wishart law requires independence; it holds here because of the orthogonal sample decomposition. Its printed use of instead of the introduced is a notational slip. A fixed-direction Student law alone would not calibrate the maximized statistic, because its maximizing direction depends on the sample.
Past exam of the mathematics course of the University of Cambridge 2007 iii Paper 47 1 b Solution Created 2026-10-03 Updated 2026-10-14
Transform each observation to . If has full row rank , the transformed sample is multivariate normal with mean and positive-definite covariance matrix . Its sample mean is and its unbiased sample covariance matrix is . The Hotelling test of linear hypotheses therefore usesHere is required. Reject for a large scaled statistic using the relevant upper F-distribution quantile. If the rows of are dependent, choose a basis for their row space, use that basis as the contrast matrix, and replace by its rank . The null hypothesis is unchanged, but redundant contrasts must not be treated as independent dimensions. Rank zero gives no restrictions and hence no nontrivial test.
Past exam of the mathematics course of the University of Cambridge 2016 iii Paper 205 4 Solution Created 2026-10-03 Updated 2026-10-06
Write for a positive-definite matrix. Up to a constant independent of the parameters, the log-likelihood of the multivariate normal distribution isThe identityshows that, for each , the unique optimizing mean is . Using the matrix trace to rewrite the first quadratic sum, the profile likelihood isTherefore maximum likelihood estimation of the precision matrix, whenever the maximum exists, is exactlyThis is the profile likelihood for a Gaussian precision matrix. The sample covariance matrix here uses divisor , as appropriate for maximum likelihood estimation.
There is an important rank qualification in the printed assumptions. If , differentiation gives , so the unique minimizer is . Uniqueness follows because the negative log-determinant is a strictly convex function on the positive-definite matrices. But full column rank of the uncentered alone does not imply : the rank of a centered sample covariance matrix depends on the centered design. For example, with and raw data matrix ,Although has full column rank, setting gives objective . Thus an unpenalized maximizer need not exist under the literal raw-rank assumption. The likelihood reduction remains valid; existence requires full column rank of the centered data, equivalently . For the nonsingular Gaussian model this holds almost surely when .
Use the entrywise-penalty convention for the Graphical Lasso:The sum is the entrywise matrix L1 norm. Its Graphical-Lasso Karush-Kuhn-Tucker conditions areHere is symmetric; its nonzero-entry values are , and its zero-entry values are any numbers in . These are the subgradient optimality condition for this convex optimization problem. Since a positive-definite matrix has positive diagonal, and . Counting both off-diagonal entries in the penalty and in the trace makes the same appear in their stationarity equations. The common variant penalizing only off-diagonal entries instead sets ; the off-diagonal equations and the column argument below are unchanged.
For the given column problem, abbreviateIts smooth part expands to plus a constant, because is symmetric and . The matrix is a positive-definite matrix, so this quadratic is a strictly convex function. Adding the convex L1 norm penalty preserves strict convexity, and the objective tends to infinity as . The minimizer exists and is unique. Its Karush-Kuhn-Tucker conditions are
We identify that minimizer directly from the precision matrix. Write and defineThe denominator is positive. The off-diagonal part of column of givesOn the other hand, the off-diagonal Graphical-Lasso Karush-Kuhn-Tucker conditions readBecause , the coordinates of have the opposite signs from those of and vanish at exactly the same positions. The subgradient of the absolute value therefore satisfiesIt follows thatThese are exactly the Lasso column problem's Karush-Kuhn-Tucker conditions. Its unique minimizer must be , yieldingThis is the Graphical Lasso column regression identity. The minus sign is essential: it converts the precision-entry subgradient into the regression-coefficient subgradient. The argument uses the inverse identity directly, so it does not require proving the supplied block inverse formula.
Past exam of the mathematics course of the University of Cambridge 2021 iii Paper 205 5 Solution 2026-09-28
Use the uncentered sample covariance matrixThen and, simultaneously for every unit vector ,Here and the effective rank of a covariance matrix satisfiesThe Gaussian sample-covariance operator-norm bound therefore gives, with probability at least ,Under the assumed upper bound on , the second term is at most the first. Thus the stronger simultaneous estimateholds for every . Squaring and using that the displayed ratio is at most one gives the inequality requested in the question after enlarging the universal constant .
Past exam of the mathematics course of the University of Cambridge 2024 iii Paper 205 2 a Solution Created 2026-09-24 Updated 2026-09-25
The matrix is the sample covariance matrixChanging to is another convention, but the objective must use the same convention throughout.
For independent multivariate normal observations with unknown mean and nonsingular covariance, profiling the mean at its sample value gives negative log-likelihood proportional to over . The sample covariance matrix uses divisor . Its minimizer exists exactly when , and is then .
Rank of a centered sample covariance matrix 2026-10-06
If and , then . In particular full column rank of raw does not ensure a nonsingular centered sample covariance matrix. When is singular, its Gaussian precision profile likelihood has no finite maximizer: increase precision along a nonzero null vector.
Sample correlation matrix 2026-10-14
A sample correlation matrix rescales a sample covariance matrix to unit diagonal, for variables with positive sample variance. Its off-diagonal entries are sample correlation coefficients. Strong correlations between predictors can indicate multicollinearity, but pairwise correlations alone do not exclude higher-order linear dependence.
Sample covariance Created 2026-09-29 Updated 2026-10-06
For paired scalar observations , their sample covariance is , or the same sum divided by under the unbiased convention. It is an off-diagonal entry of the sample covariance matrix of the paired vectors.
Uncentered empirical second-moment matrix 2026-10-06
The uncentered empirical second-moment matrix averages the outer products of the observations. Its expected value is . It is an unbiased estimator of the covariance matrix when the population expected value is known to be zero. It differs from a sample covariance matrix centered at the sample mean.