stat 111 chapter four random variables and their probability distributions 1

17
STAT 111 Chapter Four Random Variables and Their Probability Distributions 1

Upload: verity-henry

Post on 04-Jan-2016

224 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: STAT 111 Chapter Four Random Variables and Their Probability Distributions 1

STAT 111

Chapter Four

Random Variables and Their Probability Distributions

1

Page 2: STAT 111 Chapter Four Random Variables and Their Probability Distributions 1

Random Variables

In the previous chapter, we introduced properties of a set function P defined on a sample space (S,f).In this chapter, we define random variables and discuss some of its properties.

Definition A random variable is a function whose domain is a sample space and whose range is a set of real numbers.

Random variables will be represented by capital letters X, Y, Z, etc., whereas, x,y,z will denote particular values a random variable may assume. Mathematically, a random variable X is a mapping

X: S → R

where the domain S is a sample space and R is the set of real numbers. It should be noted that the fundamental difference between a random variable and a real-valued function of a real variable is the associated notion of a probability distribution. Also, the name R.V(random variable) and not a function because the R.V is developed long before the term function is introduced.

2

Page 3: STAT 111 Chapter Four Random Variables and Their Probability Distributions 1

Example Suppose that a coin is tossed

twice, let X represent the number of heads which can come up. Find the possible values of X.

Solution

X= number of heads

 Possible values x=0,1,2 (the values in the range, ordered, no repetition).

3

(H,H)

(H,T)

(T,H)

(T,T)

0

1

2

Page 4: STAT 111 Chapter Four Random Variables and Their Probability Distributions 1

Note

Random variables may be given by describing the quantity of interest, for example, in the case of X in the preceding example, we let X represent the number of heads which can come up. From this the functional relationship between sample space elements and real numbers may be determined.

It should be noted that many other random variables could also be defined on this sample space, for example the square of the number of heads, the number of heads minus the number of tails, etc.

4

Page 5: STAT 111 Chapter Four Random Variables and Their Probability Distributions 1

Discrete Distributions It is said that a random variable X has a discrete distribution if X can take only a finite number n

of different values x1,...,xn or, countably infinite number of different values x1, x2,…. Examples of discrete random variables are; the number of bacteria per unit area in the study of

drug control on bacterial growth, the number of defective television sets in a shipment of 100.Indeed, discrete random variables most often represent counts associated with real phenomena.

If X can take an infinite number of possibilities equal to the number of points on aline segment, then X has a continuous distribution.

Definition:

If a random variable X has a discrete distribution, the probability mass function (abbreviated p.m.f.) of X is defined as the function f such that for any real number x,

f(x) = P(X = x)

and f(x)=0, for any point x which is not one of the possible values of X. The expression (X= x) can be read, the set of all points in S assigned the value x by

the random variable X, and P(X=x) is defined to be the sum of the probabilities of allsample points in S that are assigned the value x.

5

Recall that a set of elements is Countably infinite if the elements of

the set can be put into one-to-one Correspondence with the positive integers

Page 6: STAT 111 Chapter Four Random Variables and Their Probability Distributions 1

Probability mass function (p.m.f.)Properties of p.m.f.

f(x) is a probability mass function iff

It is often instructive to present the probability mass function in graphical format by plotting f(x) on the y-axis against X; on the x-axis. Before presenting several examples of p.m.f, we would like to point out that the p.m.f. of X is often called by a variety of other names. Among these are the following:

1. Distribution of the random variable X

2. Probability function

3. Discrete density function.6

x

1f(x) 2.

x 0f(x) .1

Page 7: STAT 111 Chapter Four Random Variables and Their Probability Distributions 1

Example Determine whether the following can be probability mass function and

explain your answers.

1. ƒ (x) =1/5 , x = 0,1,2,3,4,5

7

0,1,2,3,4 x,30

xf(x) .2

2

p.m.f. a is f(x) 1f(x) andx 0f(x)x

1,2,3,4,5 x,

5

2-xf(x) .3

p.m.f. a bet can' f(x) 05

1

5

2-1f(1)

p.m.f. a bet can' f(x) 1f(x) x

Page 8: STAT 111 Chapter Four Random Variables and Their Probability Distributions 1

Example

Suppose that a pair of fair coins is tossed and let the random variable X denote the number of heads minus the number of tails.

1. Obtain the probability distribution for X

X=number of H - number of T,

S= {HH,HT,TH,TT}

8

(H,H)

(H,T)

(T,H)

(T,T)

-2

0

2

2

1

4

2THHT,P0XP0f

4

1TTP2-XP2-f

4

1HHP2XP2f

x-202sum

f(x)1/41/21/41

The probability distribution for X

Page 9: STAT 111 Chapter Four Random Variables and Their Probability Distributions 1

2. Construct a graph for this probability distribution

9

-2

x-202sum

f(x)1/41/21/41

Page 10: STAT 111 Chapter Four Random Variables and Their Probability Distributions 1

3. Find P(X=1), f(-2), P(X ≤ 2),P(-2≤X<2),P(X<0)

P(X=1)=f(1)=0

f(-2)=1/4

P(X≤ 2)=P(X= - 2)+P(X=0)+P(X=2)=1/4+1/2+1/4=1

P(-2≤X<2)=P(X= -2)+P(X=0)=1/4+1/2=3/4

P(X<0)=P(X= -2)=1/4

10

x-202sum

f(x)1/41/21/41

Page 11: STAT 111 Chapter Four Random Variables and Their Probability Distributions 1

Example

Find the value of k if

Solution

11

x-101

f(x)0.2k0.5

x

1f(x)

0.2+k+0.5=1 k=0.3

Page 12: STAT 111 Chapter Four Random Variables and Their Probability Distributions 1

Example

A shipment of 7 television sets contains 2 defectives. A hotel makes a random purchase of 3 of the sets. If X is the number of defective sets purchased by the hotel. Find the probability distribution for X.

Solution:

X ≡ number of defective possible values of x=0,1,2

12

7

1

3

7

1

5

2

2

2

XP 7

4

3

7

2

5

1

2

1

XP 7

2

3

7

3

5

0

2

0

XP

x011

f(x)2/74/71/7

Page 13: STAT 111 Chapter Four Random Variables and Their Probability Distributions 1

Cumulative Distribution FunctionsThe cumulative distribution function (abbreviated c.d.f.), or more simply the distribution

function F of the random variable X, is defined for all real numbers x, -∞ <x < ∞ as F (x)= P( X ≤ x)In words, F(x) denotes the probability that the random variable X takes on a value that is

less than or equal to x.

Some properties of the c.d.f F are1. 0≤F(x)≤1

2. F is nondecreasing function; that is, if x < y , then F (x) ≤ F ( y)

3. lim x → -∞ F ( x ) = 0 i.e. F(x) = 0 for every x that is less than the smallest value in S

4. limx → ∞ F ( x ) = 1 i.e. F(x)= 1 for every x that is grater than the largest x values in S.

5. F is right continuous. That is, for any x and any decreasing sequence xn ,n ≥ 1, that converges to x,

limx → ∞ F (xn) = F( x ) Note: For a discrete random variable X, the graph of F(x) will have a jump at every

possible value of X and will be flat between possible values. Such a graph is called a step function.

Page 14: STAT 111 Chapter Four Random Variables and Their Probability Distributions 1

ExampleThe probability mass function of the random variable X is given as

Find the distribution function F(x) and graph this distribution function.

Solution:

x123

f(x)1/21/31/6

3

32

21

1

16

52

10

x

x

x

x

xF

Graph of F(x) (step function)

Page 15: STAT 111 Chapter Four Random Variables and Their Probability Distributions 1

Cumulative distribution function

All probability questions about X can be answered in terms of the c.d.f. For example,

P(X≤ a)=F (a) P(X=a)=P( X≤ a) -P (X< a)

=P(X≤ a )-P(X≤ a-1)

=1- F(a) - F (a-1) P(X>a)=1- P(X≤ a)=1 - F(a) P(X≥ a)=1- P(X<a)=1- P(X≤ a -1)= 1-F(a-1) P(X<a)=P(X≤ a - 1)=F (a -1) P(a <X ≤ b)=F(b)-F(a)

Page 16: STAT 111 Chapter Four Random Variables and Their Probability Distributions 1

All probabilities in term of F(a)

In summary, all probabilities in term of F(a)

1. P(a<X≤b) = F (b) – F (a )

2. P(a≤ X≤ b) = P(a-1<X ≤ b) = F(b) –F (a-1)

3. P(a < X < b) = P(a < X≤ b-1)= F (b-1) – F (a )

4. P(a≤ X< b) = P(a-1<X ≤ b-1) =F (b-1) – F (a-1 )

5. P(X = a) = F(a) – F (a-1)

6. P(X ≤ a ) = F (a )

7. P (X < a ) = P (X ≤ a – 1 ) = F ( a – 1 )

8. P (X > a ) = 1 –P (X ≤ a ) = 1 – F ( a )

9. P (X ≥ a ) = 1 – P (X < a ) = 1 – P ( X ≤ a – 1 ) = 1 F ( a – 1 )

Page 17: STAT 111 Chapter Four Random Variables and Their Probability Distributions 1

ExampleThe distribution function of the random

variable X is given by

1. Determine the p .m .f.

The probability mass function is

2. Compute

P(X< 0) =0

P (X = 2 ) =F(2)-F(1)=0.92-0.75=0.17

P( X ≤ 5) =F(5)=1

P (1/2 < X ≤ 4) =F(4)-F(1/2)=1-0.25=0.75

332

2110

0

192.0

75.025.0

0

xx

xx

x

xF

x0123Sum

f(x)0.250.50.170.081

Or simply f(2)=0.17