
I show how multivariate integration over a physical object serves as a handy tool for a gentle introduction to multivariate probability theory with continuous variables. This exercise helps to visualise and thus link concepts that at first sight seem distant or even unrelated. The concepts and methods presented are digestible for advanced high school classes and above.
Citation: László Bokor. Conceptual analogy between mass density and probability density – An almost non-technical note[J]. STEM Education, 2024, 4(2): 142-150. doi: 10.3934/steme.2024009
[1] | José Luis Díaz Palencia, Yanko Ordónez Ontiveros . A classroom experience about the application of research-based learning for the teaching of probability in engineering. STEM Education, 2024, 4(2): 127-141. doi: 10.3934/steme.2024008 |
[2] | Tasadduq Imam . Good practices of delivery and teaching leadership for online educators in technical disciplines: A perspective. STEM Education, 2021, 1(2): 92-103. doi: 10.3934/steme.2021007 |
[3] | Tianxin Cai . "My life can be said to form a circle" — An interview with Nobel laureate Professor Chen-Ning Yang. STEM Education, 2023, 3(4): 273-287. doi: 10.3934/steme.2023017 |
[4] | Hafiz Idrus, Suzieleez Syrene Abdul Rahim, Hutkemri Zulnaidi . Conceptual knowledge in area measurement for primary school students: A systematic review. STEM Education, 2022, 2(1): 47-58. doi: 10.3934/steme.2022003 |
[5] | Qiuhui Ren, Thitinant Wareewanich . Research on performance evaluation of higher vocational education informatization based on data envelopment analysis. STEM Education, 2023, 3(3): 230-250. doi: 10.3934/steme.2023014 |
[6] | William Guo . Solving word problems involving triangles and implications on training pre-service mathematics teachers. STEM Education, 2024, 4(3): 263-281. doi: 10.3934/steme.2024016 |
[7] | Inae Jeong, Tanya Evans . Knowledge Organisers for learning: Examples, non-examples and concept maps in university mathematics. STEM Education, 2023, 3(2): 103-129. doi: 10.3934/steme.2023008 |
[8] | Tanya Evans, Sergiy Klymchuk, Priscilla E. L. Murphy, Julia Novak, Jason Stephens, Mike Thomas . Non-routine mathematical problem-solving: Creativity, engagement, and intuition of STEM tertiary students. STEM Education, 2021, 1(4): 256-278. doi: 10.3934/steme.2021017 |
[9] | Andrzej Szymon Borkowski . Experiential learning in the context of BIM. STEM Education, 2023, 3(3): 190-204. doi: 10.3934/steme.2023012 |
[10] | William Guo . Solving problems involving numerical integration (Ⅱ): Modified Simpson's methods for equal intervals of odd numbers. STEM Education, 2023, 3(3): 171-189. doi: 10.3934/steme.2023011 |
I show how multivariate integration over a physical object serves as a handy tool for a gentle introduction to multivariate probability theory with continuous variables. This exercise helps to visualise and thus link concepts that at first sight seem distant or even unrelated. The concepts and methods presented are digestible for advanced high school classes and above.
Integration can be used to derive the mass of non-homogeneous objects if the structure is not too complex. Such an exercise, however, is not only useful in engineering, but can also be a very illustrative, tangible way of introducing multivariate probability theory with continuous variables. It seems logical to start with the three-dimensional case, since this is what we encounter every day, and thus what we can easily relate to.
Take a non-homogeneous cube with an edge of a meters. Suppose that its density (ρ) depends on the sum of the shortest distances from the three faces meeting at a given vertex. Thus, placing the cube into a Cartesian coordinate system where the origin is that particular vertex (Figure 1), the density can be expressed as the sum of the spatial coordinates, 1
ρ(x,y,z)=(x+y+z)kgm4. | (1) |
It follows that the density of the large cube is a spectrum between 0kg/m3 and 3akg/m3. Since the equation x+y+z=j∈R+m defines a hyperplane, the cube consists of a continuum of parallel cross-sections (slices). Practically speaking, each slice is a set of points for which the sums of the coordinates are equal (Figure 2).
Question 1: What is the mass of the small cube with an edge of a/2 meters and its relation to the mass of the large cube?
If the material were homogeneous, the answer would be straightforward. The volume of the small cube is a3/8m3, which should be multiplied by the density of the material to get the mass. In our case, however, the density is in not a constant but a linear function of x,y,z. Triple integration comes to our rescue.
In this process, the object is scanned properly along each dimension. Since we are dealing with cubes that have three edges on the axes of the coordinate system, we have an easy job: The limits of integration, i.e. the lower and upper bounds of the scan are simply the origin and the edge length in each dimension. That is, the mass of the small cube is (substituting Equation 1)2
∫a20∫a20∫a20ρ(x,y,z)dzdydx=∫a20∫a20∫a20(x+y+z)dzdydx=∫a20∫a20[xz+yz+z22]a20dydx=∫a20∫a20(a2x+a2y+a28)dydx=∫a20[a2xy+a4y2+a28y]a20dx=∫a20(a24x+a38)dx=[a28x2+a38x]a20=a432+a416=3a432kg. | (2) |
The mass is calculated in the same way for the large cube:
∫a0∫a0∫a0ρ(x,y,z)dzdydx=∫a0∫a0∫a0(x+y+z)dzdydx=∫a0∫a0[xz+yz+z22]a0dydx=∫a0∫a0(ax+ay+a22)dydx=∫a0[axy+a2y2+a22y]a0dx=∫a0(a2x+a3)dx=[a22x2+a3x]a0=a42+a4=3a42kg. | (3) |
Table 1 summarises our answer to Question 1.
Small cube | Large cube | Ratio | |
Homogeneous* | 3a48kg | 3a4kg | 18 |
Non-homogeneous | 3a432kg | 3a42kg | 116 |
*ρ=3akg/m3 (i.e., the spectral maximum of the non-homogenous) is assumed. |
Of a homogeneous object and its non-homogenous lookalike, the one with the lower average density is the lighter. Since the density of the homogeneous is assumed to be equal to the spectral maximum of the non-homogeneous, it is obvious why the homogeneous is the heavier.
Overall, for complex structures, it is usually necessary to go beyond simple geometric formulae and use integration to calculate the mass. Depending on the shape of the surface and also the density structure, other coordinate systems may be more useful. For example, in the spherical coordinate system, the three coordinates of a point P are the radial distance (i.e., the length of the line segment OP), the azimuthal angle (measured between the x-axis and OP's projected line segment on the xy-plane) and the zenith angle (measured between the z-axis and OP). With a concrete example, the point (a,a,a) in our Cartesian coordinate system would be the point (a√3,π/4,π/4) in a spherical coordinate system assuming identical axes, where the two 45° angles are in radians. Without going into the details, this alone suggests that for a non-homogeneous sphere, the radial and angular scans under the spherical coordinate system (with more obvious limits of integration) may be more appropriate than the scans along the axes under the Cartesian coordinate system.
The above concept can be readily applied to probability calculations. Let us suppose that a source emits sinusoidal pulses for which all their characteristics (amplitude, wavelength, speed) are random variables. Assume that each variable can take a value between 0 and a in their own unit of measurement, and that a pulse is more likely to occur if the value of any of its properties is greater.3 Assuming direct proportionality with proportionality constant 1 for each variable and, for simplicity, taking the values without the units of measurement, it means
f(x,y,z)=x+y+z, | (4) |
where x, y and z are the values for amplitude, wavelength and speed, respectively.4 Thus, we know the ranges (0 to a for each), we know the occurrence density of the triplets (defined by function f), and so we know the set of all possible outcomes of our random experiment, i.e., the sample space (S).5 This abstract space can be imagined as if it were a real space. That is, x, y, and z can be thought of as "spatial" coordinates and the function f as the descriptor of "mass" density.
Question 2: What is the probability that the next pulse emitted will have amplitude and wavelength of a/2 meters or less and speed of a/2 m/s or less?
Actually, we have already solved this puzzle. The set of outcomes defined in Question 2 is a so-called event (E), therefore the probability in question is (recall Table 1)
Pr(E)=ES="Mass"ofsmallcube"Mass"oflargecube=3a4323a42=116, | (5) |
where Pr is a function called probability measure that maps all events to a real number between 0 and 1, i.e., Pr:Event→[0,1]. That is, the domain of this function is a collection of sets.
For example, let us take two events whose union gives the sample space: The one that we have already defined (E), and its complement set (EC), where all three variables are greater than a/2 (in their own unit of measurement). Then, the domain consists of these two disjoint events which the probability measure maps to 1/16 and 15/16 (recall Equation 5), plus the trivial events, the empty set (∅) and the sample space (S), which it maps to 0 and 1.6 Note that non-trivial events are not necessarily defined as disjoints. The point is that all outcomes should be covered, i.e., the union of non-trivial events should be the sample space. Empty set can be, for example, an elementary event, meaning an event having only a single outcome (e.g., "Each variable equals a/2"). By geometric analogy, a point has no extent and hence no mass, i.e. the numerator in Equation 5 and so the probability will be zero (Pr:∅→0).
Recall that the "mass" of the large cube is 3a4/2. Thus, with a:=4√2/3, our non-homogenous structure of the large cube represents not only an occurrence density, but also a probability density: It integrates to 1 just like the probability density function (PDF) of a normal (Gaussian) or any other absolutely continuous probability distribution.7 Practically, as the "mass" of the sample space is 1, it means that the "mass" of an event is also the probability of the event (e.g., Pr(E)="Mass"ofsmallcube/1).
Thus, in this case, Equation 4 is a three-variable joint PDF. A three-variable PDF has three marginal PDFs. The marginal PDF shows the probability distribution of a variable considering all related value pairs of the remaining two variables. For example, it shows the probability distribution of amplitude considering all related pairs of wavelength and speed. Formally, the marginal PDF of amplitude is (using the expression a2x+a3 obtained in Equation 3 after the integration with respect to z and y, and substituting a=4√2/3)
fAMP(x)=x√23+4√(23)3. | (6) |
Question 3: What is the probability that the next pulse emitted will have amplitude of a/2 meters or less?
To answer this question, we need to integrate fAMP(x) from 0 to 4√2/3/2 (i.e., halfway). Visually, the integration of this function can be also thought of as an underlying cross-section scan of the large cube along the desired segment of the x-axis. That is, the "mass" of the ABCDEFGO cuboid in Figure 3 and the size of the shaded area in Figure 4 are exactly the same, namely the probability we want to find.
The cumulative distribution function (CDF) simply shows the integrated "mass" of the PDF from the minimum value of the random variable to a specific value of the random variable, i.e., the probability that the random variable is smaller than the specific value. As for amplitude, the event is amplitude≤x, and so the related probability is Pr(amplitude≤x). It logically follows that the CDF goes from 0 to 1 as x increases from its minimum value. Formally, the marginal CDF of amplitude is (using Equation 6)
FAMP(x)=∫x0fAMP(t)dt=∫x0(t√23+4√(23)3)dt=x22√23+x4√(23)3≡F(4√23,4√23,x)=∫4√230∫4√230∫x0f(t,y,z)dzdydt, | (7) |
where the expressions after sign ≡ recalls the underlying content highlighted in Figure 3. The specific value from Question 3 is x=4√2/3/2, so substituting this into Equation 7 gives the probability sought.
To conclude this section, let us invoke our old acquaintance, the small cube. The probability of the event it represents (here: "All variables are 4√2/3/2 or less in their own unit of measurement") is, of course, already known. Notice, however, that since it is located at the origin (i.e., at the minimum values of the variables), the probability can be expressed by the joint CDF,
F(4√232,4√232,4√232)=116. | (8) |
Let us return to the general concept of "small cube / large cube" with a>0. The concept can be easily generalized to higher (or lower) dimensions. For example, if the duration of a pulse varies, this new dimension can be added to our sample space. Assuming a range of 0 to a seconds, the sample space becomes a tesseract, i.e., a 4-dimensional hypercube.
Let w, x, y, and z denote the values (without the units of measurement) for duration, amplitude, wavelength and speed, respectively. Suppose that, in the occurrence density function, the duration also has the same proportionality as the other addends. Thus, the sample space is (denoting dimension in parenthesis)
S(4)={v=(w,x,y,z)∈R4|0<w≤a0<x≤a0<y≤a0<z≤a}, | (9) |
whereas the occurrence density function is f(4)(w,x,y,z)=w+x+y+z. Using the result of Equation 3, the "mass" of such an object is
∫∫∫∫S(4)f(4)(w,x,y,z)dzdydxdw=∫a0∫a0∫a0∫a0(w+x+y+z)dzdydxdw=∫a03a42dw+∫a0∫a0∫a0∫a0wdzdydxdw=[3a42w]a0+[a32w2]a0=3a52+a52=2a5. | (10) |
The event in which the duration is a/2 seconds or less, in addition to the other three analogous conditions, is
E(4)={v=(w,x,y,z)∈R4|0<w≤a/20<x≤a/20<y≤a/20<z≤a/2}, | (11) |
and so its "mass", using the result of Equation 2, is
∫∫∫∫E(4)f(4)(w,x,y,z)dzdydxdw=∫a20∫a20∫a20∫a20(w+x+y+z)dzdydxdw=∫a203a432dw+∫a20∫a20∫a20∫a20wdzdydxdw=[3a432w]a20+[a316w2]a20=3a564+a564=a516, | (12) |
and so the probability of such an event is
Pr(E(4))=E(4)S(4)=a5162a5=132. | (13) |
Notice that the probability of our 4-dimensional event (see Equation 13) is only half of the probability of our 3-dimensional event (see Equation 5). It is easy to see that the probabilities of events defined along similar patterns dwarf as the dimension increases. Assuming an occurrence density of 1, for simplicity, the limit is
limn→∞E(n)S(n)=limn→∞(ak)nan=limn→∞1kn=0. | (14) |
where n∈N denotes the dimension and k>1 is a constant.
Note that, in this context, the shape of the sample space and the event is not irrelevant. Think of a homogeneous spherical sample space and a cubical event with radius (r) and edge (l) of a "metres" and identical center of symmetry. It follows that E(3)cube(l=a)⊂S(3)sphere(r=a) as the body diagonal of the cube is smaller than the diameter of the sphere (a√3<2a). As n goes to infinity, however, their ratio also goes to infinity,
limn→∞E(n)cube(l=a)S(n)sphere(r=a)=limn→∞anan√πn/Γ(n2+1)=limn→∞Γ(n2+1)√πn=∞↯, | (15) |
where Γ denotes the gamma function.8 That is, beyond a certain point, E(n)cube(l=a)⊄S(n)sphere(r=a) is inevitable, which relation makes no sense.
I proposed an approach for those who prefer visualisation to abstraction when they first encounter a more complex subject such as multivariate probability theory with continuous variables. Once the link is established through a three-dimensional physical example, one could easily move towards abstraction. In fact, geometry as a complement can help to understand several algebraic concepts. Adventurous readers with a deeper interest in geometric probability should delve into the books of, for example, Solomon [3], Klain and Rota [4], or Mathai [5].
The author declares that he did not use Artificial Intelligence (AI) tools in the creation of this article.
The author thanks the anonymous reviewers for their helpful comments.
The author declares that there is no conflict of interest to disclose.
The author declares that there was no human participation in this article and therefore ethics approval and informed consent were not required.
1 Note that the unit of measurement of the variables is meter, and so m⋅kg/m4=kg/m3.
2 Only power rule is applied: ∫xndx=xn+1/(n+1)+c. Note that the constant cancels out for a definite integral. For simplicity, the units of measurement were omitted during the integration. However, notice that, at the end, the meters would be to the fourth power, which together with the factor kg/m4 of the density function is m4⋅kg/m4=kg.
3 This is just an arbitrary example with no underlying physical content.
4 If the function were defined for the values with units of measurement, it would be f(x,y,z)=x/m+y/m+z⋅s/m similar to Equation 1.
5 Note that, in a continuous space, a single point (triplet) has no mass and hence no density, but the very small environment around it has mass and hence density.
6 This collection {∅,E,EC,S} is a so-called σ-algebra on S. The trio of sample space, σ-algebra, and probability measure is called the probability space.
7 The Cantor distribution is a notable example of a continuous (but not absolutely continuous) distribution without a PDF. For a geometric discussion of this interesting distribution, see Presnell [1].
8 For an in-depth discussion of the interesting properties of n-sphere's volume (e.g., besides its asymptotic nullity, its non-monotonicity to n), see Smith and Vamanamurthy [2].
[1] |
Presnell, B., A Geometric Derivation of the Cantor Distribution. The American Statistician, 2022, 76(1): 73‒77. https://doi.org/10.1080/00031305.2021.1905062 doi: 10.1080/00031305.2021.1905062
![]() |
[2] |
Smith, D.J., Vamanamurthy, M.K., How Small Is a Unit Ball? Mathematics Magazine, 1989, 62(2): 101‒107. https://doi.org/10.1080/0025570X.1989.11977419 doi: 10.1080/0025570X.1989.11977419
![]() |
[3] | Solomon, H., Geometric Probability – CBMS-NSF Regional Conference Series in Applied Mathematics No. 28, 1978, Society for Industrial and Applied Mathematics. |
[4] | Klain, D.A., Rota, G-C., Introduction to Geometric Probability, 1997, Cambridge University Press. |
[5] | Mathai, A.M., An Introduction to Geometrical Probability: Distributional Aspects with Applications, 1999, CRC Press. |
Small cube | Large cube | Ratio | |
Homogeneous* | 3a48kg | 3a4kg | 18 |
Non-homogeneous | 3a432kg | 3a42kg | 116 |
*ρ=3akg/m3 (i.e., the spectral maximum of the non-homogenous) is assumed. |