Rather than mentioning what I have not been doing, I will talk about what very little I have accomplished over the past four days! (I will save the "whinging" for another post.)
Double integration was taught in my first year as part of the calculus and vectors module. Initially I had difficulty understanding it but when it came to revising, things made a little more sense. I actually was able to evaluate a double integral last year - whatever the region of integration might be! (I had to know this to use Green's/Stoke's Theorems).
However during the first few stats lectures this semester, when double integrals were evaluated, my mind didn't register what was happening. Somewhere a part of me knew what to do, but I blindly assumed that it will all come back to me in due course. (Note: just because we have to evaluate double integrals in stats doesn't make it any nicer). I stupidly left it at that i.e. assumed that my last years knowledge of how to answer questions with double integrals would return magically. Clutching at straws I suppose.
Evaluating a double integral is "easy" (one could say). Well if the limits have been given and everything is hunky dory, then hopefully I can do the integration. What I can't do though is set the integral up. I had forgotten how to choose the limits of integration, which turns out to be important!
So why not make this a big deal. Over the past four days... yes four days I lie to you, I have been bravely (without a doubt!) struggling with mastering the art of finding limits for double integrals. A mouthful isn't it? Having (I hope) mastered this successfully, I proceed to kick myself with a certain venom! WHY couldn't I have done this before my stats coursework test? WHY?! Had I done so, I wouldn't have done as badly in my coursework! (Bad relative to the other tests and my own marker.) I got one question wrong due to my stupidity* but the rest of the marks were lost on evaluating double integrals. Hence why I will now attempt to solve the question here!
Question
The joint probability density function (pdf) of the random variables X and Y is given by:

a) Find the marginal pdf of X.
SolutionThe marginal pdf of X is found by

. (The limits in this case are symbolic and will be determined by the region of integration).
Firstly we will (roughly!) sketch the region in order to deduce the limits:

The shaded in part (i.e. the yellow region) is the region of our integration. The integral tells us that we will be integrating with respect to y. So now to determine the limits, we draw a vertical rectangle (or line) through the shaded region on the diagram:

The red spot is where our pen should be. Unfortunately I can't give a concise mathematical explanation as to why we do this, but it is something along the lines that
x is fixed and we want to see how
y varies within this region. So we move upwards from the red spot until we hit the line
y=0. We have to pass this line to enter the region and so it is the lower limit for this integral. Now that we are in the region we continue travelling along this green line until we hit the line
y=
x. We could carry on moving upwards until we hit the line
y=1, but then we will be out of the region (and not answering the question). Hence when we hit the line
y=
x we stop and choose that to be our upper limit.
This gives us the integral

, which is left as an exercise for the reader! (I love saying that, but hopefully you get that this integrates to 2
x!)
The question however asks for the pdf, and simply writing 2
x is wrong. The correct answer (by elimination) then is:
I didn't choose that option which is why it must be correct, for mine was wrong! I don't understand the reasoning for choosing

, but then again somethings will never be understood. (I had "guessed" the other option with region

which was incorrect).
The question doesn't ask for the marginal pdf of Y, but I will mention it here. This time the integral will be

(with symbolic limits).
The region for the integration is the same, however to find the limits we now draw a horizontal line on the graph through the shaded region:

So we start at the big red spot and move towards the right on the green line. To enter the region we have to "hit" the line
y=x first, which becomes the lower limit in the integral. Then we merrily continue our journey along the line until wham, we hit the line
x=1 -- the upper limit. Thus our integral is

. (Once again left as an exercise!)
Now something is telling me that I might have written something horribly wrong! Call it a gut feeling, but have I got this all wrong? Do I need to call it a day, and find myself a nice farm? If I knew what the actual answer was then I would probably be more confident. Hence why I think you should take this post lightly! (I cant believe I am blogging about probability -- maybe that's why I am feeling slightly queasy and unsure about what has been typed? By the way, I realise that I mostly complain about stats but that includes probability. My module is called probability and statistics but it is easier to write just "stats". Maybe I should write "stats inc." to mean probability is included! I dislike both for the record.)
This post hasn't really been about double integrals, but nevertheless the method of finding the limits is similar. If the region we are integrating over is rectangular (i.e

) then the integral is much nicer. It is only when the region is non-rectangular that things get messy. I think to validate my post title I will now do a proper double integral over a non-rectangular region! (And in future I will try to write the posts first and then choose the title).
ExampleEvaluate the volume under the surface given by
f(
x,
y) =
x^2+ 0.5
y, over the region bounded by the curves
y = 2
x and y =
x^2.
SolutionBefore we proceed a (dodgy) diagram is needed (with the region of integration shaded). Always sketch the region first.

At this stage of the game we are faced with a choice -- do we want to integrate with respect to
x first or with respect to
y? I will choose to integrate with respect to (w.r.t)
y first, but if you choose to do otherwise, the answer should still be the same.
Since we have chosen to integrate w.r.t
y first, we will be drawing a vertical line through the yellow region as in the example above. (I remember the direction of the line because the y-axis is vertical so the line should be vertical. If you choose to integrate w.r.t
x first then draw a horizontal line.) Having drawn the line (on your paper!) we see that to enter the region we have to hit the curve
y=x^2 first -- the lower limit; and to exit the region we have to hit the line
y=2
x -- the upper limit. So we now have our limits for the inner integral w.r.t.
y.
For the outer integral (with respect to
x), we need the points of intersection of the two curves i.e. the solutions to the equation 2
x =
x^2. Solving this gives us the limits x=0 and x=2 (I think we are meant to aim to make the outer limits as constants.) Thus our integral becomes:

.
Since I am faffing about as it is, here is the solution to the above double integral:
As you can see, once set up the integration isn't too bad. It is easy to make a mistake, but last year when integrating w.r.t
y, I sometimes wrote c instead of x as to avoid confusion. And then when I integrated w.r.t
x, I wrote
x again. (But with practice this stopped happening). The main thing I feel, is to have the correct limits. Actually I didn't get the stats (inc.) question above wrong because of my inability to integrate, but because I didn't understand the stats behind the pdf! (Although that can't be said for the other questions...)
I have been wanting to post a somewhat mathematical post for sometime; but boy does it take a while to dig them out. (This was meant to be my 30minutes break from marginal distributions, but has become a 2 hour break!) As you might have gathered, I am trying to revise stats even though my first exam is PDEs and vector calculus. I am thinking that I will try not to blog for a week and see how it goes. If I do blog then it means I have been revising which is a good thing! (You might need to read that sentence again). Many thanks to
Steve for the cool looking LaTeX images in this blog, and thanks to paint for the horrible graphs!
Now to some nightmares about stats and probability.
EDIT: I think the title "limits of integrals" would be more suited to this post...
PS: This is a reminder to post about my dream. It was really weird and had the formula for the sum of numbers from 1 to n in it and my old school. Not really that weird maybe, because I have been thinking about that formula recently... Oh and if I do post this week the posts most likely will be short!