Chapter 1 Welcome! :)

You are reading the lecture notes of the R labs for the Probability and Statistics for Business and Finance (PBSF) course at University of Bergamo (academic year 2021/22). R is a great programming language especially designed for statistical analysis and data visualisation.

The PSBF R labs are designed for those who don’t have any programming background. It will be a step-by-step path; at the end you will have the basic R knowledge for analysing financial time series.

Enjoy the journey!

In the following lecture notes, this font (with grey background) represents R code. The following is an example of R code with the corresponding output.

print("Hello PSBF World!")
## [1] "Hello PSBF World!"

These notes are written in RStudio by using bookdown ( For errors, typos, suggestions, … write to or .