Let \(k\) be the number of parameters in the model then AIC is given by

$$ AIC = 2k - 2 log(\hat {L}), $$

where \( \hat{L} \) denotes the maximised value of the likelihood function. Then, we select the model with the minimum value of AIC. 

We note that although AIC ranks the best models among various candidate models, it tells us nothing about the absolute quality of the models. Therefore, to evaluate the precision of a model, further statistical tests should be performed.