I want to express the following statement as a formula:
All probability values of $max(x,y)$ should be counted if and only if they have reached a certain boundary value, otherwise the value will not be counted. So only valid values should be counted. For example, I have the values \begin{matrix} 2 & 3 \\ 4 & 4 \\ 5 & 1 \end{matrix} and a boundary of [4], than the output should be 66,7% since on first row neither 2 or 3 is >= 4.
My approach with piecewise function:
\begin{equation} Coverage = \sum^n_{i=1} \begin{cases} \max(P(x^{(i)}), P(x^{(j)}) & \text{if} & P(x^{(i)}) \lor P(x^{(j)}) \geq t\in[0.5...0.95] \\ 0 & \text{otherwise} \end{cases} \end{equation}
Is this formula correct and how can it be improved?
You can use the Heaviside step function: $$H[x]=\left\{\begin{array}{ll}1 & \text{if }x\geq 0\\0&\text{if }x<0\end{array}\right..$$
Then you want to say something like
$$\sum_{i=1}^n \max\{P(x),P(y)\}H[\max\{x,y\}-4]$$