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.

Can someone give me more information about statement 2) and how to link 1) and 2)?
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)?
 A: Some pointers that I hope adress your question:

*

*It is true that when estimating the success probability for a simple binomial distribution the standard error is smallest when the probability is 0.5. Since it's really the same thing this includes intercept-only logistic regression, but note that logistic regression usually operates on the log-odds scale so you will need to transform the predictions to success probabilities.

*Consider simple linear regression. The confidence bands grow wider as you begin to extrapolate outside the range of data observed. For example, if you built a model using subjects age 30-40 your error bands will be larger for age = 60 than for age = 35. That is because you extrapolate and is caused by correlation of the intercept and slope. See Wikipedia.

When you consider a logistic regression with a predictor then you get a combination of both effects. For example, your plot shows the narrowest band at a bit below 0.5. That is due to the distribution of AGE.
