Skip
# Why can't I differentiate this nomal/Guassian distrubution?

As someone who does differentiation all the time, it looks overly pedantic to me — like it was generated by an algorithm rather than a person who truly understood the method. But there's nothing wrong with any of the steps.

posted by Johnny Assay at 7:17 AM on January 18

Post

# Why can't I differentiate this nomal/Guassian distrubution?

January 17, 2014 7:50 AM Subscribe

Have a look here. I'm assured that differentiating 1, with respect to

*x*, gets you 2. Now 2 is - I think, and correct me if I'm wrong - equivalent to 3. The problem is I can't see how 3 is the result of differentiating 1. What's more, an online solver produces something (that looks) very different. Can someone help me out?Step 2 is the derivative. Step 3 is substituting equation 1 into the "N" in equation 2. 2 and 3 are identical, 3 is just a more full solution.

posted by no regrets, coyote at 8:10 AM on January 17

posted by no regrets, coyote at 8:10 AM on January 17

When you differentiate 1, the exponential factor itself is unchanged, because it's an exponential. The only thing that happens is you must multiply by the derivative of what's inside the exponential, due to the chain rule. That derivative is this. (3) is simply (1) times this factor.

The online solver you linked to has produced the same result, but written in a really funny way, splitting the square root into individual factors and writing sqrt(sigma^2) as abs(sigma)--which is

posted by Aquinas at 8:15 AM on January 17

The online solver you linked to has produced the same result, but written in a really funny way, splitting the square root into individual factors and writing sqrt(sigma^2) as abs(sigma)--which is

*technically*the same, but it's a really non-conventional way to write it.posted by Aquinas at 8:15 AM on January 17

You're correct that they're all the same. To see why the online solver and your expression #3 are the same, note the following:

Apologies if my answer is overly pedantic, but I wasn't exactly sure which step you weren't seeing.

posted by Johnny Assay at 8:15 AM on January 17

- √(σ
^{2}) is the same thing as the absolute value of σ (which is written as |σ|. - That means that √2 * √π * |σ| = √2 * √π * √(σ
^{2}) = √(2*π*σ^{2}) = (2*π*σ^{2})^{1/2}. - e
^{whatever}and exp(whatever) are two ways of writing the same thing.

Apologies if my answer is overly pedantic, but I wasn't exactly sure which step you weren't seeing.

posted by Johnny Assay at 8:15 AM on January 17

Your equation 3 has three terms. The first term is the constant factor that also appears in Equation 1, and remains unchanged through differentiation. The second term is the function e^(something), which also appears in the first equation, and remains unchanged via the properties of the generic function e^y under differentiation. Of course, when differentiating e^y with respect to say x, if y is a function of x, you need to use the chain rule. Thus the third term in your equation 3 is the derivative of the (something) with respect to x. (note: strictly speaking, the negative sign at the beginning of the expression comes from the third term, but conventional notation likes to place the negatives at the beginning)

Your equation #2 just takes the first two terms of Equation 3 and rewrites them as N, since together they are equivalent to the original function. The results from both online solver and Wolfram Alpha also appear to be equivalent (although written with slightly different factorizations).

posted by grog at 8:18 AM on January 17

Your equation #2 just takes the first two terms of Equation 3 and rewrites them as N, since together they are equivalent to the original function. The results from both online solver and Wolfram Alpha also appear to be equivalent (although written with slightly different factorizations).

posted by grog at 8:18 AM on January 17

Excellent. Thanks guys. I hadn't understoood that a) the exp was a function of x like any other and b) the minus at the start of 3 originally belonged to its third term. As for the differentiation of that function, does this look sensible?

posted by ed\26h at 4:42 AM on January 18

posted by ed\26h at 4:42 AM on January 18

*As for the differentiation of that function, does this look sensible?*

As someone who does differentiation all the time, it looks overly pedantic to me — like it was generated by an algorithm rather than a person who truly understood the method. But there's nothing wrong with any of the steps.

posted by Johnny Assay at 7:17 AM on January 18

While the answer is correct, I suspect you might be abusing the rules of differentiation. When you differentiate (x-u)^2, you can't just pull the 2 down and call it a day. You have to expand the expression into x^2 - 2ux + u^2 and differentiate each term separately. In this case you get the same answer either way, but that is a coincidence! You could also use the chain rule, and maybe that's what you're doing, but either way your technique is not explicit in your derivation, which makes me think you "got lucky" by misapplying the simpler rule.

posted by grog at 7:41 AM on January 18

posted by grog at 7:41 AM on January 18

For what it's worth, I would differentiate (x-u)^2 as 2(x-u) by using the chain rule (in its most trivial possible form) without making an explicit step for it. But it's good to be sure that the OP understands all the steps of what he's doing.

posted by dfan at 3:53 PM on January 18

posted by dfan at 3:53 PM on January 18

You are not logged in, either login or create an account to post comments

posted by zscore at 8:04 AM on January 17