Julia for Statistics - a tutorial
This tutorial was prepared as part of the COST action HiTEc for the Econometrics & Statistics (Ecosta) 2025 conference in Tokyo.
![]() |
![]() |
Aim
This tutorial introduces the Julia programming language and its use for statistical analysis.
The following topics will be covered:
introduction to the Julia programming language
the package manager and tooling
managing data in Julia
plots for statistics
statistical distributions
likelihood inference using numerical optimization
working with R and Python in Julia
probabilistic programming for statistical inference using Turing.jl
Instructor
Mattias Villani
Professor of Statistics
Stockholm University
Before the tutorial
You may want to install Julia and VS code before the tutorial, to follow along in my interactive demos and also experiment yourself. I will not assume that you have installed Julia however, and you can attend the tutorial just to listen. See the first lecture for information on how to install Julia and (optionally, but recommended, VS Code). If you want to have the same packages and versions that I use in the tutorial, do this after you have installed Julia:
- Download the Project.toml and Manifest.toml files and place them in your directory of choice.
- Start Julia by typing
julia
in the terminal. - In Julia, cd to your directory by typing
cd("PathToYourDirectory")
. - In Julia, type
]
and pressEnter
to enter the package manager. The prompt should change to something withpkg>
. - activate the environment by typing
activate .
andEnter
. (that isactivate
followed by space and a dot). - Instantiate the environment with all dependencies by typing
instantiate
andEnter
. This will takes some time since many packages are installed and precompiled. - Press
Backspace
to exit the package manager.
Workshop plan, materials and schedule
Lecture 1 - The Julia programming language and tooling
Time: 14.00-15.00
Reading: Getting started with Julia
Live demo: Basic Julia
🍎 leg stretcher
Lecture 2 - Working with data in Julia
Time: 15.00-16.00
Reading: Read, managing and plotting data
Code: DataFrames.jl | Tidier.jl | Plots
☕ tea break
Lecture 3 - Statistics in Julia
Time: 16.30-17.30
Reading: Distributions and Optimization | Interop with R and Python
Code: Distributions | Optimization | Working with R and Python
🍓 leg stretcher
Lecture 4 - Probabilistic programming using Turing.jl
Time: 17.30-18.30
Reading: Probabilistic programming with Turing.jl
More material
Books, courses and podcasts etc about Julia
A collection of Julia links
Writing Julia packages
More on packages and the package manager