1
$\begingroup$

Let's say I have a likelihood function for a vector X.

I get this as dnorm(X, mean(X), sd(X)

Obviously the MLE will be the mean here.

But let's say I want to compare some other value, like 4, to the MLE. I do dnorm(4, mean(X), sd(X)

Then -2*log(prod(dnorm(X, mean(X), sd(X))/prod(dnorm(4, mean(X), sd(X))) to get the log likelihood ratio.

Since the chi-squared test degrees of freedom for the likelihood ratio statistic is # parameters-#parameters ( zero) or 1 or the same as the t-distribution 1-n (149 for the vector I'm playing with in R, iris$Sepal.Width).

But I can't get the proper p-values with any of the chisq functions in R with any of these degrees of freedom.

Basically, I'm trying to recreate the one sample t-test using the likelihood ratio test. I know that the one sample t-test IS the likelihood ratio test for a mean with unknown variance but I'm trying to understand the math/logic of how you get from the LRT with its use of chi-squared sampling distribution to the t-test. I know the t-test is essentially the wald test, but the wald test evaluates distance on the likelihood function on the horizontal scale, not vertical (see photo). Or should I expect different p-values?

enter image description here

$\endgroup$

1 Answer 1

1
$\begingroup$

Yes, I think you should expect different values. Student's t-test and the chi-squared test have different theoretical assumptions. Student's t-test is exact under the normal assumption. It is a 'true' likelihood ratio test and the uniformly most powerful unbiased test for the mean of the distribution for given $\alpha$. The generalised likelihood ratio test based on the chi-squared test is based on the asymptotic distribution of the log-likelihood function (look up Wilks' theorem). It is not exact since you can never have an infinite sample size, and it does not make a normal assumption.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.