2

I was curious about how to derive the derivative of an average. More specifically:

$$\mu = \frac{1}{m}\sum_{i = 1}^m x_i$$

$$\frac{\partial \mu}{\partial x_i} =\ ?$$

My derivation is as follows:

$$ \begin{align} \mu & = \frac{1}{m}(x_1 + x_2 + \cdots + x_m) \\ \partial \mu / \partial x_i& = \frac{1}{m}(1 + 1+\dots + 1) \\ & = 1 \end{align} $$

but I'm not sure if this is correct...

Sean
  • 1,487

1 Answers1

7

You're close. However, you made one mistake: Your partial differentiation wasn't partial. All variables except $x_i$ should disappear (become $0$). For instance, for three variables, I'm sure you know that $$ \frac{\partial}{\partial x}(x+y+z)=1+0+0 $$ rather than $1+1+1$. Calling them $x_1,x_2,x_3$ rather than $x,y,z$ doesn't change this.

Arthur
  • 199,419
  • 1
    Thanks for the quick answer. Then does that mean for the case that I've showed, since we're differentiating w.r.t. a specific single $x_i$, rather than $1/m \times (1 + 1 + \cdots + 1)$ it would be $1/m \times 1$, right? – Sean Aug 15 '19 at 05:45
  • 2
    @Seankala Exactly! And I'm sure you've seen this in action: if you increase one of the variables by $1$, how much does the average change? – Arthur Aug 15 '19 at 05:45