# Picking a discrete set in a continuous probability distribution

maybe this a stupid question, however I could not solve it properly. What´s the general method to solve problems relating the probability of a given event in a set of discrete events picked from a non-discrete set of events?

For instance, given $n$ points belonging to $[0, 1]$, what´s the probability of there exists 3 points $a < b < c$ (among the $n$ points choosed) such that the equation $ax^2 +bx + c = 0$ has real solutions?

Or, given 4 points in a square, what´s the probability of they form a convex polygon with area ranging from $A_1$ to $A_2$ and perimeter ranging from $p_1$ to $p_2$?

-
It's too vast a question to answer. The only correct answer is: follow a course in probability theory. You need to learn about random variables and sampling. – Raskolnikov May 7 '13 at 15:51
OK, but for the first one, I think you didn't formulate it properly. As it stands, the only answer for which $ax^2+bx+c=0$ holds is when $a=b=c=0$ and you've excluded that case. besides $a,b,c$ are not points but numbers. For the second problem, it depends on how you pick your points in the square. – Raskolnikov May 7 '13 at 15:55
As Raskolnikov said, this question is way too broad. If you're interested in these two specific questions, please post them separately as individual questions. The second one by itself is already a lot of work. If you do repost it, I suggest that you provide some motivation why you're interested in this particular question. – joriki May 7 '13 at 15:59
OK, but you certainly didn't reproduce the first question correctly. What is $x$? For the second question, I suppose you need to sample points uniformly from the square and then we can start to answer it. – Raskolnikov May 7 '13 at 16:00
I'm surprised to hear both that someone posing exercises thought that these two problems belong in the same exercise and that they thought the second problem was suitable as an exercise in a test. I'll be keen to see any simple solutions of the second problem; from my experience with geometric probability problems, I would have expected the second problem to be a complete nightmare. – joriki May 7 '13 at 16:19

For the first question, note that $ax^2+bx+c=0$ has real solutions if $b^2\ge 4ac$.

The following will investigate the case $n=3$ exactly and give lower estimates for bigger $n$:

If $0<x_1<x_2<\ldots <x_n<1$ are our random numbers, we investigate the case $(a,b,c)=(x_1,x_{n-1},x_n)$ further as that is the constellation where we expect $b$ to be as relatively close to $c$ as possible and at the same time $a$ as small as possible. In other words, if any triple with $c=x_n$ exists, then replacing $b$ with $x_{n-1}$ gives us another such triple and so does replacing $a$ with $x_1$. For $0<r<1$, the probability that $x_n<r$ equals $r^n$ (the probability that $n$ numbers are $<r$). If we know $x_n$, then $x_1, \ldots, x_{n-1}$ are uniformly distributed in $[0,x_n]$. Therefore, $$\tag1P(x_{n-1}<rx_n)=r^{n-1}.$$ Similarly, $$\tag2P(x_1<sx_{n-1})=1-(1-s)^{n-2}.$$
Now with independent(!) random variables $R=\frac{x_{n-1}}{x_n}=\frac bc$ and $S=\frac{x_1}{x_{n-1}}=\frac ab$, we want to calculate $P(R\ge 4S)$. With the densitiy function for $R$ obtained from $(1)$, this turns out to be \tag3\begin{align} &\int_0^1\left(1-\left(1-\frac r4\right)^{n-2}\right)\cdot (n-1)r^{n-2}\,\mathrm dr.\end{align}

If $n=3$, then $(3)$ gives the exact answer $\frac16$.

If $n=4$, then $(3)$ evaluates to $\frac{27}{80}$, but gives only a lower estimate for the probability asked for (we are missing the cases where $x_3^2<4x_1x_4$, but $x_2^2>4x_1x_3$). By numerical experimentation, the correct answer seems to be $\approx 0.352$ (compared to $\frac{27}{80}=0.3375$).

If $n=5$, then $(3)$ evaluates to $\frac{271}{560}\approx0.48$ as lower bound (numerical estimation for correct value: $0.505$) and for $n>19$ the result of $(3)$ is $>0.99$.

A better approximation in case $n>3$ may be obtained by investigating three independent random variables $R_1=\frac{x_{n-1}}{x_n}$, $R_2=\frac{x_{n-2}}{x_{n-1}}$, $S=\frac{x_1}{x_{n-2}}$ and find $P(R_2>4S\lor R_1>4R_2S)$ by integration.

-