All the examples we have considered up to this point are static: each statistical individual is measured just once at some point in time. Many interesting problems, however, are dynamic in nature and the analysis of the data they generate focuses on how individuals evolve over time. BNs presented in previous chapters can be extended into dynamic Bayesian networks (DBNs) to perform this kind of analysis, which will be the topic of this chapter. As an example, we will consider a domotic setup that controls windows to maintain suitable inside temperature and air quality.