Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2022/iii/paper-218/3/a/solution

For word-count vector , the fitted logistic model is
Holding other counts fixed, one additional occurrence of "dollar" multiplies the fitted spam odds by .
The logistic classifier is
The coefficients maximize the Bernoulli logistic-regression model likelihood over the training emails.

New to topics? Read the docs here!