# Integrals as Probabilities

Firstly, I'm not a mathematician as will become evident in a quick moment. I was pondering some maths the other day and had an interesting thought: If you encased an integrable function over some range in a primitive with an easily computable area, the probability that a random point within said primitive also exists below that function's curve, scaled by the area of the primitive, is the indefinite integral of the function over that domain.

So let's say I want to "solve" for $\pi$. Exploiting a circle's symmetry, I can define $\pi$ as:

$$4 \int_{0}^{1}\sqrt{1-x^2} \,dx$$

Which I can "encase" in the unit square. Since the area of the unit square is 1, $\pi$ is just 4 * the probability that a point chosen at random within the unit square is below the quarter-circle's arc.

I'm sure this is well known, and so my questions are:

• What is this called?

• Is there anything significant about this--for instance, is the relationship between the integral and the encasing object of interest--or is it just another way of phrasing indefinite integrals?

Sorry if this is painfully elementary!

-
–  Shai Covo Feb 3 '11 at 16:09
Don't be so hard on yourself, Drew! If you discovered this on your own, you definitely show signs of thinking like a mathematician. :-) –  Hans Lundmark Feb 3 '11 at 16:22
@Shai Covo: Thanks, that looks helpful –  Drew Cummins Feb 3 '11 at 16:23
This doesn't really answer your question, but here is an interesting (and famous) similar problem en.wikipedia.org/wiki/Buffon's_needle –  Brian Feb 3 '11 at 18:45

No, this is a very good observation! It is the basis of the modern definition of probability, where all probabilities are essentially defined as integrals. Your particular observation about $\pi$ being closely related to the probability that a point lands in a circle is also very good, and actually leads to a probabilistic algorithm to compute $\pi$ (an example of a Monte Carlo method). The subject in which probabilities are studied as integrals is, broadly speaking, called measure theory.

Monte Carlo methods are also used to numerically compute other integrals; this is called Monte Carlo integration.

Now that you have discovered this wonderful fact, here are some interesting exercises. I recommend that you try to draw the relevant regions when $n = 2, 3$ before tackling the general case.

• Choose $n$ numbers randomly in the interval $[0, 1]$. What is the probability that the first number you chose is the biggest one?
• Choose $n$ numbers randomly in the interval $[0, 1]$. What is the probability that they are in decreasing order?
• Choose $n$ numbers randomly in the interval $[0, 1]$. What is the probability that their sum is less than $1$?
-
Awesome answer, with homework! I'll get back to you. –  Drew Cummins Feb 3 '11 at 17:31
Don't know if I've ever done a proper probability problem before! I found the first probability to be $\frac{1}{n}$ and the 2nd and 3rd to both be $\frac{1}{n!}$. Interestingly, the average number of randomly chosen numbers in the interval $[0,1]$ whose sum is less than 1 seems to be $e$. I'm guessing that probably means the 2nd probability tends toward the same average. My shallow mathematical background prevents me from making a profound connection--any further insight would be appreciated. Thanks! –  Drew Cummins Feb 4 '11 at 15:57
@Drew: yes, and your observation is also spot on. Follow-up question: can you see how to get the answers to the first two questions without computing any integrals? (Can you see how this tells you what the integrals have to be?) –  Qiaochu Yuan Feb 4 '11 at 16:01