# Maximum Likelihood estimator from sample distribution $N(0,\sigma^2x_i^2)$

Let independent random variable $Y_1,...,Y_n$ have respective distributions $N(0,\sigma^2x_i^2)$, where $i=1,2,...,n$ are known constants such that $x_i\neq 0$ for all $i=1,2,...,n$. Find the maximum likelihood estimator of $\hat{\sigma}^2$, of the unknown parameter $\sigma^2$.

My attempt:

The likelihood function is $L(\sigma^2)=\prod_{i=1}^n\frac{1}{\sqrt{2\pi\sigma^2x_i^2}}exp(-\frac{y_i}{2\sigma^2x_i^2})=(2\pi\sigma^2)^{-\frac{n}{2}}\prod_{i=1}^n\frac{1}{x_i}\prod_{i=1}^nexp(-\frac{y_i}{2\sigma^2x_i^2})$. Since the $x_i$ are constants, I'll replace $\prod_{i=1}^n\frac{1}{x_i}$ with the constant $K$. Now I'm not exactly sure how I can rewrite the $\prod_{i=1}^nexp(-\frac{y_i}{2\sigma^2x_i^2})$ term in a useful way. I thought of maybe saying $\sum_i\frac{y_i}{2\sigma^2x_i^2}=\frac{\sum_i(\frac{y_i}{x_i})\prod_ix_i}{2\sigma^2\prod_ix_i}=\frac{\sum_i(\frac{y_i}{x_i})}{2\sigma^2}$, so then $L(\sigma^2)=(2\pi\sigma^2)^{-\frac{n}{2}}Kexp(-\frac{\sum_i(\frac{y_i}{x_i})}{2\sigma^2})$. Then I would maximize $ln(L(\sigma^2))=-\frac{n}{2}ln(2\pi\sigma^2)+ln(K)-\frac{\sum_i(\frac{y_i}{x_i})}{2\sigma^2}.$

This doesn't seem right though. Can anyone point out where I might have made a mistake or how I should go about this?

• $\displaystyle \left(\frac{Y_1}{x_1},\frac{Y_2}{x_2}, \cdots, \frac{Y_n}{x_n}\right)$ is a set of $n$ independent $N(0,\sigma^2)$ random variables, and your book probably has a full description of the maximum-likelihood estimator of $\sigma^2$ in terms of the $\frac{Y_i}{x_i}$. So, apply this known solution to the scaled observations $\frac{y_i}{x_i}, 1 \leq i \leq n$. Oct 8 '14 at 2:11

I think you miss square of $y_i$ in the likelihood. Then the Likelihood is $\Pi_{i=1}^n\frac{1}{\sqrt{2\pi x_i^2 \sigma^2}}e^{-\frac{y_i^2}{2x_i^2 \sigma^2}}=e^{-\sum_{i=1}^n\frac{y_i^2}{2x_i^2 \sigma^2}} \Pi_{i=1}^n\frac{1}{\sqrt{2\pi x_i^2 \sigma^2}}$. Taking log-likelihood and differentiating w.r.t. $\sigma$, you get $$\sum_{i=1}^n\frac{y_i^2}{\sigma^3 x_i^2}-\frac{n}{\sigma}=0$$.
From this, you get $\sigma^2=\frac{\sum_{i=1}^n\frac{y_i^2}{x_i^2}}{n}$, which seems familiar...
1. the density function $f_i$ of $Y_i \sim \mathcal{N}(0, \sigma^2 x_i^2)$ is $$f_i (y_i) = \frac{1}{\sqrt{2 \pi \sigma^2 x_i^2}} \mathrm{exp}\left\{ - \frac{1}{2} \frac{(y_i - 0)^2}{\sigma^2 x_i^2} \right\}$$
2. e.g. $x_1 = -1$ and $x_2 = \dots = x_n = 1$, so $$\prod_{i=1}^n \frac{1}{\sqrt{x_i^2}} = \frac{1}{1} \cdot \dots \cdot \frac{1}{1} = 1$$ but $$\prod_{i=1}^n \frac{1}{x_i} = \frac{1}{-1} \cdot \frac{1}{1} \cdot \dots \cdot \frac{1}{1} = -1$$