Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Probability and Statistical Methods

Math 322

Chapter 3 Random Variables and Probability Distributions

In statistics we deal with random variables- variables whose observed value is determined by
chance. Random variables usually fall into one of two categories: discrete or continuous

Random Variable. A random variable (r.v.) is a function that associates a real number with each
element in the sample space. Random variables will be denoted by uppercase letters and their
observed numerical values by lowercase letters.

Discrete Random Variable. A random variable is discrete if it can assume at most a finite or a
countably infinite number of possible values.

Example 1. Two balls are drawn in succession without replacement from an urn containing 4 red
and 3 black balls. The possible outcomes and values y of the random variable Y where Y is the
number of red balls are:
Sample Space y
RR 2
RB 1
BR 1
BB 0

Continuous Random Variable. A random variable is continuous if it can assume any value in
some interval or intervals of real numbers and the probability that it assumes any specific value
is 0.

Discrete Probability Distributions

Definition. The set of ordered pairs ( x, f ( x ) ) is a probability function, probability mass


function or probability distribution of the discrete random variable X if,

(1) f ( x )  0

(2)  f ( x) = 1
x

(3) P ( X = x ) = f ( x ) .

Example 1. A committee of size 5 is to be selected at random from 3 chemists and 5


mathematicians. Find the probability distribution (p.d.) for the number of chemists on the
committee.

Sonuç Zorlu Lecture Notes


1
Let X be the number of chemists on the committee. Then x : 0,1, 2,3 .

 3  5   3  5 
     
P ( X = 0 ) = f ( 0 ) =    = P ( X = 1) = f (1) =    =
0 5 1 1 4 15
;
8 56 8 56
   
 5  5

 3  5   3  5 
     
P ( X = 2 ) = f ( 2 ) =    =  3  2  = 10
2 3 30
; P ( X = 3) = f ( 3) =
8 56 8 56
   
5  5
Therefore the probability distribution of X is

x 0 1 2 3
f ( x) 1 15 30 10
56 56 56 56

Exercise. Among 10 applicants for an open position 6 are female and 4 are males. Suppose 3
applicants are randomly selected from the applicant pool for final interviews. Find the
probability distribution for X , which is the number of female applicants among the final three.

Exercise. Let W be a random variable giving the number of heads minus the number of tails in
three tosses of a coin.
(a) List the elements of the sample space
(b) Assign a value w of W to each sample points.
(c) Find the probability distribution of the random variable W assuming that the coin is
biased so that a head is twice as likely to occur as a tail.

Cumulative Distribution. The cumulative distribution F ( x ) of a discrete random variable X


with probability distribution f ( x ) is

F ( x ) = P ( X  x ) =  f (t ) , for −  x   .
tx

Example 2. Find the cumulative distribution of the number of chemists in Example 1. Using,
10
F ( x ) , show that f ( 3) = .
56

1
F ( 0) = f ( 0) = ;
56

Sonuç Zorlu Lecture Notes

2
16
F (1) = f ( 0 ) + f (1) =
56
46
F ( 2 ) = f ( 0 ) + f (1) + f ( 2 ) = ;
56
F ( 3) = f ( 0 ) + f (1) + f ( 2 ) + f ( 3) = 1 .

Hence,
0, if x  0
1
 if 0  x  1
 56
 16
F ( x) =  if 1  x  2
 56
 46
 56 if 2  x  3

1 if x  3
46 10
Now, f ( 3) = F ( 3) − F ( 2 ) = 1 − = .
56 56

Continuous Probability Distributions

Definition. (Probability Density Function) The function f ( x ) is a probability density


function for the continuous random variable X , defined over the set of real numbers , if

(1) f ( x )  0, for all x 

(2)  f ( x ) dx = 1
−

b
(3) P ( a  X  b ) =  f ( x ) dx .
a

Note that for a continuous random variable X ,


a
P ( X = a ) =  f ( x ) dx = 0 .
a

Cumulative Distribution. The cumulative distribution F ( x ) of a continuous random variable


X with density function f ( x ) is
x
F ( x) = P ( X  x) =  f ( t )dt for −   x   .
−

Sonuç Zorlu Lecture Notes

3
Example 1. Suppose that a random variable X has a probability density function given by
kx (1 − x ) 0  x  1

f ( x) = 

0 elsewhere
(a) Find the value of k that makes this a probability function.
1

 kx (1 − x ) dx = 1  k = 6
0

(b) Find P ( 0.4  X  1)


1  ( 0.4 )2 ( 0.4 )3 
 6 x (1 − x ) dx = 1 − 6  2 − 3  = 0.332
0.4  
(c) Find F ( x ) = P ( X  x ) and sketch the graph of this function.

0, if x  0

F ( x) = 3x 2 − 2 x 3 , if 0  x  1
1, if x 1

Example 2. The weekly demand X for kerosene at a certain supply station has a density
function given by
x for 0  x  1

f ( x) = 1/ 2 for 1  x  2
0
 elsewhere
1 3
(a) Find P   X  
2 2
(b) Find F ( x ) = P ( X  x ) .

Joint Probability Distributions

Joint Probability Distributions of two discrete random variables X and Y :

Definition. The function f ( x, y ) is a joint probability distribution of the discrete random


variables X and Y if
(1) f ( x, y )  0 for all ( x, y)

(2)  f ( x, y ) = 1
x y

(3) P ( X = x, Y = y ) = f ( x, y )

For any region A in the xy − plane , P ( X , Y )  A =  f ( x, y )


A

Sonuç Zorlu Lecture Notes


Example 1. Determine the value of c so that the following functions represent the joint
4
probability distribution of the random variables X and Y .
(a) f ( x, y ) = cxy for x = 1, 2,3, y = 1, 2,3
(b) f ( x, y ) = c x − y for x = −2, 0, 2, y = −2,3

Definition. The function f ( x, y ) is a joint probability density function of the continuous


random variables X and Y if
(1) f ( x, y )  0 for all ( x, y)
 
(2)   f ( x, y )dxdy = 1
− −

(3) P ( X , Y )  A  =  f ( x, y )dxdy


A

for any region A in the xy − plane .

Example 2. Let X denote the reaction time, in seconds, to a stimulant and denote Y the
temperature ( 0 F ) at which a certain reaction starts to take place. Suppose that two random
variables X and Y have the joint density
4 xy, 0  x  1, 0  y  1
f ( x, y ) = 
0, elsewhere
(a) Show that f ( x, y ) is a probability density function
 1 1 1
(b) Find P  0  X  ,  Y   .
 2 4 2

Marginal Distributions

Definition. The marginal distributions of X alone and Y alone are


g ( x ) =  f ( x, y ) and h ( y ) =  f ( x, y )
y x

for the discrete case and


 
g ( x) =  f ( x, y ) dy and h( y) =  f ( x, y ) dx
- -
for the continuous case.

Example 1. Suppose that X and Y have the following joint probability distribution:

f ( x, y ) x 1 2 h( y)
1 0.10 0.15 0.25
y 3 0.20 0.30 0.50
5 0.10 0.15 0.25
g ( x) 0.40 0.60 1

Sonuç Zorlu Lecture Notes

5
(a) Find the marginal distribution of X
x 1 2
g ( x) 0.40 0.60

(b) Find the marginal distribution of Y


y 1 3 5
h ( y ) 0.25 0.50 0.25

Statistical Independence

Theorem. Let X and Y be two random variables, discrete and continuous, with joint
probability distribution f x, y and marginal distributions g ( x) and h( y ) respectively. The
random variables X and Y are said to be statistically independent if and only if

f ( x, y ) g ( x ) h( y )
for all ( x, y ) within their range.

Example 1. Let X denote the number of times a certain numerical control machine will
malfunction: 1,2,3 times on any given day. Let Y denote the number of times a technician is
called on an emergency call. Their joint probability distribution is given as

f x, y x
1 2 3
1 0.05 0.05 0.10
y 2 0.05 0.10 0.35
3 0 0.20 0.10

(a) Find the marginal distribution of X


The Marginal distribution of X is
x 1 2 3
g ( x) 0.10 0.35 0.55

(b) Find the marginal distribution of Y


The marginal distribution of Y is
y 1 2 3
h( y ) 0.20 0.50 0.30

(c) Determine whether X and Y are independent or not.


Let X 1 and Y 1, then f ( x, y ) 0.05 . Now check whether f ( x, y ) g ( x ) h( y ) .
?
So, f (1,1) g (1) h(1) , 0.05 (0.10)(0.20) , which implies that X and Y are not
independent.

Sonuç Zorlu Lecture Notes

6
Example 2. Consider the following joint probability density function of the random variables
X and Y :
3x y
, 1 x 3,1 y 2
f ( x, y ) 9
0 elsewhere

(a) Find the marginal distributions of X and Y

The marginal distribution of X is


2
3x y 1 y2 2 2x 1
g ( x) dy 3xy , 1 x 3
1
9 9 2 1 6

The marginal distribution of Y is


3
3x y 1 3x 2 3 12 2y
h( y ) dx yx , 1 y 2
1
9 9 2 1 9

(b) Are X and Y independent?

If f ( x, y ) g ( x) h( y ) then X and Y are independent.

3x y 2 x 1 12 2 y
Since , the variables X and Y are not independent.
9 6 9

(c) Find P X 2 .
3 3
2x 1 2
P( X 2) g ( x)dx dx .
2 2
6 3

Exercises

1.A coin is tossed twice. Let Z denote the number of heads on the first toss and W the total
number of heads on the 2 tosses. If the coin is unbalanced and a head has a 40% chance of
occurring, find
(a) the joint probability distribution of W and Z
(b) the marginal distribution of W
(c) the marginal distribution of Z
(d) the probability that at least 1 tail occurs.

2. Suppose that 2 batteries are randomly chosen without replacement from the following group
of 12 batteries such that 3 of them are new, 4 are used (working) and 5 are defective.
Let X denote the number of new batteries chosen and Y denote the number of used batteries
chosen. Construct the joint probability distribution for the random variables X and Y .

7
3. Suppose that X and Y have the following joint probability distribution.

x h(y)
f(x,y)
2 4
1 0.10 0.15
y 2 0.30
3 0.10
g(x) 0.60 1

Fill in the missing probabilities and determine whether X and Y are independent or not.

4. A box contains 3 cards numbered as 1, 2 and 3. Two cards are selected at random, without
replacement. Let X and Y be two discrete random variables defined by
X (a, b) = min(a, b) and Y (a, b) = a − b .
a) Determine the sample space;S, of the experiment.
b) Determine the image sets; X ( S ) and Y ( S ).
c) Construct the joint distribution table for X and Y, including marginal distributions.

8
Sonuç Zorlu Lecture Notes

You might also like