Constrained Randomistic Variables
Constrained Randomistic Variables
9, 2024-03
Hugo Hernandez
ForsChem Research, 050030 Medellin, Colombia
[email protected]
doi: 10.13140/RG.2.2.12411.73764
Abstract
Randomistic variables integrate the realms of deterministic and random variables. Randomistic
variables are represented by probability distribution functions, and in the case of continuous
variables, also by probability density functions (just like random variables). Any randomistic
variable can be subject to external constraints on its possible values. Thus, the resulting
probability distribution of the constrained variable may be different from the probability
distribution of the original variable. In this report, general expressions for analytically
determining the probability distribution functions (or probability density functions) of
constrained randomistic variables are presented. These expressions are extended to
constraints involving multiple, independent randomistic variables. Several illustrative examples,
with different degrees of difficulty, are included. These examples show that constrained
randomistic variables represent the solution to a wide variety of problems, including algebraic
systems of equations, inequalities, magic squares, etc. Further improvements in analytical and
numerical methods for finding constrained probability functions would be highly desirable.
Keywords
Constraints, Equations, Inequalities, Membership Function, Multivariate, Probability Density,
Probability Distribution, Randomistics, Sets
1. Introduction
The term randomistic represents the integration of the random and deterministic domains [1].
In general, a quantitative randomistic variable can be described by the following expression:
(1.1)
where represents the magnitude of the deterministic term (bias), represents the
magnitude of the pure random term (uncertainty), represents the standard deterministic
Cite as: Hernandez, H. (2024). Constrained Randomistic Variables. ForsChem Research Reports, 9, 2024-
03, 1 - 31. Publication Date: 07/03/2024.
Constrained Randomistic Variables
Hugo Hernandez
ForsChem Research
[email protected]
variable (with mean value and variance , and corresponding to number ), and represents
a type I standard random variable (with mean value and variance ) [1].
( ) ( )
(1.2)
The probability distribution function can also be expressed in terms of a probability density
function ( ( ) ) as follows:
( ) ( )
(1.3)
where represents the difference between and the next possible value of the randomistic
variable. For continuous (or approximately continuous [2]) variables, , and therefore:
( ) ( )
(1.4)
The probability distribution function of real randomistic variables has two important
conditions:
( )
(1.5)
∑ ( )
(1.6)
For real continuous variables, these conditions can be expressed as follows:
( )
(1.7)
∫ ( )
(1.8)
Particularly, the probability distribution function of the standard deterministic variable ( ) can
be expressed as the Dirac measure ( ):
( ) ( ) {
(1.9)
Similarly, the probability density function of the standard deterministic variable ( ) can be
described in terms of Dirac’s delta function ( ) as follows1:
( ) ( ) {
(1.10)
On the other hand, a probability distribution function for any type I standard random variable
( ) must fulfill the following conditions, in addition to Eq. (1.5) and (1.6):
∑ ( )
(1.11)
∑ ( )
(1.12)
Similarly, the probability density function of any type I standard random variable ( ) must fulfill
the following conditions, in addition to Eq. (1.7) and (1.8):
∫ ( )
(1.13)
∫ ( )
(1.14)
Now, considering the change of variable theorem [3], the probability distribution and
probability density functions of a randomistic variable can be expressed in terms of the
probability functions of the corresponding standard deterministic and random variables as
follows2:
( ) ( ) ( ) ( )
(1.15)
( )
( ) ∫ ( ) | |
( )
(1.16)
1
Notice that ( ) ( ) .
2
It is assumed that the standard deterministic ( ) and the standard random ( ) variables are completely
independent from each other.
We may say that a randomistic variable is “known” when the probability distribution function
of the variable is known.
When external constraints are imposed on the possible values of the randomistic variable, the
probability distribution function of the variable may change [4].
For example, let us consider that one or more external constraints are present, such that the
possible values of the variable are now limited to the set , characterized by the following
membership function:
( ) {
(2.1)
The probability that the randomistic variable satisfies the constraint will be given by [4]:
( ) ∑ ( ) ( )
(2.2)
and for continuous variables:
( ) ∫ ( ) ( )
(2.3)
Clearly, the key to finding the probability distribution function of the constrained variable lies in
determining the constraint correction factor for each possible value of the randomistic
variable.
( ) {
(2.6)
Typically, multiple constraints represent joint constraints which must be all simultaneously
fulfilled. In this case, the overall membership function ( ) for the set of constraints can be
determined as follows:
( ) ∏ ( )
(2.7)
representing the intersection of multiple sets of values [4].
Notice that ( ) only when ( ) for . If at least one of the constraints has
a (Boolean) membership function of (zero), then the overall membership function is also
zero.
Nevertheless, certain constraints can be disjunctively imposed on the variable, implying that at
least one of the constraints must be fulfilled. In the case of disjunctive constraints, the overall
membership function can be determined as follows:
( ) ( ( ))
(2.8)
In the case of two disjunctive constraints, the overall membership function can be alternatively
expressed as [4]:
( ) ( ) ( ) ( ) ( )
(2.9)
A constraint simply represents an arbitrary set of values. The most direct way to describe a
constraint is by listing the elements of the set, like for example (considering elements):
{ }
(2.10)
The elements contained by the constraint might be described as the solution of an
equation (equality relation or equality constraint), as follows:
( )
(2.11)
where ( ) represents an arbitrary function of , such that the inverse of the function yields the
elements of the constraint:
( )
{ }
(2.12)
The simplest type of equation is the linear constraint:
( )
(2.13)
In this case, the set comprises only a single value:
{ }
(2.14)
or alternatively,
(2.15)
As an additional example, let us consider the following equality constraint:
( )
(2.16)
The set of values described by the constraint is now:
{ }
(2.17)
alternatively expressed as:
(2.18)
Another type of constraints is described by inequalities. Two basic types of inequalities are
possible:
Less-than inequality ( ):
( )
(2.19)
Greater-than inequality ( ):
( )
(2.20)
However, notice that multiplying both sides of Eq. (2.19) by -1, we obtain:
( )
(2.21)
And we may conclude that the same constraint can be expressed as a less-than equality or a
greater-than equality simply by considering:
( ) ( )
(2.22)
In some cases, multiple constraints can be integrated in a single expression. Some examples
include:
Not equal to ( ):
( ) ( ) ( )
(2.23)
( ) ( ) ( )
(2.24)
Greater than or equal to ( ):
( ) ( ) ( )
(2.25)
Open interval:
( ) ( ) ( )
(2.26)
Closed interval:
( ) ( ) ( )
(2.27)
Half-open intervals:
( ) ( ) ( )
(2.28)
( ) ( ) ( )
(2.29)
In certain cases, it is possible that the constraints imposed on the variable result in an empty
set, as follows:
(2.30)
The corresponding constraint membership function will be:
( )
(2.31)
with constraint set probability (from Eq. 2.2):
( )
(2.32)
( )
Since the calculated constraint correction factor is, for this case, indetermined ( ), the
( )
probability distribution functions of the constrained variable are also indetermined. However,
for practical purposes, let assume the following probability distribution functions3:
( )
(2.33)
( )
(2.34)
It is also important to remark that an empty constraint set is different from a constraint set
with a single value of zero (which is not an empty constraint set).
Let us now assume that the continuous variable is subject to the following constraint:
{ }
(2.35)
where is a constant value.
The corresponding constraint membership function is (from Eq. 2.1):
( ) ( ) {
(2.36)
with constraint probability (Eq. 2.3):
3
Notice however that these functions do not satisfy the conditions given in Eq. (1.6) and (1.8).
( ) ∫ ( ) ( ) ( ) ( )
(2.37)
Now, the probability density function of the constrained variable is (from Eq. 2.5):
( ) ( ) ( )
( ) ( ) ( ) ( ) ( ) {
( ) ( ) ( )
(2.38)
representing the probability density of a deterministic variable having an exact value of . In
other words,
(2.39)
In general, the result shown in Eq. (2.38) is obtained for any arbitrary probability density
function of , as long as ( ) . The case where ( ) results in indetermination,
equivalent to the case of an empty constraint set (Section 2.4).
The most general type of constraint set is the multiple-value set, expressed as follows:
{ }
(2.40)
where is the number of elements in the constraint set .
In this case, each possible value has a membership function to the constraint set :
( ) ∑ ( ) {
(2.41)
The resulting constrained probability distribution function ( ) fulfills:
( )
(2.42)
( )
(2.43)
∑ ( ) ∑ ( )
(2.44)
Assuming that the randomistic variable can be treated as a continuous variable, then the
corresponding probability density function of the constrained variable must fulfill the following
conditions:
( )
(2.45)
( )
(2.46)
∫ ( ) ∑ ( )
(2.47)
The number of elements in the constraint set can be considered finite (discrete) or infinite
(continuous). Of course, for discrete randomistic variables the number of elements in the
constraint can only be discrete.
Particularly in the case of discrete constraint sets, the probability distribution function and the
probability density function can be expressed in terms of Dirac’s functions as follows (from Eq.
2.4, 2.5 and 2.41):
∑ ( ) ( )
( )
∑ ( )
(2.48)
∑ ( ) ( ) ∑ ( ) ( )
( )
∑ ( ) ∑ ( )
(2.49)
For example, the equality constraint given in Eq. (2.11) can be alternatively expressed as
follows:
(( ) ) ( ( ) )
(2.50)
where ( ) indicates the conditional probability of statement given statement .
( ( ) ) ( )
(2.51)
where ( ) is now a function involving probability functions.
On the other hand, the inequality constraint given in Eq. (2.19) will now be expressed as
follows:
( ( ) )
(2.52)
or alternatively,
( ( ) )
(2.53)
Notice that in this case, an inequality constraint is transformed into an equality constraint of
probability functions.
Multiple constraints can also be represented in terms of probability functions. For example, let
us consider two conjunctive constraints expressed as in terms of the randomistic variable as
follows:
( )
( )
(2.54)
Can be expressed as a single constraint in terms of probability functions as follows:
( ( ) ) ( ( ) )
(2.55)
If the constraints considered in Eq. (2.54) were disjunctive, the resulting overall constraint
would be:
( ( ) ) ( ( ) ) ( ( ) ) ( ( ) )
(2.56)
Inequality constraints of probability functions are also possible. For example, the overall
constraint for two disjunctive constraints can alternatively be expressed as follows:
( ( ) ) ( ( ) )
(2.57)
However, when an equivalent equality expression is available, the equality will be preferred.
Up to this point, constraints influencing only a single randomistic variable were considered.
However, in a more general scenario, constraints may involve two or more independent
randomistic variables ( ) simultaneously.
In terms of simple functions of the randomistic variables, we may represent equality and
inequality constraints as follows:
( )
(2.58)
( )
(2.59)
It is also possible to describe constraints in terms of probability functions.
( )
{
(2.60)
and the constraint set probability will be given by:
( )
∑ ∑ ∑ ∏
( ) ( )
(2.61)
and for continuous variables:
( )
∫ ∫ ∫ ( )
∏( ( )
)
(2.62)
The main difficulty lies in the analytic determination of the constrained probability distribution
functions for individual randomistic variables. For example, for the first randomistic variable
( ) we obtain:
∑ ∑ ∏
( ) ( )
( )
( )
(2.63)
∫ ∫ ( ) ( )
∏ ( ( )
)
( )
( )
(2.64)
3. Illustrative Examples
In this Section, some illustrative examples are used to provide a better understanding of the
concepts introduced in Section 2. In all cases, the goal is finding the constrained probability
distribution function or the constrained probability density function of the randomistic
variable(s) subject to the constraint(s) considered.
3.1. Example # 1: Single-Value Constraint Set imposed on a Standard Normal Random Variable
As a first example, let us consider a continuous randomistic variable given by the following
expression:
(3.1)
where is a standard normal random variable with probability density:
( )
√
(3.2)
Thus, from Eq. (1.16), and considering that and :
( ) ( )
√
(3.3)
Now, let us assume that this variable is subject to the following equality constraint:
(3.4)
with membership function:
( ) {
(3.5)
The constrained probability density function then becomes (from Eq. 2.5):
( )
( ) ( ) {
( )
(3.6)
Corresponding to Dirac’s delta function ( ). It means that the solution to this problem is
simply:
(3.7)
The original and constrained probability density functions obtained for this example are
depicted in Figure 1.
Figure 1. Original (solid blue line) and constrained (dashed red line) probability density function for
Example # 1.
3.2. Example # 2: Same Single-Value Constraint Set but now imposed on a Standard Uniform
Random Variable
The previous example may appear quite trivial since Eq. (3.7) can be directly obtained by
rearranging Eq. (3.4); however, let us now assume that the same constraint was imposed on
the standard uniform random variable:
(3.8)
with probability density function:
( ) ( ) {
(3.9)
( )
( ) ( ) {
( )
(3.10)
The result in this case is indetermined, indicating that there is no solution since an empty set is
obtained.
Thus, even when a value of the variable can be obtained directly from the constraints (like Eq.
3.7), if it is an impossible result for the original variable, then it is not a valid solution to the
problem.
Figure 2 illustrates the original and constrained probability density functions obtained for this
example. The constraint solution ( ) is included for comparison.
Figure 2. Original (solid blue line) and constrained (dashed red line) probability density function for
Example # 2. The solution to the constraint is represented by the dashed gray line.
Let us consider again the standard normal random variable introduced in Eq. (3.1), with
probability density function described by Eq. (3.3). The constraint imposed in this case is the
following:
(3.11)
As a result, the constraint set is represented by only two elements:
{ }
(3.12)
and with membership function:
{ }
( ) {
{ }
(3.13)
( )
( )
( ) ( )
( )
( )
{
(3.14)
which can be alternatively expressed as follows:
( ) ( )
( )
(3.15)
Figure 3. Original probability density function (solid blue line) and constrained probability function
(dashed red line) for Example # 3.
( ) ( )
( ) ( )
(3.16)
This means that two possible values can solve the problem: with a probability
3.4. Example # 4: Inequality Constraint imposed on the Standard Normal Random Variable
Let us continue considering the standard normal random variable introduced in Eq. (3.1), with
probability density function described by Eq. (3.3). The inequality constraint imposed in this
case is the following:
(3.17)
with membership function:
( ) {
(3.18)
Figure 4. Original (solid blue line) and constrained (dashed red line) probability density functions for
Example # 4.
The probability density function obtained for the constrained variable is:
( )
( ) ( ) √
( ) √
∫ ( )
(3.19)
and ( ) for .
Figure 4 illustrates the probability density functions for the original and constrained variables.
3.5. Example # 5: Periodic Constraint imposed on the Standard Normal Random Variable
This example again considers the standard normal random variable as the original variable. The
constraint imposed in this case is the following:
( )
(3.20)
The constraint set obtained can be represented by the following expression:
( )
(3.21)
or in terms of the periodic equality operator [6]:
(3.22)
The corresponding membership function is:
( ) {
(3.23)
( )
( ∑ )
(3.24)
with probabilities:
( )
∑
(3.25)
Figure 5 shows the original probability density function along the constrained probability
distribution, limited to the range .
Figure 5. Original probability density function (solid blue line) and constrained probability function
(dashed red line) for Example # 5.
Let us consider now a multivariate problem, involving two independent randomistic variables
having uniform distributions, but different ranges as follows:
(3.26)
( )
{
(3.27)
( )
{
(3.28)
Let us now consider the following constraint imposed on these variables:
(3.29)
with membership function:
( ) ( )
{
(3.30)
4
The probability of the constraint set is (from Eq. 2.62) :
( )
∫ ∫ ∫ ∫
( )
(3.31)
The first integral is limited to because (from Eq. 3.29 and 3.28):
(3.32)
and thus,
(3.33)
But since (Eq. 3.27), the overall limits obtained are:
(3.34)
The second integral is limited to the exact point:
(3.35)
due to constraint (3.29).
4
Here, it was considered that ∫ , since the integral is an infinite sum of differentials,
and in this case we are considering a single case when . Thus, the result of the integral (or
infinite sum) simply becomes a single differential .
Then, the resulting constrained distribution for will be (from Eq. 2.64, 3.31 and 3.34):
∫ ∫
( )
( )
(3.36)
Eq. (3.36) represents a uniform distribution of values in the range .
On the other hand, Eq. (3.31) can be alternatively determined as follows:
( )
∫ ∫ ∫ ∫
( )
(3.37)
and therefore:
∫ ∫
( )
( )
(3.38)
also representing a uniform distribution of values, but in this case in the range .
Figure 6 illustrates the probability density functions of both variables before and after imposing
the constraint.
Figure 6. Original (solid blue line) and constrained (dashed red line) probability density function of
variables (left plot) and (right plot) for Example # 6.
( )
∫ ∫
( ) √ √
( )
( )
∫ ∫
√ √
(3.39)
Figure 7. Original (solid blue line) and constrained (dashed red line) probability density functions of
variables and for Example # 7.
( )
∫ ( )
( )
√ √
( ) √
√ √
(3.40)
( )
∫ ( )
( )
√ √
( ) √
√ √
(3.41)
Both expressions correspond to normal distributions with a mean value of and standard
deviation √ . Figure 7 illustrates the probability density functions before and after imposing
the constraints. In this example, both variables behave identically, but this is not necessarily
always the case. Notice also that the constrained variables are no longer independent from
each other.
(3.42)
with membership function:
( ) ( ) ( )
{
(3.43)
where represents Heaviside’s step function, defined as ( ) { .
( )
∫ ∫ ( ( ) ( )
)
√ √
√
∫ (∫ )
√
∫ (√ )
√
(3.44)
5
A numerical evaluation of the last integral is required. The value obtained for this integral can be found
here: integral(exp(-x^2/2)*erf(sqrt((1-x^2)/2))), from -1 to 1 - Wolfram|Alpha (wolframalpha.com).
∫ ( ( ) ( )
)
√ √
( )
( )
√
∫
√
(√ )
(3.45)
(√ )
( )
(3.46)
The constrained probability density function obtained is compared to the original
unconstrained probability density function in Figure 8.
Figure 8. Original (solid blue line) and constrained (dashed red line) probability density functions of
variables and for Example # 8.
Increasing the level of complexity, in this example three different standard random variables
are considered: , , and , with probability densities given by Eq. (3.3),
(3.9), and (3.47), respectively.
( ) ( )
{
(3.47)
The constraints imposed on these variables are the following:
(3.48)
with membership function:
( ) ( ) ( )
{
(3.49)
The probability of the constraint set is for this problem:
( )
∫ ∫ ∫ ( ( ) ( )
)
∫ ∫ ∫
√
∫ (∫ (∫ ) )
√
∫ (∫ ∫ )
√
( ∫ ∫ )
√
( ) ( ) √
√ √
(3.50)
And the resulting constrained probability density functions are:
∫ ∫
√ ( )
( )
( )
(3.51)
√
∫ ∫
√ √
( )
( )
( (√ ) (√ ))
(3.52)
√
∫ ∫
√ √
( )
( )
√ (√ )
(3.53)
Figure 9 shows the probability density functions of the original and constrained variables.
Figure 9. Original (solid blue line) and constrained (dashed red line) probability density function of
variables (top left plot), (top right plot) and (bottom plot) for Example # 9.
Let us consider four independent discrete uniform binomial variables , , and , such
that:
{ }
( )
{ { }
{ }
(3.54)
In fact, the probability distribution of the original variables would satisfy all constraints if they
were referred to the probabilities of the randomistic variable, which is not the case.
In this problem, we want to find the four values , , , and that satisfy the four
constraints to . However, one of the constraints is redundant, as it can be obtained from
the previous three expressions:
(3.56)
So, actually there are only three equality constraints leaving one degree of freedom available.
Unless we assume the value of one of the variables (the available degree of freedom) no
specific solution would be obtained.
If we assume ( ) ( )
, then we obtain from Eq. (3.55):
( ) ( )
( ) ( )
( ) ( )
(3.57)
( ) ( )
( ) ( )
(3.58)
Alternatively, if we assume ( ) ( )
, then we obtain:
( ) ( )
( ) ( )
( ) ( )
( ) ( )
(3.59)
These two solution sets can be represented by arranging the four variables in a table, as
depicted in Figure 10.
2x2 Table Solution 1 Solution 2
1 2 2 1
2 1 1 2
Figure 10. Left: arrangement of the four variables considered in Example # 10. Middle: Solution #1.
Right: Solution #2.
( )
[ ] [ ] [ ]
( )
[ ( )]
(3.60)
Solution #1:
( )
( )
[ ] [ ] [ ]
( )
[ ( )]
(3.61)
4. Summary
( ) {
(2.1)
This restriction imposed on the variable may result in a different distribution of probabilities for
the values in the constrained variable ( ( ) ), compared to the probability distribution in the
original variable ( ( ) ):
( )
( ) ( )
( )
(2.4)
where
( ) ∑ ( ) ( )
(2.2)
In the case of continuous variables, the probability density function of the constrained variable
will be:
( )
( ) ( )
( )
(2.5)
where
( ) ∫ ( ) ( )
(2.3)
If the restrictions considered involve two or more ( ) independent randomistic variables
simultaneously, then the constrained probability function of the arbitrary variable
becomes:
∑ ∑ ∏
( ) ( )
( )
( )
(2.63)
with
( )
∑ ∑ ∑ ∏
( ) ( )
(2.61)
And for continuous variables:
∫ ∫ ( ) ( )
∏ ( ( )
)
( )
( )
(2.64)
with
( )
∫ ∫ ∫ ( )
∏( ( )
)
(2.62)
The expressions for the constrained randomistic variable are valid as long as the probability of
the constraint set ( ) is greater than zero. If the ( ) is exactly zero, then an empty
constraint set is obtained, and no solution exists.
This report provides data, information and conclusions obtained by the author(s) as a result of original
scientific research, based on the best scientific knowledge available to the author(s). The main purpose
of this publication is the open sharing of scientific knowledge. Any mistake, omission, error or inaccuracy
published, if any, is completely unintentional.
This research did not receive any specific grant from funding agencies in the public, commercial, or not-
for-profit sectors.
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC
4.0). Anyone is free to share (copy and redistribute the material in any medium or format) or adapt
(remix, transform, and build upon the material) this work under the following terms:
Attribution: Appropriate credit must be given, providing a link to the license, and indicating if
changes were made. This can be done in any reasonable manner, but not in any way that
suggests endorsement by the licensor.
NonCommercial: This material may not be used for commercial purposes.
References
[1] Hernandez, H. (2022). Standard Deterministic, Standard Random, and Randomistic Variables.
ForsChem Research Reports, 7, 2022-06, 1 - 18. doi: 10.13140/RG.2.2.36316.87688.
[2] Hernandez, H. (2020). On the Discreteness of Measured Variables and the Continuous
Approximation. ForsChem Research Reports, 5, 2020-20, 1-18. doi: 10.13140/RG.2.2.27740.00646.
[3] Hernandez, H. (2017). Multivariate Probability Theory: Determination of Probability Density
Functions. ForsChem Research Reports, 2, 2017-13, 1-13. doi: 10.13140/RG.2.2.28214.60481.
[4] Hernandez, H. (2024). Calculus of Probabilities of Randomistic Variables. ForsChem Research
Reports, 9, 2024-01, 1 - 31. doi: 10.13140/RG.2.2.27248.23044.
[5] Hernandez, H. (2018). Introduction to Randomistic Optimization. ForsChem Research Reports, 3,
2018-11, 1-25. doi: 10.13140/RG.2.2.30110.18246.
[6] Hernandez, H. (2023). The Periodic Equality Operator ( ). ForsChem Research Reports, 8, 2023-04,
1 - 8. doi: 10.13140/RG.2.2.36167.57768.
[7] Euler, L. (1862). De quadratis magicis. Opera Posthuma Mathematica et Physica. Academiae
Scientiarum Petropolitanae, Petropoli. pp. 140-151. https://scholarlycommons.pacific.edu/euler-
works/795. English translation: arxiv.org/pdf/math/0408230.pdf. French translation:
arxiv.org/pdf/math/0607468.pdf.