Download Lecture 27 - WordPress.com

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Statistics wikipedia , lookup

Ars Conjectandi wikipedia , lookup

History of statistics wikipedia , lookup

Probability wikipedia , lookup

Probability interpretations wikipedia , lookup

Transcript
STA301 – Statistics and Probability
Lecture No 27:



Properties of Expected Values in the case of Bivariate Probability Distributions (Detailed discussion)
Covariance & Correlation
Some Well-known Discrete Probability Distributions:

Discrete Uniform Distribution

An Introduction to the Binomial Distribution
EXAMPLE:
Let X and Y be two discrete r.v.’s with the following joint p.d.
y
1
3
5
0.10
0.20
0.10
x
2
4
0.15 0.30 0.15
Find E(X),
E(Y),
E(X + Y), and
E(XY).
SOLUTION:
To determine the expected values of X and Y, we first find the marginal p.d. g(x) and h(y) by adding over the
columns and rows of the two-way table as below:
y
1
3
5
g(x)
2
0.10
0.20
0.10
0.40
4
0.15
0.30
0.15
0.60
h(y)
0.25
0.50
0.25
1.00
x
Now
E(X) =  xi g(xi)
= 2 × 0.40 + 4 × 0.60
= 0.80 + 2.40 = 3.2
E(Y) =  yj h(yj)
= 1 × 0.25 + 3 × 0.50 + 5 × 0.25
= 0.25 + 1.50 + 1.25
= 3.0
Hence
E(X) + E(Y) = 3.2 + 3.0 = 6.2

 
EX  Y     x i  y j f x i , y j

i j
= (2 + 1) (0.10) + (2 + 3) (0.20) +
(2 + 5) (0.10) + (4 + 1) (0.15) +
(4 + 3) (0.30) + (4 + 5) (0.15)
= 0.30 + 1.00 + 0.70 + 0.75 +
2.10 + 1.35 = 6.20
= E(X) + E(Y)
In order to compute E(XY) directly, we apply the formula:

 
EXY     x i y j f x i , y j
i
In this example,

j

 
EXY     x i y j f x i , y j

i j+ (2  3) (0.20) + (2  5) (0.10) + (4  1) (0.15) + (4  3) (0.30) + (4  5) (0.15)
= (2  1) (0.10)
= 9.6
Virtual University of Pakistan
Page 207
STA301 – Statistics and Probability
Now
E(X) E(Y)
= 3.2  3.0
= 9.6
Hence E(XY) = E(X) E(Y) implying that X and Y are independent.
This was the discrete situation; let us now consider an example of the continuous situation:
EXAMPLE:
Let X and Y be independent r.v.’s with joint p.d.f.
f ( x , y) 


x 1  3y 2
,
4
0 < x < 2, 0 < y < 1
= 0, elsewhere.
Find E(X), E(Y), E(X + Y) and E(XY).
To determine E(X) and E(Y), we first find the marginal p.d.f. g(x) and h(y) as below:



x 1  3y 2
gx    f x , y  dy  
dy
4

0
1
1


1
x
  xy  xy 3  , for 0 < x < 2.
h y   4 f x, y dx 0 2

2

2 x 1  3y 2


4  2
4
0

 dx  1  x 2  3xy 2 

1
1  3y 2 ,
2

0
for 0 < y < 1.
Hence

EX    x gx  dx

2
1  x3  4
x
  x   dx     , and
2  3  3
0 2
2
0

11


EY    y h y  dy   y 1  3y 2 dy
20

1
And
1  y 2 3y 4  1  1 3  5
  

 ,

2  2
4  2  2 4  8
 
0
EX  Y     x  y  f x, y  dx dy

Virtual University of 
Pakistan


x 1  3y 2


x

y
dy dx

4
00
21
Page 208
STA301 – Statistics and Probability
21
 
00
2 1 xy  3xy 3
x 2  3x 2 y 2
dx dy   
dy dx
4
4
00
1
1  xy

x y  x y  dx   
4 2
4
1
21

0
2
2 3
2
0
2

0

3xy 4 
 dx
4 
0
1  x 3x 

2x 2 dx      dx
4
42 4 
21
2
0
0

2

2
 x 3  1  x 2 3x 2 
   

8 
 3  4  4
1
2
0

0
4 5 47
 
, and
3 8 24
 
EXY     xy f x, y  dx dy
 
21
   xy 
00


2 1 x 2 y  3x 2 y 3
x 1  3y 2
dy dx   
dy dx
4
4
00
1
2 4
2 2
2 1  5x 2
2
3
x y

3x y
1  5x
5
 dx 
 


 dx   



4 
4  12  6
04 2
0 4 4 
21
0
0
It should be noted that
i) E(X) + E(Y) = 4/3 +
5/8
= 47/24 = E(X + Y), and
ii) E(X) E(Y) = (4/3) (5/8)
= 5/6 = E(XY).
Hence, the two properties of mathematical expectation valid in the case of bivariate probability distributions are
verified.
Next, we consider the COVARIANCE & CORRELATION FOR BIVARIATE PROBABILITY DISTRIBUTIONS
COVARIANCE OF TWO RANDOM VARIABLES:
Virtual University of Pakistan
Page 209
STA301 – Statistics and Probability
The covariance of two r.v.’s X and Y is a numerical measure of the extent to which their values tend to
increase or decrease together.
It is denoted by XY or Cov (X, Y), and is defined as the expected value of the product
[X – E(X)] [Y – E(Y)].
That is
Cov (X, Y) = E {[X – E(X)] [Y – E(Y)]}
And the short cut formula is:
Cov (X, Y) = E(XY) – E(X) E(Y).
If X and Y are independent, then
E(XY) = E(X) E(Y), and
Cov (X, Y) = E(XY) – E(X) E(Y)
=0
It is very important to note that covariance is zero when the r.v.’s X and Y are independent but its converse is not
generally true. The covariance of a r.v. with itself is obviously its variance.
Next, we consider the Correlation Co-efficient of Two Random Variables.
Let X and Y be two r.v.’s with non-zero variances 2X and 2Y.
Then the correlation coefficient which is a measure of linear relationship between X and Y, denoted by XY (the Greek
letter rho) or Corr(X, Y), is defined as
 XY

EX  E X Y  E X 
XY
Cov X, Y 

Var X  Var Y 
If X and Y are independent r.v.’s, then XY will be zero but zero correlation does not necessarily imply independence.
Let us now apply these concepts to an example:
EXAMPLE:
From the following joint p.d. of X and Y, find Var(X), Var(Y), Cov(X,Y) and .
y
0
1
2
3
g(x)
0
1
2
0.05
0.05
0
0.05
0.10
0.15
0.10
0.25
0.10
0
0.10
0.05
0.20
0.50
0.30
h(y)
0.10
0.30
0.45
0.15
1.00
x
Now
E(X)
E(Y)
E(X2)
E(Y2)
= xig(xi)
= 0  0.20 + 1  0.50 +2  0.30
= 0 + 0.50 + 0.60 = 1.10
= yjh(yj)
= 0  0.10 + 1  0.30 + 2  0.45 + 3  0.15
= 0 + 0.30 + 0.90 + 0.45 = 1.65
= xi2g(xi)
= 0  0.20 + 1  0.50 + 4  0.30
= 1.70
= yj2h(yj)
= 0  0.10 + 1  0.30 + 4  0.45 + 9  0.15
= 3.45
Thus
Var(X) = E(X2) – [E(X)]2
= 1.70 – (1.10)2 = 0.49,
Virtual University of Pakistan
Page 210
STA301 – Statistics and Probability
and
Var(Y) = E(Y2) – [E(Y)]2
= 3.45 – (1.65)2 = 0.7275
Again:
E(XY)
=
  x y  f x , y 
i
i
j
i
j
j
= 1  0.10 + 2  0.15 + 2  0.25 + 4  0.10 + 3  0.10 + 6  0.05
= 0.10 + 0.30 + 0.50 + 0.40 + 0.30 + 0.30
= 1.90

Cov(X,Y) = E(XY) – E(X) E(Y)
= 1.90 – 1.10  1.65 = 0.085, and


CovX, Y 
Var X  Var Y 
0.085
(0.49) 0.7275

0.085
0.595
 0.14
Hence, we can say that there is a weak positive linear correlation between the random variables X and Y.
EXAMPLE:
If f(x, y)
= x2 + xy/3 , 0 < x < 1, 0 < y < 2
= 0,
elsewhere,
Find
Var(X), Var(Y) and Corr(X,Y).
The marginal p.d.f.’s are
2
xy 
3

gx     x 2   dy  2x 2  x,
3 
2
0 
0  x 1
and
1
xy 
1 y

h y     x 2   dx   ,
3 
3 6
0 
Now
0y2

E X    xg x  dx

1
2x 
13

  x  2x 2 
 dx  ,
3 
18
0 

E Y    yh y  dy

2
10
1 y
  y    dy  .
9
0 3 6
Thus
Var X   EX  EX 2

 
x   x 2 gx  dx

Virtual University
of Pakistan
2
13  
2x 
73

   x    2x 2 
 dx 
18  
3 
1620
0 
1
Page 211
STA301 – Statistics and Probability
Var Y   EY  EY 2



  y   y 2 h y  dy

2
10   1 y 
26

   y      dy  , and
9  3 6
81
0 
2
Cov(X, Y)
= E{[X – E(X)] [Y – E(Y)]}
13  
10  
xy 

    x    y    x 2   dy dx
18  
9
3 
0 0 
1 2
1
25 2 26 
1
 2
    x3 
x 
x  dx 
.
9
81
243
162


0
Hence
Corr X, Y  

CovX, Y 
Var X  Var Y 
 1 162
(73 1620) 26 81
  0.05
Hence we can say that there is a VERY weak negative linear correlation between X and Y.In other words, X and Y are
almost uncorrelated.This brings us to the end of the discussion of the BASIC concepts of discrete and continuous
univariate and bivariate probabilWe now begin the discussion of some probability distributions that are WELLKNOWN, and are encountered in real-life situations.
First of all, let us consider the DISCRETE UNIFORM DISTRIBUTION.
We illustrate this distribution with the help of a very simple example:
EXAMPLE:
Suppose that we toss a fair die and let X denote the number of dots on the upper-most face.
Virtual University of Pakistan
Page 212
STA301 – Statistics and Probability
Since the die is fair, hence each of the X-values from 1 to 6 is equally likely to occur, and hence the probability
distribution of the random variable X is as follows:
X
1
2
3
4
5
6
Total
P(x)
1/6
1/6
1/6
1/6
1/6
1/6
1
If we draw the line chart of this distribution, we obtain:
Line Chart Representation of the
Discrete Uniform Probability Distribution
Probability
P(x)
2/6
1/6
0
1
2
3
4
5
X
6
No. of dots on the upper-most face
As all the vertical line segments are of equal height, hence this distribution is called a uniform distribution.
As this distribution is absolutely symmetrical, therefore the mean lies at the exact centre of the distribution i.e. the
mean is equal to 3.5.
Virtual University of Pakistan
Page 213
STA301 – Statistics and Probability
Line Chart Representation of the
Discrete Uniform Probability Distribution
Probability
P(x)
2/6
1/6
X
0
1
2
3
4
5
6
No. of dots on the
upper-most face
 = E(X) = 3.5
What about the spread of this distribution? You are encouraged to compute the standard deviation as well as the
coefficient of variation of this distribution on their own.
Let us consider another interesting example:
EXAMPLE:
The lottery conducted in various countries for purposes of money-making provides a good example of the
discrete uniform distribution.
Suppose that, in a particular lottery, as many as ten thousand lottery tickets are issued, and the numbering is 0000 to
9999. Since each of these numbers is equally likely to occur, hence we have the following situation:
Probability
of Winning
Discrete Uniform Distribution
9996
9996
9997
9998
9999
0000
0001
0002
0003
0004
0005
0006
0007
0008
0009
1/10000
X
INTERPRETATION:
It reflects the fact that winning lottery numbers
selected by a random procedure which makes all numbers
LotteryareNumber
equally likely to be selected. The point to be kept in mind is that, whenever we have a situation where the various
Virtual University of Pakistan
Page 214
STA301 – Statistics and Probability
outcomes are equally likely, and of a form such that we have a random variable X with values 0, 1, 2, … or , as in the
above example, 0000, 0001 …, 9999, we will be dealing with the discrete uniform distribution.
Next, we discuss the BINOMIAL DISTRIBUTION.
The binomial distribution is a very important discrete probability distribution. It was discovered by James Bernoulli
about the year 1700.We illustrate this distribution with the help of the following example:
EXAMPLE:
Suppose that we toss a fair coin 5 times, and we are interested in determining the probability distribution of
X, where X represents the number of heads that we obtain.
We note that in tossing a fair coin 5 times:
1) every toss results in either a head or a tail,
2) the probability of heads (denoted by p) is equal to ½ every time (in other words, the probability of heads
remains constant),
3) every throw is independent of every other throw, and
4) the total number of tosses i.e. 5 is fixed in advance.
The above four points represents the four basic and vitally important PROPERTIES of a binomial experiment.
PROPERTIES OF A BINOMIAL EXPERIMENT:
1.
Every trial results in a success or a failure.
2.
The successive trials are independent.
3.
The probability of success, p, remains constant from trial to trial.
4.
The number of trials, n, is fixed in advanced.
In the next lecture, we will deal with the binomial distribution in detail, and will discuss the formula that is valid in the
case of a binomial experiment.
Virtual University of Pakistan
Page 215