+ All Categories
Home > Documents > STA301_LEC27

STA301_LEC27

Date post: 30-Mar-2016
Category:
Upload: amin-butt
View: 217 times
Download: 3 times
Share this document with a friend
Description:
 
75
Virtual University of Pakistan Lecture No. 27 of the course on Statistics and Probability by Miss Saleha Naghmi Habibullah
Transcript
Page 1: STA301_LEC27

Virtual University of Pakistan

Lecture No. 27 of the course on

Statistics and Probability

by

Miss Saleha Naghmi Habibullah

Page 2: STA301_LEC27

IN THE LAST LECTURE, YOU LEARNT

•BIVARIATE Probability Distributions (Discrete and Continuous)

• Properties of Expected Values in the case of Bivariate Probability Distributions

Page 3: STA301_LEC27

TOPICS FOR TODAY

• 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

Page 4: STA301_LEC27

EXAMPLE:

Let X and Y be two discrete r.v.’s with the following joint p.d.

y

x1 3 5

2 0.10 0.20 0.104 0.15 0.30 0.15

Page 5: STA301_LEC27

Find E(X),

E(Y),

E(X + Y), and

E(XY).

y

x1 3 5 g(x)

2 0.10 0.20 0.10 0.404 0.15 0.30 0.15 0.60

h(y) 0.25 0.50 0.25 1.00

Page 6: STA301_LEC27

SOLUTIONTo 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:

Page 7: STA301_LEC27

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

Page 8: STA301_LEC27

i j

jiji y,xfyxYXE

= (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)

Page 9: STA301_LEC27

i j

jiji y,xfyxXYE

In order to compute E(XY) directly, we apply the formula:

In this example,

= (2 1) (0.10) + (2 3) (0.20) + (2 5) (0.10) + (4 1) (0.15) + (4 3) (0.30) + (4 5) (0.15)= 9.6

Page 10: STA301_LEC27

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.

Page 11: STA301_LEC27

This was the discrete situation; let us now consider an example of the continuous situation:

Page 12: STA301_LEC27

EXAMPLE:

Let X and Y be independent r.v.’s with joint p.d.f.

,4

y31x)y,x(f2

0 < x < 2 , 0 < y < 1= 0 , e ls e w h e r e .

Find E(X), E(Y), E(X + Y) and E(XY).

Page 13: STA301_LEC27

To determine E(X) and E(Y), we first find the marginal p.d.f. g(x) and h(y) as below:

Page 14: STA301_LEC27

dy4

y31xdyy,xfxg1

0

2

,2xxyxy

41

1

0

3 for 0 < x < 2.

Page 15: STA301_LEC27

dxy,xfyh

2

0

222

0

2xy3

2x

41dx

4y31x

,y3121 2 f o r 0 < y < 1 .

Page 16: STA301_LEC27

H e n c e

dxxgxXE

and,34

3x

21dx

2xx

2

0

32

0

Page 17: STA301_LEC27

dyy31y21dyyhyYE

1

0

2

,85

43

21

21

4y3

2y

21

1

0

42

Page 18: STA301_LEC27

dydxy,xfyxYXE

2

0

21

0dxdy

4y31xyx

And

Page 19: STA301_LEC27

2

0

31

0

2

0

2221

0dxdy

4xy3xydydx

4yx3x

dx4

xy32

xy41dxyxyx

41 2

00

422

0 0

322

11

dx4

x32x

41dxx2

41 2

0

2

0

2

2

0

22

0

3

8x3

4x

41

3x

21

2

and,2447

85

34

Page 20: STA301_LEC27

dydxy,xfxyXYE

2

0

3221

0

2

0

21

0dxdy

4yx3yxdxdy

4y31xxy

65

12x5

41dx

4x5

41dx

4yx3

2yx

41

2

0

322

0

1

0

42222

0

Page 21: STA301_LEC27

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.

Page 22: STA301_LEC27

Next, we consider the COVARIANCE & CORRELATION FOR BIVARIATE PROBABILITY DISTRIBUTIONS

Page 23: STA301_LEC27

COVARIANCE OF TWO RANDOM VARIABLES:

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.

Page 24: STA301_LEC27

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

Page 25: STA301_LEC27

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).

Page 26: STA301_LEC27

If X and Y are independent, then E(XY) = E(X) E(Y), and

Cov (X, Y) = E(XY) – E(X) E(Y) = 0

Page 27: STA301_LEC27

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.

Page 28: STA301_LEC27

Next, we consider the Correlation Co-efficient of Two Random Variables.

Page 29: STA301_LEC27

Let X and Y be two r.v.’s with non-zero variances 2

X 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

Page 30: STA301_LEC27

YVarXVar

Y,XCov

XEYXEXE

YXXY

Page 31: STA301_LEC27

If X and Y are independent r.v.’s, then XY will be zero but zero correlation does not necessarily imply independence.

Page 32: STA301_LEC27

Let us now apply these concepts to an example:

Page 33: STA301_LEC27

EXAMPLE:

From the following joint p.d. of X and Y, find Var(X), Var(Y), Cov(X,Y) and .

Page 34: STA301_LEC27

y

x0 1 2 3 g(x)

0 0.05 0.05 0.10 0 0.201 0.05 0.10 0.25 0.10 0.502 0 0.15 0.10 0.05 0.30

h(y) 0.10 0.30 0.45 0.15 1.00

Page 35: STA301_LEC27

NowE(X) = xig(xi)

= 0 0.20 + 1 0.50 +2 0.30= 0 + 0.50 + 0.60 = 1.10

E(Y) = yjh(yj)= 0 0.10 + 1 0.30

+ 2 0.45 + 3 0.15= 0 + 0.30 + 0.90 + 0.45 = 1.65

Page 36: STA301_LEC27

E(X2) = xi2g(xi)

= 0 0.20 + 1 0.50 + 4 0.30 = 1.70

E(Y2) = yj2h(yj)

= 0 0.10 + 1 0.30 + 4 0.45 + 9 0.15 = 3.45

Page 37: STA301_LEC27

Thus

Var(X) = E(X2) – [E(X)]2 = 1.70 – (1.10)2 = 0.49,

and

Var(Y) = E(Y2) – [E(Y)]2 = 3.45 – (1.65)2 = 0.7275

Cov(X,Y) = E(XY) – E(X) E(Y)

= 1.90 – 1.10 1.65 = 0.085, and

Page 38: STA301_LEC27

Again:E(XY) =

= 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

jijiji

y,xfyx

Page 39: STA301_LEC27

Cov(X,Y) = E(XY) – E(X) E(Y) = 1.90 – 1.10 1.65 = 0.085, and

14.0

595.0085.0

7275.0)49.0(

085.0YVarXVar

Y,XCov

Page 40: STA301_LEC27

Hence, we can say that there is a weak positive linear correlation between the random variables X and Y.

Page 41: STA301_LEC27

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).

Page 42: STA301_LEC27

T h e m a r g i n a l p . d . f . ’ s a r e

1x0

,x23x2dy

3xyxxg 22

2

0

a n d

2y0

,6y

31dx

3xyxyh 2

1

0

Page 43: STA301_LEC27

N o w

,1813dx

3x2x2x

dxxxgXE

21

0

.9

10dy6y

31y

dyyyhYE

2

0

Page 44: STA301_LEC27

T h u s

dxxgx

XEXEXVar

2x

2

162073dx

3x2x2

1813x 2

21

0

Page 45: STA301_LEC27

dyyhy

YEYEYVar

2y

2

and,8126dy

6y

31

910y

22

0

Page 46: STA301_LEC27

C o v ( X , Y )

= E { [ X – E ( X ) ] [ Y – E ( Y ) ] }

dxdy3

xyx9

10y1813x 2

2

0

1

0

.162

1dxx243

26x8125x

92 23

1

0

Page 47: STA301_LEC27

Hence

05.0

8126)162073(

1621YVarXVar

Y,XCovY,XCorr

Page 48: STA301_LEC27

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.

Page 49: STA301_LEC27

This brings us to the end of the discussion of the BASIC concepts of discrete and continuous univariate and bivariate probability distributions.

Page 50: STA301_LEC27

We now begin the discussion of some probability distributions that are WELL-KNOWN, and are encountered in real-life situations.

Page 51: STA301_LEC27

First of all, let us consider the DISCRETE UNIFORM DISTRIBUTION.

Page 52: STA301_LEC27

We illustrate this distribution with the help of a very simple example:

Page 53: STA301_LEC27

EXAMPLESuppose that we toss a fair die and let X denote the

number of dots on the upper-most face.

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:

Page 54: STA301_LEC27

X P(x)1 1/62 1/63 1/64 1/65 1/66 1/6

Total 1

Page 55: STA301_LEC27

If we draw the line chart of this distribution, we obtain:

Page 56: STA301_LEC27

Line Chart Representation of theDiscrete Uniform Probability

Distribution

No. of dots on the upper-most face

Probability

P(x)

1/6

2/6

01 2 3 4 5 6 X

Page 57: STA301_LEC27

As all the vertical line segments are of equal height, hence this distribution is called a uniform distribution.

Page 58: STA301_LEC27

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.

Page 59: STA301_LEC27

Line Chart Representation of theDiscrete Uniform Probability

Distribution

No. of dots on the

upper-most face

Probability

P(x)

1/6

2/6

0 1 2 3 4 5 6X

= E(X) = 3.5

Page 60: STA301_LEC27

What about the spread of this distribution?

The students are encouraged to compute the standard deviation as well as the coefficient of variation of this distribution on their own.

Page 61: STA301_LEC27

Let us consider another interesting example:

Page 62: STA301_LEC27

EXAMPLE

The lottery conducted in various countries for purposes of money-making provides a good example of the discrete uniform distribution.

Page 63: STA301_LEC27

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:

Page 64: STA301_LEC27

0000

0001

0002

0003

0004

0005

0006

0007

0008

0009

9996

9996

9997

9998

9999

Probabilityof Winning

1/10000

Lottery Number

X

Discrete Uniform Distribution

Page 65: STA301_LEC27

INTERPRETATION

It reflects the fact that winning lottery numbers are selected by a random procedure which makes all numbers equally likely to be selected.

Page 66: STA301_LEC27

The point to be kept in mind is that, whenever we have a situation where the various 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.

Page 67: STA301_LEC27

Next, we discuss the BINOMIAL DISTRIBUTION.

Page 68: STA301_LEC27

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:

Page 69: STA301_LEC27

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.

Page 70: STA301_LEC27

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, and4) the total number of tosses i.e. 5 is fixed in advance.

Page 71: STA301_LEC27

The above four points represents the four basic and vitally important PROPERTIES of a binomial experiment.

Page 72: STA301_LEC27

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.

Page 73: STA301_LEC27

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.

Page 74: STA301_LEC27

IN TODAY’S LECTURE, YOU LEARNT

• 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

Page 75: STA301_LEC27

IN THE NEXT LECTURE, YOU WILL LEARN

•Binomial Distribution

•Fitting a Binomial Distribution to Real Data

•An Introduction to the Hypergeometric Distribution