Discrete Random Variables. Numerical Outcomes Consider associating a numerical value with each...

Post on 03-Jan-2016

216 views 2 download

Tags:

transcript

Discrete Random Variables

Numerical Outcomes

• Consider associating a numerical value with each sample point in a sample space.

(1,1) (1,2) (1,3) (1,4) (1,5) (1,6)(2,1) (2,2) (2,3) (2,4) (2,5) (2,6)(3,1) (3,2) (3,3) (3,4) (3,5) (3,6)(4,1) (4,2) (4,3) (4,4) (4,5) (4,6)(5,1) (5,2) (5,3) (5,4) (5,5) (5,6)(6,1) (6,2) (6,3) (6,4) (6,5) (6,6)

:9101112

• For example, associate each roll of 2 dice with the sum of their faces.

Random Variable

• A real-valued functionwhose domain is the sample space Sis a random variable for the experiment.

:f S

• We refer to values of the random variable as events. For example, {Y = 9}, {Y = 10}, etc.

:(3, 6)(4, 6)(5, 5)(6, 4)(5, 6) :

: 9101112f

S Y

Probability Y = y• The probability of an event, such as {Y = 9}

is denoted P(Y = 9).• In general, for a real number y,

the probability of {Y = y} is denoted P(Y = y), or simply, p( y).

• P(Y = y) is the sum of probabilities for sample points which are assigned the value y.

• When rolling two dice, P(Y = 10) = P({(4, 6)}) + P({(5, 5)}) + P({(6, 4)}) = 1/36 + 1/36 + 1/36 = 3/36

Discrete Random Variable• A discrete random variable is a random variable

that only assumes a finite (or countably infinite) number of distinct values.

• For an experiment whose sample points are associated with the integers or a subset of integers, the random variable is discrete.

• For an experiment whose sample points are associated with the reals or an interval of real numbers, the random variable is not discrete.(Chapter 4 considers “continuous random variables”.)

“Towards Statistics”• Studying probability, we learn about certain types

of random variables that occur frequently in practice and their probability distributions. Knowledge about the probabilities of these common random variables may help us make appropriate inferences about a population. (page 84).

• Remember, our theoretical models represent the distribution that may be expected but may differ from the actual frequencies resulting from an experiment. (page 87)

Probability Distribution• A probability distribution describes the probability

for each value of the random variable.

Presented as a table, formula, or graph.

y p(y)2 1/363 2/364 3/365 4/366 5/367 6/368 5/369 4/3610 3/3611 2/3612 1/36

0

0.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16

0.18

2 3 4 5 6 7 8 9 10 11 12

Probability Distribution• For a probability distribution:

y p(y)2 1/363 2/364 3/365 4/366 5/367 6/368 5/369 4/3610 3/3611 2/3612 1/36 = 1.0

( ) 1y

p y

Here we may take the sum just over those values of y for which p(y) is non-zero.

And, of course,

0 ( ) 1, for all .p y y

Expected Value

• The “long run theoretical average”• For a discrete R.V. with probability function p(y),

define the expected value of Y as:

( ) ( )y

E Y y p y

• In a statistical context, E(Y) is referred to as the mean and so E(Y) and are interchangeable.

An average circle?

• Suppose a class has cut some circles out of construction paper, as described below.

Radius(inches) frequency 3 150 4 200 6 125

Let radius be the random variable, R.Compute E(R).

Function of a Random Variable

• Suppose g(Y) is a real-valued function of a discrete random variable Y.

[ ( )] ( ) ( )y

E g Y g y p y

• It follows g(Y) is also a random variable with expected value

s y g(y)

Y g(Y)S

Expected Circumference

• Consider the function C = 2R.• C is a function of a random variable, and so C is

also a random variable.

Radius(inches) circumference frequency 3 6 150 4 8 200 6 12 125

• Compute the expected value, E(C).

For a constant multiple…

• Of course, a constant multiple may be factored out of the sum

( ) ( ) ( )

( ) ( )

y

y

E cY c y p y

c y p y cE y

• Thus, for our circles, E(C) = E(2R) = 2E(R).

For a constant function…

• In particular, if g(y) = c for all y in Y, then E[g(Y)] = E(c) = c.

( ) ( )

( ) ( )(1)

y

y

E c c p y

c p y c c

For sums of variables…

• Also, if g1(Y) and g2(Y) are both functions of the random variable Y, then

1 2 1 2

1 2

1 2

1 2

[ ( ) ( )] ( ( ) ( )) ( )

[ ( ) ( ) ( ) ( )]

( ) ( ) ( ) ( )

[ ( )] [ ( )]

y

y

y y

E g Y g Y g Y g Y p y

g Y p y g Y p y

g Y p y g Y p y

E g Y E g Y

All together now…

• So, when working with expected values, we have

1 2 1 2[ ( ) ( )] [ ( )] [ ( )]E g Y g Y E g Y E g Y

( ) ( ), and ( ) .E cY cE y E c c • Thus, for a linear combination Z = c g(Y) + b,

where c and b are constants:

( ) [ ( ) ]

[ ( )] ( )

[ ( )]

E Z E cg Y b

E cg Y E b

c E g Y b

Variance, V(Y)

• For a discrete R.V. with probability function p(y), define the variance of Y as:

2( ) [( ) ]V Y E Y

• Here, we use V(Y) and interchangeably to denote the variance.

• As previously, the positive square root of the variance is the standard deviation of Y.

Computing V(Y)

• Based on our definition of the variance of Y2( ) [( ) ]V Y E Y

• And applying our rules for expected value, we find variance may be expressed as

2 2 2

2 2

( ) [( ) ] [ 2 ]

[ ] (2 ) [ ] [ ]

V Y E Y E Y Y

E Y E Y E

2 2

22 2 2

[ ] (2 )( )

[ ] or [ ] [ ]

E Y

E Y E Y E Y

(as the mean is a constant)

“Moments and Mass”

• Note the probability function p(y) for a discrete random variable is also called a “probability mass function”.

• The expected values E(Y) and E(Y2) are called the first and second moments, respectively.

Did you compute mass and moments in Calculus?

Variance of R?

• For our collection of circles, determine the variance of the random variable R

Radius(inches) frequency 3 150 4 200 6 125

22( ) [ ] [ ]V R E R E R 2( ) [( ) ]RV R E R

It’s your choice. Which formula is easier?

or

Variance of C?

• For our collection of circles, determine the variance, 22( ) [ ] [ ]V C E C E C

Radius(inches) circumference frequency 3 6 150 4 8 200 6 12 125

• It can be shown that 2( ) c ( )V cY V Y

2(2

Verify that

) (2 ) ( ) V R V R