Probability of 3 numbers chosen between 0 and 10 being within 1 of each other

229 Views Asked by At

I was trying to find the probability that 3 real numbers uniformly chosen from 0 to 10 are within 1 of each other (the largest number minus the smallest number is at most 1).

I tried using geometric probability, and I got a region that looks like what you would get if you put one vertex of a unit cube at the origin (and orient the edges such that they line up with the positive axes), and move the corner at the origin from (0,0,0) to (9,9,9) (is this region correct?). I calculated the volume by finding the area of the one of the faces of the cube (which is 1), and multiplying it by the distance it moved (which is 9). Since there are three of these squares, the volume is 27. I then add this to the volume of the cube, which results in 28. The total volume is 10^3 = 1000, so the probability is 28/1000 = 7/250.

Is this correct? Any feedback would be greatly appreciated.

Thanks!

3

There are 3 best solutions below

4
On

I agree that choosing uniformly at random 3 integers between 0 and 10 is equivalent to choosing a point in the cube (0,0,0) (10,10,10). The 3 numbers belonging to a range of size 1 does not give a simple volume easy to compute. The volume is generated by a translation of the unit cube along the global diagonal of the larger cube. This volume is not as trivial as you seem to think. It is not generated by the translation of the face of a cube along the global diagonal. The perspective is such that the object is way more complex. The object has 6 side faces and a hexagonal based pyramid. The vertices of the pyramid base are not even all of the same length.

The probability you are looking for can be computed like this:

$$\frac 1{10^3} \int_{0}^{10}\int_{max(0,x-1)}^{min(10,x+1)}\int_{max(0,x-1,y-1)}^{min(10,x+1,y+1)} dzdydx $$

You could derive a similar integral to compute the volume of the object we describe previously and it will be as if not more complex.

0
On

We have to determine the volume of a particular subset $B\subset[0,10]^3$. Your computation of this volume is audacious, but absolutely correct! Here is another way:

The set $A$ of the $(x_1,x_2,x_3)\in B$ satisfying $x_1<x_2<x_3$ comprises a sixth of this volume. In order to determine ${\rm vol}(A)$ we let $x_2=:\lambda\in[0,10]$, and then have to find the area $a(\lambda)$ of the set $A_\lambda$ in the $(x_1,x_3)$-plane determined by the conditions $$x_1<\lambda,\quad x_3>\lambda, \quad x_3-x_1<1\ .$$ Inspecting a figure shows the following: For $\lambda<1$ and $9<\lambda<10$ the set $A_\lambda$ is a trapezoid, and for $1<\lambda<9$ the set $A_\lambda$ is a triangle of area ${1\over2}$. It follows that $${\rm vol}(A)=2\int_0^1 a(\lambda)\>d\lambda +8\cdot{1\over2}=\int_0^1\lambda{(1-\lambda)+1\over2}\>d\lambda +4={28\over6}\ .$$ In this way the probability $p$ we are looking for becomes $$p={{\rm vol}(B)\over 10^3}={6\,{\rm vol}(A)\over 10^3}=0.028\ .$$

0
On

A point $P$ having those three random numbers $(x,y,z)$ as coordinates lies in the cube $[0,10]\times[0,10]\times[0,10]$. If the distance between the coordinates is less than $1$, then $P$ must also lie in the intersection of the three regions comprised between parallel planes $x-y=\pm1$, $y-z=\pm1$ and $z-x=\pm1$, which is a hexagonal infinite prism. Diagram below shows that part of the prism which is inside the cube.

To evaluate the volume of that region, notice that it can be decomposed into three equal slanted prisms with a unit square as base and height 9 (one of them is shown in red in the diagram), plus a unit cube having $(10,10,10)$ as a vertex. The volume of the region is thus $28$ and the probability is $28/1000$.