When to use it
Predict class membership when the classes have clearly different spreads or orientations (unequal covariance matrices) and every class has enough rows to estimate its own covariance: QDA draws curved (quadratic) decision boundaries.
When not to: Any class is small relative to the number of predictors (its covariance estimate will be noisy or singular; consider regularization or LDA instead), Box's M shows classes have similar covariance structures (LDA would likely perform just as well with less estimation variance), or you need the linear discriminant scores (LD1/LD2) for a low-dimensional separation plot, which QDA cannot provide.
Step by step
Open it from the menu
Click Multivariate & ML in the menu bar; under Classification choose Quadratic Discriminant Analysis.
Fill in the form
Choose the columns: Groups to predict, Columns that may explain it. The form lists only columns whose type fits each field.
Check the options
The options start at their defaults: Class priors, CV folds, Regularization (reg_param). Change one only when your question needs it.
Run the analysis
Press Run analysis. The Result Card opens on its Results tab.
What to choose in the form
| Groups to predict Outcome required | One categorical or binary column. Categorical class label to predict (2+ classes). |
|---|---|
| Columns that may explain it Predictors required | One numeric column. Numeric predictor columns. |
| Class priors | Prior class probabilities: proportional to observed class frequencies, or equal across classes. Default: proportional. |
| CV folds | Stratified k-fold cross-validation folds for an honest accuracy estimate (seeded, shuffled; 0 = off). Default: 5. |
| Regularization (reg_param) | Shrink each class covariance toward its diagonal (0 = none, up to 1). Raise it when a class covariance is near-singular. Default: 0. |
How to read the card
The Results tab starts with what to know first (rows left out, checks that did not pass), then the interpretation in words and the Key Results; charts and assumption checks follow further down. Learn More explains the method in plain words. Read a Result Card covers all four tabs.
What it assumes
- Normality (of residuals, not of the raw data)
If it does not hold: QDA's curved decision boundaries are derived assuming each predictor is approximately normally distributed WITHIN each class; strong non-normality makes the boundary and the reported classification accuracy less trustworthy, especially with small classes.
How to check: Shapiro-Wilk per predictor within each class, reported directly on the card, with predictors named and skipped when there are too few or too many rows to test.
- Independence of observations
If it does not hold: Rows must be independent (no repeated measures of the same subject in different rows); violated independence distorts both the fitted boundaries and the cross-validated accuracy estimate.
How to check: Not checked by KernelStats: stated directly as a standing 'Independent observations' reminder.
A worked example
Classifying three penguin species from four body measurements, comparing QDA against LDA on the same data with 5-fold cross-validation.
Result: QDA: in-sample 98.8%, 5-fold cross-validated 98.5%; LDA: in-sample 98.8%, cross-validated 98.5%. Identical to the reported precision. Box's M rejects equal covariances (chi-square(20) = 76.8, p < .001).
Box's M says the species' covariance matrices differ, yet QDA's extra 20 covariance parameters buy no cross-validated accuracy at all: the difference is real but does not matter for classification. That is exactly why the choice should rest on cross-validated accuracy rather than on Box's M, and with a tie the simpler LDA is the one to report.
From the Statistics Library.
The code tabs
Code gives this analysis as Python, R and MATLAB code (and SAS where the tab offers it), reading the data the way KernelStats did. Export sends the card to a report or to slides. See The Code tab.
Understand the statistics
Ask Oobi
Type one of these into Ask Oobi beside your data:
- Do penguin species differ not just in average size but in how variable their measurements are, and does a curved boundary classify them better?
- Explain the quadratic discriminant analysis (QDA) in plain words.
- What does homogeneity of variance (homoscedasticity) mean?
Last reviewed November 16, 2026.
