Statistical Modelling course


Third-year course of the B.Sc. in Artificial Intelligence (Universities of Milano-Bicocca, Milano and Pavia).
A.A. 2026/2027, 1st semester.


Communications
  • Sign up for the course on the Kiro platform to receive communications via email.
  • Office hours (online or in-person): send me an email to schedule a meeting.
  • Exam Instructions:
    • The exam lasts two hours and consists of exercises similar to those covered during the course.
    • In addition to the exercises, there may be one or two open questions requiring a more interpretative and/or theoretical answer.
    • The exam must be written in blue or black ink. Anything written in pencil will not be graded, with the exception of graphs. For each exercise, you must clearly show all the steps, not just the final answer. Answers without intermediate steps or clear explanations will not be considered valid.
    • You may bring a cheat sheet to the exam: one single-sided A4 sheet on which you may write anything you find useful and which you may consult during the exam.
    • Apart from the cheat sheet, the exam is closed book: you are not allowed to consult any other materials during the exam. The use of mobile phones or smartwatches is strictly prohibited. Any violation will be dealt with in accordance with the University regulations.
    • You may (and are strongly encouraged to) bring a non-programmable scientific calculator.

Contacts

laura.dangelo@unimib.it


Calendar

(may be subject to change)



Course material
Lecture notes

The course material is largely based on the book “Modello lineare - Teoria e Applicazioni con R” (Grigoletto M., Pauli F., Ventura L., 2017), and on the course material kindly provided by Prof. Nicola Sartori and Prof. Bernardo Nipoti.

29 Sep - Class 1
Review of probability and statistics.
Probability review (1) - Probability review (2)
Statistics review (1) - Statistics review (2)

01 Oct - Class 2
Introduction: role of the variables; phases of the analysis; types of models.
Simple linear model via ordinary least squares: definition, estimate, interpretation of the parameters, descriptive and inferential properties.
Introduction
Simple linear model via OLS - Properties

06 Oct - Class 3
Simple Gaussian linear model: definition, estimation via likelihood.
Exact distribution of the maximum likelihood estimators.
Inference about the regression coefficients (confidence intervals, tests). Inference about the mean (prediction).
Simple Gaussian LM - Inference about β - Prediction

08 Oct - Class 4 *
Exercises on the simple Gaussian linear model.
Exercises simple LM
Solutions: Exercise 1

13 Oct - Class 5
Partition of the sum of squares. Coefficient of determination R2.
Decomposition of the sum of squares - Coefficient R2

15 Oct - Class 6
Test about the overall model; equivalence with the test about the significance of β2.
Analysis of the residuals (descriptive properties, distribution, types of residuals).
Diagnostics (residuals vs. fitted, ECDF, normal Q-Q plot).
Test about the overall model - Equivalence with the test about β2
Analysis of the residuals - Diagnostics

20 Oct - Class 7 *
Exercises on the simple Gaussian linear model.
Solutions exercise 2 - Solutions exercises 3 and 4

22 Oct - Class 8
Multiple Gaussian linear model: specification, assumptions, estimation.
Model specification and assumptions - Estimation

27 Oct - Class 9
Geometric interpretation of the linear model.
Distribution of the estimators in the multiple Gaussian linear model.
Geometric interpretation
Distribution of the estimators

29 Oct - Class 10
Gauss-Markov theorem.
Inference in the multiple Gaussian linear model: test about an individual coefficient, test about a subset of coefficients.
Geometric interpretation of the test for comparing nested models.
Special cases: test about βj, test about the overall significance, equivalence with the test about R2.
Adjusted R2.
Gauss-Markov theorem
Test about βj - Test about a subset of β
Geometric interpretation - Special cases
Adjusted R2

03 Nov - Class 11 *
Exercises on the multiple Gaussian linear model.
Exercises multiple LM
Solution exercise 1 - Solution exercise 2



Past Exams

25 Jan 2024 - Exam 25/01/24
27 Jun 2024 - Exam 27/06/24
03 Sep 2024 - Exam 03/09/24
24 Sep 2024 - Exam 24/09/24
20 Feb 2025 - Exam 20/02/25

Suggested books

Fox (2015) “Applied regression analysis and generalized linear models”. Sage Publications.

James, Witten, Hastie, and Tibshirani (2021) “An Introduction to Statistical Learning (with Applications in R)”. Springer

Abraham and Ledolter (2006) “Introduction to Regression Modeling”, Duxbury Press