Template:Short description

Template:More footnotes

In statistics, the algebra of random variables 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.

Elementary symbolic algebra of random variablesEdit

Considering two random variables <math>X</math> and <math>Y</math>, the following algebraic operations are possible:

  • Addition: <math>Z = X + Y = Y + X</math>
  • Subtraction: <math>Z = X - Y = - Y + X</math>
  • Multiplication: <math>Z = X Y = Y X</math>
  • Division: Suppose <math> Y \neq 0 </math>, <math>Z = X / Y = X \cdot (1/Y) = (1/Y) \cdot X</math>.
  • Exponentiation: <math>Z = X^Y = e^{Y\ln(X)}</math>

In all cases, the variable <math>Z</math> 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.

Expectation algebra for random variablesEdit

The expected value <math>\operatorname{E}[Z]</math> of the random variable <math>Z</math> resulting from an algebraic operation between two random variables can be calculated using the following set of rules:

  • Addition: <math>\operatorname{E}[Z] = \operatorname{E}[X+Y] = \operatorname{E}[X] + \operatorname{E}[Y] = \operatorname{E}[Y] + \operatorname{E}[X]</math>
  • Subtraction: <math>\operatorname{E}[Z] = \operatorname{E}[X-Y] = \operatorname{E}[X] - \operatorname{E}[Y] = -\operatorname{E}[Y] + \operatorname{E}[X]</math>
  • Multiplication: <math>\operatorname{E}[Z] = \operatorname{E}[X Y] = \operatorname{E}[YX]</math>. Particularly, if <math>X</math> and <math>Y</math> are independent from each other, then: <math>\operatorname{E}[X Y] = \operatorname{E}[X] \cdot \operatorname{E}[Y] = \operatorname{E}[Y] \cdot \operatorname{E}[X]</math>.
  • Division: <math>\operatorname{E}[Z] = \operatorname{E}[X/Y] = \operatorname{E}[X \cdot (1/Y)] = \operatorname{E}[(1/Y) \cdot X]</math>. Particularly, if <math>X</math> and <math>Y</math> are independent from each other, then: <math>\operatorname{E}[X/Y] = \operatorname{E}[X] \cdot \operatorname{E}[1/Y] = \operatorname{E}[1/Y] \cdot \operatorname{E}[X]</math>.
  • Exponentiation: <math>\operatorname{E}[Z] = \operatorname{E}[X^Y] = \operatorname{E}[e^{Y\ln(X)}]</math>

If any of the random variables is replaced by a deterministic variable or by a constant value (<math>k</math>), the previous properties remain valid considering that <math>\Pr(X = k) = 1</math> and, therefore, <math>\operatorname{E}[X] = k</math>.

If <math>Z</math> is defined as a general non-linear algebraic function <math>f</math> of a random variable <math>X</math>, then:

<math display="block">\operatorname{E}[Z] = \operatorname{E}[f(X)] \neq f(\operatorname{E}[X])</math>

Some examples of this property include:

  • <math>\operatorname{E}[X^2] \neq \operatorname{E}[X]^2</math>
  • <math>\operatorname{E}[1/X] \neq 1/\operatorname{E}[X]</math>
  • <math>\operatorname{E}[e^X] \neq e^{\operatorname{E}[X]}</math>
  • <math>\operatorname{E}[\ln(X)] \neq \ln(\operatorname{E}[X])</math>

The exact value of the expectation of the non-linear function will depend on the particular probability distribution of the random variable <math>X</math>.

Variance algebra for random variablesEdit

The variance <math>\operatorname{Var}[Z]</math> of the random variable <math>Z</math> resulting from an algebraic operation between random variables can be calculated using the following set of rules:

  • Addition: <math display="block">\operatorname{Var}[Z] = \operatorname{Var}[X+Y] = \operatorname{Var}[X] + 2 \operatorname{Cov}[X,Y] + \operatorname{Var}[Y].</math>Particularly, if <math>X</math> and <math>Y</math> are independent from each other, then: <math display="block">\operatorname{Var}[X+Y] = \operatorname{Var}[X] + \operatorname{Var}[Y].</math>
  • Subtraction: <math display="block">\operatorname{Var}[Z] = \operatorname{Var}[X-Y] = \operatorname{Var}[X] - 2 \operatorname{Cov}[X,Y] + \operatorname{Var}[Y].</math>Particularly, if <math>X</math> and <math>Y</math> are independent from each other, then: <math display="block">\operatorname{Var}[X-Y] = \operatorname{Var}[X] + \operatorname{Var}[Y].</math> That is, for independent random variables the variance is the same for additions and subtractions: <math display="block">\operatorname{Var}[X+Y] = \operatorname{Var}[X-Y] = \operatorname{Var}[Y-X] = \operatorname{Var}[-X-Y].</math>
  • Multiplication: <math display="block">\operatorname{Var}[Z] = \operatorname{Var}[XY] = \operatorname{Var}[YX].</math> Particularly, if <math>X</math> and <math>Y</math> are independent from each other, then: <math display="block">\begin{align}

\operatorname{Var}[XY] &= \operatorname{E}[X^2] \cdot \operatorname{E}[Y^2] - {\left(\operatorname{E}[X] \cdot \operatorname{E}[Y]\right)}^2 \\[2pt] &= \operatorname{Var}[X] \cdot \operatorname{Var}[Y] + \operatorname{Var}[X] \cdot {\left(\operatorname{E}[Y]\right)}^2 + \operatorname{Var}[Y] \cdot {\left(\operatorname{E}[X]\right)}^2. \end{align}</math>

  • Division: <math display="block">\operatorname{Var}[Z] = \operatorname{Var}[X/Y]

= \operatorname{Var}[X \cdot (1/Y)] = \operatorname{Var}[(1/Y) \cdot X].</math> Particularly, if <math>X</math> and <math>Y</math> are independent from each other, then: <math display="block">\begin{align} \operatorname{Var}[X/Y] &= \operatorname{E}[X^2] \cdot \operatorname{E}[1/Y^2] - {\left(\operatorname{E}[X] \cdot \operatorname{E}[1/Y]\right)}^2 \\[2pt] &= \operatorname{Var}[X] \cdot \operatorname{Var}[1/Y] + \operatorname{Var}[X] \cdot {\left(\operatorname{E}[1/Y]\right)}^2 + \operatorname{Var}[1/Y] \cdot {\left(\operatorname{E}[X]\right)}^2. \end{align}</math>

  • Exponentiation: <math display="block">\operatorname{Var}[Z] = \operatorname{Var}[X^Y] = \operatorname{Var}[e^{Y\ln(X)}]</math>

where <math>\operatorname{Cov}[X,Y] = \operatorname{Cov}[Y,X]</math> represents the covariance operator between random variables <math>X</math> and <math>Y</math>.

The variance of a random variable can also be expressed directly in terms of the covariance or in terms of the expected value:

<math display="block">\operatorname{Var}[X] = \operatorname{Cov}(X,X) = \operatorname{E}[X^2] - \operatorname{E}[X]^2</math>

If any of the random variables is replaced by a deterministic variable or by a constant value (<math>k</math>), the previous properties remain valid considering that <math>\Pr(X = k) = 1</math> and <math>\operatorname{E}[X] = k</math>, <math>\operatorname{Var}[X] = 0</math> and <math>\operatorname{Cov}[Y,k] = 0</math>. Special cases are the addition and multiplication of a random variable with a deterministic variable or a constant, where:

  • <math>\operatorname{Var}[k+Y] = \operatorname{Var}[Y]</math>
  • <math>\operatorname{Var}[kY] = k^2 \operatorname{Var}[Y]</math>

If <math>Z</math> is defined as a general non-linear algebraic function <math>f</math> of a random variable <math>X</math>, then:

<math display="block">\operatorname{Var}[Z] = \operatorname{Var}[f(X)] \neq f(\operatorname{Var}[X])</math>

The exact value of the variance of the non-linear function will depend on the particular probability distribution of the random variable <math>X</math>.

Covariance algebra for random variablesEdit

The covariance (<math>\operatorname{Cov}[Z,X]</math>) between the random variable <math>Z</math> resulting from an algebraic operation and the random variable <math>X</math> can be calculated using the following set of rules:

  • Addition: <math display="block">\operatorname{Cov}[Z,X] = \operatorname{Cov}[X+Y,X] = \operatorname{Var}[X] + \operatorname{Cov}[X,Y].</math> If <math>X</math> and <math>Y</math> are independent from each other, then: <math display="block">\operatorname{Cov}[X+Y,X] = \operatorname{Var}[X].</math>
  • Subtraction: <math display="block">\operatorname{Cov}[Z,X] = \operatorname{Cov}[X-Y,X] = \operatorname{Var}[X] - \operatorname{Cov}[X,Y].</math> If <math>X</math> and <math>Y</math> are independent from each other, then: <math display="block">\operatorname{Cov}[X-Y,X] = \operatorname{Var}[X].</math>
  • Multiplication: <math display="block">\operatorname{Cov}[Z,X] = \operatorname{Cov}[XY,X] = \operatorname{E}[X^2Y] - \operatorname{E}[XY] \operatorname{E}[X].</math> If <math>X</math> and <math>Y</math> are independent from each other, then: <math display="block">\operatorname{Cov}[XY,X] = \operatorname{Var}[X] \cdot \operatorname{E}[Y].</math>
  • Division (covariance with respect to the numerator): <math display="block">\operatorname{Cov}[Z,X] = \operatorname{Cov}[X/Y,X] = \operatorname{E}[X^2/Y] - \operatorname{E}[X/Y] \operatorname{E}[X].</math> If <math>X</math> and <math>Y</math> are independent from each other, then: <math display="block">\operatorname{Cov}[X/Y,X] = \operatorname{Var}[X] \cdot \operatorname{E}[1/Y].</math>
  • Division (covariance with respect to the denominator): <math display="block">\operatorname{Cov}[Z,X] = \operatorname{Cov}[Y/X,X] = \operatorname{E}[Y] - \operatorname{E}[Y/X] \operatorname{E}[X].</math> If <math>X</math> and <math>Y</math> are independent from each other, then: <math display="block">\operatorname{Cov}[Y/X,X] = \operatorname{E}[Y] \cdot (1-\operatorname{E}[X] \cdot \operatorname{E}[1/X]).</math>
  • Exponentiation (covariance with respect to the base): <math display="block">\operatorname{Cov}[Z,X] = \operatorname{Cov}[X^Y,X] = \operatorname{E}[X^{Y+1}]-\operatorname{E}[X^Y] \operatorname{E}[X].</math>
  • Exponentiation (covariance with respect to the power): <math display="block">\operatorname{Cov}[Z,X] = \operatorname{Cov}[Y^X,X] = \operatorname{E}[XY^X]-\operatorname{E}[Y^X] \operatorname{E}[X].</math>

The covariance of a random variable can also be expressed directly in terms of the expected value:

<math display="block">\operatorname{Cov}(X,Y) = \operatorname{E}[XY] - \operatorname{E}[X]\operatorname{E}[Y]</math>

If any of the random variables is replaced by a deterministic variable or by a constant value Template:Nowrap the previous properties remain valid considering that Template:Nowrap <math>\operatorname{Var}[k] = 0</math> and Template:Nowrap

If <math>Z</math> is defined as a general non-linear algebraic function <math>f</math> of a random variable <math>X</math>, then:

<math display="block">\operatorname{Cov}[Z,X] = \operatorname{Cov}[f(X),X] = \operatorname{E}[Xf(X)] - \operatorname{E}[f(X)] \operatorname{E}[X]</math>

The exact value of the covariance of the non-linear function will depend on the particular probability distribution of the random variable <math>X</math>.

Approximations by Taylor series expansions of momentsEdit

If the moments of a certain random variable <math>X</math> are known (or can be determined by integration if the probability density function is known), then it is possible to approximate the expected value of any general non-linear function <math>f(X)</math> as a Taylor series expansion of the moments, as follows:

<math display="block">f(X) = \sum_{n=0}^\infty \frac{1}{n!} \left(\frac{d^n f}{dX^n}\right)_{X=\mu} {\left(X - \mu\right)}^n,</math> where <math>\mu = \operatorname{E}[X]</math> is the mean value of <math>X</math>.

<math display="block">\begin{align} \operatorname{E}[f(X)] &= \operatorname{E}\left[ \sum_{n=0}^\infty \frac{1}{n!}\left({d^nf \over dX^n}\right)_{X=\mu} {\left(X-\mu\right)}^n\right] \\ &= \sum_{n=0}^\infty \frac{1}{n!}\left(\frac{d^n f}{dX^n}\right)_{X=\mu} \operatorname{E}\left[{\left(X - \mu\right)}^n\right] \\ &= \sum_{n=0}^\infty \frac{1}{n!}\left({d^nf \over dX^n}\right)_{X=\mu}\mu_n(X), \end{align}</math> where <math>\mu_n(X) = \operatorname{E}[(X-\mu)^n]</math> is the n-th moment of <math>X</math> about its mean. Note that by their definition, <math>\mu_0(X)=1</math> and <math>\mu_1(X)=0</math>. The first order term always vanishes but was kept to obtain a closed form expression.

Then,

<math display="block">\operatorname{E}[f(X)] \approx \sum_{n=0}^{n_{\max}} \frac{1}{n!} \left(\frac{d^nf}{dX^n}\right)_{X=\mu}\mu_n(X), </math> where the Taylor expansion is truncated after the <math>n_{\max} </math>-th moment.

Particularly for functions of normal random variables, it is possible to obtain a Taylor expansion in terms of the standard normal distribution:<ref>Template:Cite journal</ref>

<math display="block">f(X) = \sum_{n=0}^\infty \frac{\sigma^n}{n!} \left(\frac{d^n f}{dX^n}\right)_{X=\mu} \mu_n(Z),</math>where <math>X \sim N(\mu,\sigma ^2)</math> is a normal random variable, and <math>Z\sim N(0,1)</math> is the standard normal distribution. Thus,

<math display="block">\operatorname{E}[f(X)]\approx \sum_{n=0}^{n_{\max}} {\sigma ^n \over n!} \left({d^nf \over dX^n}\right)_{X=\mu} \mu_n(Z) , </math> where the moments of the standard normal distribution are given by:

<math display="block">\mu_n(Z) = \begin{cases} \prod_{i=1}^{n/2}(2i-1), & \text{if } n \text{ is even} \\ 0, & \text{if }n\text{ is odd} \end{cases}</math>

Similarly for normal random variables, it is also possible to approximate the variance of the non-linear function as a Taylor series expansion as:

<math display="block">\operatorname{Var}[f(X)] \approx \sum_{n=1}^{n_{\max}} \left({\sigma^n \over n!} \left({d^nf \over dX^n}\right)_{X=\mu}\right)^2 \operatorname{Var}[Z^n] + \sum_{n=1}^{n_{\max}} \sum_{m \neq n} \frac{\sigma^{n+m}}Template:N!m! \left({d^nf \over dX^n}\right)_{X=\mu} \left({d^mf \over dX^m}\right)_{X=\mu} \operatorname{Cov}[Z^n,Z^m],</math> where <math display="block">\operatorname{Var}[Z^n] = \begin{cases} \prod_{i=1}^{n}(2i-1) -\prod_{i=1}^{n/2}(2i-1)^2, & \text{if }n\text{ is even} \\ \prod_{i=1}^{n}(2i-1), & \text{if }n\text{ is odd}, \end{cases}</math> and <math display="block">\operatorname{Cov}[Z^n,Z^m] = \begin{cases} \prod_{i=1}^{(n+m)/2}(2i-1) -\prod_{i=1}^{n/2}(2i-1) \prod_{j=1}^{m/2}(2j-1), & \text{if }n\text{ and }m \text{ are even} \\ \prod_{i=1}^{(n+m)/2}(2i-1), & \text{if }n\text{ and }m\text{ are odd} \\ 0, & \text{otherwise} \end{cases}</math>

Algebra of complex random variablesEdit

In the algebraic axiomatization 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:

  1. complex constants are possible realizations of a random variable;
  2. the sum of two random variables is a random variable;
  3. the product of two random variables is a random variable;
  4. addition and multiplication of random variables are both commutative; and
  5. there is a notion of conjugation of random variables, satisfying Template:Math and Template:Math for all random variables Template:Math and coinciding with complex conjugation if Template:Math is a constant.

This means that random variables form complex commutative *-algebras. If Template:Math then the random variable Template:Math is called "real".

An expectation Template:Math on an algebra Template:Math of random variables is a normalized, positive linear functional. What this means is that

  1. Template:Math where Template:Math is a constant;
  2. Template:Math for all random variables Template:Math;
  3. Template:Math for all random variables Template:Math and Template:Math; and
  4. Template:Math if Template:Math is a constant.

One may generalize this setup, allowing the algebra to be noncommutative. This leads to other areas of noncommutative probability such as quantum probability, random matrix theory, and free probability.

See alsoEdit

Template:More footnotes

ReferencesEdit

<references />

Further readingEdit