Excuse my naive question, have been searching around a lot!

How could I properly write the formula for the AIC estimation in a Latex Article?

Thank you!

enter image description here

  • 3
    $\mathrm{AIC}=2k-2\ln\bigl(\hat{L}\bigr)$ should do it, albeit with \widehat, it would probably look better.
    – Bernard
    Aug 20, 2021 at 22:30
  • Thank you Bernard!!
    – eirini
    Aug 20, 2021 at 22:59

2 Answers 2


It looks like you obtained the screenshot of the formula you're interested in replicating from the AIC Wikipedia page. If you click on that page's "edit" button, you'll find the following math-ml expression that underlies the screenshot you posted:

<math>\mathrm{AIC} \, = \, 2k - 2\ln(\hat L)</math>

Translating this code to "pure" LaTeX, you might write

\begin{math} \mathrm{AIC} = 2k - 2\ln(\hat L) \end{math}

or, more succinctly,

$\mathrm{AIC} = 2k - 2\ln(\hat L)$

where $ is a TeX-special character that's used to initiate and terminate inline math mode.

As @Bernard has noted in a comment, using \widehat instead of \hat would make the formula look even better, especially if one dispenses with the unnecessary parentheses.

enter image description here

\documentclass{article} % or some other suitable document class
$\mathrm{AIC} = 2k - 2\ln\widehat{L}$
  • I'm not sure that \widehat is better.
    – egreg
    Aug 21, 2021 at 21:02

You should write something like:

     = 2 k - 2 \ln \widehat{L}

The \mathrm{...} bit gives roman (upright, spaced as text, not a sequence of three variables).

  • 1
    AIC is an acronym for "Akaike Information Criterion" and is named for the Japanese statistician Hirotsugu Akaike, who first proposed it as a model selection criterion roughly 50 years ago. The AIC is is computed as the sum of (i) the (negative of) the model likelihood (\widehat{L}) and (ii) a linear penalty term (2k), the number of parameters used in the estimating the model. The AIC is not an operator in the normal sense of the word. The upshot? Just write \mathrm{AIC}.
    – Mico
    Aug 21, 2021 at 0:49
  • 1
    @Mico, learned some (La)TeX today. Thanks!
    – vonbrand
    Aug 21, 2021 at 13:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .