# CARLO AMBROGIO FAVERO

## Teaching > Teaching materials

## 20630 Introduction to Sport Analytics

This course provides the analytics requirements of a Sports Management program and it provides an opportunity for applied work for students in Business Analytics and Data Science. All applications in the course will be based on the statistical software R. The course is taught through a combination of lectures, class discussion, group presentations. Students are required to read assignments from the texts as well as additional sources provided by the instructor. Students must attend class prepared to engage in discussions; have, articulate and defend a point of view; and ask questions and provide comments based on their reading and on their own R applications.

**Pre-Requisites: **Students are expected to have attended a core course in statistics and to be familiar with basic calculus and linear algebra.

**Course Content Summary**

**Section 1: The Modelling Approach to Sport Analytics**

**Topics of the lectures**

Why models ?

The checklist of model building

Graphical and Descriptive Analysis

Model Specification

Model Estimation

Model Simulation

Model Evaluation

An Application: mapping boxscores statistics into Team Performance

**References**

Winston W.L.(2009) Mathletics, Princeton University Press

Berri D.J.,M.B.Schmidt and S. Brook(2006), The Wages of Wins, Stanford University Press

SLIDES An Overview of the Data with R Shiny

**Section 2: An introduction to R**

**Before the lectures**:

Install R and R studio on your computer and learn how to run them

Learn what is a package and how to install it

Understand what is a view

**Topics of the lectures**

Data Objects in R (data types) and Data Structures In R (Vectors, Matrices, Arrays, Data Frames, Lists)

Data Handling in R (Importing and Exporting data)

Programming and Control Flow (if-else statements, using switch, loops, functions in R)

Dynamic Documents with R Markdown: build a report with all results and comments

**References**

Singh AK and DE Allen(2017) R in Finance and Economics. A Beginners Guide, World Scientific Publishing, Ch 1,2,3,4

Heiss F. (2016) Using R for introductory Econometrics http://urfie.net/read/mobile/index.html#p=4,

Yihui Xie, Dynamic Documents with R and Knitr, Chapman and Hall

Torfs Brauer "A Very Short Intro to R"

An introduction to R Markdown

Intro R Code (from Singh and Allen)

all R codes used in Singh and Allen are downloaded at

http://www.rforresearch.com/r-in-finance-economics

**R CODES** (from Singh and Allen) : Data Objects, Data Handling, Programming

**EXERCISE 1** Write an R code that answers to all the ToDo points in Torfs P. and C. Bauer(2014) “A (very short) introduction to R” , solution

Group: Jacob Hylin, Nicola Rogante

**EXERCISE 2** An introduction to Data Handling, solution

Group: Daniel Hame, Daniel Coppel,Jan-Niklas Hannig,Jonas Heidenreich

**Section 3: Graphical and Descriptive Analysis of Sport Statistics **

The NBA database: download and import in R. readme.doc

https://www.basketball-reference.com

**Topics of the lectures**

Graphical Analysis

Correlation Analysis

QQ plots and Histogram

Subsetting data and TS plots

Introduction to model building and Simulation

**R CODES** : code, data

SLIDES

**EXERCISE 3: **text, SOLUTION

Group:Massimiliano Minorati, Michele Molteni,Filippo Forconi,Elyas Sadou

**Section 4: The Linear Regression Model **

Models for Experimental and non-Experimental Data

Models as outcomes of reduction processes

Model Estimation: the OLS and its properties

Interpreting Regression Results: Statistical Significance and Relevance

The Effects of Model Misspecification

SLIDES

**AN APPLICATION,THE FOUR FACTOR MODEL **slides, Rcode

**EXERCISE 4: **The Four Factor Model, SOLUTION, NOTES

Group:Yevhen Samofal, Andrea Bianchi

**References**

Winston W.L.(2009) Mathletics, Princeton University Press, Chapter 28

**Section 5: Using Models to Weight NBA Statistics **

Weighting Statistics to measure performance

Correlation analysis

The NBA Efficiency Measure

Using a Model based on Possession

Offensive Efficiency and Defensive Efficiency

Modelling Wins

Evaluating Statistics by Simulation: Monte-Carlo and Bootstrap methods

Completing the Model

Evaluating Players' Efficiency: WINS, assists and WINS48

**R CODES**: team_stat, players_stat, data on players

SLIDES, SLIDES ON PLAYERS EFFICIENCY,** **NOTES

**EXERCISE 5: **text, SOLUTION

Group:Andrea Premoli, Massimo Cittadini

**EXERCISE 6: ** text, SOLUTION1, SOLUTION2, notes

**References**

Berri D.J.,M.B.Schmidt and S. Brook(2006), The Wages of Wins, Stanford University Press, Ch 6,7

**Section 6: Measuring Competitive Advantage and its effects **

Competitive Balance inthe Sport Industry

The Noll-Scully Measure

CR concentaration Measure

Herfindal Index

Competitive Balance in European Football

Evidence from a Natural Experiment on English Soccer

SLIDES

**EXERCISE 7: ** text, solution

**References**

Berri D.J.,M.B.Schmidt and S. Brook(2006), The Wages of Wins, Stanford University Press, Ch 3,4

Brandes L. and E.Franck(2007) "Who made who? An Empirical Analysis of Competitive Balance in European Soccer Leagues" Eastern Economic Journal

Haddock D. and L.P.Cain(2006) "Measuring Parity:Tying into the Idealized Standard Deviation", Journal of Sport and Economics

Koning R.H.(2000) Balance in competition in Dutch soccer, The Statistician, 49, Part 3, pp.419-431

Szimansky S.(2001) "Income inequality, competitive balance and the attractivenessof team sports:some evidence and a natural experiment from English Soccer" the Economic Journal,111, F69-F84

**Section 7: Evaluating Soccer players performance (in collaboration with WYSCOUT) **

PlayeRank: multidimensional and role aware evaluation of soccer players performance

Modeling players performance

Weigting performance indicators

Computing performance ratings

Classifing player roles

Ranking players

**R CODES**: data players serie A, codes for downloading data, code for clustering, code for ranking

SLIDES

SLIDES PRESENTATION MASSUCCO PART 1

SLIDES PRESENTATION MASSUCCO PART2

SLIDES PRESENTATION MASSUCCO PART 3

**References**

Pappalardo, Cintia, Ferragina, Massucco, Pedreschi, Giannotti (2018) "PlayerRank: Multi-dimensional and role-aware rating of soccer player performance"