A SAMPLE SPACE S may be difficult to describe if the elements of S are not numbers. Let discuss how one can use a rule by which each simple outcome of a random experiment, an element s of S, may be associated with a real number x.
1. Given a random experiment with a sample space S, a function X that assigns to each element s in S one and only one real number X( s )=x is called a random variable. The space of X is the set of real numbers { x:x=X( s ),s∈S }, where s belongs to S means the element s belongs to the set S.
2. It may be that the set S has elements that are themselves real numbers. In such an instance we could write X( s )=s so that X is the identity function and the space of X is also S. This is illustrated in the example below.
Let the random experiment be the cast of a die, observing the number of spots on the side facing up. The sample space associated with this experiment is S=( 1,2,3,4,5,6 ) . For each s belongs to S, let X( s )=s . The space of the random variable X is then {1,2,3,4,5,6}.
If we associate a probability of 1/6 with each outcome, then, for example, P( X=5 )=1/6,P( 2≤X≤5 )=4/6, and s belongs to S seem to be reasonable assignments, where ( 2≤X≤5 ) means (X = 2,3,4 or 5) and ( X≤2 ) means (X = 1 or 2), in this example.
In many practical situations the probabilities assigned to the event are unknown.
Since there are many ways of defining a function X on S, which function do we want to use?
Let X denotes a random variable with one-dimensional space R, a subset of the real numbers. Suppose that the space R contains a countable number of points; that is, R contains either a finite number of points or the points of R can be put into a one-to- one correspondence with the positive integers. Such set R is called a set of discrete points or simply a discrete sample space.
Furthermore, the random variable X is called a random variable of the discrete type, and X is said to have a distribution of the discrete type. For a random variable X of the discrete type, the probability P( X=x ) is frequently denoted by f(x), and is called the probability density function and it is abbreviated p.d.f..
Let f(x) be the p.d.f. of the random variable X of the discrete type, and let R be the space of X. Since, f( x )=P( X=x ) , x belongs to R, f(x) must be positive for x belongs to R and we want all these probabilities to add to 1 because each P( X=x ) represents the fraction of times x can be expected to occur. Moreover, to determine the probability associated with the event A⊂R , one would sum the probabilities of the x values in A.
P( X=x ) ,
, where A⊂R.
Usually let f( x )=0 when x∉R and thus the domain of f(x) is the set of real numbers. When we define the p.d.f. of f(x) and do not say zero elsewhere, then we tacitly mean that f(x) has been defined at all x’s in space R, and it is assumed that f( x )=0 elsewhere, namely, f( x )=0 , x∉R . Since the probability P( X=x )=f( x )>0 when x∈R and since R contains all the probabilities associated with X, R is sometimes referred to as the support of X as well as the space of X.
Roll a four-sided die twice and let X equal the larger of the two outcomes if there are different and the common value if they are the same. The sample space for this experiment is , where each of this 16 points has probability 1/16. Then P( X=1 )=P[ ( 1,1 ) ]=1/16 , P( X=2 )=P[ ( 1,2 ),( 2,1 ),( 2,2 ) ]=3/16 , and similarly P( X=3 )=5/16 and P( X=4 )=7/16 . That is, the p. d.f. of X can be written simply as
We could add that f( x )=0 elsewhere; but if we do not, one should take f(x) to equal zero when x∉R .
A better understanding of a particular probability distribution can often be obtained with a graph that depicts the p.d.f. of X.
the graph of the p.d.f. when f( x )>0 , would be simply the set of points { [ x,f( x ) ]:x∈R }, where R is the space of X.
Two types of graphs can be used to give a better visual appreciation of the p.d.f., namely, a bar graph and a probability histogram. A bar graph of the p.d.f. f(x) of the random variable X is a graph having a vertical line segment drawn from ( x,0 ) to [ x,f( x ) ] at each x in R, the space of X. If X can only assume integer values, a probability histogram of the p.d.f. f(x) is a graphical representation that has a rectangle of height f(x) and a base of length 1, centered at x, for each x∈R , the space of X.
1. Let X be a random variable of the discrete type with space R and p.d.f. f( x )=P( X=x ) , x∈R . Now take x to be a real number and consider the set A of all points in R that are less than or equal to x. That is, A=( t:t≤x ) and t∈R .
2. Let define the function F(x) by
The function F(x) is called the distribution function (sometimes cumulative distribution function) of the discrete-type random variable X.
Several properties of a distribution function F(x) can be listed as a consequence of the fact that probability must be a value between 0 and 1, inclusive:
0≤F(x)≤1 because F(x) is a probability,
F(x) is a nondecreasing function of x,
F( y )=1 , where y is any value greater than or equal to the largest value in R; and F( z )=0 , where z is any value less than the smallest value in R;
If X is a random variable of the discrete type, then F(x) is a step function, and the height at a step at x, x∈R , equals the probability P( X=x ) .
It is clear that the probability distribution associated with the random variable X can be described by either the distribution function F(x) or by the probability density function f(x). The function used is a matter of convenience; in most instances, f(x) is easier to use than F(x).
If f(x) is the p.d.f. of the random variable X of the discrete type with space R and if the summation
exists, then the sum is called the mathematical expectation or the expected value of the function u(X), and it is denoted by E[ u( X ) ] . That is,
We can think of the expected value E[ u( X ) ] as a weighted mean of u(x), x∈R , where the weights are the probabilities f( x )=P( X=x ) .
The usual definition of the mathematical expectation of u(X) requires that the sum converges absolutely; that is, exists.
There is another important observation that must be made about consistency of this definition. Certainly, this function u(X) of the random variable X is itself a random variable, say Y. Suppose that we find the p.d.f. of Y to be g(y) on the support R1 . Then E(Y) is given by the summation
In general it is true that that is, the same expectation is obtained by either method.
Let X be the random variable defined by the outcome of the cast of the die. Thus the p.d.f. of X is
, x=1,2,3,4,5,6 .
In terms of the observed value x, the function is as follows
The mathematical expectation is equal to
Let the random variable X have the p.d.f. , x∈R , where R ={-1,0,1}. Let u( X )=X2. Then
However, the support of random variable Y=X2 is R1 =( 0,1 ) and
That is, and R1. Hence
, which illustrates the preceding observation.
When it exists, mathematical expectation E satisfies the following properties: