# Mdp1 _sciences_
## 2 Methods and Data
### Detection Efficiency for Incompliance Events  
The probability for detecting an (_incompliance_) _event_, i.e., a specific instance with \(y^{(0)}<-a\), can be written as the _conditional_ probability for the predicted value to be smaller than \(-a\) as well (\(\hat{y}<-a\)). Writing \(\hat{y}=y+\delta y\), we have \[p(\hat{y}<-a\mid y^{(0)})=\int_{-\infty}^{-a-y^{(0)}}f_{Y,\;\delta Y}(\delta y \mid y^{(0)})\;\mathrm{d}(\delta y), \tag{9}\]  
where \(f_{Y,\;\delta Y}(\delta y\mid y^{(0)})\) is the conditional probability density for observing a forecast error \(\delta y\), given a true change \(y^{(0)}\):  
\[f_{Y,\;\delta Y}(\delta y\mid y^{(0)})=\frac{f_{Y,\;\delta Y}(y^{(0)},\;\delta y )}{f_{Y}(y^{(0)})}. \tag{10}\]  
\(f_{Y,\;\delta Y}(\delta y,\;y^{(0)})\) is the bivariate probability density function (bi-pdf) for variables \(y\) and \(\delta y\), and \(f_{Y}(y^{(0)})\) is the marginal pdf for \(y^{(0)}\). In the special case of vanishing correlation between the variables (i.e., \(\mathrm{corr}(\delta y,y^{(0)})=0\)), the conditional probability density simply reduces to the marginal density for \(\delta y\). In this work, however, we will remain focused on the general case of finite correlation. We can easily state the _total_ probability for detecting an incompliance event by multiplying the conditional probability \(p(\hat{y}<-a\mid y^{(0)})\) (Equation (9)) with the marginal density for \(y^{(0)}\) and integrating over \(\mathrm{d}y^{(0)}\):  
\[P(\hat{y}<-a\mid y<-a)=\int_{-\infty}^{-a}f_{Y}(y^{(0)})\int_{-\infty}^{-a-y^{ (0)}}f_{Y,\;\delta Y}(\delta y\mid y^{(0)})\;\mathrm{d}(\delta y)\;\mathrm{d }y^{(0)}. \tag{11}\]  
Using Equation (10), we can simplify the former expression to read:  
\[P(\hat{y}<-a\mid y<-a)=\int_{-\infty}^{-a}\int_{-\infty}^{-a-y}f_{Y,\;\delta Y }(\delta y,y)\;\mathrm{d}(\delta y)\;\mathrm{d}y, \tag{12}\]  
where the superscript (0) has been dropped for brevity. Therefore, the total probability for detecting an incompliance event is simply obtained from a bi-dimensional integral over the joint or bivariate pdf \(f_{Y,\;\delta Y}(\delta y,y)\) for the variables \(y\) and \(\delta y\). We can also calculate the fraction of _true positives_ from  
\[r_{\mathrm{TP}}=\frac{P(\hat{y}<-a\mid y<-a)}{P(y<-a)}, \tag{13}\]  
where  
\[P(y<-a)=\int_{-\infty}^{-a}f_{Y}(y)\;\mathrm{d}y \tag{14}\]  
is the true probability for the occurrence of an incompliance event. Equation (12) allows for a geometric interpretation, which is highly useful for the interpretation of the efficacy of a given forecasting method. For this interpretation, we turn to Figure 2, where the detection region \(\mathbb{D}_{\mathrm{TP}}=\{(y,\delta y)|-\infty<y\leq-a\wedge-\infty<\delta y \leq-a-y\}\) for true positives has been indicated, together with pictorial representations of bivariate pdfs for uncorrelated (Figure 2b) and negatively correlated variables (Figure 2c), respectively. It can be seen (Figure 2a) that only events \((y,\delta y)\) contained in \(\mathbb{D}_{\mathrm{TP}}\) lead to the correct identification of an incompliance event, whereas events in the \"lost\" area go undetected. It then becomes clear that designing a forecast method is about avoiding a large fraction of the joint pdf for \(y\) and \(\delta y\) to fall within this lost area. In Figure 2b, representative contours, say, for 95% of cumulative probability, of the joint pdf have been drawn for the case of comparable variations in the forecast error and the wind speed changes (b.1) and significantly smaller forecast errors (b.2). The events unaccounted for by the forecasting system in case (b.1) are represented by the dark pie slice-shaped area; note that the fraction of undetected events is proportional to the ratio of the dark area and the total area of the circle. It can seen that even in this relatively stringent case, where the variability of both \(y\) and \(\delta y\) is of the same order as \(a\), the fraction of undetected events is relatively small.