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:
- 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$
- 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?
self-study
(did it for you) $\endgroup$