# A Gaussian Process Method with Uncertainty Quantification for Air Quality Monitoring
## 3 Uncertainty Quantification in Gaussian Processes  
### Uncertainty in Measurements  
It is intuitive that noisy measurements would result in less accurate predictions, just as a poor model would do. However, it is not direct from Equations (6) and (7). We will show in detail how the measurement noise would affect the prediction accuracy. From Equations (6) and (7), we can see that the measurement noise \(\epsilon\) affects the prediction and the covariance by adding a term \(\sigma_{n}^{2}\mathbf{I}\) to the prior covariance \(\mathbf{K}\) in comparison to the noisy free scenario [20]. From the way that they originated, we know that both \(\mathbf{K}\) and \(\sigma_{n}^{2}\mathbf{I}\) are symmetrical. Then, a matrix \(\mathbf{P}\) exists such that  
\[\mathbf{K}=\mathbf{P}^{-1}\mathbf{D}_{\mathbf{K}}\mathbf{P}, \tag{14}\]  
where \(\mathbf{D}_{\mathbf{K}}\) is a diagonal matrix with eigen values of \(\mathbf{K}\) along the diagonal. As \(\sigma_{n}^{2}\mathbf{I}\) a diagonal matrix itself, we have  
\[\sigma_{n}^{2}\mathbf{I}=\mathbf{P}^{-1}\sigma_{n}^{2}\mathbf{I}\mathbf{P}. \tag{15}\]  
Therefore, we have the partial derivative of Equation (6) with respect to \(\sigma_{n}^{2}\) as  
\[\frac{\partial\widetilde{\mathbf{f}}_{s}}{\partial\sigma_{n}^{2}}=\mathbf{K}_{ \mathbf{t}}\mathbf{P}(\mathbf{D}_{\mathbf{K}}+\sigma_{n}^{2}\mathbf{I})^{-2} \mathbf{P}^{-1}\mathbf{y}, \tag{16}\]The element-wise form of Equation (16) can be therefore obtained as  
\[\Big{(}\frac{\partial\mathbf{\tilde{f}}_{*}}{\partial\sigma_{n}^{2}}\Big{)}_{o}= -\sum_{h=1}^{n}\sum_{i=1}^{n}\sum_{j=1}^{n}p_{hj}p_{ij}k_{oh}\Lambda_{j}^{-1}y_{ i}, \tag{17}\]  
where \(\Lambda_{j}=(\lambda_{j}+\sigma_{n}^{2})^{2}\). \(p_{hj}\) and \(p_{ij}\) are the entries indexed by the \(j\)-th column, \(h\)-th and \(i\)-th row, respectively. \(k_{oh}\) is the \(o\)-th row and \(h\)-th column entry of \(\mathbf{K}_{*}\). \(y_{i}\) is the \(i\)-th element of \(\mathbf{y}\). \(o=1,\cdots,s\) denotes the \(o\)-th element of the partial derivation. We can see that the sign of Equation (17) is determined by \(p_{hj}\) and \(p_{ij}\). This is because we can actually transform \(\mathbf{y}\) to either positive or negative with a linear transformation, which will not be an issue for the GPs model. When we impose no constraints on \(p_{hj}\) and \(p_{ij}\), Equation (17) could be any real number, indicating that \(\mathbf{\tilde{f}}_{*}\) is multimodal with respect to \(\sigma_{n}^{2}\), which means that one \(\sigma_{n}^{2}\) can lead to different \(\mathbf{\tilde{f}}_{*}\), or equivalently, different \(\sigma_{n}^{2}\) can lead to the same \(\mathbf{\tilde{f}}_{*}\). In such cases, it is difficult to investigate how \(\sigma_{n}^{2}\) affects the prediction accuracy. In this paper, to facilitate the study of the monotonicity of \(\mathbf{\tilde{f}}_{*}\), we constrain \(p_{hj}\) and \(p_{ij}\) to satisfy  
\[\Big{(}\frac{\partial\mathbf{\tilde{f}}_{*}}{\partial\sigma_{n}^{2}}\Big{)}_{o} \left\{ \begin{array}{ll}>0,&p_{hj}p_{ij}<0,\\ <0,&p_{hj}p_{ij}>0,\\ =0,&p_{hj}p_{ij}=0.\end{array} \right. \tag{18}\]  
Then, we can see that \(\mathbf{\tilde{f}}_{*}\) is monotonic. It means that changes of \(\sigma_{n}^{2}\) can cause arbitrarily large/small predictions, whereas a robust method should bound the prediction errors regardless of how \(\sigma_{n}^{2}\) varies.