Integrals and The Fundamental Theorem of Calculus
To compute a p-value, we need to know the area under the shaded part of the probability distribution function. We know that the area under the entire curve equals 1, but what fraction of that area is shaded below?
The area of a rectangle is easy. \(A = bh\)
Curves are harder. We didn’t learn this in geometry!
\(f(x) = x^3 - 2x^2 + 2\). Find area under curve from \(x=0\) to \(x=3\).
\(f(x) = x^3 - 2x^2 + 2\). Find area under curve from \(x=0\) to \(x=3\).
\(f(x) = x^3 - 2x^2 + 2\). Find area under curve from \(x=0\) to \(x=3\).
\(f(x) = x^3 - 2x^2 + 2\). Find area under curve from \(x=0\) to \(x=3\).
\(f(x) = x^3 - 2x^2 + 2\). Find area under curve from \(x=0\) to \(x=3\).
\[\lim_{h \to 0} \sum f(x) \cdot h = \int f(x)dx \]
\(dx\) is an “infinitesimal” (infinitely small value).
So \(\int f(x)dx\) is the area of an infinite number of infinitely skinny rectangles.
If we want the area under a curve between \(a\) and \(b\), we denote it like so:
\[\int_a^b f(x)dx\]
There has to be an easier way to compute the area under a curve than taking the sum of an nearly infinite number of skinny rectangles…
What we want is a function \(F(x)\); let’s call it the area function.
\(F(a)\) gives the area under \(f(x)\) between \(-\infty\) and \(a\).
\(F(b) - F(a)\) gives the area under \(f(x)\) between \(a\) and \(b\).
As \(h\) approaches zero, our skinny rectangles should become a better and better approximation of this area function…
\[f(x) \cdot h = \lim_{h \to 0} F(x+h) - F(x)\]
Divide on both sides by \(h\).
\[f(x) = \lim_{h \to 0} \frac{F(x+h) - F(x)}{h}\]
Hey doesn’t that look familiar?
\(f(x) = F'(x)\). In other words, \(F(x)\) is the antiderivative.
\[\int_a^b f(x)dx = F(b) - F(a)\]
Finding the area under the curve and taking the antiderivative are equivalent operations!
If \(f(x) = x\), find the area under the curve between \(x=0\) and \(x=4\).
If \(f(x) = x\), find the area under the curve between \(x=0\) and \(x=4\).
Use the Fundamental Theorem of Calculus
\[ \int_0^4 f(x)dx = F(4) - F(0) \]
\(F(x) = \frac{1}{2}x^2 + C\)
\(F(4) - F(0) = \frac{1}{2}\cdot4^2 = 8\)
If \(f(x) = x^3 - 2x^2 + 2\), find the area under the curve between \(x=0\) and \(x=3\).
\[\int_0^3 f(x)dx = F(3) - F(0)\]
\(F(x) = \frac{1}{4}x^4 - \frac{2}{3}x^3 + 2x + C\)
\(F(3) - F(0) = \frac{1}{4}3^4 - \frac{2}{3}3^3 + 2(3) - [\frac{1}{4}0^4 - \frac{2}{3}0^3 + 2(0)]\)
\(= 8.25\)
That’s the same answer that we got from the skinny rectangles!