Random variable: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
In [[probability and statistics]], a '''random variable''' or '''stochastic variable''' is, roughly speaking, a [[Variable (mathematics)|variable]] whose value results from a measurement on a system that is subject to variations due to chance. Intuitively, a random variable is a numerical description of the outcome of an experiment (e.g., the possible results of rolling two dice: (1, 1), (1, 2), etc.). Alternatively, a random variable can be thought of as a quantity whose value can ''not'' exist, as a constant; or |
In [[probability and statistics]], a '''random variable''' or '''stochastic variable''' is, roughly speaking, a [[Variable (mathematics)|variable]] whose value results from a measurement on a system that is subject to variations due to chance. Intuitively, a random variable is a numerical description of the outcome of an experiment (e.g., the possible results of rolling two dice: (1, 1), (1, 2), etc.). Alternatively, a random variable can be thought of as a quantity whose value can ''not'' exist, as a constant (e.g., unchanging, regardless of changes in context); or as an always fixed point in a continuum (when a particular context presents itself more than once). But it is a variable which can ''only'' take on a calculable ''range'' of different values; and it is the [[probability distribution]] that is used to describe the probabilities that different values will arise in any particular context. And even if a particular context presents itself multiple times, up to and including an infinite number of times, the consequence would still be a calculable range or probability distribution that only a range different values would arise. Realizations of a random variable are called [[random variate]]s. |
||
A random variable's possible values might represent the possible outcomes of a yet-to-be-performed experiment, or the potential values of a quantity whose already-existing value is uncertain (e.g. as a result of incomplete information or imprecise measurements). Random variables can be classified as either [[Discrete random variable|''discrete'']] (i.e. it may assume any of a specified list of exact values) or as [[Continuous random variable|''continuous'']] (i.e. it may assume any numerical value in an interval or collection of intervals). |
A random variable's possible values might represent the possible outcomes of a yet-to-be-performed experiment, or the potential values of a quantity whose already-existing value is uncertain (e.g. as a result of incomplete information or imprecise measurements). Random variables can be classified as either [[Discrete random variable|''discrete'']] (i.e. it may assume any of a specified list of exact values) or as [[Continuous random variable|''continuous'']] (i.e. it may assume any numerical value in an interval or collection of intervals). |
Revision as of 15:23, 7 March 2012
In probability and statistics, a random variable or stochastic variable is, roughly speaking, a variable whose value results from a measurement on a system that is subject to variations due to chance. Intuitively, a random variable is a numerical description of the outcome of an experiment (e.g., the possible results of rolling two dice: (1, 1), (1, 2), etc.). Alternatively, a random variable can be thought of as a quantity whose value can not exist, as a constant (e.g., unchanging, regardless of changes in context); or as an always fixed point in a continuum (when a particular context presents itself more than once). But it is a variable which can only take on a calculable range of different values; and it is the probability distribution that is used to describe the probabilities that different values will arise in any particular context. And even if a particular context presents itself multiple times, up to and including an infinite number of times, the consequence would still be a calculable range or probability distribution that only a range different values would arise. Realizations of a random variable are called random variates.
A random variable's possible values might represent the possible outcomes of a yet-to-be-performed experiment, or the potential values of a quantity whose already-existing value is uncertain (e.g. as a result of incomplete information or imprecise measurements). Random variables can be classified as either discrete (i.e. it may assume any of a specified list of exact values) or as continuous (i.e. it may assume any numerical value in an interval or collection of intervals).
Random variables are usually real-valued, but one can consider arbitrary types such as boolean values, complex numbers, vectors, matrices, sequences, trees, sets, shapes, manifolds, functions, and processes. The term random element is used to encompass all such related concepts. A related concept is the stochastic process, a set of indexed random variables (typically indexed by time or space).
The formal mathematical treatment of random variables is dealt with in the subject of probability theory. In that context, random variables are defined in terms of functions defined on a probability space.
Introduction
Real-valued random variables (those whose range is the real numbers) are used in the sciences to make predictions based on data obtained from scientific experiments. In addition to scientific applications, random variables were developed for the analysis of games of chance and stochastic events. In such instances, the function that maps the outcome to a real number is often the identity function or similarly trivial function, and not explicitly described. In many cases, however, it is useful to consider random variables that are functions of other random variables, and then the mapping function included in the definition of a random variable becomes important. As an example, the square of a random variable distributed according to a standard normal distribution is itself a random variable, with a chi-squared distribution. One way to think of this is to imagine generating a large number of samples from a standard normal distribution, squaring each one, and plotting a histogram of the values observed. With enough samples, the graph of the histogram will approximate the density function of a chi-squared distribution with one degree of freedom.
Another example is the sample mean, which is the average of a number of samples. When these samples are independent observations of the same random event they can be called independent identically distributed random variables. Since each sample is a random variable, the sample mean is a function of random variables and hence a random variable itself, whose distribution can be computed and properties determined.
One of the reasons that real-valued random variables are so commonly considered is that the expected value (a type of average) and variance (a measure of the "spread", or extent to which the values are dispersed) of the variable can be computed.
There are several types of random variables, the most common two are the discrete and the continuous.[1] A discrete random variable maps outcomes to values of a countable set (e.g., the integers), with each value in the range having probability greater than or equal to zero. A continuous random variable maps outcomes to values of an uncountable set (e.g., the real numbers). For a continuous random variable, the probability of any specific value is zero, whereas the probability of some infinite set of values (such as an interval of non-zero length) may be positive. A random variable can be "mixed", with part of its probability spread out over an interval like a typical continuous variable, and part of it concentrated on particular values like a discrete variable. These classifications are equivalent to the categorization of probability distributions.
The expected value of random vectors, random matrices, and similar aggregates of fixed structure is defined as the aggregation of the expected value computed over each individual element. The concept of "variance of a random vector" is normally expressed through a covariance matrix. No generally-agreed-upon definition of expected value or variance exists for cases other than just discussed.
Examples
The possible outcomes for one coin toss can be described by the state space = {heads, tails}. We can introduce a real-valued random variable Y as follows:
If the coin is equally likely to land on either side then it has a probability mass function given by:
A random variable can also be used to describe the process of rolling a die and the possible outcomes. The most obvious representation is to take the set = {1, 2, 3, 4, 5, 6} as the state space, defining the random variable X equal to the number rolled. In this case,
An example of a continuous random variable would be one based on a spinner that can choose a horizontal direction. Then the values taken by the random variable are directions. We could represent these directions by North West, East South East, etc. However, it is commonly more convenient to map the sample space to a random variable which takes values which are real numbers. This can be done, for example, by mapping a direction to a bearing in degrees clockwise from North. The random variable then takes values which are real numbers from the interval [0, 360), with all parts of the range being "equally likely". In this case, X = the angle spun. Any real number has probability zero of being selected, but a positive probability can be assigned to any range of values. For example, the probability of choosing a number in [0, 180] is ½. Instead of speaking of a probability mass function, we say that the probability density of X is 1/360. The probability of a subset of [0, 360) can be calculated by multiplying the measure of the set by 1/360. In general, the probability of a set for a given continuous random variable can be calculated by integrating the density over the given set.
An example of a random variable of mixed type would be based on an experiment where a coin is flipped and the spinner is spun only if the result of the coin toss is heads. If the result is tails, X = −1; otherwise X = the value of the spinner as in the preceding example. There is a probability of ½ that this random variable will have the value −1. Other ranges of values would have half the probability of the last example.
Formal definition
Let (Ω, ℱ, P) be a probability space and (E, ℰ) a measurable space. Then an (E, ℰ)-valued random variable is a function X: Ω→E which is (ℱ, ℰ)-measurable. The latter means that, for every subset B ∈ ℰ, its preimage X −1(B) ∈ ℱ where X −1(B) = {ω: X(ω) ∈ B}.[2] This definition enables us to measure any element B in the target space by looking at its preimage, which by assumption is measurable.
When E is a topological space, then the most common choice for the σ-algebra ℰ is to take it equal to the Borel σ-algebra ℬ(E), which is the σ-algebra generated by the collection of all open sets in E. In such case the (E, ℰ)-valued random variable is called the E-valued random variable. Moreover, when space E is the real line ℝ, then such real-valued random variable is called simply the random variable.
Real-valued random variables
In this case the observation space is the real numbers. Recall, is the probability space. For real observation space, the function is a real-valued random variable if
This definition is a special case of the above because the set generates the Borel sigma-algebra on the real numbers, and it suffices to check measurability on any generating set. Here we can prove measurability on this generating set by using the fact that .
Distribution functions of random variables
Associating a cumulative distribution function (CDF) with a random variable is a generalization of assigning a value to a variable. If the CDF is a (right continuous) Heaviside step function then the variable takes on the value at the jump with probability 1. In general, the CDF specifies the probability that the variable takes on particular values.
If a random variable defined on the probability space is given, we can ask questions like "How likely is it that the value of is bigger than 2?". This is the same as the probability of the event which is often written as for short, and easily obtained since
Recording all these probabilities of output ranges of a real-valued random variable X yields the probability distribution of X. The probability distribution "forgets" about the particular probability space used to define X and only records the probabilities of various values of X. Such a probability distribution can always be captured by its cumulative distribution function
and sometimes also using a probability density function. In measure-theoretic terms, we use the random variable X to "push-forward" the measure P on Ω to a measure dF on R. The underlying probability space Ω is a technical device used to guarantee the existence of random variables, and sometimes to construct them. In practice, one often disposes of the space Ω altogether and just puts a measure on R that assigns measure 1 to the whole real line, i.e., one works with probability distributions instead of random variables.
Moments
The probability distribution of a random variable is often characterised by a small number of parameters, which also have a practical interpretation. For example, it is often enough to know what its "average value" is. This is captured by the mathematical concept of expected value of a random variable, denoted E[X], and also called the first moment. In general, E[f(X)] is not equal to f(E[X]). Once the "average value" is known, one could then ask how far from this average value the values of X typically are, a question that is answered by the variance and standard deviation of a random variable. E[X] can be viewed intuitively as an average obtained from an infinite population, the members of which are particular evaluations of X.
Mathematically, this is known as the (generalised) problem of moments: for a given class of random variables X, find a collection {fi} of functions such that the expectation values E[fi(X)] fully characterise the distribution of the random variable X.
Functions of random variables
If we have a random variable on and a Borel measurable function , then will also be a random variable on , since the composition of measurable functions is also measurable. (However, this is not true if is Lebesgue measurable.) The same procedure that allowed one to go from a probability space to can be used to obtain the distribution of . The cumulative distribution function of is
If function g is invertible, i.e. g−1 exists, and increasing, then the previous relation can be extended to obtain
and, again with the same hypotheses of invertibility of g, assuming also differentiability, we can find the relation between the probability density functions by differentiating both sides with respect to y, in order to obtain
- .
If there is no invertibility of g but each y admits at most a countable number of roots (i.e. a finite, or countably infinite, number of xi such that y = g(xi)) then the previous relation between the probability density functions can be generalized with
where xi = gi-1(y). The formulas for densities do not demand g to be increasing.
Example 1
Let X be a real-valued, continuous random variable and let Y = X2.
If y < 0, then P(X2 ≤ y) = 0, so
If y ≥ 0, then
so
Example 2
Suppose is a random variable with a cumulative distribution
where is a fixed parameter. Consider the random variable Then,
The last expression can be calculated in terms of the cumulative distribution of so
Equivalence of random variables
There are several different senses in which random variables can be considered to be equivalent. Two random variables can be equal, equal almost surely, or equal in distribution.
In increasing order of strength, the precise definition of these notions of equivalence is given below.
Equality in distribution
If the sample space is a subset of the real line a possible definition is that random variables X and Y are equal in distribution if they have the same distribution functions:
Two random variables having equal moment generating functions have the same distribution. This provides, for example, a useful method of checking equality of certain functions of i.i.d. random variables. However, the moment generating function exists only for distributions that are good enough.
Almost sure equality
Two random variables X and Y are equal almost surely if, and only if, the probability that they are different is zero:
For all practical purposes in probability theory, this notion of equivalence is as strong as actual equality. It is associated to the following distance:
where "ess sup" represents the essential supremum in the sense of measure theory.
Equality
Finally, the two random variables X and Y are equal if they are equal as functions on their measurable space:
Convergence
A significant theme in mathematical statistics consists of obtaining convergence results for certain sequences of random variables; for instance the law of large numbers and the central limit theorem.
There are various senses in which a sequence (Xn) of random variables can converge to a random variable X. These are explained in the article on convergence of random variables.
See also
References
- ^ Rice, John (1999). Mathematical Statistics and Data Analysis. Duxbury Press. ISBN 0534209343.
- ^ Fristedt & Gray (1996, page 11)
![]() | This article includes a list of references, related reading, or external links, but its sources remain unclear because it lacks inline citations. (February 2012) |
Literature
- Fristedt, Bert; Gray, Lawrence (1996). A modern approach to probability theory. Boston: Birkhäuser. ISBN 3-7643-3807-5.
{{cite book}}
: Invalid|ref=harv
(help) - Kallenberg, O. (1986) Random Measures, 4th edition. Academic Press, New York, London; Akademie-Verlag, Berlin. MR0854102 ISBN 0-12-394960-2
- Kallenberg, O. (2001) Foundations of Modern Probability, 2nd edition. Springer-Verlag, New York, Berlin, Heidelberg). ISBN 0-387-95313-2
- Papoulis, Athanasios (1965) Probability, Random Variables, and Stochastic Processes. McGraw–Hill Kogakusha, Tokyo, 9th edition, ISBN 0-07-119981-0.