2
$\begingroup$

I have a large sample (a vector) $\mathbf{x}$ from a random variable $X\sim N(\mu,\sigma^2)$. The variance $\sigma^2$ is known, but the expectation $\mu$ is unknown. I would like to test the null hypothesis $H_0\colon \ \mu\leq 0$ against the alternative $H_1\colon \ \mu>0$ using a likelihood ratio (LR) test. The test statistic is $$ \text{LR}=-2\ln\frac{L(\mathbf{x}\mid\tilde\mu,\sigma^2)}{L(\mathbf{x}\mid\hat\mu,\sigma^2)}. $$ where $\tilde\mu$ is the estimate of $\mu$ under $H_0$ (thus $\tilde\mu\leq 0$) and $\hat\mu$ is the estimate of $\mu$ under $H_0 \cup H_1$ (thus $\hat\mu\in R$).

I expected the asymptotic distribution of $\text{LR}$ under $H_0$ to be $\chi^2(1)$ but I am getting only zeros in a simulation below.

Questions: Why is that? Is my simulation wrong? Or is the test statistic not supposed to have the $\chi^2(1)$ asymptotic distribution under $H_0$, and if so, why?


(Related question: "Failing to obtain $\chi^2(1)$ asymptotic distribution under $H_0$ in a likelihood ratio test: example 1")


n=1e3   # sample size
sigma=1 # standard deviation of X
m=3e3   # number of simulation runs
mu=-1   # particular instance of the null hypothesis used in the simulation

logL0s=logL1s=logLRs=rep(NA,m)
for(i in 1:m){
 set.seed(i); x=rnorm(m,mean=mu,sd=sigma)
 logL0=sum(log( dnorm(x,mean=min(0,mean(x)),sd=sigma) ))
 logL1=sum(log( dnorm(x,mean=max(0,mean(x)),sd=sigma) ))
 logLR =-2*(logL0-max(logL0,logL1)) # the -2*ln(LR) statistic from this simulation run
 logL0s[i]=logL0; logL1s[i]=logL1; logLRs[i]=logLR
}

summary(logLRs)
$\endgroup$
2
  • $\begingroup$ Can you please edit your question to put the links to related questions in the body of the question? If a discussion with various upvoted comments ensues, then your initial comment may be hidden later on. $\endgroup$ Jan 27, 2021 at 16:33
  • $\begingroup$ I won't say that I know more than you :), but I'd say that if you as the OP know about related questions, I think you should just put them in the body of your question - after all, they are related to it. $\endgroup$ Jan 27, 2021 at 16:37

1 Answer 1

2
$\begingroup$

The LR doesn't have a $\chi^2_1$ distribution for this test.

The basic setting where there's a $\chi^2_1$ null distribution is when the null hypothesis is a subspace of the alternative hypothesis, with one less dimension. A key part of the setup is that every point in the null has points in the alternative at arbitrarily small distances away.

In a case like this one, where some points in the null are a long way from the alternative, the sampling distribution will depend on where in the null hypothesis you are.

$\endgroup$
2
  • $\begingroup$ Thank you! I was suspecting something like this. Would you have any reference that explains the intuition in a bit more detail? Or if we look at "What are the regularity conditions for Likelihood Ratio test", which condition in particular is being violated? I looked at the list before but could not quite identify the relevant item. $\endgroup$ Jan 27, 2021 at 20:55
  • $\begingroup$ It's usually thought of as part of the question, not as a regularity condition. That is, those lists are regularity conditions for testing the null hypothesis $\theta=\theta_0$ (or perhaps $(\theta,\eta)=(\theta_0,eta)$ when there are other parameters. For example, the second comment on that linked answer specifies it's a test of $\theta=\theta_0$. $\endgroup$ Jan 28, 2021 at 2:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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