Differentiate LDA and QDA; compute boundary

Quick Overview

This question evaluates understanding of Gaussian generative classification and discriminant analysis, specifically the effects of equal versus class-specific covariances on linear (LDA) and quadratic (QDA) decision boundaries, numerical discriminant comparison, and model selection with regularization and cross-validation.

Differentiate LDA and QDA; compute boundary

Company: TikTok

Role: Data Scientist

Category: Statistics & Math

Difficulty: medium

Interview Round: Technical Screen

Class 0: μ0 = (0,0), Σ0 = [[1,0],[0,1]]. Class 1: μ1 = (2,0), Σ1 = [[4,0],[0,1]]. Priors: π0=0.7, π1=0.3. (1) Write the LDA discriminant and decision rule under the (incorrect) assumption Σ0=Σ1; give the linear boundary equation. (2) Write the QDA discriminant with the true covariances and derive the quadratic boundary (explicit scalar equation in x and y). (3) Classify x=(1,1) under both LDA and QDA (show numeric evaluation of the discriminants). (4) Discuss when QDA is preferable and when LDA is safer given n=60 per class, and propose a regularized QDA that shrinks class-specific covariances toward a common Σ with a tunable shrinkage parameter; explain how you would pick it via cross-validation.

Quick Answer: This question evaluates understanding of Gaussian generative classification and discriminant analysis, specifically the effects of equal versus class-specific covariances on linear (LDA) and quadratic (QDA) decision boundaries, numerical discriminant comparison, and model selection with regularization and cross-validation.

|Home/Statistics & Math/TikTok
TikTok logo
TikTok
Oct 13, 2025, 9:49 PM
mediumData ScientistTechnical ScreenStatistics & Math
6
0

Binary Gaussian Classification: LDA vs QDA

You are modeling a 2D binary Gaussian classifier with features (x, y):

  • Class 0: mean μ0 = (0, 0), covariance Σ0 = [[1, 0], [0, 1]].
  • Class 1: mean μ1 = (2, 0), covariance Σ1 = [[4, 0], [0, 1]].
  • Priors: π0 = 0.7, π1 = 0.3.

Assume natural logarithms throughout; additive constants common to both classes can be dropped in discriminants.

Tasks

  1. Under the (incorrect) assumption Σ0 = Σ1, write the LDA discriminant and decision rule, and give the resulting linear decision boundary (explicit equation).
  2. Using the true covariances, write the QDA discriminant and derive the quadratic decision boundary as an explicit scalar equation in x and y.
  3. Classify the point x = (1, 1) under both LDA and QDA by numerically evaluating the discriminants.
  4. With n = 60 observations per class, discuss when QDA is preferable vs when LDA is safer. Propose a regularized QDA that shrinks class-specific covariances toward a common Σ with a tunable shrinkage parameter, and explain how to select the parameter via cross-validation.
Loading comments...