The algebra of random variables in statistics, provides rules for the symbolic manipulation of random variables, while avoiding delving too deeply into the mathematically sophisticated ideas of probability theory. Its symbolism allows the treatment of sums, products, ratios and general functions of random variables, as well as dealing with operations such as finding the probability distributions and the expectations (or expected values), variances and covariances of such combinations.
In principle, the elementary algebra of random variables is equivalent to that of conventional non-random (or deterministic) variables. However, the changes occurring on the probability distribution of a random variable obtained after performing algebraic operations are not straightforward. Therefore, the behavior of the different operators of the probability distribution, such as expected values, variances, covariances, and moments, may be different from that observed for the random variable using symbolic algebra. It is possible to identify some key rules for each of those operators, resulting in different types of algebra for random variables, apart from the elementary symbolic algebra: Expectation algebra, Variance algebra, Covariance algebra, Moment algebra, etc.
In all cases, the variable resulting from each operation is also a random variable. All commutative and associative properties of conventional algebraic operations are also valid for random variables. If any of the random variables is replaced by a deterministic variable or by a constant value, all the previous properties remain valid.
The expected value of the random variable resulting from an algebraic operation between two random variables can be calculated using the following set of rules:
If any of the random variables is replaced by a deterministic variable or by a constant value (), the previous properties remain valid considering that and, therefore, .
If is defined as a general non-linear algebraic function of a random variable , then:
Some examples of this property include:
The exact value of the expectation of the non-linear function will depend on the particular probability distribution of the random variable .
Subtraction: . Particularly, if and are independent from each other, then: . That is, for independent random variables the variance is the same for additions and subtractions:
Multiplication: . Particularly, if and are independent from each other, then: .
Division: . Particularly, if and are independent from each other, then: .
where represents the covariance operator between random variables and .
The variance of a random variable can also be expressed directly in terms of the covariance or in terms of the expected value:
If any of the random variables is replaced by a deterministic variable or by a constant value (), the previous properties remain valid considering that and , and . Special cases are the addition and multiplication of a random variable with a deterministic variable or a constant, where:
If is defined as a general non-linear algebraic function of a random variable , then:
The exact value of the variance of the non-linear function will depend on the particular probability distribution of the random variable .
The covariance () between the random variable resulting from an algebraic operation and the random variable can be calculated using the following set of rules:
Exponentiation (covariance with respect to the power): .
The covariance of a random variable can also be expressed directly in terms of the expected value:
If any of the random variables is replaced by a deterministic variable or by a constant value ( ), the previous properties remain valid considering that , and .
If is defined as a general non-linear algebraic function of a random variable , then:
The exact value of the variance of the non-linear function will depend on the particular probability distribution of the random variable .
Approximations by Taylor series expansions of moments
, where is the n-th moment of about its mean. Note that by their definition, and . The first order term always vanishes but was kept to obtain a closed form expression.
Then,
, where the Taylor expansion is truncated after the -th moment.
In the algebraicaxiomatization of probability theory, the primary concept is not that of probability of an event, but rather that of a random variable. Probability distributions are determined by assigning an expectation to each random variable. The measurable space and the probability measure arise from the random variables and expectations by means of well-known representation theorems of analysis. One of the important features of the algebraic approach is that apparently infinite-dimensional probability distributions are not harder to formalize than finite-dimensional ones.
Random variables are assumed to have the following properties:
the sum of two random variables is a random variable;
the product of two random variables is a random variable;
addition and multiplication of random variables are both commutative; and
there is a notion of conjugation of random variables, satisfying (XY)* = Y*X* and X** = X for all random variables X,Y and coinciding with complex conjugation if X is a constant.
This means that random variables form complex commutative *-algebras. If X = X* then the random variable X is called "real".
An expectation E on an algebra A of random variables is a normalized, positive linear functional. What this means is that
E[k] = k where k is a constant;
E[X*X] ≥ 0 for all random variables X;
E[X + Y] = E[X] + E[Y] for all random variables X and Y; and
^Hernandez, Hugo (2016). "Modelling the effect of fluctuation in nonlinear systems using variance algebra - Application to light scattering of ideal gases". ForsChem Research Reports. 2016–1. doi:10.13140/rg.2.2.36501.52969.