**Last updated:** 2017-01-02

**Code version:** 55e11cf8f7785ad926b716fb52e4e87b342f38e1

- Likelihood ratio for

The aim here is to give some simple (somewhat artificial) examples to illustrate the idea of a likelihood ratio, and to mention some pitfalls to be avoided.

Suppose you are throwing a six-sided die with sides marked 1,2,3,4,5 and 6. Consider comparing the models \(M_0\): the die is fair (ie each face has probability 1/6) vs \(M_1\): the die is loaded, and will always land 6.

If we observe a “6” then the likelihood ratio for \(M_1\) is 1/(1/6)=6.

If we observe any other number then the likelihood ratio for \(M_1\) vs \(M_0\) is \(0/(1/6)\) = 0.

Note that LR=0 in the latter case because the data are impossible under \(M_1\). Indeed, \(LR(M_1,M_0)=0\) if and only if the data are impossible under \(M_1\), and so \(LR=0\) means that the data exclude \(M_1\). Note also that in this case the LR for \(M_0\) vs \(M_1\) is infinity. However, in general strong support for \(M_0\) vs \(M_1\) does not imply that \(M_0\) is “true”, or even a good model. It only implies that \(M_0\) is favored over \(M_1\). There could always be other models that explain the data much better than \(M_0\)!

Suppose we toss a coin 100 times, and get 50 Heads and 50 Tails (in some order). If the coin is fair, (ie 50% chance of landing heads independently for each toss) then the probability of any given sequence with 50 heads and 50 tails is \(0.5^{100}\). That is, given these data, the likelihood for the model \(M\) “the coin is fair” is \(0.5^{100}\).

Is this a big likelihood or a small likelihood? The point here is that this is not really a meaningful question. Although the number \(0.5^{100}\) is, in most contexts, “small”, in this context it would be wrong to call this a “small” likelihood. Indeed, the data are entirely consistent with the model!

Don’t focus on likelihoods: focus on likelihood ratios.

Similarly when looking at log-likelihoods, it is the difference between log-likelihoods (ie the log-likelihood ratio) that matters, not the actual log-likelihoods. For example, suppose the log-likelihood (all logs base e here) for model \(M_0\) is -33999445.1 and for model \(M_1\) is -33998325.7. Because both these numbers are very big (in absolute terms) it is tempting the view the difference (`1119.4`

) as not very big relative to these big numbers. But remember that the actual log-likelihoods themselves are irrelevant! It is only the logLR, or the difference in the log-likelihoods, that matters. So here the logLR is `1119.4`

and the data support the model 1 by a factor of more than \(exp(1000)\).

Remember that the likelihood ratio is computed for two different models on the *same data*. It must really be exactly the same data. In the continuous case this means it can’t even be a 1-1 transform of the same data - it has to be the same data.

For example, suppose you observe data \(x_1,\dots,x_n\), and you want to compare the models \(M_0: x_1,\dots,x_n\) are normally distributed vs \(M_1: log(x_1),\dots,\log(x_n)\) are normally distributed. You have to rephrase \(M_1\) in terms of the original \(x_j\): that is \(M_1: x_1,\dots,x_n\) are log-normally distributed.

Here is an extended version of this example.

Consider the tusk example, and suppose now that at marker 1 the DNA assay failed, and so the data are “missing”. How does this impact the LR?

The trick here is to note that “the data are missing” is really an “observation”. The likelihood ratio for an observation is the ratio of the probability of that observation under the two models, so the LR for this marker alone for \(M_S\) vs \(M_F\) is \[LR(M_S,M_F) = \Pr(\text{data missing} | M_S)/\Pr(\text{data missing} | M_F).\]

If the probability of getting missing data is the same for both models then the LR is 1 (and we don’t actually have to worry about what that probability of getting missing data is).

On the other hand, it is conceivable that missing data occurs more commonly in one group than in another, for one reason or another. In this case the LR for a missing observation could be something other than 1. This is called “informative missingness”, and to compute the LR our models would have to explicitly incorporate probabilities for observations to be missing.

`sessionInfo()`

```
R version 3.3.2 (2016-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.5 LTS
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] rmarkdown_1.1
loaded via a namespace (and not attached):
[1] magrittr_1.5 assertthat_0.1 formatR_1.4 htmltools_0.3.5
[5] tools_3.3.2 yaml_2.1.13 tibble_1.2 Rcpp_0.12.7
[9] stringi_1.1.1 knitr_1.14 stringr_1.0.0 digest_0.6.9
[13] gtools_3.5.0 evaluate_0.9
```

This site was created with R Markdown