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?

  • $\begingroup$ this looks like homework. you should tag as self-study (did it for you) $\endgroup$
    – seanv507
    Aug 29 at 7:27
  • 1
    $\begingroup$ your first line is wrong. don't jump to the least squares, write out the log likelihood that you want to maximise. $\endgroup$
    – seanv507
    Aug 29 at 7:30
  • $\begingroup$ 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 $\endgroup$
    – R_Squared
    Aug 29 at 11:30
  • $\begingroup$ 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 $\endgroup$
    – R_Squared
    Aug 29 at 11:35
  • $\begingroup$ Does anyone have any idea? $\endgroup$
    – R_Squared
    Sep 14 at 10:13

1 Answer 1


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


Your Answer

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

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