Tutorial Module on Integrals
Tutorial Module on Integrals
In statistics, integrals are used to find the area under a function that lies between two values. If you think about how you found areas of rectangles back in grade school, you should remember that you took the base times the height to find the area (or length times width). Integration is a similar process, except that it is repeated many times - for each position along the function, then limits are taken to make each rectangle very narrow, and the areas are added together to find the total area under the function. When you carry out integration, you won't actually do these steps, but follow certain rules that will quickly find the answer.
In general, when you integrate with respect to x you increase the power of x by 1. For example x dx (dx represents the derivative of the variable x) will integrate to x2/2, x5dx will integrate to x6/6, and so on. Notice that the result is always divided by a constant equal to the new power on the x. In our class, we are going to be working with definite integrals, which means that we are going to be integrating (finding the area) between two specific numeric values.
Let's examine a very simple function: f(x) = x. The graph of f(x) is:
As stated earlier, the integral of f(x)=x is x2/2. If we graph this function we obtain:
Each point on this curve represents the area that is less than that value of x, under the original function. For example 42/2 = 8.
Now, suppose we want to find the area under our original function, f(x)=x, between 3 and 5 (Note: you can easily do this using the area formulas that you learned in school, go ahead and try it).
The integrated function, x2/2, will give the area under the curve that is from the origin (0,0) up to the point at which it is evaluated. So, if it is evaluated at 5, then the area under the function x from (0,0) to a line at 5 is 52/2 or 12.5. However we do not want the area down to the origin, we want it to go from 3 to 5. We can get this by taking the area that is less than 5 and subtract off the area that is less than 3 (see illustration). This is 12.5-32/2 = 8.
The procedure to find a definite integral is to first integrate the function (as described above), then solve it for each of the two values. The final step is to subtract the two results. If we desired to integrate f(x)=3 from 0 to .2 we would do the following:
Notice that after we integrate 3 dx to 3x, there is a right bracket with the .2 above and 0 below. This means we need to evaluate the new function from 0 to .2. The larger of the two values always goes at the top. We then "plug" .2 into the function and subtract from that result the function with 0 "plugged" in.
Another example: Integrate f(x) = x2 between 1 and 2.
Graphically, what we are doing is finding this area:
Example: Integrate the function f(x)=2x+1 from 1 to 4. This function is a sum - to integrate it, integrate each of the parts individually, that is integrate the 2x to 2x2/2 and then the 1 to x, like:
This is how you should treat all sums and differences.
What happens when the variable x has a negative power? It is really the same idea - increase the power of x by one, and divide by a corresponding constant. For example, if we wanted to integrate f(x)=x-2 +2 from .8 to 1 we would do the following:
The one power of x that is not obvious to integrate is x-1 - this integrates to ln(|x|).
Most of the functions that we are going to integrate in this course are fairly simple. One that is a little different that we need to cover is how to integrate ex, a commonly used statistical function. In general, the integral of exdx is ex and the integral of eax dx (where 'a' stands for a constant) is eax/a. Take a look at the next example,
Now, try the following integrals - the solutions are given.
Integrate f(x)=3x2-2x from 1 to 3.
Integrate f(x)=1+e-2x from 2 to 6.
Integrate f(x)=1/4x-2 from 1 to 2.
Here is a summary of the integrals commonly used in statistics, along with another example of each:
Contact Dr. Barnet (firstname.lastname@example.org) for further assistance.