Menu Close

Multivariate methods: UPSC Statistics Optional PYQ Solutions (1996–2026)

All 31 questions UPSC has asked on multivariate methods in the Statistics Optional (Paper I, Linear Inference and Multivariate Analysis) from 1996 to 2026, solved step by step – latest first.

Try them yourself first: the same questions, without solutions, are on our Linear Inference and Multivariate Analysis topic-wise PYQs page.

How we check these solutions

These are our own solutions, prepared with AI help. UPSC does not publish official answers. Every solution is checked a second way before it goes up, and says how:

  • ✓ Checked by computer the numbers were worked out again independently in code (Python with NumPy/SciPy) and matched.
  • ✓ Proof checked step by step for “prove that” and “examine whether” questions, every step was checked against the definitions and the standard theorems.
  • ✓ Derivation checked step by step for derivations and approximations, every step was checked, and the result was also tested numerically.
  • ✓ Answer checked step by step for descriptive questions, every point was checked against the standard theory.

Spotted a mistake or a neater method? Tell us in the comments below or through Report an error.

Jump to a question (year · question number):

2026 · 5b 2025 · 8a 2024 · 6b 2023 · 6c(i) 2023 · 6c(ii) 2022 · 6c 2022 · 7b 2021 · 7b 2020 · 8c 2019 · 8b 2018 · 5b 2017 · 6a 2017 · 7b 2016 · 8a 2015 · 7b 2013 · 8b 2012 · 6c 2012 · 7b 2007 · 5b 2007 · 6b 2006 · 6a 2004 · 5f 2004 · 6b 2004 · 6c 2003 · 6b 2002 · 6c 2000 · 6b(i) 1999 · 12a 1998 · 12b 1997 · 12b 1996 · 12b

Cover of the UPSC Prelims Topic-wise PYQ book with detailed explanations

From the Optional Province team

Preparing for Prelims too?

Our UPSC Prelims Topic-wise PYQ Book covers every Prelims question with detailed explanations, so you can see exactly where UPSC asks from. Now available as a hard copy and an eBook.

Buy Hard Copy on AmazonBuy eBook (PDF)

Download a free sample

Explain the problem of classification in discriminant analysis. In case of two known multivariate normal populations, define Fisher’s discriminant function and calculate it for the data given below: 𝛍(1)=(2412),𝛍(2)=(1810) and Σ=(9−5−58)

2026 · Paper I · Q5b · 10 marks

Solution

The classification problem. We have two (or more) populations π1,π2\pi_1,\pi_2 whose distributions are known (or estimated), and an individual xx that is known to belong to one of them but not to which. We must divide the sample space into regions R1,R2R_1,R_2 and assign xx to πi\pi_i when x∈Rix\in R_i, so that the chance (or expected cost) of misclassification is as small as possible. Examples: diagnosing a disease from symptoms, assigning a fossil to a species, approving or refusing a loan.

Fisher’s discriminant function. Fisher looked for the linear combination y=a′xy=a'x whose means in the two populations are as far apart as possible relative to its standard deviation: maxa{a′(μ(1)−μ(2))}2a′Σa⇒a=Σ−1(μ(1)−μ(2)).\max_a\frac{\{a'(\mu^{(1)}-\mu^{(2)})\}^2}{a'\Sigma a}\quad\Longrightarrow\quad a=\Sigma^{-1}(\mu^{(1)}-\mu^{(2)}). The maximum value is the Mahalanobis distance Δ2=(μ(1)−μ(2))′Σ−1(μ(1)−μ(2))\Delta^2=(\mu^{(1)}-\mu^{(2)})'\Sigma^{-1}(\mu^{(1)}-\mu^{(2)}). With equal priors and costs, xx is assigned to π1\pi_1 if a′x≥12a′(μ(1)+μ(2)),a'x\ \ge\ \tfrac12a'(\mu^{(1)}+\mu^{(2)}), and to π2\pi_2 otherwise. For normal populations with a common Σ\Sigma this is also the optimal (Bayes) rule.

Calculation. μ(1)−μ(2)=(6,2)′\mu^{(1)}-\mu^{(2)}=(6,2)', |Σ|=72−25=47|\Sigma|=72-25=47: Σ−1=147(8559),a=147(48+1030+18)=147(5848)=(1.2341.021).\Sigma^{-1}=\frac1{47}\begin{pmatrix}8&5\\5&9\end{pmatrix},\qquad a=\frac1{47}\begin{pmatrix}48+10\\30+18\end{pmatrix}=\frac1{47}\begin{pmatrix}58\\48\end{pmatrix}=\begin{pmatrix}1.234\\1.021\end{pmatrix}. So Fisher’s discriminant function is y=58x1+48x247=1.234x1+1.021x2(or, scaled, y*=29x1+24x2).y=\frac{58x_1+48x_2}{47}=1.234x_1+1.021x_2\qquad(\text{or, scaled, }y^*=29x_1+24x_2).

Allocation rule. The midpoint is 12(μ(1)+μ(2))=(21,11)′\frac12(\mu^{(1)}+\mu^{(2)})=(21,11)', so m=58(21)+48(11)47=174647=37.15.m=\frac{58(21)+48(11)}{47}=\frac{1746}{47}=37.15 . Assign xx to π1\pi_1 if 1.234x1+1.021x2≥37.151.234x_1+1.021x_2\ge37.15 (equivalently 29x1+24x2≥87329x_1+24x_2\ge873), and to π2\pi_2 otherwise.

The separation is Δ2=6(58)+2(48)47=44447=9.45\Delta^2=\frac{6(58)+2(48)}{47}=\frac{444}{47}=9.45, Δ=3.07\Delta=3.07, so each population is misclassified with probability Φ(−Δ/2)=Φ(−1.54)≈0.062\Phi(-\Delta/2)=\Phi(-1.54)\approx0.062.

✓ Checked by computer We checked in Python: Σ⁻¹(μ₁ − μ₂) = (58, 48)/47, Δ² = 444/47 = 9.45 and the cut-off 1746/47 = 37.15.

↑ Back to the question list

(i) What are principal components? Show that the principal components are uncorrelated. (ii) Obtain the principal components and the amount of variation explained by each principal component associated with the following dispersion matrix: Σ=(421231112) Comment on the results.

2025 · Paper I · Q8a · 20 marks

Solution

(i) Principal components. For a random vector XX with dispersion matrix Σ\Sigma (eigenvalues λ1≥…≥λp\lambda_1\ge\dots\ge\lambda_p, orthonormal eigenvectors e1,…,epe_1,\dots,e_p), the jj-th principal component is Yj=ej′X,Y_j=e_j'X, the normalised linear combination with the largest variance among those uncorrelated with Y1,…,Yj−1Y_1,\dots,Y_{j-1}. Its variance is V(Yj)=λjV(Y_j)=\lambda_j.

They are uncorrelated. For j≠kj\ne k, Cov(Yj,Yk)=ej′Σek=ej′(λkek)=λkej′ek=0,\text{Cov}(Y_j,Y_k)=e_j'\Sigma e_k=e_j'(\lambda_ke_k)=\lambda_k\,e_j'e_k=0, because the eigenvectors of the symmetric matrix Σ\Sigma are orthogonal. (If two eigenvalues are equal, the eigenvectors can still be chosen orthogonal.) In matrix form, with P=[e1,…,ep]P=[e_1,\dots,e_p], Y=P′XY=P'X has V(Y)=P′ΣP=diag(λ1,…,λp)V(Y)=P'\Sigma P=\text{diag}(\lambda_1,\dots,\lambda_p).

(ii) Calculation. |Σ−λI|=0|\Sigma-\lambda I|=0 gives λ3−9λ2+20λ−13=0\lambda^3-9\lambda^2+20\lambda-13=0 (trace 9; sum of the principal 2×2 minors 8+7+5=208+7+5=20; |Σ|=13|\Sigma|=13). Its roots are λ1=6.049,λ2=1.643,λ3=1.308.\lambda_1=6.049,\qquad\lambda_2=1.643,\qquad\lambda_3=1.308 . Solving (Σ−λjI)e=0(\Sigma-\lambda_jI)e=0 and normalising:

PC Eigenvector (e1,e2,e3)(e_1,e_2,e_3) Variance % of total (9) Cumulative
Y1Y_1 (0.737,0.591,0.328)(0.737,\ 0.591,\ 0.328) 6.049 67.2% 67.2%
Y2Y_2 (−0.591,0.328,0.737)(-0.591,\ 0.328,\ 0.737) 1.643 18.3% 85.5%
Y3Y_3 (0.328,−0.737,0.591)(0.328,\ -0.737,\ 0.591) 1.308 14.5% 100%

So Y1=0.737X1+0.591X2+0.328X3,Y2=−0.591X1+0.328X2+0.737X3,Y3=0.328X1−0.737X2+0.591X3.Y_1=0.737X_1+0.591X_2+0.328X_3,\quad Y_2=-0.591X_1+0.328X_2+0.737X_3,\quad Y_3=0.328X_1-0.737X_2+0.591X_3 .

Comment.

  • All variables are positively correlated, so Y1Y_1 has all positive weights: it is a weighted “overall size” index, dominated by X1X_1 (the variable with the largest variance) and explaining about two-thirds of the total variation.
  • Y2Y_2 and Y3Y_3 are contrasts between the variables. Their variances, 1.64 and 1.31, are close, so neither is clearly more important than the other, and their directions are not well determined.
  • Two components explain 85.5% of the variation, so the data can be reduced from 3 to 2 dimensions with modest loss; one component already gives 67%. The variances differ (4, 3, 2), so the components of the correlation matrix would be somewhat different.

✓ Checked by computer We checked in Python: the characteristic equation λ³ − 9λ² + 20λ − 13 = 0, the roots 6.049, 1.643 and 1.308, their eigenvectors and the shares 67.2%, 18.3% and 14.5%.

↑ Back to the question list

Define principal components and canonical correlation. How can one attain data reduction using principal components? If (X1,X2) has covariance matrix Σ=[1ρρ1] then find the principal components.

2024 · Paper I · Q6b · 15 marks

Solution

Principal components. For XX with dispersion matrix Σ\Sigma, the principal components are the uncorrelated linear combinations Yj=ej′XY_j=e_j'X, where eje_j is the normalised eigenvector of Σ\Sigma for its jj-th largest eigenvalue λj\lambda_j. Y1Y_1 has the largest variance of all normalised combinations, Y2Y_2 the largest among those uncorrelated with Y1Y_1, and so on; V(Yj)=λjV(Y_j)=\lambda_j and ∑λj=trΣ\sum\lambda_j=\text{tr}\,\Sigma.

Canonical correlation. For two sets X(1)X^{(1)} (pp variables) and X(2)X^{(2)} (qq variables), the first canonical correlation is the largest correlation between linear combinations U=a′X(1)U=a'X^{(1)} and V=b′X(2)V=b'X^{(2)}. The pair (U1,V1)(U_1,V_1) attaining it is the first pair of canonical variates; the next pair has the largest correlation among combinations uncorrelated with the first, and so on. The squared canonical correlations are the eigenvalues of Σ11−1Σ12Σ22−1Σ21\Sigma_{11}^{-1}\Sigma_{12}\Sigma_{22}^{-1}\Sigma_{21}.

Data reduction. The total variance ∑λj\sum\lambda_j is preserved. If the first kk eigenvalues account for most of it (say 80–90%), we keep Y1,…,YkY_1,\dots,Y_k and discard the rest. The pp correlated variables are then replaced by k<pk<p uncorrelated ones with little loss of information. The number kk is chosen from the cumulative proportion ∑j≤kλj/∑λj\sum_{j\le k}\lambda_j/\sum\lambda_j, a scree plot, or Kaiser’s rule (keep λj>1\lambda_j>1 for a correlation matrix).

Calculation. For Σ=(1ρρ1)\Sigma=\begin{pmatrix}1&\rho\\\rho&1\end{pmatrix}: |Σ−λI|=(1−λ)2−ρ2=0⇒λ=1±ρ.|\Sigma-\lambda I|=(1-\lambda)^2-\rho^2=0\quad\Longrightarrow\quad\lambda=1\pm\rho .

  • λ=1+ρ\lambda=1+\rho: (1−λ)e1+ρe2=0⇒e1=e2(1-\lambda)e_1+\rho e_2=0\Rightarrow e_1=e_2, so e=12(1,1)′e=\frac1{\sqrt2}(1,1)'.
  • λ=1−ρ\lambda=1-\rho: e1=−e2e_1=-e_2, so e=12(1,−1)′e=\frac1{\sqrt2}(1,-1)'.

Hence, for ρ>0\rho>0, Y1=X1+X22,V(Y1)=1+ρ;Y2=X1−X22,V(Y2)=1−ρ.Y_1=\frac{X_1+X_2}{\sqrt2},\quad V(Y_1)=1+\rho;\qquad Y_2=\frac{X_1-X_2}{\sqrt2},\quad V(Y_2)=1-\rho . The first component explains a proportion (1+ρ)/2(1+\rho)/2 of the total variance. (For ρ<0\rho<0 the order is reversed, and for ρ=0\rho=0 every direction is a principal component.) The directions do not depend on ρ\rho; only the variances do.

✓ Proof checked step by step We checked the eigenvalues 1 ± ρ and the eigenvectors (1, 1)/√2 and (1, −1)/√2 of the given matrix.

↑ Back to the question list

State briefly three reasons why an analyst may wish to perform a principal component analysis.

2023 · Paper I · Q6c(i) · 6 marks

Solution

Three reasons for a principal component analysis.

  1. Data reduction. When many variables are measured, a few components often explain most of the total variance. Replacing pp variables by k≪pk\ll p components makes the data easier to store, display (for example a scatter plot of the first two components) and analyse.
  2. Removing multicollinearity. The components are uncorrelated. Using them as regressors (principal component regression) avoids the unstable estimates caused by highly correlated predictors, and the same idea helps in other procedures that need a well-conditioned covariance matrix.
  3. Understanding the structure. The weights show how the variables group together, for example an overall “size” component and “shape” contrasts. Components are also used to build composite indices (such as a development or welfare index), to find outliers and clusters, and as a first step in factor analysis.

✓ Answer checked step by step We checked each of the reasons against the standard properties of principal components.

↑ Back to the question list

Define canonical correlations and give two examples of their application. Describe the procedure of working out canonical correlations and canonical variates.

2023 · Paper I · Q6c(ii) · 9 marks

Solution

Definition. Let X=(X(1)′,X(2)′)′X=(X^{(1)\prime},X^{(2)\prime})' have dispersion matrix Σ=(Σ11Σ12Σ21Σ22),\Sigma=\begin{pmatrix}\Sigma_{11}&\Sigma_{12}\\\Sigma_{21}&\Sigma_{22}\end{pmatrix}, with pp variables in the first set and q(≥p)q\ (\ge p) in the second. The first canonical correlation ρ1\rho_1 is the largest correlation between a linear combination U=a′X(1)U=a'X^{(1)} of the first set and a linear combination V=b′X(2)V=b'X^{(2)} of the second. The kk-th canonical correlation is the largest correlation between combinations uncorrelated with the first k−1k-1 pairs. The combinations (Uk,Vk)(U_k,V_k) are the canonical variates. Canonical correlation generalises the multiple correlation (p=1p=1) and simple correlation (p=q=1p=q=1).

Two applications.

  1. Relating a set of economic indicators (prices, wages, interest rates) to a set of outcomes (output, employment, consumption).
  2. Relating aptitude or entrance-test scores of students to their later performance in examinations; or relating measurements on fathers to the same measurements on sons, or climatic variables to crop yields.

Procedure.

  1. Obtain Σ\Sigma (or the sample matrix SS or correlation matrix RR) and partition it as above.
  2. Maximise Corr(a′X(1),b′X(2))=a′Σ12b\text{Corr}(a'X^{(1)},b'X^{(2)})=a'\Sigma_{12}b subject to a′Σ11a=b′Σ22b=1a'\Sigma_{11}a=b'\Sigma_{22}b=1. Lagrange multipliers give Σ12b=ρΣ11a,Σ21a=ρΣ22b,\Sigma_{12}b=\rho\,\Sigma_{11}a,\qquad\Sigma_{21}a=\rho\,\Sigma_{22}b, so (Σ11−1Σ12Σ22−1Σ21−ρ2I)a=0,(Σ22−1Σ21Σ11−1Σ12−ρ2I)b=0.\big(\Sigma_{11}^{-1}\Sigma_{12}\Sigma_{22}^{-1}\Sigma_{21}-\rho^2I\big)a=0,\qquad\big(\Sigma_{22}^{-1}\Sigma_{21}\Sigma_{11}^{-1}\Sigma_{12}-\rho^2I\big)b=0 .
  3. Solve |Σ11−1Σ12Σ22−1Σ21−ρ2I|=0|\Sigma_{11}^{-1}\Sigma_{12}\Sigma_{22}^{-1}\Sigma_{21}-\rho^2I|=0. Its roots ρ12≥ρ22≥…≥ρp2\rho_1^2\ge\rho_2^2\ge\dots\ge\rho_p^2 are the squared canonical correlations.
  4. For each ρk2\rho_k^2, find the eigenvector aka_k and scale it so that ak′Σ11ak=1a_k'\Sigma_{11}a_k=1. Then bk=1ρkΣ22−1Σ21akb_k=\frac1{\rho_k}\Sigma_{22}^{-1}\Sigma_{21}a_k, which automatically has bk′Σ22bk=1b_k'\Sigma_{22}b_k=1.
  5. The canonical variates are Uk=ak′X(1)U_k=a_k'X^{(1)}, Vk=bk′X(2)V_k=b_k'X^{(2)}, with Corr(Uk,Vk)=ρk\text{Corr}(U_k,V_k)=\rho_k and all other correlations between different pairs zero.
  6. In samples, test how many canonical correlations are significant with Bartlett’s statistic −{n−1−12(p+q+1)}∑i>klog(1−ri2)∼χ(p−k)(q−k)2-\{n-1-\frac12(p+q+1)\}\sum_{i>k}\log(1-r_i^2)\sim\chi^2_{(p-k)(q-k)}.

✓ Answer checked step by step We checked the description: the eigen-equations for the canonical correlations, the normalisation of the canonical variates and the order of extraction.

↑ Back to the question list

(i) If X1=Y1+Y2,X2=Y2+Y3,X3=Y3+Y1, where Y1,Y2 and Y3 are uncorrelated random variables and each of which has zero mean and unit standard deviation, find the multiple correlation coefficient between X3 and X1,X2. (ii) Let 𝐗 be a 3-dimensional random vector with dispersion matrix Σ=(933393339). Determine the first principal component and the proportion of the total variability that it explains.

2022 · Paper I · Q6c · 15 marks

Solution

(i) Multiple correlation. Since the YY’s are uncorrelated with unit variance, V(Xi)=1+1=2,Cov(X1,X2)=Cov(Y1+Y2,Y2+Y3)=V(Y2)=1,V(X_i)=1+1=2,\qquad\text{Cov}(X_1,X_2)=\text{Cov}(Y_1+Y_2,\ Y_2+Y_3)=V(Y_2)=1, and similarly Cov(X2,X3)=V(Y3)=1\text{Cov}(X_2,X_3)=V(Y_3)=1 and Cov(X3,X1)=V(Y1)=1\text{Cov}(X_3,X_1)=V(Y_1)=1. So every correlation is ρ12=ρ13=ρ23=12.\rho_{12}=\rho_{13}=\rho_{23}=\frac12 . The multiple correlation of X3X_3 on X1,X2X_1,X_2 is R3⋅122=ρ132+ρ232−2ρ12ρ13ρ231−ρ122=14+14−2⋅181−14=1/43/4=13,R_{3\cdot12}^2=\frac{\rho_{13}^2+\rho_{23}^2-2\rho_{12}\rho_{13}\rho_{23}}{1-\rho_{12}^2}=\frac{\frac14+\frac14-2\cdot\frac18}{1-\frac14}=\frac{1/4}{3/4}=\frac13, R3⋅12=13=0.577.R_{3\cdot12}=\frac1{\sqrt3}=0.577 .

(ii) First principal component. Σ=6I+3J\Sigma=6I+3J, where JJ is the matrix of ones. The vector 𝟏=(1,1,1)′\mathbf 1=(1,1,1)' satisfies J𝟏=3⋅𝟏J\mathbf 1=3\cdot\mathbf 1, so Σ𝟏=(6+9)𝟏=15⋅𝟏.\Sigma\mathbf 1=(6+9)\mathbf 1=15\cdot\mathbf 1 . Any vector orthogonal to 𝟏\mathbf 1 has Jv=0Jv=0, so Σv=6v\Sigma v=6v. The eigenvalues are λ1=15,λ2=λ3=6.\lambda_1=15,\qquad\lambda_2=\lambda_3=6 . The first principal component is Y1=X1+X2+X33,V(Y1)=15,Y_1=\frac{X_1+X_2+X_3}{\sqrt3},\qquad V(Y_1)=15, and it explains 1515+6+6=1527=59=55.6%\frac{15}{15+6+6}=\frac{15}{27}=\frac59=55.6\% of the total variability. (The other two components are not unique: any pair of orthonormal contrasts, such as (X1−X2)/2(X_1-X_2)/\sqrt2 and (X1+X2−2X3)/6(X_1+X_2-2X_3)/\sqrt6, will do.)

✓ Checked by computer We checked in Python: the covariance matrix [[2, 1, 1], [1, 2, 1], [1, 1, 2]], R² = 1/3, and the eigenvalues 15, 6, 6 of Σ with the first share 5/9.

↑ Back to the question list

(i) The data matrix of a random sample of size n=3 from a bivariate normal population BVN(μ1,μ2,σ12,σ22,ρ) is X=[61010682]. Test the null hypothesis H0:𝛍=𝛍0 against H1:𝛍≠𝛍0, where 𝛍0′=(8,5), at 10% level of significance. [You are given: F0.10;2,1=49.5,F0.10;1,2=8.53] (ii) Suppose n1=11 and n2=12, observations are made on two random vectors 𝐗1 and 𝐗2 which are assumed to have bivariate normal distribution with a common covariance matrix Σ, but possibly different mean vectors 𝛍1 and 𝛍2. The sample mean vectors and pooled covariance matrix are 𝐗‾1=(−1−1),𝐗‾2=(21),Spooled=(7−1−15). Obtain Mahalanobis sample distance D2 and Fisher’s linear discriminant function. Assign the observation 𝐗0=(01) to either population Π1 or Π2.

2022 · Paper I · Q7b · 20 marks

Solution

(This question is also listed under 3.6 Mahalanobis’s D² and Hotelling’s T². The worked solution is repeated here so that this page is complete.)

(i) One-sample test. N=3N=3, p=2p=2. x‾=((6+10+8)/3(10+6+2)/3)=(86).\bar x=\begin{pmatrix}(6+10+8)/3\\(10+6+2)/3\end{pmatrix}=\begin{pmatrix}8\\6\end{pmatrix}. Deviations: (−2,4)(-2,4), (2,0)(2,0), (0,−4)(0,-4): S=12(8−8−832)=(4−4−416),|S|=48,S−1=148(16444).S=\frac12\begin{pmatrix}8&-8\\-8&32\end{pmatrix}=\begin{pmatrix}4&-4\\-4&16\end{pmatrix},\qquad|S|=48,\qquad S^{-1}=\frac1{48}\begin{pmatrix}16&4\\4&4\end{pmatrix}. With x‾−μ0=(0,1)′\bar x-\mu_0=(0,1)': T2=N(x‾−μ0)′S−1(x‾−μ0)=3⋅448=0.25.T^2=N(\bar x-\mu_0)'S^{-1}(\bar x-\mu_0)=3\cdot\frac4{48}=0.25 . F=N−p(N−1)pT2=14(0.25)=0.0625on (2,1) df.F=\frac{N-p}{(N-1)p}T^2=\frac1{4}(0.25)=0.0625\quad\text{on }(2,1)\text{ df}. Since 0.0625<F0.10;2,1=49.50.0625<F_{0.10;2,1}=49.5, we do not reject H0:μ=(8,5)′H_0:\mu=(8,5)' at the 10% level.

(ii) Mahalanobis distance. x‾1−x‾2=(−3,−2)′\bar x_1-\bar x_2=(-3,-2)'. With |Sp|=35−1=34|S_p|=35-1=34, Sp−1=134(5117),a=Sp−1(x‾1−x‾2)=134(−15−2−3−14)=(−0.5−0.5).S_p^{-1}=\frac1{34}\begin{pmatrix}5&1\\1&7\end{pmatrix},\qquad a=S_p^{-1}(\bar x_1-\bar x_2)=\frac1{34}\begin{pmatrix}-15-2\\-3-14\end{pmatrix}=\begin{pmatrix}-0.5\\-0.5\end{pmatrix}. D2=(x‾1−x‾2)′Sp−1(x‾1−x‾2)=(−3)(−0.5)+(−2)(−0.5)=2.5.D^2=(\bar x_1-\bar x_2)'S_p^{-1}(\bar x_1-\bar x_2)=(-3)(-0.5)+(-2)(-0.5)=2.5 .

Fisher’s linear discriminant function. y=a′x=−0.5x1−0.5x2.y=a'x=-0.5x_1-0.5x_2 . Its values at the two means are y‾1=a′x‾1=1\bar y_1=a'\bar x_1=1 and y‾2=a′x‾2=−1.5\bar y_2=a'\bar x_2=-1.5, with midpoint m=12(y‾1+y‾2)=−0.25.m=\tfrac12(\bar y_1+\bar y_2)=-0.25 . Rule (equal priors and costs): assign xx to Π1\Pi_1 if a′x≥ma'x\ge m, and to Π2\Pi_2 otherwise.

Classification of x0=(0,1)′x_0=(0,1)'. y0=−0.5(0)−0.5(1)=−0.5<−0.25y_0=-0.5(0)-0.5(1)=-0.5<-0.25. So x0x_0 is assigned to Π2\Pi_2.

✓ Checked by computer We checked in Python: (i) T² = 0.25 and F = 0.0625 < 49.5; (ii) the discriminant coefficients (−0.5, −0.5), D² = 2.5, the midpoint −0.25 and the score −0.5 of x₀.

↑ Back to the question list

What are principal components? Describe how to compute the principal components of the vectors X1=[10−1] and X2=[−110]. Give X1 and X2 in terms of the principal components.

2021 · Paper I · Q7b · 15 marks

Solution

Note on the question. We read X1X_1 and X2X_2 as two variables, each observed on 3 units: X1X_1 takes the values 1,0,−11,0,-1 and X2X_2 the values −1,1,0-1,1,0. (Read as two observations of a 3-vector, the same steps apply to XX′XX'.)

Principal components. The jj-th principal component is Yj=ej′XY_j=e_j'X, where eje_j is the normalised eigenvector of the covariance matrix for its jj-th largest eigenvalue. The components are uncorrelated, and their variances are the eigenvalues.

Method.

  1. Centre the variables and form the covariance matrix SS.
  2. Solve |S−λI|=0|S-\lambda I|=0 for λ1≥λ2\lambda_1\ge\lambda_2.
  3. Find the normalised eigenvectors e1,e2e_1,e_2.
  4. Form Yj=ej′XY_j=e_j'X; the proportion explained by YjY_j is λj/tr(S)\lambda_j/\text{tr}(S).

Calculation. Both variables already have mean zero. ∑x12=2,∑x22=2,∑x1x2=−1+0+0=−1,\sum x_1^2=2,\qquad\sum x_2^2=2,\qquad\sum x_1x_2=-1+0+0=-1, so, with divisor n−1=2n-1=2, S=12(2−1−12)=(1−0.5−0.51).S=\frac12\begin{pmatrix}2&-1\\-1&2\end{pmatrix}=\begin{pmatrix}1&-0.5\\-0.5&1\end{pmatrix}. |S−λI|=(1−λ)2−0.25=0|S-\lambda I|=(1-\lambda)^2-0.25=0 gives λ1=1.5\lambda_1=1.5, λ2=0.5\lambda_2=0.5, with eigenvectors 12(1,−1)′\frac1{\sqrt2}(1,-1)' and 12(1,1)′\frac1{\sqrt2}(1,1)'. Hence Y1=X1−X22(variance 1.5,75%),Y2=X1+X22(variance 0.5,25%).Y_1=\frac{X_1-X_2}{\sqrt2}\ (\text{variance }1.5,\ 75\%),\qquad Y_2=\frac{X_1+X_2}{\sqrt2}\ (\text{variance }0.5,\ 25\%). The component scores for the three units are Y1=12(2,−1,−1),Y2=12(0,1,−1).Y_1=\frac1{\sqrt2}(2,-1,-1),\qquad Y_2=\frac1{\sqrt2}(0,1,-1).

XX in terms of the components. The eigenvector matrix P=12(11−11)P=\frac1{\sqrt2}\begin{pmatrix}1&1\\-1&1\end{pmatrix} is orthogonal, so X=PYX=PY: X1=Y1+Y22,X2=Y2−Y12.X_1=\frac{Y_1+Y_2}{\sqrt2},\qquad X_2=\frac{Y_2-Y_1}{\sqrt2}. (Check, first unit: Y1=2/2Y_1=2/\sqrt2, Y2=0Y_2=0 gives X1=1X_1=1, X2=−1X_2=-1.)

✓ Checked by computer We checked in Python: the covariance matrix [[2, −1], [−1, 2]]/2, its eigenvalues 3/2 and 1/2, and the inverse relations X₁ = (Y₁ + Y₂)/√2, X₂ = (Y₂ − Y₁)/√2.

↑ Back to the question list

Two types of tests viz: written and oral were conducted for seeking admission to MBA course. The result of the test given by the students are as follows: x=(x1x2)=(marks obtained in written testmarks obtained in oral test) Let π1: students eligible for admission to MBA course; π2: students not eligible for admission to MBA course μ1=(30.614.4),Σ1=(5.60−0.62−0.622.08)μ2=(24.811.2),Σ2=(5.60−0.62−0.622.08) If one student gets 29.0 marks in written test and 12.0 in oral test, classify the student as eligible or not based on Fisher’s linear discriminant function. Also find the probability of misclassification. [Given that P(0<Z<1.8277)=0.4664].

2020 · Paper I · Q8c · 15 marks

Solution

Fisher’s linear discriminant function. The populations have a common covariance matrix Σ\Sigma, so a=Σ−1(μ1−μ2),y=a′x.a=\Sigma^{-1}(\mu_1-\mu_2),\qquad y=a'x . μ1−μ2=(5.8,3.2)′\mu_1-\mu_2=(5.8,\ 3.2)' and |Σ|=5.60(2.08)−0.622=11.2636|\Sigma|=5.60(2.08)-0.62^2=11.2636: Σ−1=111.2636(2.080.620.625.60),\Sigma^{-1}=\frac1{11.2636}\begin{pmatrix}2.08&0.62\\0.62&5.60\end{pmatrix}, a=111.2636(2.08(5.8)+0.62(3.2)0.62(5.8)+5.60(3.2))=111.2636(14.04821.516)=(1.24721.9102).a=\frac1{11.2636}\begin{pmatrix}2.08(5.8)+0.62(3.2)\\0.62(5.8)+5.60(3.2)\end{pmatrix}=\frac1{11.2636}\begin{pmatrix}14.048\\21.516\end{pmatrix}=\begin{pmatrix}1.2472\\1.9102\end{pmatrix}. y=1.2472x1+1.9102x2.y=1.2472x_1+1.9102x_2 .

Cut-off. 12(μ1+μ2)=(27.7,12.8)′\frac12(\mu_1+\mu_2)=(27.7,\ 12.8)', so m=1.2472(27.7)+1.9102(12.8)=34.547+24.451=59.00.m=1.2472(27.7)+1.9102(12.8)=34.547+24.451=59.00 . Rule: classify as eligible (π1\pi_1) if y≥59.00y\ge59.00, otherwise not eligible (π2\pi_2).

The student. x0=(29.0,12.0)′x_0=(29.0,\ 12.0)': y0=1.2472(29)+1.9102(12)=36.169+22.922=59.09≥59.00.y_0=1.2472(29)+1.9102(12)=36.169+22.922=59.09\ \ge\ 59.00 . So the student is classified as eligible for admission, though only just: the score is very close to the boundary.

Probability of misclassification. Δ2=(μ1−μ2)′a=5.8(1.2472)+3.2(1.9102)=13.35,Δ2=1.827.\Delta^2=(\mu_1-\mu_2)'a=5.8(1.2472)+3.2(1.9102)=13.35,\qquad\frac\Delta2=1.827 . Under π1\pi_1, y∼N(a′μ1,Δ2)y\sim N(a'\mu_1,\Delta^2), and it is misclassified if y<m=a′μ1−Δ2/2y<m=a'\mu_1-\Delta^2/2, i.e. if Z<−Δ/2Z<-\Delta/2. So P(2∣1)=P(1∣2)=Φ(−Δ/2)=Φ(−1.8277)=0.5−0.4664=0.0336.P(2\mid1)=P(1\mid2)=\Phi(-\Delta/2)=\Phi(-1.8277)=0.5-0.4664=0.0336 . About 3.4% of students would be misclassified in each direction.

✓ Checked by computer We checked in Python: the coefficients (1.2472, 1.9102), the score 59.09 against the cut-off 59.00, D² = 13.35 and the misclassification probability 0.0336.

↑ Back to the question list

Consider two sons born first in n families. Let X1: head length of first son X2: head breadth of first son X3: head length of second son X4: head breadth of second son The measurements provide the sample variance covariance matrix S=(91.48150.75366.87544.26750.75352.18649.25933.65166.87549.25996.77554.27844.26733.65154.27843.222) that leads to the correlation matrix R=(R11R12R21R22), where R11=(10.73460.73461),R22=(10.83920.83921) R12=R′21=(0.71070.70400.69310.7085). Obtain the canonical correlations and hence the first canonical variables and interpret your result.

2019 · Paper I · Q8b · 15 marks

Solution

Method. Work with the correlation matrix, i.e. standardised variables ZiZ_i. The squared canonical correlations are the eigenvalues of M=R11−1R12R22−1R21.M=R_{11}^{-1}R_{12}R_{22}^{-1}R_{21}.

Calculation. R11−1=10.46036(1−0.7346−0.73461),R22−1=10.29574(1−0.8392−0.83921).R_{11}^{-1}=\frac1{0.46036}\begin{pmatrix}1&-0.7346\\-0.7346&1\end{pmatrix},\qquad R_{22}^{-1}=\frac1{0.29574}\begin{pmatrix}1&-0.8392\\-0.8392&1\end{pmatrix}. Multiplying out, M=(0.32250.31690.30180.3020),trM=0.6246,|M|=0.0018.M=\begin{pmatrix}0.3225&0.3169\\0.3018&0.3020\end{pmatrix},\qquad\text{tr}\,M=0.6246,\quad|M|=0.0018 . The eigenvalues are r12=0.6217,r22=0.0029,r_1^2=0.6217,\qquad r_2^2=0.0029, so the canonical correlations are r1=0.7885,r2=0.054.r_1=0.7885,\qquad r_2=0.054 .

First canonical variables. The eigenvector of MM for r12r_1^2, scaled so that a′R11a=1a'R_{11}a=1, and b∝R22−1R21ab\propto R_{22}^{-1}R_{21}a scaled so that b′R22b=1b'R_{22}b=1, give U1=0.552Z1+0.521Z2,V1=0.504Z3+0.538Z4,U_1=0.552Z_1+0.521Z_2,\qquad V_1=0.504Z_3+0.538Z_4, with Corr(U1,V1)=0.789\text{Corr}(U_1,V_1)=0.789. In the original units (dividing by the standard deviations 9.565,7.224,9.837,6.5749.565,\ 7.224,\ 9.837,\ 6.574): U1=0.0577X1+0.0722X2,V1=0.0513X3+0.0819X4.U_1=0.0577X_1+0.0722X_2,\qquad V_1=0.0513X_3+0.0819X_4 .

Interpretation.

  • Both canonical variates give roughly equal weight to head length and head breadth, so each is essentially an overall head size index. The first canonical correlation, 0.79, shows a strong association between the head size of the first son and that of the second son.
  • The second canonical correlation, 0.054, is negligible. Its variates are approximately breadth-minus-length contrasts (head shape), so the brothers’ head shapes are essentially unrelated once size is allowed for.
  • So the relation between the two sets is almost entirely carried by one dimension: the four measurements can be summarised by one pair of size indices.

✓ Checked by computer We checked in Python: the eigenvalues of R₁₁⁻¹R₁₂R₂₂⁻¹R₂₁ are 0.6217 and 0.0029, so the canonical correlations are 0.7885 and 0.0536, and the first canonical variates have standardised weights (0.552, 0.521) and (0.504, 0.538).

↑ Back to the question list

Define principal components. Is the principal component affected by standardization? Establish your claim by illustrating the same with the covariance matrix Σ=[144100].

2018 · Paper I · Q5b · 10 marks

Solution

Definition. The principal components of XX are the uncorrelated linear combinations Yj=ej′XY_j=e_j'X, where eje_j is the normalised eigenvector of the dispersion matrix for its jj-th largest eigenvalue λj\lambda_j; V(Yj)=λjV(Y_j)=\lambda_j.

Is the principal component affected by standardisation? Yes. Principal components are not scale invariant. Changing the units of a variable changes its variance and therefore the components; the components of the covariance matrix Σ\Sigma and of the correlation matrix RR (standardised variables) are in general different, and one set cannot be obtained from the other by a simple rescaling.

Illustration.

From Σ\Sigma. |Σ−λI|=(1−λ)(100−λ)−16=λ2−101λ+84=0|\Sigma-\lambda I|=(1-\lambda)(100-\lambda)-16=\lambda^2-101\lambda+84=0: λ1=100.16,λ2=0.84.\lambda_1=100.16,\qquad\lambda_2=0.84 . Y1=0.040X1+0.999X2(99.2% of the variance),Y2=0.999X1−0.040X2.Y_1=0.040X_1+0.999X_2\quad(99.2\%\text{ of the variance}),\qquad Y_2=0.999X_1-0.040X_2 . The first component is almost exactly X2X_2, simply because X2X_2 has a much larger variance (100 against 1).

From RR. ρ=41×100=0.4\rho=\frac{4}{\sqrt{1\times100}}=0.4, so R=(10.40.41)R=\begin{pmatrix}1&0.4\\0.4&1\end{pmatrix}, with λ1=1.4,λ2=0.6,\lambda_1=1.4,\qquad\lambda_2=0.6, Y1=Z1+Z22(70%),Y2=Z1−Z22(30%),Y_1=\frac{Z_1+Z_2}{\sqrt2}\quad(70\%),\qquad Y_2=\frac{Z_1-Z_2}{\sqrt2}\quad(30\%), where Z1=X1Z_1=X_1 and Z2=(X2−μ2)/10Z_2=(X_2-\mu_2)/10.

Conclusion. With Σ\Sigma, the first component explains 99.2% and is essentially one variable. With RR, both variables get equal weight and the first component explains only 70%. So standardisation changes both the weights and the proportions explained. Standardising is advisable when the variables are measured in different units or have very different variances; otherwise the variable with the largest variance dominates.

✓ Checked by computer We checked in Python: from Σ the eigenvalues are 100.16 and 0.84 with first PC (0.040, 0.999), explaining 99.2%; from R (ρ = 0.4) they are 1.4 and 0.6 with first PC (1, 1)/√2, explaining 70%.

↑ Back to the question list

Obtain first canonical correlation and its associated canonical variable pair for the following correlation matrix: ρ=[1122323121232323231122323121]

2017 · Paper I · Q6a · 20 marks

Solution

Partition. With X(1)=(X1,X2)′X^{(1)}=(X_1,X_2)' and X(2)=(X3,X4)′X^{(2)}=(X_3,X_4)': ρ11=ρ22=(112121),ρ12=ρ21=23(1111)=23J.\rho_{11}=\rho_{22}=\begin{pmatrix}1&\frac12\\\frac12&1\end{pmatrix},\qquad\rho_{12}=\rho_{21}=\frac23\begin{pmatrix}1&1\\1&1\end{pmatrix}=\frac23J .

Canonical correlations. We need the eigenvalues of M=ρ11−1ρ12ρ22−1ρ21M=\rho_{11}^{-1}\rho_{12}\rho_{22}^{-1}\rho_{21}. Since ρ11𝟏=32𝟏\rho_{11}\mathbf 1=\frac32\mathbf 1, we have ρ11−1𝟏=23𝟏\rho_{11}^{-1}\mathbf 1=\frac23\mathbf 1 (and likewise for ρ22\rho_{22}), and J𝟏=2⋅𝟏J\mathbf 1=2\cdot\mathbf 1, Jv=0Jv=0 for v⊥𝟏v\perp\mathbf 1. So M𝟏=ρ11−1⋅23J⋅ρ22−1⋅23J𝟏=23⋅23⋅2⋅23⋅23⋅2⋅𝟏=6481𝟏,M\mathbf 1=\rho_{11}^{-1}\cdot\tfrac23J\cdot\rho_{22}^{-1}\cdot\tfrac23J\,\mathbf 1=\tfrac23\cdot\tfrac23\cdot2\cdot\tfrac23\cdot\tfrac23\cdot2\cdot\mathbf 1=\tfrac{64}{81}\mathbf 1, and M(1,−1)′=0M(1,-1)'=0. Hence ρ12=6481,ρ1=89=0.889,ρ2=0.\rho_1^2=\frac{64}{81},\qquad\rho_1=\frac89=0.889,\qquad\rho_2=0 .

Canonical variates. The eigenvector for ρ12\rho_1^2 is a∝(1,1)′a\propto(1,1)'. Normalising, a′ρ11a=c2(1+1+2⋅12)=3c2=1a'\rho_{11}a=c^2(1+1+2\cdot\frac12)=3c^2=1, so c=1/3c=1/\sqrt3. By symmetry b=(1/3,1/3)′b=(1/\sqrt3,1/\sqrt3)'. So U1=X1+X23,V1=X3+X43.U_1=\frac{X_1+X_2}{\sqrt3},\qquad V_1=\frac{X_3+X_4}{\sqrt3}.

Check. Corr(U1,V1)=a′ρ12b=13⋅23⋅(1,1)J(1,1)′=13⋅23⋅4=89.\text{Corr}(U_1,V_1)=a'\rho_{12}b=\frac13\cdot\frac23\cdot(1,1)J(1,1)'=\frac13\cdot\frac23\cdot4=\frac89 . So the first canonical correlation is 8/98/9, carried by the sums (totals) of the two sets. There is no further correlation between the sets (ρ2=0\rho_2=0).

✓ Checked by computer We checked in Python: R₁₁⁻¹R₁₂R₂₂⁻¹R₂₁ has eigenvalues 64/81 and 0, so ρ₁ = 8/9, with a = b = (1/√3, 1/√3).

↑ Back to the question list

Suppose n1=11 and n2=12 observations are made on two random vectors X1 and X2 which are assumed to have bivariate normal distribution with a common covariance matrix Σ, but possibly different mean vectors μ1 and μ2. The sample mean vectors and pooled covariance matrix are X‾1=[−1−1],X‾2=[21],Spooled=[7−1−15] Obtain Mahalanobis sample distance D2 and Fisher’s linear discriminant function. Assign the observation X0′=(0,1) to either population π1 or π2.

2017 · Paper I · Q7b · 15 marks

Solution

(This question is also listed under 3.6 Mahalanobis’s D² and Hotelling’s T². The worked solution is repeated here so that this page is complete.)

Mahalanobis distance. X‾1−X‾2=(−3,−2)′\bar X_1-\bar X_2=(-3,-2)'. |Sp|=35−1=34|S_p|=35-1=34 and Sp−1=134(5117).S_p^{-1}=\frac1{34}\begin{pmatrix}5&1\\1&7\end{pmatrix}. a=Sp−1(X‾1−X‾2)=134(5(−3)+1(−2)1(−3)+7(−2))=134(−17−17)=(−0.5−0.5).a=S_p^{-1}(\bar X_1-\bar X_2)=\frac1{34}\begin{pmatrix}5(-3)+1(-2)\\1(-3)+7(-2)\end{pmatrix}=\frac1{34}\begin{pmatrix}-17\\-17\end{pmatrix}=\begin{pmatrix}-0.5\\-0.5\end{pmatrix}. D2=(X‾1−X‾2)′a=(−3)(−0.5)+(−2)(−0.5)=2.5.D^2=(\bar X_1-\bar X_2)'a=(-3)(-0.5)+(-2)(-0.5)=2.5 .

Fisher’s linear discriminant function. y=a′x=−0.5x1−0.5x2(equivalently y=−(x1+x2)/2).y=a'x=-0.5x_1-0.5x_2\qquad(\text{equivalently }y=-(x_1+x_2)/2). Scores of the means: y‾1=a′X‾1=1.0\bar y_1=a'\bar X_1=1.0 and y‾2=a′X‾2=−1.5\bar y_2=a'\bar X_2=-1.5; midpoint m=y‾1+y‾22=−0.25.m=\frac{\bar y_1+\bar y_2}2=-0.25 . Rule (equal priors and equal costs): allocate to π1\pi_1 if y≥my\ge m, otherwise to π2\pi_2.

Allocation of X0=(0,1)′X_0=(0,1)'. y0=−0.5(0)−0.5(1)=−0.5<−0.25y_0=-0.5(0)-0.5(1)=-0.5<-0.25, so X0X_0 is assigned to π2\pi_2.

(The separation is significant: T2=11×1223D2=14.35T^2=\frac{11\times12}{23}D^2=14.35, F=2042T2=6.83>F0.05(2,20)=3.49F=\frac{20}{42}T^2=6.83>F_{0.05}(2,20)=3.49.)

✓ Checked by computer We checked in Python: S⁻¹(x̄₁ − x̄₂) = (−0.5, −0.5), D² = 2.5, the midpoint is −0.25, and the score of x₀ is −0.5, so x₀ goes to π₂.

↑ Back to the question list

Let 𝐗=(X1,X2,X3)′ has the following covariance matrix: Σ=[1−20−250002] Obtain the first three principal components using these values and the proportion of variations explained by the first two principal components.

2016 · Paper I · Q8a · 20 marks

Solution

Eigenvalues. X3X_3 is uncorrelated with X1,X2X_1,X_2, so λ=2\lambda=2 with eigenvector (0,0,1)′(0,0,1)'. For the 2×22\times2 block (1−2−25)\begin{pmatrix}1&-2\\-2&5\end{pmatrix}: (1−λ)(5−λ)−4=λ2−6λ+1=0⇒λ=3±22.(1-\lambda)(5-\lambda)-4=\lambda^2-6\lambda+1=0\quad\Longrightarrow\quad\lambda=3\pm2\sqrt2 . So λ1=3+22=5.828,λ2=2,λ3=3−22=0.172.\lambda_1=3+2\sqrt2=5.828,\qquad\lambda_2=2,\qquad\lambda_3=3-2\sqrt2=0.172 .

Eigenvectors.

  • λ1=5.828\lambda_1=5.828: (1−5.828)e1−2e2=0⇒e2=−2.414e1(1-5.828)e_1-2e_2=0\Rightarrow e_2=-2.414e_1. Normalising, e1=(0.383,−0.924,0)′e_1=(0.383,\ -0.924,\ 0)'.
  • λ2=2\lambda_2=2: e2=(0,0,1)′e_2=(0,0,1)'.
  • λ3=0.172\lambda_3=0.172: e3=(0.924,0.383,0)′e_3=(0.924,\ 0.383,\ 0)'.

Principal components. Y1=0.383X1−0.924X2,Y2=X3,Y3=0.924X1+0.383X2,Y_1=0.383X_1-0.924X_2,\qquad Y_2=X_3,\qquad Y_3=0.924X_1+0.383X_2, with variances 5.828, 2 and 0.172 (total 1+5+2=81+5+2=8).

Proportion explained. λ18=72.9%,λ1+λ28=7.8288=97.9%.\frac{\lambda_1}{8}=72.9\%,\qquad\frac{\lambda_1+\lambda_2}{8}=\frac{7.828}{8}=97.9\% . The first two components explain about 98% of the total variation, so Y3Y_3 can be dropped. Note that X3X_3, being uncorrelated with the others, is itself a principal component.

✓ Checked by computer We checked in Python: the eigenvalues 3 + 2√2 = 5.828, 2 and 3 − 2√2 = 0.172, and the share of the first two components, 7.828/8 = 97.9%.

↑ Back to the question list

Suppose a random vector X∼ has the covariance matrix Σ=(311131115). Find the principal components of X∼ and obtain the proportion of the total variance accounted for by the first two principal components.

2015 · Paper I · Q7b · 15 marks

Solution

Eigenvalues. |Σ−λI|=0|\Sigma-\lambda I|=0 gives λ3−11λ2+36λ−36=0\lambda^3-11\lambda^2+36\lambda-36=0 (trace 11; minors 8+14+14=368+14+14=36; |Σ|=36|\Sigma|=36), which factorises as (λ−6)(λ−3)(λ−2)=0.(\lambda-6)(\lambda-3)(\lambda-2)=0 .

Eigenvectors. By the symmetry between X1X_1 and X2X_2:

  • λ=2\lambda=2: (1,−1,0)′(1,-1,0)' gives Σ(1,−1,0)′=(2,−2,0)′\Sigma(1,-1,0)'=(2,-2,0)'. ✓
  • λ=6\lambda=6: try (1,1,c)′(1,1,c)': first row 3+1+c=6⇒c=23+1+c=6\Rightarrow c=2; third row 1+1+5(2)=12=6(2)1+1+5(2)=12=6(2). ✓
  • λ=3\lambda=3: try (1,1,c)′(1,1,c)': 4+c=3⇒c=−14+c=3\Rightarrow c=-1; third row 2−5=−3=3(−1)2-5=-3=3(-1). ✓

Principal components. Y1=X1+X2+2X36(λ1=6),Y2=X1+X2−X33(λ2=3),Y3=X1−X22(λ3=2).Y_1=\frac{X_1+X_2+2X_3}{\sqrt6}\ (\lambda_1=6),\qquad Y_2=\frac{X_1+X_2-X_3}{\sqrt3}\ (\lambda_2=3),\qquad Y_3=\frac{X_1-X_2}{\sqrt2}\ (\lambda_3=2).

Proportion explained by the first two. 6+311=911=81.8%(Y1 alone: 6/11=54.5%).\frac{6+3}{11}=\frac9{11}=81.8\%\qquad(Y_1\text{ alone: }6/11=54.5\%).

✓ Checked by computer We checked in Python: the eigenvalues 6, 3 and 2, the eigenvectors (1, 1, 2)/√6, (1, 1, −1)/√3 and (1, −1, 0)/√2, and the share 9/11 = 81.8%.

↑ Back to the question list

Cover of the UPSC Mains Topic-wise and Year-wise PYQs book (2013–2026)

From the Optional Province team

Strengthen your GS papers

Our UPSC Mains Topic-wise & Year-wise PYQ Book (2013–2026) maps every GS question to the syllabus, so you know what UPSC asks and how often. Now available as a hard copy and an eBook.

Buy Hard Copy on AmazonBuy eBook (PDF)

Download a free sample

Let 𝐗=(X1,X2,X3)′ has the correlation matrix R given by R=[11420142114201421] Obtain the first two principal components and the population variance explained by the first two principal components.

2013 · Paper I · Q8b · 15 marks

Solution

Eigenvalues. Write c=142c=\frac1{4\sqrt2}, so R=I+cAR=I+cA with A=(010101010)A=\begin{pmatrix}0&1&0\\1&0&1\\0&1&0\end{pmatrix}. The eigenvalues of AA are 0,±20,\pm\sqrt2 (from −μ3+2μ=0-\mu^3+2\mu=0). Hence the eigenvalues of RR are 1+cμ1+c\mu: λ1=1+242=1.25,λ2=1,λ3=0.75.\lambda_1=1+\frac{\sqrt2}{4\sqrt2}=1.25,\qquad\lambda_2=1,\qquad\lambda_3=0.75 .

Eigenvectors (those of AA):

  • μ=2\mu=\sqrt2: (12,12,12)′(\frac12,\frac1{\sqrt2},\frac12)';
  • μ=0\mu=0: (12,0,−12)′(\frac1{\sqrt2},0,-\frac1{\sqrt2})';
  • μ=−2\mu=-\sqrt2: (12,−12,12)′(\frac12,-\frac1{\sqrt2},\frac12)'.

First two principal components (of the standardised variables ZiZ_i): Y1=0.5Z1+0.707Z2+0.5Z3,V(Y1)=1.25,Y_1=0.5Z_1+0.707Z_2+0.5Z_3,\qquad V(Y_1)=1.25, Y2=0.707Z1−0.707Z3,V(Y2)=1.Y_2=0.707Z_1-0.707Z_3,\qquad V(Y_2)=1 .

Variance explained. The total is trR=3\text{tr}\,R=3: 1.253=41.7%,1.25+13=2.253=75%.\frac{1.25}{3}=41.7\%,\qquad\frac{1.25+1}{3}=\frac{2.25}{3}=75\% . The correlations are weak (0.18), so the variance is spread fairly evenly over the three components and the reduction from 3 to 2 components keeps only 75% of the variation.

✓ Checked by computer We checked in Python: the eigenvalues 1.25, 1 and 0.75 and their eigenvectors, and the share 2.25/3 = 75%.

↑ Back to the question list

Suppose X∼=(X1,X2,X3)1 has co-variance matrix Σ=[1−20−250002]. Obtain the first two principal components of X.

2012 · Paper I · Q6c · 20 marks

Solution

Note. This is the same covariance matrix as in Q14 (2016). The superscript “1” in (X1,X2,X3)1(X_1,X_2,X_3)^1 is a transpose.

Eigenvalues. X3X_3 is uncorrelated with X1,X2X_1,X_2, giving λ=2\lambda=2. The block (1−2−25)\begin{pmatrix}1&-2\\-2&5\end{pmatrix} gives λ2−6λ+1=0\lambda^2-6\lambda+1=0, so λ=3±22\lambda=3\pm2\sqrt2. In decreasing order: λ1=5.828,λ2=2,λ3=0.172.\lambda_1=5.828,\qquad\lambda_2=2,\qquad\lambda_3=0.172 .

First two principal components.

  • For λ1\lambda_1: e2=−(1+2)e1e_2=-(1+\sqrt2)e_1, normalised e1=(0.383,−0.924,0)′e_1=(0.383,-0.924,0)': Y1=0.383X1−0.924X2,V(Y1)=5.83(72.9%).Y_1=0.383X_1-0.924X_2,\qquad V(Y_1)=5.83\ (72.9\%).
  • For λ2=2\lambda_2=2: e2=(0,0,1)′e_2=(0,0,1)': Y2=X3,V(Y2)=2(25%).Y_2=X_3,\qquad V(Y_2)=2\ (25\%). Together they explain 7.83/8=97.9%7.83/8=97.9\% of the total variance.

✓ Checked by computer We checked in Python: the same matrix as Q14, with eigenvalues 5.828, 2 and 0.172.

↑ Back to the question list

Bring out the relation between Hotelling’s T2 and Mahalanobis D2. Explain how T2 can be interpreted as an extension of the student’s t statistic. Describe the utility of Fisher’s discriminent function in classification problems.

2012 · Paper I · Q7b · 20 marks

Solution

(This question is also listed under 3.6 Mahalanobis’s D² and Hotelling’s T². The worked solution is repeated here so that this page is complete.)

Relation between T2T^2 and D2D^2. For samples of sizes n1,n2n_1,n_2 from Np(μ1,Σ)N_p(\mu_1,\Sigma) and Np(μ2,Σ)N_p(\mu_2,\Sigma), the sample Mahalanobis distance is D2=(x‾1−x‾2)′S−1(x‾1−x‾2),D^2=(\bar x_1-\bar x_2)'S^{-1}(\bar x_1-\bar x_2), with SS the pooled unbiased covariance matrix. The two-sample Hotelling statistic for H0:μ1=μ2H_0:\mu_1=\mu_2 is T2=n1n2n1+n2D2,n1+n2−p−1(n1+n2−2)pT2∼Fp,n1+n2−p−1under H0.T^2=\frac{n_1n_2}{n_1+n_2}\,D^2,\qquad\frac{n_1+n_2-p-1}{(n_1+n_2-2)p}T^2\sim F_{p,\,n_1+n_2-p-1}\ \text{under }H_0 . So D2D^2 measures the distance between the samples, and T2T^2 turns it into a test statistic by allowing for the sample sizes. (In the one-sample case, T2=ND2T^2=N\,D^2 with D2=(x‾−μ0)′S−1(x‾−μ0)D^2=(\bar x-\mu_0)'S^{-1}(\bar x-\mu_0).)

T2T^2 as an extension of Student’s tt.

  • With one variable, the two-sample tt is t=x‾1−x‾2s1/n1+1/n2t=\dfrac{\bar x_1-\bar x_2}{s\sqrt{1/n_1+1/n_2}}, so t2=n1n2n1+n2(x‾1−x‾2)(s2)−1(x‾1−x‾2)t^2=\dfrac{n_1n_2}{n_1+n_2}(\bar x_1-\bar x_2)(s^2)^{-1}(\bar x_1-\bar x_2). T2T^2 has exactly this form, with vectors and matrices in place of scalars. For p=1p=1 it reduces to t2t^2, and its FF distribution reduces to t2∼F1,n1+n2−2t^2\sim F_{1,n_1+n_2-2}.
  • T2T^2 is the maximum of the squared tt statistics over all linear combinations a′xa'x of the variables. So it tests all such comparisons at once while controlling the overall level.
  • Like tt, it is the likelihood ratio test and is invariant under changes of scale (indeed, under any non-singular linear transformation).

Fisher’s discriminant function in classification. Fisher looked for the linear combination y=a′xy=a'x that separates the two groups best, in the sense of maximising {a′(x‾1−x‾2)}2a′Sa.\frac{\{a'(\bar x_1-\bar x_2)\}^2}{a'Sa}. The maximum is reached at a=S−1(x‾1−x‾2),a=S^{-1}(\bar x_1-\bar x_2), and its maximum value is D2D^2. To classify a new individual x0x_0:

  • compute y0=a′x0y_0=a'x_0 and the midpoint m=12a′(x‾1+x‾2)m=\frac12a'(\bar x_1+\bar x_2);
  • assign x0x_0 to π1\pi_1 if y0≥my_0\ge m and to π2\pi_2 otherwise (with unequal priors qiq_i or costs, compare with m+log(q2/q1)m+\log(q_2/q_1) instead).

For normal populations with a common covariance matrix this is the optimal (Bayes) rule. Its expected error rate is Φ(−Δ/2)\Phi(-\Delta/2), so a larger Mahalanobis distance means better classification. It also reduces pp measurements to a single score, and shows (through the size of the coefficients for standardised variables) which characters matter most. Uses include taxonomy, medical diagnosis, credit scoring and anthropometric classification.

✓ Answer checked step by step Every step was checked: the relation T² = n₁n₂D²/(n₁ + n₂), the reduction of T² to Student’s t when p = 1, and the discriminant rule.

↑ Back to the question list

Explain briefly the method of factor analysis and its uses.

2007 · Paper I · Q5b · 12 marks

Solution

Idea. Factor analysis explains the correlations among pp observed variables in terms of a small number mm of unobserved common factors. Variables that are highly correlated are assumed to share a common underlying cause (for example “verbal ability” behind several language test scores).

Model. X−μ=LF+ε,X-\mu=LF+\varepsilon, where FF (m×1m\times1) are the common factors, LL (p×mp\times m) the factor loadings, and ε\varepsilon the specific factors, with E(F)=0E(F)=0, V(F)=IV(F)=I, V(ε)=ΨV(\varepsilon)=\Psi diagonal and F,εF,\varepsilon uncorrelated. Then Σ=LL′+Ψ,σii=∑jlij2⏟communality hi2+ψi.\Sigma=LL'+\Psi,\qquad\sigma_{ii}=\underbrace{\textstyle\sum_jl_{ij}^2}_{\text{communality }h_i^2}+\psi_i .

Method.

  1. Compute the correlation (or covariance) matrix of the variables.
  2. Decide the number of factors mm (eigenvalues of RR greater than 1, scree plot, or a likelihood ratio test).
  3. Estimate the loadings and specific variances, by the principal component (principal factor) method or by maximum likelihood.
  4. Rotate the factors (for example varimax) to get a simple structure in which each variable loads heavily on few factors, making the factors interpretable.
  5. Name the factors from the variables that load on them, and if needed compute factor scores for each individual (Bartlett’s or the regression method).

Uses.

  • Reducing many correlated variables to a few interpretable constructs: intelligence and personality traits in psychology, consumer attitudes in marketing, development indicators in economics.
  • Building scales and checking whether a questionnaire measures what it claims (construct validity).
  • Providing factor scores as inputs to regression or cluster analysis, avoiding multicollinearity.

✓ Answer checked step by step We checked the model X − μ = LF + ε, the covariance structure Σ = LL′ + Ψ and the estimation steps described.

↑ Back to the question list

Briefly explain the development and use of linear discriminant functions in the context of two multivariate populations.

2007 · Paper I · Q6b · 20 marks

Solution

Context. Two pp-variate populations π1,π2\pi_1,\pi_2 with means μ1,μ2\mu_1,\mu_2 and a common dispersion matrix Σ\Sigma. We want a single linear score y=a′xy=a'x that separates them as well as possible, so that a new individual can be classified by one number.

Development (Fisher, 1936). The separation between the populations along a′xa'x is measured by the squared difference of the means relative to the variance: ϕ(a)={a′(μ1−μ2)}2a′Σa.\phi(a)=\frac{\{a'(\mu_1-\mu_2)\}^2}{a'\Sigma a}. Setting ∂ϕ/∂a=0\partial\phi/\partial a=0: 2(μ1−μ2)a′(μ1−μ2)⋅a′Σa−2Σa{a′(μ1−μ2)}2=0⇒Σa∝μ1−μ2.2(\mu_1-\mu_2)\,a'(\mu_1-\mu_2)\cdot a'\Sigma a-2\Sigma a\{a'(\mu_1-\mu_2)\}^2=0\ \Longrightarrow\ \Sigma a\propto\mu_1-\mu_2 . So a=Σ−1(μ1−μ2),maxϕ=Δ2=(μ1−μ2)′Σ−1(μ1−μ2).a=\Sigma^{-1}(\mu_1-\mu_2),\qquad\max\phi=\Delta^2=(\mu_1-\mu_2)'\Sigma^{-1}(\mu_1-\mu_2). By the Cauchy–Schwarz inequality this is the global maximum. The function is unique up to a constant multiple. In samples, μi\mu_i are replaced by x‾i\bar x_i and Σ\Sigma by the pooled SS, and the maximum becomes D2D^2.

Use.

  1. Classification. Compute y0=a′x0y_0=a'x_0 and assign to π1\pi_1 if y0≥12a′(μ1+μ2)y_0\ge\frac12a'(\mu_1+\mu_2), otherwise to π2\pi_2. With priors q1,q2q_1,q_2 and costs c(1|2),c(2|1)c(1|2),c(2|1), the cut-off becomes 12a′(μ1+μ2)+logq2c(1|2)q1c(2|1)\frac12a'(\mu_1+\mu_2)+\log\frac{q_2c(1|2)}{q_1c(2|1)}. For normal populations this is the Bayes rule; each error has probability Φ(−Δ/2)\Phi(-\Delta/2) with equal priors.
  2. Testing separation. D2D^2 (through Hotelling’s T2=n1n2n1+n2D2T^2=\frac{n_1n_2}{n_1+n_2}D^2) tests whether the populations differ at all.
  3. Importance of variables. The standardised coefficients show which characters contribute most to the separation, and tests on additional variables show whether a character is worth measuring.

Examples: diagnosis (diseased or healthy), credit scoring (good or bad risk), taxonomy (species A or B), and selection (eligible or not).

✓ Answer checked step by step We checked the derivation of Fisher’s function by maximising the separation ratio, the classification rule and its error rate.

↑ Back to the question list

Discuss the procedure of classification of an observation into one of two known multivariate normal populations.

2006 · Paper I · Q6a · 20 marks

Solution

Problem. π1:Np(μ1,Σ)\pi_1:N_p(\mu_1,\Sigma) and π2:Np(μ2,Σ)\pi_2:N_p(\mu_2,\Sigma) are completely known, with prior probabilities q1,q2q_1,q_2 and misclassification costs c(2|1)c(2|1) (assigning a π1\pi_1 member to π2\pi_2) and c(1|2)c(1|2). We must split ℝp\mathbb R^p into regions R1,R2R_1,R_2.

Optimal rule. The expected cost of misclassification is ECM=c(2|1)q1∫R2f1dx+c(1|2)q2∫R1f2dx=c(2|1)q1+∫R1{c(1|2)q2f2−c(2|1)q1f1}dx.\text{ECM}=c(2|1)q_1\int_{R_2}f_1\,dx+c(1|2)q_2\int_{R_1}f_2\,dx=c(2|1)q_1+\int_{R_1}\big\{c(1|2)q_2f_2-c(2|1)q_1f_1\big\}dx . This is smallest when R1R_1 contains exactly the points where the integrand is negative: R1:f1(x)f2(x)≥k=c(1|2)q2c(2|1)q1,R2:f1(x)f2(x)<k.R_1:\ \frac{f_1(x)}{f_2(x)}\ \ge\ k=\frac{c(1|2)\,q_2}{c(2|1)\,q_1},\qquad R_2:\ \frac{f_1(x)}{f_2(x)}<k .

Normal populations with a common Σ\Sigma. logf1(x)f2(x)=(μ1−μ2)′Σ−1x−12(μ1−μ2)′Σ−1(μ1+μ2).\log\frac{f_1(x)}{f_2(x)}=(\mu_1-\mu_2)'\Sigma^{-1}x-\tfrac12(\mu_1-\mu_2)'\Sigma^{-1}(\mu_1+\mu_2). So we assign xx to π1\pi_1 if U(x)=(μ1−μ2)′Σ−1{x−12(μ1+μ2)}≥logk,U(x)=(\mu_1-\mu_2)'\Sigma^{-1}\Big\{x-\tfrac12(\mu_1+\mu_2)\Big\}\ \ge\ \log k, and to π2\pi_2 otherwise. U(x)U(x) is linear in xx, and its coefficient vector Σ−1(μ1−μ2)\Sigma^{-1}(\mu_1-\mu_2) is Fisher’s discriminant function. With equal priors and costs, logk=0\log k=0.

Error probabilities. Under π1\pi_1, U∼N(12Δ2,Δ2)U\sim N(\frac12\Delta^2,\Delta^2); under π2\pi_2, U∼N(−12Δ2,Δ2)U\sim N(-\frac12\Delta^2,\Delta^2), with Δ2=(μ1−μ2)′Σ−1(μ1−μ2)\Delta^2=(\mu_1-\mu_2)'\Sigma^{-1}(\mu_1-\mu_2). So P(2|1)=Φ(logk−12Δ2Δ),P(1|2)=Φ(−logk−12Δ2Δ),P(2|1)=\Phi\Big(\frac{\log k-\frac12\Delta^2}{\Delta}\Big),\qquad P(1|2)=\Phi\Big(\frac{-\log k-\frac12\Delta^2}{\Delta}\Big), both equal to Φ(−Δ/2)\Phi(-\Delta/2) when k=1k=1.

Unequal covariance matrices. If Σ1≠Σ2\Sigma_1\ne\Sigma_2, the log ratio contains −12x′(Σ1−1−Σ2−1)x-\frac12x'(\Sigma_1^{-1}-\Sigma_2^{-1})x, and the boundary becomes quadratic (quadratic discriminant analysis).

In practice the parameters are estimated from training samples (x‾1,x‾2,Spooled\bar x_1,\bar x_2,S_{\text{pooled}}), giving the sample rule W(x)=(x‾1−x‾2)′S−1{x−12(x‾1+x‾2)}W(x)=(\bar x_1-\bar x_2)'S^{-1}\{x-\frac12(\bar x_1+\bar x_2)\} (Anderson’s WW statistic), and the error rate is estimated by cross-validation.

✓ Derivation checked step by step We checked the derivation: the regions minimising the expected cost, the likelihood-ratio rule, its linear form for equal covariance matrices and the error probabilities.

↑ Back to the question list

What is the purpose of MANOVA? Explain the one-way MANOVA model.

2004 · Paper I · Q5f · 12 marks

Solution

Purpose. MANOVA (multivariate analysis of variance) tests whether the mean vectors of several groups differ when several correlated responses are measured on each unit. Running a separate ANOVA on each response would ignore the correlations between them and inflate the overall chance of a Type I error; MANOVA tests all responses together at a single level, and may detect differences that no single response shows clearly. Example: comparing three teaching methods on students’ scores in mathematics, reading and science.

One-way MANOVA model. With gg groups and nℓn_\ell units in group ℓ\ell: Xℓj=μ+τℓ+eℓj,j=1,…,nℓ,ℓ=1,…,g,X_{\ell j}=\mu+\tau_\ell+e_{\ell j},\qquad j=1,\dots,n_\ell,\ \ell=1,\dots,g, where XℓjX_{\ell j} is the p×1p\times1 response, μ\mu the overall mean vector, τℓ\tau_\ell the effect of group ℓ\ell with ∑nℓτℓ=0\sum n_\ell\tau_\ell=0, and eℓj∼iidNp(0,Σ)e_{\ell j}\stackrel{iid}\sim N_p(0,\Sigma).

Hypothesis. H0:τ1=τ2=…=τg=0H_0:\tau_1=\tau_2=\dots=\tau_g=0 (all the group mean vectors are equal).

Decomposition. The matrices of sums of squares and cross-products (SSP) split exactly as in ANOVA: ∑ℓ∑j(xℓj−x‾)(xℓj−x‾)′⏟T(n−1 df)=∑ℓnℓ(x‾ℓ−x‾)(x‾ℓ−x‾)′⏟B(g−1 df)+∑ℓ∑j(xℓj−x‾ℓ)(xℓj−x‾ℓ)′⏟W(n−g df),\underbrace{\sum_\ell\sum_j(x_{\ell j}-\bar x)(x_{\ell j}-\bar x)'}_{T\ (n-1\text{ df})}=\underbrace{\sum_\ell n_\ell(\bar x_\ell-\bar x)(\bar x_\ell-\bar x)'}_{B\ (g-1\text{ df})}+\underbrace{\sum_\ell\sum_j(x_{\ell j}-\bar x_\ell)(x_{\ell j}-\bar x_\ell)'}_{W\ (n-g\text{ df})}, with n=∑nℓn=\sum n_\ell.

Test. Wilks’ lambda, the likelihood ratio statistic, is Λ=|W||B+W|=∏i11+λi,\Lambda=\frac{|W|}{|B+W|}=\prod_i\frac1{1+\lambda_i}, where λi\lambda_i are the eigenvalues of W−1BW^{-1}B. Small Λ\Lambda leads to rejection of H0H_0. For large samples, −(n−1−p+g2)logΛ∼χp(g−1)2-\big(n-1-\frac{p+g}2\big)\log\Lambda\sim\chi^2_{p(g-1)} (Bartlett), and exact FF forms exist for small pp or gg; for example, with g=2g=2, n−p−1p⋅1−ΛΛ∼Fp,n−p−1\frac{n-p-1}{p}\cdot\frac{1-\Lambda}{\Lambda}\sim F_{p,n-p-1}, which is the two-sample Hotelling T2T^2. Other statistics are Pillai’s trace, the Lawley–Hotelling trace and Roy’s largest root.

Assumptions. Independent observations, multivariate normality within groups, and a common covariance matrix (checked with Box’s MM test).

✓ Answer checked step by step We checked the one-way MANOVA model, the decomposition T = B + W and Wilks’ Λ with its exact F form.

↑ Back to the question list

Explain the purpose of discriminant analysis. What is Fisher’s discriminant function for two populations? Give the allocation rule based on it.

2004 · Paper I · Q6b · 20 marks

Solution

Purpose of discriminant analysis.

  1. Separation: to describe how two or more groups differ, using linear combinations of the measured variables that separate them as much as possible.
  2. Classification (allocation): to build a rule that assigns a new individual, whose group is unknown, to one of the groups with as few errors as possible. Examples are medical diagnosis, credit scoring, species identification and selection of candidates.

Fisher’s discriminant function for two populations. With means μ1,μ2\mu_1,\mu_2 and a common dispersion matrix Σ\Sigma, Fisher chose the linear combination y=a′xy=a'x that maximises {a′(μ1−μ2)}2a′Σa,\frac{\{a'(\mu_1-\mu_2)\}^2}{a'\Sigma a}, the squared distance between the group means of yy relative to its within-group variance. The solution is a=Σ−1(μ1−μ2),y=(μ1−μ2)′Σ−1x,a=\Sigma^{-1}(\mu_1-\mu_2),\qquad y=(\mu_1-\mu_2)'\Sigma^{-1}x, and the maximum is Δ2=(μ1−μ2)′Σ−1(μ1−μ2)\Delta^2=(\mu_1-\mu_2)'\Sigma^{-1}(\mu_1-\mu_2). In samples, x‾1,x‾2\bar x_1,\bar x_2 and the pooled SS replace μ1,μ2,Σ\mu_1,\mu_2,\Sigma: ŷ=(x‾1−x‾2)′S−1x.\hat y=(\bar x_1-\bar x_2)'S^{-1}x . Fisher’s derivation needs no normality assumption, only a common covariance matrix.

Allocation rule. Let m=12(y‾1+y‾2)=12(x‾1−x‾2)′S−1(x‾1+x‾2)m=\frac12(\bar y_1+\bar y_2)=\frac12(\bar x_1-\bar x_2)'S^{-1}(\bar x_1+\bar x_2), the midpoint of the two group means of yy. For a new observation x0x_0:

  • allocate x0x_0 to π1\pi_1 if y0=(x‾1−x‾2)′S−1x0≥my_0=(\bar x_1-\bar x_2)'S^{-1}x_0\ \ge\ m;
  • allocate x0x_0 to π2\pi_2 if y0<my_0<m.

If prior probabilities q1,q2q_1,q_2 or unequal costs c(1|2),c(2|1)c(1|2),c(2|1) apply, compare y0−my_0-m with log{q2c(1|2)/q1c(2|1)}\log\{q_2c(1|2)/q_1c(2|1)\} instead of zero. For normal populations this rule minimises the expected cost of misclassification.

✓ Answer checked step by step We checked Fisher’s function as the maximiser of the separation ratio and the allocation rule, including the version with priors and costs.

↑ Back to the question list

Outlining the purpose of factor analysis, describe the orthogonal factor model along with its covariance structure.

2004 · Paper I · Q6c · 20 marks

Solution

Purpose of factor analysis. To explain the covariances (correlations) among many observed variables by a few unobservable, underlying variables called common factors. It seeks to identify the latent constructs (such as intelligence, socio-economic status or customer satisfaction) that make groups of variables vary together, and so to reduce and interpret the data.

Orthogonal factor model. For a pp-variate XX with mean μ\mu: X−μ=LF+ε,i.e.Xi−μi=li1F1+…+limFm+εi,i=1,…,p,X-\mu=LF+\varepsilon,\qquad\text{i.e.}\qquad X_i-\mu_i=l_{i1}F_1+\dots+l_{im}F_m+\varepsilon_i,\quad i=1,\dots,p, where

  • F=(F1,…,Fm)′F=(F_1,\dots,F_m)', m<pm<p, are the common factors;
  • L=(lij)L=(l_{ij}) is the p×mp\times m matrix of factor loadings (lijl_{ij} is the loading of variable ii on factor jj);
  • ε=(ε1,…,εp)′\varepsilon=(\varepsilon_1,\dots,\varepsilon_p)' are specific factors (unique to each variable).

Assumptions. E(F)=0,V(F)=Im(orthogonal factors),E(ε)=0,V(ε)=Ψ=diag(ψ1,…,ψp),Cov(ε,F)=0.E(F)=0,\quad V(F)=I_m\ (\text{orthogonal factors}),\quad E(\varepsilon)=0,\quad V(\varepsilon)=\Psi=\text{diag}(\psi_1,\dots,\psi_p),\quad\text{Cov}(\varepsilon,F)=0 .

Covariance structure. Σ=E{(LF+ε)(LF+ε)′}=LE(FF′)L′+E(εε′)=LL′+Ψ,\Sigma=E\{(LF+\varepsilon)(LF+\varepsilon)'\}=L\,E(FF')L'+E(\varepsilon\varepsilon')=LL'+\Psi, Cov(X,F)=E{(LF+ε)F′}=L.\text{Cov}(X,F)=E\{(LF+\varepsilon)F'\}=L . Element by element: σii=li12+…+lim2⏟hi2(communality)+ψi⏟specific variance,σik=∑jlijlkj(i≠k),Cov(Xi,Fj)=lij.\sigma_{ii}=\underbrace{l_{i1}^2+\dots+l_{im}^2}_{h_i^2\ (\text{communality})}+\underbrace{\psi_i}_{\text{specific variance}},\qquad\sigma_{ik}=\sum_jl_{ij}l_{kj}\ (i\ne k),\qquad\text{Cov}(X_i,F_j)=l_{ij}. So all the covariances come from the common factors, and each variance is split into the part shared with other variables (hi2h_i^2) and the part unique to the variable (ψi\psi_i).

Non-uniqueness. For any orthogonal TT (TT′=ITT'=I), L*=LTL^*=LT and F*=T′FF^*=T'F give the same Σ=L*L*′+Ψ\Sigma=L^*L^{*\prime}+\Psi. This is why loadings are rotated (varimax, quartimax) to make them easier to interpret.

✓ Derivation checked step by step We checked the derivation of the covariance structure Σ = LL′ + Ψ, Cov(X, F) = L, the communalities and the rotation non-uniqueness.

↑ Back to the question list

What are the situations where discriminant analysis is used? Give some examples in support of your answer. Write the objectives of two group discriminant analysis. Explain how the discriminant criterion is calculated.

2003 · Paper I · Q6b · 20 marks

Solution

Situations where discriminant analysis is used. Whenever individuals belong to one of a few known groups, and we want to know which measured characteristics distinguish the groups, or to assign new individuals to a group from their measurements. Examples:

  • Medicine: diagnosing a disease (present or absent) from test results and symptoms.
  • Banking: classifying loan applicants as good or bad credit risks from income, debts and history.
  • Marketing: separating buyers from non-buyers of a product from demographic and attitude data.
  • Biology and anthropology: assigning a skull or plant specimen to a species or population from its measurements (Fisher’s iris data).
  • Education and recruitment: deciding whether candidates are suitable for admission or a job from test scores.
  • Agriculture: classifying soil types or crop varieties.

Objectives of two-group discriminant analysis.

  1. To find the linear combination of the predictor variables (the discriminant function) that best separates the two groups.
  2. To test whether the groups differ significantly on the predictors taken together.
  3. To find which predictors contribute most to the separation.
  4. To classify new cases into one of the two groups, and to estimate the probability of misclassification (the hit rate).

The discriminant criterion. For a linear combination y=a′xy=a'x, the discriminant criterion is the ratio of the between-group to the within-group variation of yy: λ(a)=a′Baa′Wa,\lambda(a)=\frac{a'Ba}{a'Wa}, where WW is the pooled within-group SSP matrix and BB the between-group SSP matrix. For two groups B=n1n2n(x‾1−x‾2)(x‾1−x‾2)′B=\frac{n_1n_2}{n}(\bar x_1-\bar x_2)(\bar x_1-\bar x_2)', so λ(a)=n1n2n⋅{a′(x‾1−x‾2)}2a′Wa.\lambda(a)=\frac{n_1n_2}{n}\cdot\frac{\{a'(\bar x_1-\bar x_2)\}^2}{a'Wa}. Calculation.

  1. Compute the group means x‾1,x‾2\bar x_1,\bar x_2 and the pooled matrix WW (or S=W/(n−2)S=W/(n-2)).
  2. Maximise λ(a)\lambda(a): this gives a∝W−1(x‾1−x‾2)a\propto W^{-1}(\bar x_1-\bar x_2), the eigenvector of W−1BW^{-1}B for its only non-zero eigenvalue.
  3. The maximum value is λ=n1n2n(n−2)D2\lambda=\frac{n_1n_2}{n(n-2)}D^2, where D2=(x‾1−x‾2)′S−1(x‾1−x‾2)D^2=(\bar x_1-\bar x_2)'S^{-1}(\bar x_1-\bar x_2).
  4. The canonical correlation λ/(1+λ)\sqrt{\lambda/(1+\lambda)} and Wilks’ Λ=1/(1+λ)\Lambda=1/(1+\lambda) measure the strength of discrimination, and F=n−p−1pλF=\frac{n-p-1}{p}\lambda on (p,n−p−1)(p,n-p-1) df tests it.

✓ Answer checked step by step We checked the objectives listed and the calculation of the discriminant criterion as the ratio of between-group to within-group variance.

↑ Back to the question list

What are principal components? Discuss the method of finding them.

2002 · Paper I · Q6c · 20 marks

Solution

Definition. For a pp-variate random vector XX with dispersion matrix Σ\Sigma, the principal components are linear combinations Y1=a1′X,Y2=a2′X,…Y_1=a_1'X,\ Y_2=a_2'X,\dots, with aj′aj=1a_j'a_j=1, such that

  • Y1Y_1 has the largest variance among all normalised linear combinations;
  • YjY_j has the largest variance among normalised combinations uncorrelated with Y1,…,Yj−1Y_1,\dots,Y_{j-1}.

Finding them.

First component. Maximise V(a′X)=a′ΣaV(a'X)=a'\Sigma a subject to a′a=1a'a=1. With ϕ=a′Σa−λ(a′a−1)\phi=a'\Sigma a-\lambda(a'a-1): ∂ϕ∂a=2Σa−2λa=0⇒(Σ−λI)a=0.\frac{\partial\phi}{\partial a}=2\Sigma a-2\lambda a=0\quad\Longrightarrow\quad(\Sigma-\lambda I)a=0 . So aa must be an eigenvector of Σ\Sigma and λ\lambda an eigenvalue, the root of |Σ−λI|=0|\Sigma-\lambda I|=0. Then V(a′X)=a′Σa=λa′a=λV(a'X)=a'\Sigma a=\lambda a'a=\lambda, so the maximum is the largest eigenvalue λ1\lambda_1, and a1a_1 is its normalised eigenvector.

Second component. Maximise a′Σaa'\Sigma a subject to a′a=1a'a=1 and Cov(a′X,Y1)=a′Σa1=λ1a′a1=0\text{Cov}(a'X,Y_1)=a'\Sigma a_1=\lambda_1a'a_1=0. With ϕ=a′Σa−λ(a′a−1)−2νa′a1\phi=a'\Sigma a-\lambda(a'a-1)-2\nu a'a_1: 2Σa−2λa−2νa1=0.2\Sigma a-2\lambda a-2\nu a_1=0 . Premultiplying by a1′a_1' gives ν=0\nu=0, so again Σa=λa\Sigma a=\lambda a; the best choice is the second largest eigenvalue λ2\lambda_2 with eigenvector a2a_2.

In general, the jj-th principal component is Yj=aj′XY_j=a_j'X, where aja_j is the normalised eigenvector for the jj-th largest eigenvalue λj\lambda_j.

Properties. V(Yj)=λj,Cov(Yj,Yk)=0(j≠k),∑jV(Yj)=∑jλj=trΣ=∑jσjj.V(Y_j)=\lambda_j,\qquad\text{Cov}(Y_j,Y_k)=0\ (j\ne k),\qquad\sum_jV(Y_j)=\sum_j\lambda_j=\text{tr}\,\Sigma=\sum_j\sigma_{jj}. The proportion of the total variance explained by YjY_j is λj/trΣ\lambda_j/\text{tr}\,\Sigma, and Corr(Yj,Xi)=aijλj/σii\text{Corr}(Y_j,X_i)=a_{ij}\sqrt{\lambda_j}/\sqrt{\sigma_{ii}}.

Practical steps.

  1. Compute the sample covariance matrix SS (or the correlation matrix RR if the units differ).
  2. Find its eigenvalues and normalised eigenvectors (by solving the characteristic equation, or by the power method / Jacobi method for larger pp).
  3. Arrange them in decreasing order of eigenvalue and form the component scores yj=aj′(x−x‾)y_j=a_j'(x-\bar x).
  4. Keep the first kk components that explain enough of the total variance.

✓ Derivation checked step by step We checked the derivation: maximising a′Σa subject to a′a = 1 gives Σa = λa, and the successive components follow from the orthogonality constraints.

↑ Back to the question list

Define principal components and explain their significance in statistical practice.

2000 · Paper I · Q6b(i) · 10 marks

Solution

Definition. The principal components of a pp-variate vector XX with dispersion matrix Σ\Sigma are the linear combinations Yj=aj′XY_j=a_j'X (j=1,…,pj=1,\dots,p), where aja_j is the normalised eigenvector of Σ\Sigma for the jj-th largest eigenvalue λj\lambda_j. Y1Y_1 has the maximum variance among all normalised combinations, each later component has the maximum variance subject to being uncorrelated with the earlier ones, V(Yj)=λjV(Y_j)=\lambda_j, and the components together keep all the variance: ∑λj=trΣ\sum\lambda_j=\text{tr}\,\Sigma.

Significance in statistical practice.

  1. Dimension reduction. A few components often account for most of the variation, so many variables can be summarised by two or three, with little loss of information.
  2. Uncorrelated variables. The components can replace highly correlated regressors (principal component regression), removing multicollinearity.
  3. Visualisation. Plotting the first two component scores displays multivariate data in two dimensions and reveals clusters, trends and outliers.
  4. Indices. The first component often serves as a weighted composite index (for example of size, socio-economic status or development), with weights chosen by the data.
  5. Interpretation. The loadings show which variables move together, and the smallest components reveal near-linear relations among the variables.
  6. Preparing other analyses. They are a starting point for factor analysis, clustering and classification.

✓ Answer checked step by step We checked the definition and the listed uses against the standard properties of principal components.

↑ Back to the question list

What are principal components? Explain the differences between principal components analysis and factor analysis. Briefly indicate how you can obtain maximum likelihood estimates of the principal components, given a random sample from Np(0,Σ) where Σ has all its characteristic roots distinct.

1999 · Paper I · Q12a · 35 marks

Solution

Principal components. For XX with dispersion matrix Σ\Sigma, the principal components are Yj=γj′XY_j=\gamma_j'X, where γj\gamma_j is the normalised eigenvector of Σ\Sigma for its jj-th largest root λj\lambda_j. They are uncorrelated, V(Yj)=λjV(Y_j)=\lambda_j, and successively have the largest possible variance.

Principal components analysis and factor analysis: differences.

Principal components analysis Factor analysis
Aim Explains the total variance of the variables Explains the covariances (correlations) among the variables
Model No statistical model; a transformation of the data A model: X−μ=LF+εX-\mu=LF+\varepsilon, Σ=LL′+Ψ\Sigma=LL'+\Psi
Direction Components are functions of the observed variables, Y=Γ′XY=\Gamma'X Observed variables are functions of the latent factors
Error term None: with pp components, XX is reproduced exactly Each variable has a specific factor εi\varepsilon_i with variance ψi\psi_i
Uniqueness Unique (if the roots are distinct) Loadings are unique only up to rotation
Variance used Total variance, including unique variance Only the common (shared) variance, the communalities
Effect of mm Adding a component does not change the earlier ones Changing the number of factors changes all the loadings
Interpretation Mainly data reduction Seeks interpretable underlying constructs

Maximum likelihood estimates. Let x1,…,xNx_1,\dots,x_N be a random sample from Np(0,Σ)N_p(0,\Sigma), with the roots of Σ\Sigma all distinct. The MLE of Σ\Sigma is Σ̂=1N∑α=1Nxαxα′=AN.\hat\Sigma=\frac1N\sum_{\alpha=1}^Nx_\alpha x_\alpha'=\frac AN . The eigenvalues λ1>…>λp\lambda_1>\dots>\lambda_p and the normalised eigenvectors γ1,…,γp\gamma_1,\dots,\gamma_p (with a sign convention, for example first non-zero element positive) are one-to-one functions of Σ\Sigma when the roots are distinct. By the invariance property of maximum likelihood estimators, the MLE of a function of Σ\Sigma is the same function of Σ̂\hat\Sigma. Hence:

  • the MLEs of the λj\lambda_j are the roots l1>…>lpl_1>\dots>l_p of |Σ̂−lI|=0|\hat\Sigma-lI|=0;
  • the MLEs of the γj\gamma_j are the corresponding normalised eigenvectors cjc_j of Σ̂\hat\Sigma, from (Σ̂−ljI)cj=0(\hat\Sigma-l_jI)c_j=0, cj′cj=1c_j'c_j=1;
  • the estimated principal components are Ŷj=cj′X\hat Y_j=c_j'X.

The distinct-roots condition is needed because with repeated roots the eigenvectors are not unique, so they are not well-defined functions of Σ\Sigma. (If the unbiased S=A/(N−1)S=A/(N-1) is used instead, the eigenvectors are the same and the roots are multiplied by N/(N−1)N/(N-1).) In large samples, N(lj−λj)→N(0,2λj2)\sqrt N(l_j-\lambda_j)\to N(0,2\lambda_j^2) independently of the other roots.

✓ Answer checked step by step We checked the comparison of the two methods and the maximum likelihood result: the components of the MLE of Σ are the MLEs of the components, by invariance.

↑ Back to the question list

Let Np(μ1,Σ) and Np(μ2,Σ) and linear discriminant function L(U)=(μ2−μ1)′Σ−1U is sufficient for the class of normal densities Np(αμ1+βμ2,Σ), α+β=1, prove it. Discuss the methods used in it.

1998 · Paper I · Q12b · 30 marks

Solution

Note on the question. We read it as: let UU come from Np(αμ1+βμ2,Σ)N_p(\alpha\mu_1+\beta\mu_2,\Sigma) with α+β=1\alpha+\beta=1 (μ1,μ2,Σ\mu_1,\mu_2,\Sigma known, β\beta unknown). Prove that the linear discriminant function L(U)=(μ2−μ1)′Σ−1UL(U)=(\mu_2-\mu_1)'\Sigma^{-1}U is sufficient for this family.

Proof. With α=1−β\alpha=1-\beta, the mean is μ(β)=μ1+β(μ2−μ1).\mu(\beta)=\mu_1+\beta(\mu_2-\mu_1). The density is f(u;β)=(2π)−p/2|Σ|−1/2exp{−12(u−μ(β))′Σ−1(u−μ(β))}.f(u;\beta)=(2\pi)^{-p/2}|\Sigma|^{-1/2}\exp\Big\{-\tfrac12\big(u-\mu(\beta)\big)'\Sigma^{-1}\big(u-\mu(\beta)\big)\Big\}. Expand the quadratic form: (u−μ(β))′Σ−1(u−μ(β))=u′Σ−1u−2μ1′Σ−1u−2β(μ2−μ1)′Σ−1u+μ(β)′Σ−1μ(β).\big(u-\mu(\beta)\big)'\Sigma^{-1}\big(u-\mu(\beta)\big)=u'\Sigma^{-1}u-2\mu_1'\Sigma^{-1}u-2\beta(\mu_2-\mu_1)'\Sigma^{-1}u+\mu(\beta)'\Sigma^{-1}\mu(\beta). Hence f(u;β)=exp{βL(u)−12μ(β)′Σ−1μ(β)}⏟g(L(u);β)⋅(2π)−p/2|Σ|−1/2exp{−12u′Σ−1u+μ1′Σ−1u}⏟h(u).f(u;\beta)=\underbrace{\exp\Big\{\beta\,L(u)-\tfrac12\mu(\beta)'\Sigma^{-1}\mu(\beta)\Big\}}_{g(L(u);\,\beta)}\cdot\underbrace{(2\pi)^{-p/2}|\Sigma|^{-1/2}\exp\Big\{-\tfrac12u'\Sigma^{-1}u+\mu_1'\Sigma^{-1}u\Big\}}_{h(u)}. The first factor depends on uu only through L(u)=(μ2−μ1)′Σ−1uL(u)=(\mu_2-\mu_1)'\Sigma^{-1}u, and the second does not involve β\beta. By the Neyman–Fisher factorisation theorem, L(U)L(U) is sufficient for β\beta, i.e. for the family Np(αμ1+βμ2,Σ)N_p(\alpha\mu_1+\beta\mu_2,\Sigma), α+β=1\alpha+\beta=1. ◼\blacksquare

For a sample U1,…,UnU_1,\dots,U_n the same argument shows that ∑iL(Ui)\sum_iL(U_i) is sufficient. The family is a one-parameter exponential family in β\beta with natural statistic L(U)L(U), so LL is also complete and minimal sufficient.

Methods used and meaning.

  • The method is the factorisation criterion applied to an exponential family; the family is the line of normal distributions joining π1\pi_1 and π2\pi_2.
  • So all the information in UU about which population (or which point on the line between the two populations) it comes from is carried by the single number L(U)L(U). This justifies reducing the pp-dimensional observation to the linear discriminant score in classification: the likelihood ratio f2/f1=exp{L(u)−12(μ2′Σ−1μ2−μ1′Σ−1μ1)}f_2/f_1=\exp\{L(u)-\frac12(\mu_2'\Sigma^{-1}\mu_2-\mu_1'\Sigma^{-1}\mu_1)\} is a function of LL alone, and so is the optimal (Bayes) rule.
  • In practice, μ1,μ2,Σ\mu_1,\mu_2,\Sigma are replaced by x‾1,x‾2\bar x_1,\bar x_2 and the pooled SS, giving Fisher’s sample discriminant function.

✓ Proof checked step by step We checked the proof: expanding the normal density with mean μ₁ + β(μ₂ − μ₁) and applying the factorisation theorem to L(U).

↑ Back to the question list

Define fishers discriminant function and obtain a test of the adequacy of a hypothetical discriminant function.

1997 · Paper I · Q12b · 30 marks

Solution

Fisher’s discriminant function. For two pp-variate populations with a common dispersion matrix, Fisher’s discriminant function is the linear combination y=a′xy=a'x that maximises the ratio of the squared difference of the group means to the within-group variance, {a′(x‾1−x‾2)}2a′Sa⇒a=S−1(x‾1−x‾2),\frac{\{a'(\bar x_1-\bar x_2)\}^2}{a'Sa}\quad\Longrightarrow\quad a=S^{-1}(\bar x_1-\bar x_2), and the maximum is Dp2=(x‾1−x‾2)′S−1(x‾1−x‾2)D_p^2=(\bar x_1-\bar x_2)'S^{-1}(\bar x_1-\bar x_2). Here SS is the pooled within-sample covariance matrix on n1+n2−2n_1+n_2-2 df.

Adequacy of a hypothetical function. Suppose a function y0=a0′xy_0=a_0'x is proposed on prior grounds (for example from theory, or from an earlier study). We want to test whether it discriminates as well as the best function, i.e. whether the true discriminant coefficients are proportional to a0a_0: H0:Σ−1(μ1−μ2)∝a0.H_0:\Sigma^{-1}(\mu_1-\mu_2)\propto a_0 .

Statistic. The distance achieved by the hypothetical function alone is D12={a0′(x‾1−x‾2)}2a0′Sa0≤Dp2.D_1^2=\frac{\{a_0'(\bar x_1-\bar x_2)\}^2}{a_0'Sa_0}\ \le\ D_p^2 . If H0H_0 is true, the remaining p−1p-1 dimensions orthogonal to a0a_0 (in the metric of Σ\Sigma) add nothing to the separation. The test is the test of additional information carried by p−1p-1 further variables after one (y0y_0): F=n1+n2−p−1p−1⋅n1n2n1+n2(Dp2−D12)(n1+n2−2)+n1n2n1+n2D12∼Fp−1,n1+n2−p−1under H0.F=\frac{n_1+n_2-p-1}{p-1}\cdot\frac{\frac{n_1n_2}{n_1+n_2}\big(D_p^2-D_1^2\big)}{(n_1+n_2-2)+\frac{n_1n_2}{n_1+n_2}D_1^2}\ \sim\ F_{p-1,\,n_1+n_2-p-1}\quad\text{under }H_0 . We reject the adequacy of the hypothetical function if F>Fα(p−1,n1+n2−p−1)F>F_\alpha(p-1,n_1+n_2-p-1).

Steps.

  1. Compute x‾1,x‾2\bar x_1,\bar x_2, d=x‾1−x‾2d=\bar x_1-\bar x_2 and SS.
  2. Compute Dp2=d′S−1dD_p^2=d'S^{-1}d (best function) and D12=(a0′d)2/(a0′Sa0)D_1^2=(a_0'd)^2/(a_0'Sa_0) (hypothetical function).
  3. Compute FF and compare it with the table value.
  4. A non-significant FF means the proposed function is adequate: it captures essentially all of the available separation. A significant FF means the variables contain discriminating information not captured by a0a_0.

(Equivalently, in Fisher’s regression formulation with a dummy dependent variable, this is the test of whether the regression on all pp variables significantly improves on the regression on y0y_0 alone.)

✓ Derivation checked step by step We checked the test: D² for the hypothetical function is (a₀′d)²/(a₀′Sa₀), and the gain D²ₚ − D²₁ is tested with an F on (p − 1, n₁ + n₂ − p − 1) df.

↑ Back to the question list

Define Fisher’s discriminant function between two p-variate populations. Indicate the connection between the discriminant function coefficients and the D2-statistic. Describe a test to judge the adequacy of a preassigned discriminant function.

1996 · Paper I · Q12b · 30 marks

Solution

Fisher’s discriminant function. For two pp-variate populations with means μ1,μ2\mu_1,\mu_2 and a common dispersion matrix Σ\Sigma, Fisher’s linear discriminant function is y=a′x,a=Σ−1(μ1−μ2),y=a'x,\qquad a=\Sigma^{-1}(\mu_1-\mu_2), the linear combination that maximises {a′(μ1−μ2)}2/a′Σa\{a'(\mu_1-\mu_2)\}^2/a'\Sigma a. In samples, a=S−1da=S^{-1}d with d=x‾1−x‾2d=\bar x_1-\bar x_2 and SS the pooled within-sample covariance matrix.

Connection with D2D^2.

  1. The maximum is D2D^2. The largest value of the separation ratio is (a′d)2a′Sa=(d′S−1d)2d′S−1d=d′S−1d=D2.\frac{(a'd)^2}{a'Sa}=\frac{(d'S^{-1}d)^2}{d'S^{-1}d}=d'S^{-1}d=D^2 .
  2. D2D^2 in terms of the coefficients. Since a=S−1da=S^{-1}d, D2=d′a=∑i=1paidi,D^2=d'a=\sum_{i=1}^pa_id_i, the difference between the means of the discriminant scores: D2=y‾1−y‾2D^2=\bar y_1-\bar y_2. Also D2=a′SaD^2=a'Sa, the variance of yy. So the discriminant function measures the separation in units of its own standard deviation, (y‾1−y‾2)/sy=D(\bar y_1-\bar y_2)/s_y=D.
  3. Regression form (Fisher). Define a dummy variable z=n2nz=\frac{n_2}{n} for members of π1\pi_1 and z=−n1nz=-\frac{n_1}{n} for π2\pi_2, and regress zz on x1,…,xpx_1,\dots,x_p. The regression coefficients are proportional to aa, and the regression sum of squares, or R2R^2, is a function of D2D^2: R21−R2=n1n2n(n−2)D2.\frac{R^2}{1-R^2}=\frac{n_1n_2}{n(n-2)}D^2 . So testing the regression (FF on (p,n−p−1)(p,n-p-1) df) is the same as testing D2D^2 with Hotelling’s T2=n1n2nD2T^2=\frac{n_1n_2}{n}D^2.

Test of a preassigned discriminant function. Suppose y0=a0′xy_0=a_0'x is specified in advance. Its distance is D12=(a0′d)2a0′Sa0≤Dp2.D_1^2=\frac{(a_0'd)^2}{a_0'Sa_0}\ \le\ D_p^2 . To test H0H_0 that a0a_0 is the true discriminant direction (it extracts all the separation): F=n−p−1p−1⋅n1n2n(Dp2−D12)(n−2)+n1n2nD12∼Fp−1,n−p−1,n=n1+n2.F=\frac{n-p-1}{p-1}\cdot\frac{\frac{n_1n_2}{n}(D_p^2-D_1^2)}{(n-2)+\frac{n_1n_2}{n}D_1^2}\sim F_{p-1,\,n-p-1},\qquad n=n_1+n_2 . If FF is not significant, the preassigned function is adequate. If it is significant, the best function S−1dS^{-1}d discriminates significantly better than a0′xa_0'x, and the preassigned function should be revised.

✓ Derivation checked step by step We checked the link a = S⁻¹d with D² = d′a, the regression (dummy variable) form of the coefficients, and the adequacy test.

↑ Back to the question list

More on Linear Inference and Multivariate Analysis

Questions: UPSC Civil Services (Main) Examination, Statistics Paper I, 1996–2026. Solutions: Optional Province. Found an error? Tell us.

Spotted an error? Tell us.

We classify every PYQ with care, but mistakes can slip in. If a question is in the wrong topic, has a typo, the wrong year, or is missing, let us know. We review every report and update the page.

Report an Error
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted