1
$\begingroup$

We are learning matrix calculus in class. This is really new for me and I am trying to get extra practice by going through old assignments. One of the questions asks to find the derivative of the function below with respect to $\beta$ and if possible to find the value of the elements of $\beta$ that maximize the function. After taking logs to simplify the original function, I took the partial with respect to $\beta$. I thought my derivative was correct, but when I set the partial equal to zero, I am unable to solve for $\beta$. So either my derivative is wrong or I don't know enough to solve for $\beta$, or it's a trick question and there is no analytical expression for $\beta$. A more advanced student suggested that it can probably only be solved by numerical methods but I was wondering if anyone here can tell me if my derivative is correct and whether or not it's possible to solve for $\beta$?

$$ x_{1} = \begin{pmatrix} a\\ b\\ \end{pmatrix}\quad x_{2} = \begin{pmatrix} c\\ d\\ \end{pmatrix}\quad \beta = \begin{pmatrix} \beta_{1}\\ \beta_{2}\\ \end{pmatrix}\quad Y = \begin{pmatrix} y_{1}\\ y_{2}\\ \end{pmatrix}\quad $$

$$ f(x_{1},x_{2},y_{1},y_{2},\beta) = \frac{1}{x_{1}'\beta}\exp\left\{\frac{-y_{1}}{x_{1}'\beta}\right\}\frac{1}{x_{2}'\beta}\exp\left\{\frac{-y_{2}}{x_{2}'\beta}\right\} $$

My answer:

$$ \frac{\partial \ln f}{\partial\beta}=-\frac{1}{x_{1}'\beta}x_{1}-\frac{1}{x_{2}'\beta}x_{2}+\frac{x_{1}y_{1}}{x_{1}'\beta.x_{1}'\beta}+\frac{x_{2}y_{2}}{x_{2}'\beta.x_{2}'\beta}=0 $$

Is this correct and is it possible to solve for $\beta$? If so, how? Thanks!

  • 0
    It seems that in the last equation you've already divided out common factors, so this isn't in fact $\partial f/\partial\beta$?2012-01-17
  • 0
    Well I'm not sure. That's why I'm asking for help. Taking logs of the original function eliminates the exp's - I'm under the impression this is OK since it's just a monotone transformation and so the Beta that maximizes the original function or its log will be the same. I just took the partial from there and got what I posted. I didn't try fiddling with it or try to cancel things out until I tried solving for Beta. So maybe my derivative is wrong?2012-01-17
  • 0
    I'm not sure I understand correctly. Are you saying that what you wrote as "$\partial f/\partial\beta$" is in fact your result for $\partial\log f/\partial\beta$?2012-01-17
  • 0
    Oh sorry, it was my fault I didn't indicate that I was taking the derivative of the transformed function as you pointed out. I made a correction in my original post. Thank you.2012-01-17
  • 0
    Two more small mistakes: You've got $y_1$ twice in $f$ where the second one should presumably be $y_2$, and the last two terms in the derivative have the wrong sign.2012-01-17
  • 0
    Thanks again - I changed y1 to y2 in the second exp term and actually both y1 and y2 were supposed to be negative in the original function and that's why the corresponding terms in my derivative are positive. I got too caught up in learning how to write in LaTeX - my first time!2012-01-17
  • 0
    It's pretty good considering it's your first time :-) Note that all the common functions like $\ln$ and $\exp$ have commands like `\ln` and `\exp` that make them come out as function names rather than italicized juxtaposed variables. If you ever need one of these for a function that isn't predefined, such as $\operatorname{Tr}$, you can get it using `\operatorname{Tr}`.2012-01-17
  • 0
    Thanks for the guidance. I think I can assume linear independence. I thought I understood what linear independence means but maybe not enough since I'm not sure what you mean by "the coefficients have to vanish individually," and then the leap to two linear equations. If you're still monitoring, would you be able to elaborate a bit more for me? Hefty thanks.2012-01-18
  • 0
    Two vectors $x_1$ and $x_2$ are by definition linearly independent if $c_1x_1+c_2x_2=0$ implies $c_1=c_2=0$; that's what I meant by "the coefficients have to vanish individually". Since you can write your equation in that form, it follows that the coefficients multiplying $x_1$ and $x_2$ must both be zero; this is what gives you two equations; the fact that they're linear in $x_i'\beta$ will become apparent when you write them down and cancel common factors. Note, however, that this cancellation is only valid if $x_i'\beta\ne0$, and these are precisely the values where the function diverges.2012-01-18

1 Answers 1