# Standard error for intercept only model in probit regression

How do you calculate the standard error for intercept for an intercept only probit regression model?

I was expecting the formula to be:

1 / sqrt(N * p * (1 - p))

where N = no. of obs, p = mean(y).

>>> ybar = np.mean(y)
>>> N = y.shape
>>> ybar
0.3175
>>> N
400
>>> 1/np.sqrt(N * ybar * (1 - ybar))
0.1074105181583031


But the numbers do not add up for statsmodels.

df = pd.read_csv("http://www.ats.ucla.edu/stat/data/binary.csv")
x = pd.Series( * 400, index=y.index)
import statsmodels.api as sm
probitmodel = sm.Probit(y, x)
result = probitmodel.fit()
result.summary()
<class 'statsmodels.iolib.summary.Summary'>
"""
Probit Regression Results
==============================================================================
Dep. Variable:                  admit   No. Observations:                  400
Model:                         Probit   Df Residuals:                      399
Method:                           MLE   Df Model:                            0
Date:                Wed, 21 Apr 2019   Pseudo R-squ.:                   0.000
Time:                        17:40:00   Log-Likelihood:                -249.99
converged:                       True   LL-Null:                       -249.99
LLR p-value:                       nan
==============================================================================
coef    std err          z      P>|z|      [95.0% Conf. Int.]
------------------------------------------------------------------------------
const         -0.4747      0.065     -7.270      0.000        -0.603    -0.347
==============================================================================


1 / np.sqrt(N * norm.pdf(b0) ** 2 / (ybar * (1 - ybar)))


where b0=norm.ppf(ybar) is the estimate of the probit intercept.

For logit link following the same method, the answer comes out to be:

1 / sqrt(N * p * (1 - p))