Quantcast
Channel: Why is everything based on likelihoods even though likelihoods are so small? - Cross Validated
Viewing all articles
Browse latest Browse all 6

Answer by Durden for Why is everything based on likelihoods even though likelihoods are so small?

$
0
0

First, as others have mentioned, we usually work with the logarithm of the likelihood function, for various mathematical and computational reasons.

Second, since the likelihood function depends on the data, it is convenient to transform it to a function with standardized maxima (see Pickles 1986).$$R(\theta) = \frac{L(\theta)}{L(\theta^\ast)} \quad \text{where } \theta^\ast = \arg \max_{\theta} L(\theta)$$

set.seed(123)random_numbers <- rnorm(50, mean = 5, sd = 5)max_likelihood <- prod(dnorm(random_numbers, mean = 5, sd = 5))nonmax_likelihood <- rep(0,1000)j <- 1 for (k in seq(0,10,length.out=1000)) {  nonmax_likelihood[j] <- prod(dnorm(random_numbers, mean=k, sd=5))  j <- j+1}par(mfrow = c(1, 2))plot(seq(0,10,length.out=1000),nonmax_likelihood/max_likelihood,      xlab="Mean", ylab="Relative likelihood")plot(seq(0,10,length.out=1000),log(nonmax_likelihood) - log(max_likelihood),     xlab="Mean", ylab="Relative log-likelihood")

enter image description here


Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>