Likelihood ratio test for normal random variables - algebraic question

174 Views Asked by At

I'm doing a likelihood ratio test for a random variable $X_i$ for $i = 1, ... 25$. The null hypothesis is $H_0: \mu = 0$ vs $H_a: \mu = 1.5$

While calculating the likelihood ratio, I got stumped with how my book arrived with this. It's really an algebraic simplification that I can't seem to figure out.

enter image description here

Initially I simplified the expression in a different manner where the $\bar X$ term was cancelled out, but for my particular problem, I need to have the $\bar X$ term to calculate the rejection region for $H_0$.

2

There are 2 best solutions below

0
On

Note that $$\sum^n(x_i - a)^2 = \sum^n(x_i^2 -2ax_i + a^2) =\sum^n x_i^2 -2a\sum^n x_i + \sum^n a^2$$ $$=\sum^n x_i^2 - 2a\cdot n\overline{X} + na^2$$ Subtracting two such sums (taking $a$ to be $\mu_A$ and $\mu_0$ in them) gives $$\sum^n(x_i - \mu_A)^2 -\sum^n(x_i - \mu_0)^2$$ $$=\left(\sum^n x_i^2 - 2\mu_A\cdot n\overline{X} + n\mu_A^2\right)- \left(\sum^n x_i^2 - 2\mu_0\cdot n\overline{X} + n\mu_0^2\right)$$ $$=2n\overline{X}(\mu_0-\mu_A) + n\mu_A^2 - n\mu_0^2 $$

You should be able to see the rest from this.

COMMENT: I think there may be a missing set of parentheses in the last line of the book's answer. It looks like $\frac{1}{2\sigma^2}$ should be applied to everything, not just the first part. Or possibly the parentheses are wrong in the first line--but something is amiss in either case. Along the same lines, I see they goofed the italicising of "$\exp$" as well since that doesn't match either.

0
On

The simplification becomes trivial if you recognize that these are pairwise differences of squares: $$\sum_{i=1}^n (x_i - \mu_A)^2 - \sum_{i=1}^n (x_i - \mu_0)^2 = \sum_{i=1}^n \left((x_i - \mu_A)^2 - (x_i - \mu_0)^2\right),$$ and the summand factors as $$\left((x_i - \mu_A) - (x_i - \mu_0)\right)\left((x_i - \mu_A) + (x_i - \mu_0)\right),$$ which in turn simplifies to $$(\mu_0 - \mu_A)(2x_i - (\mu_0 + \mu_A)).$$ Now we can expand this back: $$\sum_{i=1}^n (\mu_0 - \mu_A)(2x_i - (\mu_0 + \mu_A)) = n\left(2(\mu_0 - \mu_A) \bar X + \mu_A^2 - \mu_0^2\right).$$ The $2\sigma^2$ in the denominator should be common; the given result is not quite correct. That is to say, you should have $$LR = \exp\left(\frac{n}{2\sigma^2} \left(2 (\mu_0 - \mu_A) \bar X + \mu_A^2 - \mu_0^2 \right)\right).$$