# Largest or smallest confidence interval at $\pi_{i}=0.5$ in logistic regression

A binomial GLM can be written as:

$Y_{i}\thicksim B(1,\pi_{i})$

$\mathrm{E}(Y_{i})=\pi_{i}$ and $\mathrm{var}(Y_{i})=\pi_{i}\times(1-\pi_{i})$

$\mathrm{logit}(\pi_{i})=\mathrm{intercept} + \beta \times treatment_{i}$

1) If we consider a simplest model without any covariates but only an intercept. Given a number of sample $n$, the standard error of the expected probability $\pi_{i}$ (of outcome) would be $$\sqrt{\frac{\pi_{i}\times(1-\pi_{i})}{n}}$$.

This indicates that when $\pi_{i}=0.5$, we obtain the highest SE, thus largest confidence interval.

2) On the other hand, if we apply a logistic regression (maybe with a continuous variable $x$) and plot the predicted probability with its confidence interval against $x$. Does it mean that at $\pi_{i}=0.5$ the confidence interval is always the widest, or narrowest? (see an example figure I copied from internet). I have an impression that the prediction curve often shows a narrow band in the middle. 3) It is often said that when the number of events and non-events are equal, the logistic regression performs the best. This statement is often addressed to avoid complete separation problem when using maximum likelihood estimation in the logistic regression. Can it also be linked to statement 1) and 2)?

• I don't understand your plot. What is Bid? How is it related to an intercept only model? – Erik May 26 '15 at 12:43
• By the way, my off-hand idea is that you don't account for the fact that logistic regression models log-odds instead of success probabilities. If you properly transform one into the other, binomial estimation and the logistic regression give the same result. – Erik May 26 '15 at 13:02
• @Erik. I took a pic from internet and now I find another one, I am not sure if my statement 2) is correct. I come up with this question, because very often a see a prediction curve with a narrow band in the middle and I assume that's around $\pi=0.5$. – tiantianchen May 26 '15 at 13:16