Fundamentals of Data Analysis

Fondamenti di Analisi dei Dati — A.Y. 2026/27

A.Y. 2026/27 · BSc in Computer Science (L-31)

Fundamentals of Data Analysis

From the question to the model, with Python. Department of Mathematics and Computer Science, University of Catania.

Lecture notes Self-assessment Project

The course

The course is organised in two modules.

Module 1 — Statistical data analysis. We build the vocabulary of data (description, probability, association, distributions), then use inference and regression models to explain a phenomenon, and close with causal reasoning — why adjusting for a variable in a regression is a causal act, and when it is not enough — and with how to tell the story honestly.

Module 2 — Predictive analysis and data representation. The goal changes from explaining to predicting: empirical risk minimisation, baselines, splits and cross-validation; the same models re-read as predictors, plus a few new ones; and ways to represent data — features, clusters, densities, principal components — in the service of the analysis rather than as an end in themselves.

Each module ends with a written test. The practical work is a project on an assigned dataset, carried out in two parts and presented at the exam. The schedule says what happens when.

The official syllabus — programme, textbooks, assessment rules as filed with the university — is on the degree course pages, which are the version that counts.

Schedule

The session grid for the whole course: what each session covers, the materials it uses, and the dates of the two written tests and the two seminars.

When and where: Tuesdays and Thursdays · 15:00–18:00 · Aula 22, unless a session says otherwise.

Module 1 — Statistical Data Analysis

# Date Topic and materials
1 Thu 1 Oct Lecture Course introduction. Introduction to Python for data analysis.
Python self-study
📌 Register your project group on the course form (link on Teams) by Sun 11 October
2 Tue 6 Oct Lecture Key concepts of data analysis
3 Thu 8 Oct Lecture Describing and visualizing the data
4 Tue 13 Oct Lecture Probability for data analysis
5 Thu 15 Oct Lecture Association between variables
6 Tue 20 Oct Lecture Data distributions
7 Thu 22 Oct Lecture Statistical inference: sampling, confidence intervals, bootstrap, hypothesis testing
📌 Datasets assigned by e-mail, one per group
8 Tue 27 Oct Lecture Lab: live data analysis
9 Thu 29 Oct Lecture Linear regression
10 Tue 3 Nov Lecture Logistic regression
11 Thu 5 Nov Lecture Extending regression models: interactions, polynomial terms, multinomial regression
12 Tue 10 Nov Lecture Causal analysis
13 Thu 12 Nov Lecture Storytelling with data
The deck of this lesson is shared on Teams: it reproduces figures that cannot be redistributed.
14 Tue 17 Nov Assessment Prova in itinere 1 · Project Part 1 review
15 questions in 30 minutes on chapters 1–12. The rest of the session is spent on Part 1 of the project: an informal review at the desks, with the teacher and the tutor going round. Part 1 does not have to be finished.
Revise for this test
📌 Review of the first parts of the projects, and work in class

Module 2 — Predictive Analysis and Data Representation

# Date Topic and materials
15 Thu 19 Nov Lecture Introduction to predictive analysis: empirical risk, splits, cross-validation
16 Tue 24 Nov Lecture Regression for prediction: overfitting, regularization, the scikit-learn workflow
17 Thu 26 Nov Lecture Classification: metrics, KNN, logistic regression as a predictor
18 Tue 1 Dec Lecture Generative classifiers: QDA, LDA, naive Bayes
19 Thu 3 Dec Lecture Data representation and clustering
Data representation · Clustering
Feature spaces and distances first, then K-means and how to choose K.
20 Thu 10 Dec Lecture Density estimation
21 Tue 15 Dec Lecture Dimensionality reduction: principal component analysis
📌 Part 2 of the project walked through in class, before the break
22 Thu 7 Jan Seminar Seminar 1
23 Tue 12 Jan Seminar Seminar 2
24 Thu 14 Jan Assessment Prova in itinere 2 · Project Q&A
15 questions in 30 minutes on chapters 13–20. The rest of the session is open for questions on the project.
Revise for this test

📌 Project presentations: TBA

Lecture notes

These notes are the written companion to the lectures. Every chapter mixes explanation, runnable Python and figures; the code you see is the code that produced the figures.

Download the whole book (PDF)

Every chapter in one file, in the order of the lectures, with a bookmark for each one. Each chapter can also be downloaded on its own from the top of its page.

How to use them

  • Read online. Each chapter has a table of contents on the right and a Code menu at the top to show or hide the source of every figure.
  • Run them. Each chapter can be opened in Google Colab from the link at the top of the page, or downloaded as a notebook and run locally.
  • Practise. Chapters end with exercises, and the self-assessment quiz draws its questions from the same material.

Before you start

The course assumes you can read and write basic Python. The first lecture assigns a self-study crash course covering the language and the data-science stack (NumPy, pandas, matplotlib) — the three notebooks under Lecture 1 in the sidebar. Work through them in the first week; they are not covered in class.

Data

Datasets used by the chapters are served from this site, so the same code runs locally and on Colab. Each chapter defines

DATA = "https://antoninofurnari.github.io/fad-2627/data/"

and loads its files from there.

Slides

The slides used in class are published here as PDF, one deck per chapter.

Note

Some decks are shared on Microsoft Teams instead of being published here, when they contain figures from a textbook that cannot be redistributed. The chapter page says so explicitly when that is the case.

Deck Title
01_key_concepts Key concepts of data analysis
02_describing_visualizing Describing and visualizing the data
03_probability Probability for data analysis
04_association Association between variables
05_distributions Data distributions
06_statistical_inference Statistical inference: sampling, confidence intervals, bootstrap, hypothesis testing
08_linear_regression Linear regression
09_logistic_regression Logistic regression
10_extending_regression Extending regression models: interactions, polynomial terms, multinomial regression
11_causal_analysis Causal analysis
13_predictive_analysis Introduction to predictive analysis: empirical risk, splits, cross-validation
14_regression_for_prediction Regression for prediction: overfitting, regularization, the scikit-learn workflow
15_classification Classification: metrics, KNN, logistic regression as a predictor
16_generative_classifiers Generative classifiers: QDA, LDA, naive Bayes
17_data_representation Data representation and clustering
18_clustering Data representation and clustering
19_density_estimation Density estimation
20_pca Dimensionality reduction: principal component analysis

Project

The practical part of the exam is a data analysis project on an assigned dataset, carried out in two parts — one per module — and presented at the exam. The work happens in a GitHub repository forked from the course template; if you would rather not use GitHub, a zip by e-mail is accepted.

Template repository Parte 1 Parte 2

How it works

  • Groups of one to three students.
  • Register the group with the course form linked on Teams, by Sunday 11 October. The form is how the groups are formed; it is not the place where the dataset is chosen.
  • Each group is then assigned a dataset by e-mail, in the fourth week. The analysis is yours to design: the template says what a complete analysis contains, and you write the questions.
  • You fork the template and work in your fork. Three ways to hand a part in, whichever suits you:
    • fork public and send the link;
    • fork private and add antoninofurnari as a collaborator;
    • or send a zip of the repository by e-mail.
  • The presentation at the exam doubles as the oral examination: every member speaks and answers questions about the analysis.
Released Due
Part 1 — describing, inferring, explaining (Module 1) published from the start; the dataset arrives on session 7 reviewed in class at the first written test
Part 2 — predicting and representing (Module 2) published from the start; walked through in class on session 21 end of January
Presentation — early February, before the first exam session

Part 1 is looked at in class during the session of the first written test: the teacher and the tutor go round the desks and read what each group has. It does not have to be finished, and it is not marked that day — the point is to catch a wrong turn while there is still time to correct it. There is one submission, at the end of January: one notebook holding both parts, marked as it stands then.

Both briefs are published from the start, so nothing is held back. The two parts follow the two modules: Part 1 is the statistical analysis, up to the regression models that explain the phenomenon and the causal reading of their coefficients; Part 2 is the predictive half, plus the ways of representing the data. So the material for each part is taught before the session that reviews it. Part 2 is walked through in class before the winter break, and it is not tied to the second written test, which is a test only.

Ground rules

  • The notebook must run top to bottom in a clean environment. If it does not, the submission is returned before it is marked.
  • Data files are never committed. The repository explains how to obtain them.
  • Strip notebook outputs, or keep the notebook under 5 MB.
  • A contribution breakdown and a declaration of how generative AI was used are both mandatory.
  • A submission consisting only of slides is not marked.
  • A negative result, argued with evidence, is worth full marks. An analysis that honestly concludes “the data cannot answer this” is a good analysis.

Self-assessment

Note

The questions are in Italian, like the written tests. These are practice questions: the ones in the written tests are different.

Loading the questions…