# Correct definition of number of parameters $K$ in Akaike Information Criterion

What is the term $K$ in Akaike information criterion? The AIC is defined as $2K-2log(L)$, where $L$ is the maximized value of the likelihood function for the estimated model.

On the internet, I found three competing candidates:

1. Number of parameters + error term (for simple linear one-predictor model, intercept, slope and error term: $K=3$)
2. Number of parameters (for the linear one-predictor model, intercept and slope: $K=2$)
3. Number of predictors (for the linear one-predictor model, the slope: $K=1$)

Which one is correct and why?

The error term is not a parameter which you're independently trying to adjust, but the intercept is (e.g. your slope might be zero and the data best fit by a horizontal line). The correct answer for your simple univariate regression is $K=2$ (intercept and slope).
• "The error term is not a parameter which you're independently trying to adjust, but the intercept is (e.g. your data might best be fit by a horizontal line)." I think you mean "...fit by a line through the origin," since omitting the intercept term constrains the intercept to be zero, but yields a line with slope $\beta$. – Sycorax Sep 26 '13 at 13:34
• The point I was trying to make was that the intercept is an independently adjusted parameter. That is, you could have a slope of zero, and an intercept of, say, one. This would draw a straight line through the data. Or you can start with a slope $\beta$ and then adjust the intercept until you get the best fit. The point is that the intercept should be counted. – Cristian Dima Sep 26 '13 at 13:38