Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Suppose we have a bunch of a sampled pairs $(x_1,y_1)...(x_n,y_n)$ with the $y_i =\pm1$.

Then consider the decision function $h(x) = -1$ if $p(x)=\frac{1}{1+e^{-x}}\leq0.5$, and $h(x) = 1$ if $p(x) > 0.5$. Where $p$ is interpreted, as per logistic regression, as the probability that $x\rightarrow +1$. Then what is the probability that our decision function makes an inaccurate prediction?

For some reason I'm having a really hard time setting this problem up correctly. It seems to me I want the area below the sigmoid curve to the left of the y-axis, and the area between the curve and the line $y=1$ to the right of the y-axis. And then I need to somehow weight or normalize this integral so that it makes statistical sense.

Using the decision theory setup, I feel like this takes the form: \begin{align} &\int_{(-\infty,0]}p(x,y=1)dx + \int_{[0,\infty)}p(x,y=-1)dx\notag\\ =&\int_{(-\infty,0]}p(y=1\;|\;x)p(x)dx + \int_{[0,\infty)}p(y=-1\;|\;x)p(x)dx\notag\\ =&\int_{-\infty}^{0}\frac{1}{1+e^{-x}}p(x)dx + \int_0^{\infty}\frac{1}{1+e^{x}}p(x)dx\notag \end{align}

However there is no mention of the distributions $p(x,y)$ or $p(x)$ (this is from a professor's notes and not from a book so that could have been an oversight). Have I set this problem up correctly? Or have I misinterpreted it?

share|improve this question
The way you describe the case, $y$ plays no role at all in it. Perhaps you meant $p(y \mid x)$ instead of $p(x)$ -since you mention logistic regression? –  Alecos Papadopoulos May 13 at 17:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.