I'm trying to take the partial derivative of −n∑i=1(xi−μ)22σ2 with respect to μ. The correct answer is n∑i=1xi−μσ2. It looks like some u-substitution work where u=xi−μ and du=−1 so it's n∑i=1u22σ2du which ends up being n∑i=12(xi−μ)2σ2×(−1)
it all cancels out but why does this still work when inside of a summation?
Usually when I do derivatives of summations, I have to incorporate the n into the equation to rid myself of the summation operator. For example,
n∏i=11√2πσ2=(1√2πσ2)n
The summation operator throws me off when it involves derivatives and the only way it makes sense to me is to restructure the format so that it doesn't include the summation operator. How can this be reorganized so the derivative makes sense?
Answer
The derivative and thus the partial derivative are linear operators, i.e. for a sum of functions fi and a∈R:∂∂x(∑a⋅fi)=a⋅∑∂fi∂x
So in your case we have
∂∂μ(−n∑i=1(xi−μ)22σ2)=−12σ2n∑i=1∂∂μ((xi−μ)2)=−12σ2n∑i=1−2(xi−μ) =1σ2n∑i=1xi−μ
Which is exactly what you have as a result. Further, I don't know what you mean by the u-substitution. This is plain application of the chain rule. Moreover, what you have here is not correct:
n∑i=11√2πσ2≠(1√2πσ2)n
Summation does not result in exponentiation, but just multiplication. You should have gotten:
n∑i=11√2πσ2=n√2πσ2
No comments:
Post a Comment