1

BA 1605

Chapter 7 Random Variables and Discrete Probability Distributions

In this chapter we combine the concepts of descriptive statistics (Chapter 4) and probability (Chapter 6) when learning about random variables and their probability distributions.

7.1 Random Variables and Probability Distributions

 A random variable (usually denoted as X) is a variable whose outcome is determined by chance.  A discrete random variable has a finite number of values or a countably infinite number of values. For example: X = number of days that it rained in May, or X= number of heads in three tosses of a coin, or X = number of flaws in two metres of fabric.  A continuous random variable has infinitely many values and is associated with measurements on a continuous scale without gaps or interruptions. For example: X = weight of 10 year old boys, X = diameter of bolts  A probability distribution is a description that gives the probability for each value of the random variable. It is often expressed as a table, a graph or a formula. We will only examine discrete probability distributions in this chapter

Example: In an experiment that consists of flipping a coin three times, let X be the number of heads observed. Note that X can take on the values 0, 1, 2, 3. The probability distribution of X can be expressed in the following ways:

0 0.125 1 0.375 2 0.375 3 0.125 2

Probability Distribution of X

0.4 x

f 0.3 o

y t i l

i 0.2 b a b o

r 0.1 p

0 Number of heads in three tosses

3 n 骣1 P( X= x ) = C 琪 Note: This is an example of a binomial probability x 桫2 distribution that we will learn about in the next section.

Properties of Discrete Probability Distributions

1. 0#P ( x ) 1 , for every value of x = 2. P( x ) 1 x

Example:

Determine whether the following are valid probability distributions: 1 a) P( x) =, x = 1,2,3,4 yes 4 1 P( x) =, x = 0,1,2 b) 2( 2- x) ! x ! yes 1 c) P( x) =, x = 1,2,3 no x

Mean of the Random Variable X

 Random variables also have mean, variance and standard deviations. We use the concept of expected value to calculate them.  The mean of a discrete random variable is the long term average if we had repeated the experiment an infinite number of times. It is the expected value after an infinite number of repetitions. 3

 The mean or expected value of X, denoted  or E(X), can be found by E X  xP x the following formula, in the discrete case:     . In the x continuous case, we use calculus and the concept of integration instead of summation, but not in this class.

Example

X= # of heads in three tosses 骣1 骣 3 骣 3 骣 1 12 E( X ) =0琪 + 1 琪 + 2 琪 + 3 琪 = = 1.5 桫8 桫 8 桫 8 桫 8 8 Note that the E(X) does not have to take on a possible value of X, since it is the long term average.

The variance and standard deviation of X is more complicated than that of the mean. Before starting, let us look at some properties of expected value.

= Definition: E[ g( x)] g( x) P( x ) x

Example:

+ = +( ) = + = + a) E(3 X 5) 邋( 3 x 5) P x[ 3 xP( x) 5 P( x)] 邋 3 xP( x) 5 P( x ) x x x x E(3 X+ 5) = 3邋 xP( x) + 5 P( x) = 3 E( X ) + 5 x x = = = b) E(3) 邋 3 P ( x ) 3 P( x ) 3 x x Properties of Expected Value

Where a, b, c are constants and X is a random variable

1. E(c) = c 2. E( ax+ b) = aE( x) + b

Variance of Discrete Random Variable X

2 2 2 Var (X) or s=E( X - m) =( x - m ) P( x ) x 4

Example

X= # of heads in three tosses E( X ) = 1.5 2 2 s 2 =E( X -1.5) =( x - 1.5) P( x ) x

2骣1 2 骣 3 2 骣 3 2 骣 1 6 3 s 2 =(0 - 1.5) 琪 +( 1 - 1.5) 琪 +( 2 - 1.5) 琪 +( 3 - 1.5) 琪 = = 桫8 桫 8 桫 8 桫 8 8 4

Shortcut method for the Variance of Random Variable X

2 2 2 2 2 2 2 2 s=E( X ) - m or s=E( X) -臌轾 E( X) = x P( x ) - m x

Proof: 2 2 s2 =E( X - m) =( x - m ) P( x ) x s2=(x 2 -2 m x + m 2 ) P( x ) x s2=邋x 2 P( x) -2 m xP( x) + m 2 P( x ) x x x s2=E( X 2) - m 2

Example

X= # of heads in three tosses E( X ) = 1.5 骣1 骣 3 骣 3 骣 1 24 E( X2) = x 2 P( x ) =0 2琪 + 1 2 琪 + 2 2 琪 + 3 2 琪 = = 3 x 桫8 桫 8 桫 8 桫 8 8 s2=E( X 2) - m 2 =3 - 1.5 2 = 0.75

Standard Deviation for Discrete Random Variable X

2 22 2 2 SD(X) or s=(x - m ) P( x ) or s=E( X) -臌轾 E( X) = x P( x ) - m x x 5

Example

X= # of heads in three tosses 3 3 s = = 0.866 4 2

Properties of Variance

1. V( c ) = 0 2. V( X+ c) = V( X ) 3. V( aX+ c) = a2 V( X )

Exercises page 217 - 221