PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches
|Home/Statistics & Math/TikTok

Differentiate LDA and QDA; compute boundary

Last updated: Mar 29, 2026

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.

  • medium
  • TikTok
  • Statistics & Math
  • Data Scientist

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.

Related Interview Questions

  • Explain Type I/II errors vs precision/recall - TikTok (easy)
  • Compute cluster-aware significance and sequential corrections - TikTok (medium)
  • Model overdispersed counts; estimate treatment lift - TikTok (Medium)
  • Decide if subgroup increases imply overall increase - TikTok (medium)
  • Control confounding in observational ad lift - TikTok (hard)
TikTok logo
TikTok
Oct 13, 2025, 9:49 PM
Data Scientist
Technical Screen
Statistics & Math
4
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.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Statistics & Math•More TikTok•More Data Scientist•TikTok Data Scientist•TikTok Statistics & Math•Data Scientist Statistics & Math
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.