statistics and...

32
Atatürk University Introduction to Statistics Prof. Dr. İrfan KAYMAZ STATISTICS and PROBABILITY Atatürk University Engineering Faculty Department of Mechanical Engineering LECTURE: JOINT PROBABILITY DISTRIBUTIONS

Upload: others

Post on 24-Mar-2020

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

Atatürk University

Introduction to Statistics

Prof. Dr. İrfan KAYMAZ

STATISTICS and PROBABILITY

Atatürk UniversityEngineering Faculty

Department of Mechanical Engineering

LECTURE: JOINT PROBABILITY DISTRIBUTIONS

Page 2: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint Probability

Use joint probability mass functions and joint probability density functions to calculate probabilities.

Calculate marginal and conditional probability distributions from joint probability distributions.

Interpret and calculate covariances and correlations between random variables.

objectives of this lecture

Page 3: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint Probability

Some random variables are not independent of each other, i.e., they tend to be related. Urban atmospheric ozone and airborne particulate matter

tend to vary together. Urban vehicle speeds and fuel consumption rates tend to

vary inversely.

The length (X) of a injection-molded part might not be independent of the width (Y). Individual parts will vary due to random variation in materials and pressure.

A joint probability distribution will describe the behavior of several random variables, say, X and Y. The graph of the distribution is 3-dimensional: x, y, and f(x,y).

objectives of this lecture

Page 4: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint ProbabilityExample: Signal BarsYou use your cell phone to check your airline reservation. The airline system

requires that you speak the name of your departure city to the voice recognition system.

• Let Y denote the number of times that you have to state your departure city.

• Let X denote the number of bars of signal strength on you cell phone.

Figure : Joint probability distribution of X and Y. The table cells are the probabilities. Observe that more bars relate to less repeating.

Once

Twice3 Times

4 Times

0.00

0.05

0.10

0.15

0.20

0.25

12

3

Pro

bab

ility

Cell Phone Bars

Bar Chart of Number of Repeats vs. Cell

Phone Bars1 2 3

1 0.01 0.02 0.25

2 0.02 0.03 0.20

3 0.02 0.10 0.05

4 0.15 0.10 0.05

x = number of bars

of signal strength

y = number of

times city

name is stated

Page 5: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint ProbabilityJoint Probability Density Function Defined

Figure: Joint probability density function for the random variables Xand Y. Probability that (X, Y) is in the region R is determined by the volume of fXY(x,y) over the region R.

The joint probability density function for the continuous random variables X and Y, denotes as fXY(x,y), satisfies the following properties:

Page 6: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint ProbabilityJoint Probability Mass Function Graph

Figure :Joint probability density function for the continuous random variables X and Y of different dimensions of an injection-molded part. Note the asymmetric, narrow ridge shape of the PDF – indicating that small values in the X dimension are more likely to occur when small values in the Y dimension occur.

Page 7: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint ProbabilityExample: Server Access Time-1

Let the random variable X denote the time (msec’s) until a computerserver connects to your machine. Let Y denote the time until theserver authorizes you as a valid user. X and Y measure the wait from acommon starting point (x < y).

Figure: The joint probability density function of X and Y is nonzero over the shaded region where x < y.

0.001 0.002 6, for 0 and 6 10x y

XYf x y ke x y k

Compute the probability that X<1000 and Y<2000

Page 8: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint ProbabilityExample: Server Access Time-2

We verify that it integrates to 1 as follows:

0.001 0.002 0.002 0.001

0 0

0.0020.001 0.003

0 0

,

0.0030.002

10.003 1

0.003

x y y x

XY

x x

xx x

f x y dxdy ke dy dx k e dy e dx

ek e dx e dx

Page 9: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint ProbabilityExample: Server Access Time-3

Now calculate a probability:

Figure:Region of integration for the probability that X < 1000 and Y < 2000 is darkly shaded.

1000 2000

1000 2000

0.002 0.001

0

1000 0.002 40.001

0

1000

0.003 4 0.001

0

3 14

1000, 2000 ,

0.002

0.003

1 10.003

0.003 0.001

XY

x

y x

x

xx

x x

P X Y f x y dxdy

k e dy e dx

e ek e dx

e e e dx

e ee

0.003 316.738 11.578 0.915

Page 10: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint ProbabilityMarginal Probability Distributions (continuous)

The marginal PDFs are used to makeprobability statements about one variable.

If the joint probability density function ofrandom variables X and Y is fXY(x,y), themarginal probability density functions of Xand Y are:

Page 11: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint ProbabilityExample: a simple function

Find the marginal distribution function for X and Y

Page 12: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint ProbabilityExample: a simple function

Page 13: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint ProbabilityExample: Server Access Time-1

For the random variables times in the previousexample, find the probability that Y exceeds 2000.

Integrate the joint PDF directly using the picture todetermine the limits.

Page 14: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint ProbabilityExample: Server Access Time-2

2000

0 2000 2000

2000 , ,

Dark region left dark region right dark region

XY XY

x

P Y f x y dy dx f x y dy dx

Page 15: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint ProbabilityExample: Server Access Time-3

Alternatively, find the marginal PDF and then integrate that to find the desired probability.

0.001 0.002

0

0.002 0.001

0

0.0010.002

0

0.0010.002

3 0.002 0.001

0.001

1

0.001

6 10 1 for 0

y

x y

Y

y

y x

yx

y

yy

y y

f y ke

ke e dx

eke

eke

e e y

2000

3 0.002 0.001

2000

0.002 0.0033

2000 2000

4 63

2000

6 10 1

6 100.002 0.003

6 10 0.050.002 0.003

Y

y y

y y

P Y f y dy

e e dy

e e

e e

Page 16: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint ProbabilityConditional Probability Density Function Defined

Page 17: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint ProbabilityExample: a simple function

Find the conditional distribution function X given Y

Find the probability that X<1 given that y=1/2

Page 18: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint ProbabilityAnswer to a simple function

Page 19: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint ProbabilityExample: a simple function

Page 20: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint ProbabilityExample: Conditional Probability-1

From Example 5-2, determine the conditional PDF for Y given X=x.

0.001 0.002

0.0020.001

0.0020.001

0.003

0.001 0.002

0.003

0.002 0.002

0.002

0.002

0.003 for 0

,

0.003

0.002 for 0

x y

X

x

yx

x

x

x

x yXY

Y x x

X

x y

f x k e dy

eke

eke

e x

f x y kef y

ef x

e x y

Page 21: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint ProbabilityExample 5-6: Conditional Probability-2

Now find the probability that Y exceeds 2000 given that X=1500:

1500

2000

0.002 1500 0.002

2000

0.0023

2000

43 1

2000 1500

0.002

0.0020.002

0.002 0.3680.002

Y

y

y

P Y X

f y dy

e

ee

ee e

Figure : The conditional PDF is nonzero on the solid line in the shaded region.

Page 22: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint ProbabilityMean & Variance of Conditional Random Variables

The conditional mean of Y given X = x, denoted as E(Y|x) or μY|x is:

The conditional variance of Y given X = x, denoted as V(Y|x) or σ2

Y|x is:

2

2 2

Y x Y x Y x Y x

y y

V Y x y f y dy y f y

Page 23: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint ProbabilityExample: Conditional Mean & Variance

From Example 5-2 & 6, what is the conditional mean for Y given that x = 1500? Integrate by parts.

Page 24: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint ProbabilityCovariance

Covariance is a measure of the relationship between two random variables.

First, we need to describe the expected value of a function of two random variables. Let h(X, Y) denote the function of interest.

Page 25: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint ProbabilityCovariance Defined

Page 26: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint ProbabilityCovariance Defined

Page 27: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint ProbabilityExample

Find the covariance of X and Y

Page 28: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint ProbabilityAnswer to Example

Page 29: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint ProbabilityCovariance and Scatter Patterns

Figure: Joint probability distributions and the sign of cov(X, Y). Note that covariance is a measure of linear relationship. Variables with non-zero covariance are correlated.

Page 30: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint ProbabilityCorrelation (ρ = rho)

The between random variables X and Y,

denoted as , is

cov , (5-15)

Since 0 and 0,

and cov , have the same sign.

We say that

correlation

XY

XYXY

X Y

X Y

XY

XY

X Y

V X V Y

X Y

is normalized, so 1 1 (5-16)

Note that is dimensionless.

Variables with non-zero correlation are correlated.

XY

XY

Page 31: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint ProbabilityIndependence Implies ρ = 0

If X and Y are independent random variables,

σXY = ρXY = 0

ρXY = 0 is necessary, but not a sufficient condition for independence.

Page 32: STATISTICS and PROBABILITYmuhserv.atauni.edu.tr/.../statistics/...VI_JOINT_PROBABILITY_DISTRIBUTION_2013_student.pdfAtatürk University Introduction to Statistics Prof. Dr. İrfan

© John Wiley & Sons, Inc. Applied Statistics and Probability for Engineers, by Montgomery and Runger. Atatürk UniversityAtatürk University

Joint ProbabilityNext Lecture

Point Estimation….