Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Derivation of the Antiderivative of the Gaussian Distribution

  1. Dec 29, 2012 #1
    I'm in a high school pre-calculus class and a statistics class. For the latter, we are given z-tables for some of our tests. I don't like these z-tables.

    Thus, I decided that a more direct approach (fundamental theorem of calculus) would be more accurate and, more importantly, more fun. My teacher kind of looked at the work and said "looks right to me". I think it's right (empirically it works and Wolfram says so), but I have no basis to see if I made a mistake or not (I'm basically just using my dad's old copy of Calculus and Analytic Geometry by Edwards and Penney and random resources on the internet).

    To be clear, I'm looking for if I made a mistake in the derivation, not the answer. I tend to be good manipulating numbers in an erroneous way but still getting the right answer, but I want to make sure that I can do this correctly before I move on to something more difficult.

    [itex]\int \frac{e^{-\frac{1}{2}(\frac{x-\mu}{\sigma})^2}}{\sigma \sqrt{2\pi}} dx = \frac{1}{\sigma \sqrt{2\pi}}\int e^{\frac{-z^2}{2}} dx[/itex]

    Letting z = (x-μ)/σ (fittingly), it follows that [itex]dz = \frac{dx}{\sigma} \Rightarrow dx = \sigma dz[/itex].

    ∴[itex]\frac{1}{\sigma \sqrt{2\pi}}\int e^{\frac{-z^2}{2}} dx = \frac{1}{\sqrt{2\pi}} \int e^{-\frac{z^2}{2}} dz = \frac{1}{\sqrt{2\pi}} \int \sqrt{e^{-z^2}} dz = \frac{1}{\sqrt{\pi}} \int_{0}^{z/\sqrt{2}} e^{-t^2} dt[/itex].

    Finally, we get [itex]\displaystyle \frac{1}{\sqrt{\pi}} \int_{0}^{(\frac{x-\mu}{\sigma\sqrt{2}})} e^{-t^2} dt + C= \int \frac{e^{-\frac{1}{2}(\frac{x-\mu}{\sigma})^2}}{\sigma \sqrt{2\pi}} dx[/itex].
    Last edited: Dec 29, 2012
  2. jcsd
  3. Dec 30, 2012 #2


    User Avatar
    Homework Helper

    That is right, it is just a substitution, what are you deriving? To effect the integration you will need one of the two functions

    [tex]\Phi(x) = \frac{1}{\sqrt{2\pi}} \int_{-\infty}^x e^{-t^2/2} \, dt [/tex]

    [tex]\text{erf}(x)=\frac{2}{\sqrt{\pi}}\int_0^x e^{-t^2} \text{ dt}[/tex]

    related by

    [tex]\Phi (x) = \frac{1}{2}+ \frac{1}{2} \operatorname{erf} \left(x/ \sqrt{2}\right)[/tex]

    If your calculator or computer software does not have this built in you will need to compute it. Wikipedia has some suggestion for approximation. You will also need to be able to calculate the inverse.

  4. Dec 30, 2012 #3
    I think I put that in the title...:wink:

    The point is to use the fundamental theorem of calculus to get the area, rather than the table, as I'm sure you know from...

    However, the antiderivative is also useful for calculating things like the area between 2 points on a normal curve. For example, the I was able to show that the empirical rule (I think some people call it the "68-95-99.7 rule") is true because you can calculate [itex]\displaystyle \int_{\mu-n\sigma}^{\mu+n\sigma} \frac{e^{-\frac{1}{2}(\frac{x-\mu}{\sigma})^2}}{\sigma \sqrt{2\pi}} \ dx = \frac{1}{\sqrt{\pi}} \left(\int_{0}^{n/\sqrt{2}} e^{-t^2} \ dt + \int_{-n/\sqrt{2}}^{0} e^{-t^2} \ dt\right)[/itex]. I switched the sign of the difference, simply because I like having the lower bound of the integral be less than the upper bound rather than calculating a negative area, but I think you get the point.
  5. Dec 30, 2012 #4


    User Avatar
    Homework Helper

    You have just written down the Antiderivative of the Gaussian Distribution, not derived anything. To do anything with it you either need to introduce new functions and evaluate them (and likely their inverses).

    The empirical rule is

    If you look up erf in a table you have gained nothing. If you use a calculator of computer you gain some digits and flexibility, but it is just as much of a magic black box. Do you propose to calculate it by hand or write your own program?
  6. Dec 31, 2012 #5
    Merriam-Webster defines derivation as "a sequence of statements (as in logic or mathematics) showing that a result is a necessary consequence of previously accepted statements". Though, you are correct, I have not "derived" anything in the sense that the word is normally (heh, normally) used.

    Yes. It is. In other words, area between -σ and σ is approximately 0.682689, area between -2σ and 2σ is approximately 0.954499, etc. Was there something I missed?

    I intend to program it into my calculator. I'll probably come to some clever conclusion about it later.
  7. Dec 31, 2012 #6


    User Avatar
    Homework Helper

    ^What calculator are you using? Several such as
    HP 50g
    TI-84 Plus
    Casio cfx-9850G
    Have such a function built in, many others have it as an app or download.

    If you make your own and are happy with limitations of real numbers and 10^-7 accuracy the Zelen & Severo (1964) linked above is simple. Also 26.2.17 here http://people.math.sfu.ca/~cbm/aands/page_932.htm
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Derivation of the Antiderivative of the Gaussian Distribution