Logistic regression: Difference between revisions

Content deleted Content added
As a latent-variable model: Minus sign spacing appropriate to a unary rather than binary operation symbol depends on having nothing before the minus sign.
Line 708:
which will always be positive or zero. The reason for this choice is that not only is the deviance a good measure of the goodness of fit, it is also approximately chi-squared distributed, with the approximation improving as the number of data points (''K'') increases, becoming exactly chi-square distributed in the limit of an infinite number of data points. As in the case of linear regression, we may use this fact to estimate the probability that a random set of data points will give a better fit than the fit obtained by the proposed model, and so have an estimate how significantly the model is improved by including the ''x<sub>k</sub>'' data points in the proposed model.
 
For the simple model of student test scores described above, the maximum value of the log-likelihood of the null model is <math>\hat{\ell}_\varphi= -13.8629...\ldots</math> The maximum value of the log-likelihood for the simple model is <math>\hat{\ell}=-8.02988...\ldots</math> so that the deviance is <math>D = 2(\hat{\ell}-\hat{\ell}_\varphi)=11.6661...\ldots</math>
 
Using the [[chi-squared test]] of significance, the integral of the [[chi-squared distribution]] with one degree of freedom from 11.6661... to infinity is equal to 0.00063649...