Introduction to Graphical Models (for Network Inference) in R: Markov random Fields and Bayesian Networks

Course code
Course fee
Course Level
Advanced Master

Probabilistic graphical models (PGMs) represent the world in a simple way that humans can understand better.

They are graphical representations to understand the complex relationships between a set of random variables of interest (nodes). The edges that connect these nodes show the statistical dependencies between them.

PGMs have numerous applications in social and behavioral sciences, life sciences, economics, computer science, and many more fields.

In this introductory course, I briefly introduce two types of graphical models: undirected (Markov random fields) and directed (Bayesian networks). I will discuss how we can apply these models to estimate the dependencies between variables of interest in the form of a network. We will review excellent real-world examples and exercises (using R) to reinforce learning.

This course will open a new door for you and enable you to see the dependencies from a network point of view, which is much more comprehensive.

In this one-day course, first, probabilistic graphical models (PGMs) will be introduced in general along with some applications of PGMs in real life. We will clarify what we mean by edges and nodes in PGMs. Then, we will explain the concept of (conditional) dependency and independency and how edges and lack of edges can be interpreted based on these concepts. Thereafter some terminologies used in PGMs will be introduced. 

Then we will talk about various types of PGMs, namely Markov random fields (MRFs) and Bayesian networks (BNs). 

In MRFs, we will elaborate on how network structure can be estimated from continuous data (Graphical lasso approach) as well as from discrete data (Ising model). In BNs, the concept of (conditional) (in)dependency and their relations to the edge and lack of edges will be discussed, and after that, we will go through the concepts of the path, blocked path, and d-separation, which simplifies the understanding of conditional (in)dependencies between variables. Afterward, different types of BNs used for estimating the network structure will be discussed.

Conditional independence test and network score, two well-known approaches for network inference, will be explained. Lastly, we will briefly compare MRFs and BNs, then discuss when we should use which method. There is a practical exercise after each lecture. You will work on these exercises in R to get experience with the material from the lectures and to practice how the network structure can be estimated from some real data sets. As a prerequisite, participants should be familiar with basic statistics including probability theory, and basic R programing.

Please note that R and RStudio should be installed on your own laptop in advance. The software is available online.

In case, you have trouble installing, watch the following:

Course director
Mahdi Shafiee Kamalabad


Mahdi Shafiee Kamalabad

Target audience

Researchers, students, engineers, and analysts.

A max. of 20 number of participants will be allowed in this course.

For an overview of all our summer school courses offered by the Department of Methodology and Statistics please click here.

Aim of the course

The aim of this course is to provide fundamental knowledge of graphical models for network inference for those people such as medical scientists, psychologists, biologists, economists, and other researchers who wish to learn the network structure for discovering the relationships between variables of interest.

Study load

One day (10.00 – 17.00). Lectures and computer lab exercises will be alternated during this informal one-day workshop.

Please note that there are no graded activities included in this course. Therefore, we are not able to provide students with a transcript of grades. You will obtain a certificate upon completion of this course.


Course fee:
Fee covers
Course + course materials
Extra information about the fee

Tuition fee for PhD students from the Faculty of Social and Behavioural Sciences from Utrecht University will be funded by the Graduate School of Social and Behavioural Sciences.

Utrecht Summer School does not offer scholarships for this course.

Contact details

Irma Reyersen | E:


Application deadline: 
Registration deadline
18 January 2023