Week 7: Discriminant Analysis
Last week, we used class probabilities to make decisions and evaluate classifiers. This week models the distribution of the predictors within each class. Bayes’ rule turns those class densities into a classification rule, leading to linear and quadratic discriminant analysis.
Guiding question: How does a model for the predictors within each class determine the decision boundary?
Quiz 2 is Tuesday, October 6, 2026, before the Week 6 discussion, and covers the Week 3 through Week 5 discussions. The discriminant-analysis lecture is Thursday, October 8, 2026. Its discussion session is Tuesday, October 13, 2026.
Learning goals
By the end of this week, you should be able to:
- use Bayes’ rule to combine class densities and prior probabilities;
- estimate the class means, priors, and pooled covariance matrix for LDA;
- explain why a shared covariance matrix gives linear decision boundaries;
- describe how QDA changes the covariance assumption and decision boundary;
- fit LDA and QDA, distinguish training accuracy from test performance, and recognize when a class covariance matrix can be singular; and
- compare LDA and QDA on the same validation or test observations and explain the bias-variance trade-off.
Lecture notes
-
Bayes’ rule, a two-class Gaussian example, manual LDA estimation, linear and quadratic boundaries, South Africa heart data, iris practice, and handwritten-digit classification.
Homework 07
Homework 07 contains four required questions: manual LDA estimation for the South Africa heart data, QDA with marginal screening for handwritten digits, a simulation comparing LDA and QDA under different true covariance structures, and a reusable LDA/QDA analysis skill.
Use either R or Python. All homework assignments are evaluated as Complete or Incomplete. Attempt Questions 1 through 3 before consulting the solutions. You may work with AI to design, write, and apply the skill in Question 4, and you are responsible for checking and explaining its analysis.
Create a skill of at most 5 KB (5,000 bytes) that loads only when explicitly invoked. Apply it to the SAheart data and include an analysis report of at most one printed page, with a figure, a table, and numerical fitting results. Append the complete skill definition to your homework report. Your skill and analysis report will be reviewed and graded by other students through peer evaluation.
Solutions cover Questions 1 through 3. No solution can be provided for Question 4.
Place homework-07.pdf or homework-07.html in the homework/week-07/ folder of your stat432-fall2026 GitHub repository by Sunday, October 11, 2026, at 11:59 p.m. Central Time. The report must be either a PDF or a self-contained HTML file and must not exceed 10 pages. The final file version shown on GitHub is treated as the submitted version, and its GitHub timestamp determines whether it is on time.
Discussion Session on Tuesday, October 13, 2026
Submit discussion/week-07-question.md by Sunday, October 11, 2026, at 11:59 p.m. Central Time. This required weekly discussion question counts toward the Weekly GitHub Discussion Questions component, worth 10% of the course grade.
The final version shown on GitHub is the submitted version. If its GitHub timestamp is after the deadline, the submission receives 0 points. No late-submission exceptions are allowed.
For the required format and GitHub submission steps, see Discussion Questions: Procedures and Rules.
The Week 7 discussion session is Tuesday, October 13, 2026. Open Popping when the instructor asks you to join.
See the Discussion tab for login information. Tell the instructor during class if you cannot sign in.
Week 7 is included in Quiz 3 on Tuesday, October 27, 2026, which covers the Week 6 through Week 8 discussions. See Quizzes for the quiz format.
Discussion Question Topics
The following topics are suggestions. Your question is not limited to this list, but it should relate to the Week 7 material or your LDA/QDA analysis skill.
Model assumptions and the bias-variance trade-off. Sharing a covariance matrix can reduce variance but introduce bias when class covariances differ.
Model choice and tuning. Cross-validation can guide model choice and the weight used to blend predicted class probabilities.
Low-dimensional embedding and model fitting. An embedding can simplify covariance estimation while discarding useful class information.
Validation and diagnostics. Validation errors and covariance checks help diagnose fitting and prediction problems.
Comparison with logistic regression and KNN. Comparing these methods requires attention to their assumptions, decision boundaries, and test performance.
Reusable analysis skills. A reusable skill guides analysis and reporting through instructions independent of the dataset.
Ask one focused question that calls for an explanation, a comparison, a short derivation, a counterexample, a small computation, or a diagnosis of a concrete difficulty. Do not submit a request for code alone or repeat a homework calculation without asking about the statistical reasoning or the specific difficulty you encountered.