Random Variables
A random variable is a variable whose value is determined by the outcome of some chance experiment. In general, each outcome of an experiment can be associated with a number by specifying a rule of association. Associating a number with each point (element) of a sample space is merely another way of saying that we are defining a function over the points of a sample space.
Definition If S is a sample space with a probability measure, and X is a real-valued function defined over the elements of S, then X is called a random variable. That is, a random variable X is a function of an elementary event A: X f ( A), where A S. The value of X depends on which elementary event A occurs as a result of an experiment.
Example 2.1 Two balls are drawn in succession without replacement from a box containing four red balls and three black balls. We want to list the elements of the sample space and the corresponding values x of the random variable X, the total number of red balls drawn
Example 2.2 Consider an experiment in which a car with Greater Accra registration number (GR or GT) is selected, and define a random variable X by X=1, if the selected car has a Greater Accra registration number and X=0, if the selected car does not have a Greater Accra registration number. That is, if a car has registration number GT 5246 B, then while X ( GT 5246 B) 1. Also while X ( CR 9134 Q) 0 X ( WR 2376 D) 0 X( GT 4801 W) 1
Random variables are usually classified according to the number of values, which they can assume. There are two fundamentally different types of random variables-discrete and continuous random variables.
A discrete random variable is a random variable that assumes its values only at isolated points. A continuous random variable is a random variable that, prior to the experiment can conceivably assume any value in some interval or continuous span of real numbers.
Discrete Random Variables Definition: A variable quantity X, that in an experiment assumes one value out of a finite or infinite sequence x 1, x 2,... x k, is called a discrete random variable, if to each value x k, there corresponds a definite probability Pk that the variable X will assume the value. x k k
That is, a discrete random variable is a variable that assumes its values only at isolated points. If X is a discrete random variable, the function given by f ( x) P( X x) for each x within the range of X is called the probability distribution of X
Theorem: A function can serve as the probability distribution of a discrete random variable X if and only if its values, f (x) satisfy the following conditions: 1. f ( x) 0 for each value within its domain. 2. f ( x) 1 where the summation extends x over all the values within its domain.
Example 2.3 Check whether the following functions can serve as probability distribution of discrete random variables. x 1. x), for 0,1,2,3,4,5 f ( x 15 x 2. g x) x2, for 1,2,3,4 ( 2 2 3. h x) x, for x 0,1,2,3,4 ( 25 v( x) 4, x 1 4. for 0,1,2,4
Presentation of Discrete Probability Distributions 1. The functional relationship between the probabilities P k and the random variables x k is called the distribution law of the random variable X. Values of X Probability x 1 P 1 x 2 P 2 x k P k
Example.2.4 The probability of the occurrence of event A in each of an infinite sequence of trials is equal to P. The random variable X is the number of the trial in which A occurred for the first time. Find the law of distribution of X.
2. The distribution law can also be represented graphically in the form of a polygon of probability distribution or the frequency polygon. The value x i of the random variable having the greatest probability is called the mode.
The most general form of the distribution law is the distribution function. We shall write the probability that X takes on a value less than or equal to x as F ( x) P( X x) and refer to this function defined for all real numbers x as the distribution function or the cumulative distribution of X.
Definition If X is a discrete random variable, the function given by for x F ( x) P( X x) f ( t) tx is called the distribution function or the cumulative distribution of X, and f(t) is the value of the probability distribution of X at t.
The distribution function, for any random variable possesses the following properties: 1. F( ) 0 and F( ) 1 a b F( a) F( b) 2. If, then for any real numbers a and b.
Example 2.5 Find the cumulative distribution function of the total number of heads obtained in three tosses of a balanced coin.
Numerical Characteristics of Discrete Random Variables Associated with any random variable X, there exist parameters or constants that characterise the random variable over the entire population under study. The most common of these are the mean () ), the variance, and the standard deviation ( ) ( 2
Mathematical Expectation of a Discrete Random Variable Definition: The mathematical expectation (or simply expectation) of a random variable X denoted by E[x] or E x is the sum of the products of all possible values of the random variable by the probabilities of these variables.
Thus E X x1p 1 x2p2... x n Pn Or more compactly where E n k 1 n X P k 1 k 1 x k P k
The Variance and the Standard Deviation of a Discrete Random Variable Definition: The variance of a random variable denoted by V[x] or 2 is the expectation of the square of the difference between X and its expectation. Mathematically, the variance of a random variable is defined as V X E( X E ) 2 P EX 2 ( EX ) 2 x k n k 1 ( x k E x 2 ) P k
Definition: The mean square deviation or the standard deviation of a random variable X denoted by, is the square root of its variance. Mathematically we write n k1 ( x k E x 2 ) P k
Example 2.6: A random variable is specified by the following distribution table Determine 1. The expectation 2. The variance 3. The standard deviation X 2 3 4 P k 0.3 0.4 0.3
Example.2.7 The probability that Mr Sekyi-Baidoo will sell a piece of property at a profit of 3 million cedis is 0.15. The probability that he will sell it at a profit of 1.5 million cedis is 0.35. The probability that he will break even is 0.35 and the probability that he will lose 1.5 million cedis is 0.15. What is his expected profit?
Continuous Random Variables Definition A continuous random variable is one that can assume any value in some interval of real numbers, and the probability that it can assume any specific value is zero. We designate the probability distribution by the functional notation f (x).
Probability Density Function (p.d.f) Definition: The function f (x) is a probability density function for the continuous random variable X, defined over the set of real numbers R, if P ( a x b) f ( x) dx b a
f (x) For to be a legitimate p.d.f, it must satisfy two conditions: 1. for all x f ( x) 0. 2. f ( x) dx 1 That is, the area under the entire graph of is equal to 1
Example 2.8 If a random variable has the p.d.f find the probability that it will take on a value (a) between 1 and 3 (b) greater than 0.5 0, 0 0, 2 ) ( 2 x x e x f x
Example 2.9 If X has a probability density function of the form f ( x) 3 x ke, x 0 0, x 0 Determine P( 0.5 x 1)
The Distribution Function As in the discrete case, we shall write as the probability that a random variable with p.d.f f (x) takes one value less than or equal to x and we shall refer to the corresponding function F(x) as the distribution function or the cumulative distribution of the random variable. F(x)
Definition: If x is a continuous random variable and the value of its p.d.f at t is f then the function given by (t) x F x) P( X x) f ( t) dt, for ( x is called the distribution function, or the cumulative distribution of X.
Example 2.10 If a random variable has the p.d.f, f ( x) 2e 0, 2 x, x 0 x 0 find F(x) and hence evaluate P( x 1).
Example 2.11 Consider the function f ( x) 1 2 3 x, 1 x 2 0, elsewhere 1. Verify that this function defines a p.d.f. 2. Find P( 1 x 1) F(x) 3. Find and use it to evaluate P( x 1) 4. What can you deduce from your answers in (2) and (3)?
Numerical Characteristics of a Continuous Random Variable Definition: Let be a continuous random variable with probability density function f (x). The mathematical expectation E[X ] or of X is given by E[ x] xf ( x) dx.
Definition: The variance 2 of a continuous random variable X with probability density function f (x) and mean is given by 2 2 ( x ) f ( x) dx 2 E[( x ) ] E[( x )] ( E[ x]) 2 2
Definition: The standard deviation of a continuous random variable is the square root of its variance.
Example 2.12 The probability density function of weekly gravel sales is given by 3 2 2 (1 x ), 0 x 1 f ( x) 0,otherwise Find: 1. The expectation 2. The variance 3. The standard deviation
Example2.13 If a random variable has the p.d.f 2 x 2e, x 0 f ( x) 0, otherwise Find the mean, the variance and the standard deviation of the given random variable.