# maximum likelihood estimator of regression coefficient

Consider the following simple linear regression model:

$$y_i = (-1)^i \cdot \beta_1 + \epsilon_i \quad \text{where} \quad i = 1, \ldots, n$$

here $$\epsilon_i$$'s are i.i.d. $$N(\beta_0, 1) \text{ random variables. If } \beta_0 = 2\beta_1, = \beta, \text{ we need to find } \hat{\beta}, \text{ the maximum likelihood estimator of } \beta, \text{ E}(\hat{\beta}) \text{ and } \text{V}(\hat{\beta})$$

My approach:

For finding maximum likelihood estimator of $$\beta$$ we need to minimize the $$\sum_{i=1}^{n} \left( y_i - (-1)^i \frac{\beta}{2} \right)^2$$

Derivating the above expression with respect to $$\beta$$ and equating it to zero, i got $$\sum_{i=1}^{n} \left( (-1)^i y_i - \beta (-1)^i \right) = 0$$ which then comes to two results:

1. when n = odd:

$$\sum_{i=1}^{n} (-1)^i y_i - 1\cdot \beta = 0$$ $$\implies \beta = \sum_{i=1}^{n} (-1)^i y_i$$

1. when n = even:

$$\sum_{i=1}^{n} (-1)^i y_i - 0\cdot\beta = 0$$ $$\implies \beta$$ can be anything

I am new to regression so I am not sure is this approach correct? If not what is the correct approach to solve such problems?

• this looks like homework. you should tag as self-study (did it for you) Aug 29 at 7:27
• your first line is wrong. don't jump to the least squares, write out the log likelihood that you want to maximise. Aug 29 at 7:30
• ohkay, I tried the log-likelihood method and got the term to be maximized as $-\frac{1}{2} \sum_{i=1}^{n} \left( y_i - (-1)^i \frac{\beta}{2} - \beta \right)^2$. @seanv507 Aug 29 at 11:30
• but I am getting stuck at this expression $\sum_{i=1}^{n} y_i \left( 1 + \frac{(-1)^i}{2} \right) - \sum_{i=1}^{n} \beta \left( \frac{3}{2} + (-1)^i \right)$ = 0 Aug 29 at 11:35
• Does anyone have any idea? Sep 14 at 10:13

you can view this as repeated measurements at $$x_\text{odd}=-1$$ and $$x_\text{even}=1$$. I would rewrite your expression splitting sums over even and odd and using $$n_\text{even}$$, $$n_\text{odd}$$ and $$\bar{y_\text{even}}=\frac{1}{n_\text{even}}\sum_{i=1}^{n_\text{even}}y_{2i}$$, and $$\bar{y_\text{odd}}$$
so you want to minimise $$\frac{1}{2}\sum_{i=1}^{n_o}(y_{2i-1}-\frac{1}{2}\beta)^2 + \frac{1}{2}\sum_{i=1}^{n_e}(y_{2i}-\frac{3}{2}\beta)^2$$
and then use some term for the means over the odd/even $$y_i$$s