Look, for example, fig 5a in the following paper.
My understanding was that, to calculate the 'expected' line, we would calculate the predicted signal+background cross section $\sigma_{s+b}$ (since the cross section is the test statistic here), define a critical region by chosing a confidence level (or, equivalently, a rate of type II error in this case), let's say, 95% so that
$$ \tag{A} 0.05=\int_0^{\sigma^{95\%}_{\text{exp}}(m_S)}d\sigma \:f(\sigma(m_S)) $$
where $f$ is, in theoretical research, our favorite PDF for the background+signal hypothesis -- usually Poisson -- correctly centered at our calculated value and with a standard deviation dictated by the chosen PDF model itself. This could also be derived from a set of pseudoexperiments.
In this way we have a $\sigma^{95\%}_{\text{exp}}(m)$ for each value of the unknown degree of freedom $m$ that parametrizes it.
Then, the green and yellow bands are understandably obtained.
But what about the observed line???
I understand how the observed line varies with $m$ on graphs that plot the 95% confidence level on the ratio $\sigma^{95\%}_{\text{obs}}/\sigma_{s+b}(m)$, because here the dependence comes from the denominator. These are the graphs that exclude the theoretical point in space of parameters when $\sigma^{95\%}_{\text{obs}}/\sigma_{s+b}(m)<0$.
But what about in graphs like the example I cite that put an upper limit directly on the cross sections?
My only guess is that it is the same as before in eq. (A), but, now, with the PDF centered at (and standard deviation derived from this median)
$$ \sigma_{b+s}(m)-\sigma_{b}+\sigma_{\text{obs}}, $$
where and $\sigma_{b+s}(m)$ and $\sigma_{b}$ are calculated and $\sigma_{\text{obs}}$ is measured.
However, this must not be the case because than the dependence in $m$ would again come only from $\sigma_{b+s}(m)$ which is calculated and would not cause irregular curves as is always seen in these graphs.
I hope I could make my question clear and appreciate any insights.