joint probability distributions

Upload: jam-apizara-chaizalee

Post on 06-Oct-2015

12 views

Category:

Documents


0 download

DESCRIPTION

Joint Probability Distributions

TRANSCRIPT

  • Chapter4TitleandOutline1

    JointProbabilityDistributions

    51TwoorMoreRandomVariables51.1JointProbabilityDistributions51.2MarginalProbability

    Distributions51.3ConditionalProbability

    Distributions51.4Independence51.5MoreThanTwoRandom

    Variables

    52CovarianceandCorrelation53CommonJointDistributions53.1MultinomialProbabilityDistribution53.2BivariateNormalDistribution54LinearFunctionsofRandomVariables55GeneralFunctionsofRandomVariables

    CHAPTEROUTLINE

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    Outline

    JointProbabilityMass/DistributionFunction MarginalProbabilityDistribution Mean Variance ConditionalProbability Independence Covariance Correlation

    Sec2 3

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    ConceptofJointProbabilities Somerandomvariablesarenotindependentofeachother,i.e.,theytendtoberelated. Urbanatmosphericozoneandairborneparticulatemattertendtovarytogether.

    Urbanvehiclespeedsandfuelconsumptionratestendtovaryinversely.

    Thelength(X)ofainjectionmoldedpartmightnotbeindependentofthewidth(Y).Individualpartswillvaryduetorandomvariationinmaterialsandpressure.

    Ajointprobabilitydistributionwilldescribethebehaviorofseveralrandomvariables,say,X andY.Thegraphofthedistributionis3dimensional:x,y,andf(x,y).

    Chapter5Introduction 4

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    Example51:SignalBarsYouuseyourcellphonetocheckyourairlinereservation.Theairlinesystem

    requiresthatyouspeakthenameofyourdeparturecitytothevoicerecognitionsystem. LetYdenotethenumberoftimesthatyouhavetostateyourdeparture

    city. LetXdenotethenumberofbarsofsignalstrengthonyoucellphone.

    Sec51.1JointProbabilityDistributions 5

    Figure51JointprobabilitydistributionofXandY.Thetablecellsaretheprobabilities.Observethatmorebarsrelatetolessrepeating.

    1 2 31 0.01 0.02 0.252 0.02 0.03 0.203 0.02 0.10 0.054 0.15 0.10 0.05

    x=numberofbarsofsignalstrength

    y=numberoftimescity

    nameisstated

    Y1

    Y2

    Y3Y4

    0

    0.05

    0.1

    0.15

    0.2

    0.25

    12

    3x

    Y1

    Y2

    Y3

    Y4

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    JointProbabilityMassFunctionDefined

    Sec51.1JointProbabilityDistributions 6

    The of the discrete random variables and , denoted as , , satifies:

    (1) , 0 All probabilities

    joint probabilit

    are non-negative

    (2) , 1

    y mass function

    XY

    XY

    XYx y

    X Yf x y

    f x y

    f x y

    The sum of all probabilities is 1

    (3) , , (5-1)XYf x y P X x Y y

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    0.15 0.10 0.05

    0.02 0.10 0.05

    0.02 0.03 0.20

    0.01 0.02 0.25

    0 1 2 3

    1

    2

    3

    4

    Y = fY(y)

    4

    3

    2

    1

    MarginalProbabilityDistributions(discrete)

    Sec2 8

    x

    y

    0.15 0.10 0.05

    0.02 0.10 0.05

    0.02 0.03 0.20

    0.01 0.02 0.25

    0 1 2 3

    1

    2

    3

    4

    x

    y

    X = 1 2 3fX(x)

    Xy

    Yx

    f x f xy

    f y f xy

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    Y = fY(y)

    4 0.30

    3 0.17

    2 0.25

    1 0.28

    MeanandVariance

    Sec2 10

    0.15 0.10 0.05

    0.02 0.10 0.05

    0.02 0.03 0.20

    0.01 0.02 0.25

    0 1 2 3

    1

    2

    3

    4

    x

    y

    X = 1 2 3fX(x) 0.20 0.25 0.55

    E(X)=E(X2)=V(X)=

    E(Y)=E(Y2)=V(Y)=

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    JointProbabilityDensityFunctionDefined

    Sec51.1JointProbabilityDistributions 11

    (1) , 0 for all ,

    (2) , 1

    (3) , , (5-2)

    XY

    XY

    XYR

    f x y x y

    f x y dxdy

    P X Y R f x y dxdy

    Figure52JointprobabilitydensityfunctionfortherandomvariablesX andY.Probabilitythat(X,Y)isintheregionR isdeterminedbythevolume offXY(x,y)overtheregionR.

    ThejointprobabilitydensityfunctionforthecontinuousrandomvariablesX andY,denotesasfXY(x,y),satisfiesthefollowingproperties:

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    JointProbabilityMassFunctionGraph

    Sec51.1JointProbabilityDistributions 12

    Figure53JointprobabilitydensityfunctionforthecontinuousrandomvariablesX andY ofdifferentdimensionsofaninjectionmoldedpart.Notetheasymmetric,narrowridgeshapeofthePDFindicatingthatsmallvaluesintheX dimensionaremorelikelytooccurwhensmallvaluesintheYdimensionoccur.

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    Example52:ServerAccessTime1LettherandomvariableX denotethetime(msecs)untila

    computerserverconnectstoyourmachine.LetY denotethetimeuntiltheserverauthorizesyouasavaliduser.X andYmeasurethewaitfromacommonstartingpoint (x

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    Example52:ServerAccessTime2 Thejointprobabilitydensityfunctionis:

    Weverifythatitintegratesto1asfollows:

    Sec51.1JointProbabilityDistributions 14

    0.001 0.002 0.002 0.0010 0

    0.0020.001 0.003

    0 0

    ,

    0.0030.002

    10.003 10.003

    x y y xXY

    x x

    xx x

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

    ek e dx e dx

    0.001 0.002 6, for 0 and 6 10x yXYf x y ke x y k

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    Example52:ServerAccessTime2Nowcalculateaprobability:

    Sec51.1JointProbabilityDistributions 16

    Figure55RegionofintegrationfortheprobabilitythatX

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    MarginalProbabilityDistributions(continuous)

    RatherthansummingadiscretejointPMF,weintegrateacontinuousjointPDF.

    ThemarginalPDFsareusedtomakeprobabilitystatementsaboutonevariable.

    IfthejointprobabilitydensityfunctionofrandomvariablesX andY isfXY(x,y),themarginalprobabilitydensityfunctionsofX andY are:

    Sec51.2MarginalProbabilityDistributions 17

    ,

    , (5-3)

    X XYy

    Y XYx

    f x f x y dy

    f y f x y dx

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    Example54:ServerAccessTime1FortherandomvariablestimesinExample52,findtheprobabilitythatYexceeds2000.

    IntegratethejointPDFdirectlyusingthepicturetodeterminethelimits.

    Sec51.2MarginalProbabilityDistributions 18

    20000 2000 2000

    2000 , ,

    Dark region left dark region right dark region

    XY XYx

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

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    Example54:ServerAccessTime2

    Alternatively,findthemarginalPDF andthenintegratethattofindthedesiredprobability.

    Sec51.2MarginalProbabilityDistributions 19

    0.001 0.002

    0

    0.002 0.001

    0

    0.0010.002

    0

    0.0010.002

    3 0.002 0.001

    0.001

    10.001

    6 10 1 for 0

    yx y

    Y

    yy x

    yxy

    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

    dx

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    Mean&VarianceofaMarginalDistribution

    MeansE(X)andE(Y)arecalculatedfromthediscreteandcontinuousmarginaldistributions.

    Sec51.2MarginalProbabilityDistributions 20

    2 2 2 2

    2 2 2 2

    Discrete Continuous

    X X XR R

    Y Y YR R

    X X X XR R

    Y Y Y YR R

    E X x f x x f x dx

    E Y y f y y f y dy

    V X x f x x f x dx

    V Y y f y y f y dy

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    0.15 0.10 0.05

    0.02 0.10 0.05

    0.02 0.03 0.20

    0.01 0.02 0.25

    0 1 2 3

    1

    2

    3

    4

    ConditionalProbabilityDistributions

    Sec2 21

    x

    y Recall that P A B

    P B AP A

    FromExample51P(Y=1|X=3)=P(Y=2|X=3)=P(Y=3|X=3)=P(Y=4|X=3)=

    Y = 1 2 3 4f (y|X=3)

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    ConditionalProbabilityDensityFunctionDefined

    Sec51.3ConditionalProbabilityDistributions 23

    Given continuous random variables and with joint probability density function , , the conditional probability densiy function of given =x is

    , for 0

    XY

    XYXY x

    X

    X Yf x y

    Y Xf x y

    f y f xf x

    (5-4)

    which satifies the following properties:(1) 0

    (2) 1

    (3) for any set B in the range of Y

    Y x

    Y x

    Y xB

    f y

    f y dy

    P Y B X x f y dy

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    0.15 0.10 0.05

    0.02 0.10 0.05

    0.02 0.03 0.20

    0.01 0.02 0.25

    0 1 2 3

    1

    2

    3

    4

    Mean&VarianceofConditionalRandomVariables

    Sec2 27

    x

    y

    Y = 1 2 3 4f (y|X=3) 0.455 0.364 0.091 0.091

    FromExample51P(Y=1|X=3)=0.25/0.55=0.455P(Y=2|X=3)=0.20/0.55=0.364P(Y=3|X=3)=0.05/0.55=0.091P(Y=4|X=3)=0.05/0.55=0.091

    E(Y|X=3)=

    V(Y|X=3)=

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    Mean&VarianceofConditionalRandomVariables

    TheconditionalmeanofY givenX =x,denotedasE(Y|x)orY|x is:

    TheconditionalvarianceofY givenX =x,denotedasV(Y|x)or2Y|x is:

    Sec51.3ConditionalProbabilityDistributions 28

    (5-6)Y xy

    E Y x y f y dy

    2 2 2Y x Y x Y x Y xy y

    V Y x y f y dy y f y V(Y|x) = E(Y2|x) 2Y|x

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    JointRandomVariableIndependence

    RandomvariableindependencemeansthatknowledgeofthevaluesofXdoesnotchangeanyoftheprobabilitiesassociatedwiththevaluesofY.

    X andY varyindependently. DependenceimpliesthatthevaluesofX areinfluencedbythevaluesofY.

    Doyouthinkthatapersonsheightandweightareindependent?

    Sec51.4Independence 31

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    Exercise510:IndependentRandomVariablesInaplasticmoldingoperation,

    eachpartisclassifiedastowhetheritconformstocolorandlengthspecifications.

    Sec51.4Independence 32

    1 if the part conforms to color specs0 otherwise

    1 if the part conforms to length specs0 otherwise

    X

    Y

    Figure510(a)showsmarginal&jointprobabilities,fXY(x,y)=fX(x)*fY(y)

    Figure510(b)showtheconditionalprobabilities,fY|x(y)=fY(y)

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    PropertiesofIndependenceForrandomvariablesX andY,ifanyoneofthefollowingpropertiesistrue,theothersarealsotrue.ThenXandY areindependent.

    Sec51.4Independence 33

    (1) ,(2) for all x and y with 0

    (3) for all x and y with 0

    (4) P , for any sets and in the range of and , respectively. (5-7)

    XY X Y

    Y XY x

    X YX y

    f x y f x f y

    f y f y f x

    f y f x f y

    X A Y B P X A P Y BA B X Y

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    RectangularRangefor(X,Y)

    ArectangularrangeforX andY isanecessary,butnotsufficient,conditionfortheindependenceofthevariables.

    IftherangeofXandYisnotrectangular,thentherangeofonevariableislimitedbythevalueoftheothervariable.

    IftherangeofXandYis rectangular,thenoneofthepropertiesof(57)mustbedemonstratedtoproveindependence.

    Sec51.4Independence 34

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    Covariance

    Covarianceisameasureoftherelationshipbetweentworandomvariables.

    First,weneedtodescribetheexpectedvalueofafunctionoftworandomvariables.Leth(X,Y)denotethefunctionofinterest.

    Sec52Covariance&Correlation 49

    , , for , discrete

    , (5-13), , for , continuous

    XY

    XY

    h x y f x y X YE h X Y

    h x y f x y dxdy X Y

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    Example519:E(Functionof2RandomVariables)

    Sec52Covariance&Correlation 50

    Figure512DiscretejointdistributionofXandY.

    Task:CalculateE[(XX)(YY)]=covariance

    x y f(x,y) xX yY Prod1 1 0.1 1.4 1.0 0.141 2 0.2 1.4 0.0 0.003 1 0.2 0.6 1.0 0.123 2 0.2 0.6 0.0 0.003 3 0.3 0.6 1.0 0.181 0.3 0.203 0.7

    1 0.32 0.43 0.3

    X = 2.4

    Y = 2.0Me

    a

    n

    covariance=

    J

    o

    i

    n

    t

    M

    a

    r

    g

    i

    n

    a

    l

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    ***CovarianceDefined

    Sec52Covariance&Correlation 51

    The covariance between the random variables X and Y, denoted as cov , or is

    (5-14)

    The units of are units of times units of .

    For example, if the units of

    XY

    XY X Y X Y

    XY

    X Y

    E X Y E XY

    X Y

    X are feet and the units of Y are pounds,the units of the covariance are foot-pounds.

    Unlike the range of variance, - .XY

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    Proof )

    Note,however,that , ,

    Similarly,itcanbeshownthat ,thus

    Sec2 52

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    CovarianceandScatterPatterns

    Sec52Covariance&Correlation 53

    Figure513Jointprobabilitydistributionsandthesignofcov(X,Y).**Notethatcovarianceisameasureoflinearrelationship.**Variableswithnonzerocovariancearesaidtobecorrelated.

    XandYareNOT

    independent.

    XandYareindependent.

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    Example520:IntuitiveCovariance

    Sec52Covariance&Correlation 54

    TheprobabilitydistributionofExample51isshown.

    Byinspection,notethatthelargerprobabilitiesoccurasXandYmoveinoppositedirections.Thisindicatesanegativecovariance.

    1 2 31 0.01 0.02 0.252 0.02 0.03 0.203 0.02 0.10 0.054 0.15 0.10 0.05

    x=numberofbarsofsignalstrength

    y=numberoftimescity

    nameisstated

    Y1

    Y2

    Y3Y4

    0

    0.05

    0.1

    0.15

    0.2

    0.25

    12

    3x

    Y1

    Y2

    Y3

    Y4

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    ***Correlation( =rho)

    Sec52Covariance&Correlation 55

    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 YV 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

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    Example521:Covariance&CorrelationDeterminethe

    covarianceandcorrelation.

    Sec52Covariance&Correlation 56

    x y f(x,y) xX yY Prod0 0 0.2 1.8 1.2 0.421 1 0.1 0.8 0.2 0.011 2 0.1 0.8 0.8 0.072 1 0.1 0.2 0.2 0.002 2 0.1 0.2 0.8 0.023 3 0.4 1.2 1.8 0.880 0.2 1.2601 0.2 0.9262 0.23 0.4

    0 0.21 0.22 0.23 0.4

    X = 1.8

    Y = 1.8

    X= 1.1662

    Y= 1.1662

    S

    t

    D

    e

    v

    correlation=

    J

    o

    i

    n

    t

    M

    a

    r

    g

    i

    n

    a

    l

    covariance=

    M

    e

    a

    n

    Notethestrongpositivecorrelation.

    Figure514Discretejointdistribution,f(x,y).

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    Example521

    Sec52Covariance&Correlation 57

    Calculatethecorrelation.

    Figure515Discretejointdistribution.Steepnessoflineconnectingpointsisimmaterial.

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    IfX andY areindependentrandomvariables,XY =XY =0 (517)

    XY =0isnecessary,butnotasufficientcondition forindependence. Figure513d(x,y plotsasacircle)providesanexampleofdependence

    DESPITE havingXY =XY =0. Figure513b(x,y plotsasasquare)providesanexampleof

    independence AND havingXY =XY =0.

    Ingeneral,arectangularpatterindicatesindependence,andthusXY =XY =0.

    But,anonrectangularpatternwouldindicatedependence.

    IndependenceImplies =0

    Sec52Covariance&Correlation 58

    Independent XY =XY =0 Dependentbut XY =XY =0 Dependentand XY ,XY 0

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    Example523:IndependenceImpliesZeroCovariance

    Sec52Covariance&Correlation 59

    Figure515Aplanarjointdistribution.

    4 22 2

    0 0

    24 32

    0 0

    42

    0

    43

    0

    116

    116 3

    1 816 3

    1 1 64 326 3 6 3 9

    32 4 8 09 3 3

    XY

    E XY x y dx dy

    xy dy

    y dy

    y

    E XY E X E Y

    4 22

    0 0

    24 3

    0 0

    42

    0

    4 22

    0 0

    24 22

    0 0

    43

    0

    116

    116 3

    1 8 1 16 416 2 3 6 2 3

    116

    116 2

    2 1 64 816 3 8 3 3

    E X x ydx dy

    xy dy

    y

    E Y xy dx dy

    xy dy

    y

    Let 16 for 0 2 and 0 4Show that 0

    XY

    XY

    f xy x y x y

    E XY E X E Y

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    Summary1:MarginalProbabilities Marginalprobabilitydistributionfunction

    ExpectationandVariance

    Sec2 61

    Xy

    Yx

    f x f xy

    f y f xy

    ,

    ,

    X XYy

    Y XYx

    f x f x y dy

    f y f x y dx

  • JohnWiley&Sons,Inc. AppliedStatisticsandProbabilityforEngineers,byMontgomeryandRunger.

    Summary2:CovarianceandCorrelation

    Covariance

    Correlation

    IfX andY areindependentrandomvariables,XY =XY =0

    TheoppositeisNOT true.

    Sec2 62