**1. Introduction**

In many cities around the world, air pollution is among the many environmental problems that affect their population. Among the many known facts about the impact of pollution on human health, we have that for ozone concentration levels above 0.11 parts per million (0.11ppm), the susceptible part of the population (e.g., the elderly, ill, and newborn) staying in that environment for a long period of time, may experience serious health deterioration (see, for example, [1–10]). Therefore, to understand the behaviour of ozone and/or pollutants in general, is a very important issue.

It is possible to find in the literature a vast amount of works that try to answer some of the many issues arising in the study of pollutants' behaviour. Depending on the type of questions that one is trying to answer, different methodologies may be used. Among the many works concentrating on the study of ozone behaviour are, [11–13] using extreme value theory to study the behaviour of the maximum ozone measurements; [14] using time series analysis; [15] using volatility models to study the variability of the weekly average ozone measurements; [13, 16] using homogeneous Poisson processes and [17, 18] using non-homogeneous Poisson models to analyse the probability of having a certain number of ozone exceedances in a time interval of interest; [19] using compound Poisson models to study the occurrence of clusters of ozone exceedances as well as their mean duration time; and [20] using queueing model to study the occurrence of cluster of ozone exceedances as well as their size distribution.

In the environmental area, it is also possible to find works using Markov chains models. Some of them are, [21, 22] where non-homogeneous Markov models are used to study the occurrence of precipitation. We also have [23] where those types of models are used to study tornado activity. In the case of ozone modelling we have, for instance, the works of [24–26] using time homogeneous Markov chains. In those works the interest was in estimating the probability that the ozone measurement would be above (below) a given threshold, conditioned on where it lays in the present and in the past days.

Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. © 2015 The Author(s). Licensee InTech. This chapter is distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/3.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

©2012 Authors, licensee InTech. This is an open access chapter distributed under the terms of the Creative

In [24], the order of the Markov chain was estimated using auto-correlation function. Its transition matrix was estimated using the maximum likelihood method (see, for instance, [27, 28], among others). In [25], the order of the chain was also considered an unknown quantity that needed to be estimated. The Bayesian approach (see, for example, [29]) was used to estimate the order as well as the transition probabilities of the chain. In particular, the maximum *à posteriori* method was used. In [26], the estimation of the order of the chain is performed using the Bayesian approach using the so-called trans-dimensional Markov chain Monte Carlo algorithm ([30, 31]). The transition matrix of the chain was obtained through the maximum *à posteriori* method. However, the common denominator of those works is that the Markov chain model used was a time homogeneous one. Since ozone data are not, in general, time homogeneous, the data had to be split into time homogeneous segments and the analysis was made for each segment separately.

Here, the interest also resides in estimating, for instance, the probability that the ozone measurement will be above a given threshold some days into the future, given where it stands today and in the past few days. Although in the present work we also use Markov chain models and the Bayesian approach, the novelty here is that the time-homogeneous assumption is dropped. Here, we consider a non-homogeneous Markov chain model. We assume that the order of the chain as well as its transition probabilities are unknown and need to be estimated. The chosen method of estimation is also the maximum *à posteriori*.

This work is presented as follows. In Section 2 the non-homogeneous Markov chain model is given. Section 3 presents the Bayesian formulation of the model. An application to ozone measurements from Mexico City is given in Section 4. In Section 5 some comments about the methodology and results are made. In an Appendix, before the list of references, we present the code of the programme used to estimate the order and the transition probabilities of the Markov chain.
