Voorwaardelijke verdeling

In de kansrekening is de voorwaardelijke verdeling van een stochastische variabele X {\displaystyle X} , gegeven de waarde van een andere stochastische variabele Y {\displaystyle Y} , een nieuwe (kans)verdeling van X {\displaystyle X} waarbij er rekening mee wordt gehouden dat de waarde van Y {\displaystyle Y} bekend is.

Als beide variabelen discreet zijn, is de voorwaardelijke kansfunctie bepaald door de voorwaardelijke kansen. Zijn beide variabelen continu, dan is de voorwaardelijke kansverdeling bepaald door een voorwaardelijke kansdichtheid. Ook mengvormen zijn mogelijk.

Algemeen

Als de stochastische variabelen X {\displaystyle X} en Y {\displaystyle Y} simultaan verdeeld zijn met simultane verdelingsfunctie F X , Y ( x , y ) {\displaystyle F_{X,Y}(x,y)} , wordt de voorwaardelijke verdelingsfunctie F X ( x | Y = y ) {\displaystyle F_{X}(x|Y=y)} van X {\displaystyle X} , gegeven' dat de gebeurtenis Y = y {\displaystyle Y=y} is opgetreden, gedefinieerd door:

F X ( x | Y = y ) = P ( X x | Y = y ) = lim h 0 P ( X x | y h < Y y ) = {\displaystyle F_{X}(x|Y=y)=P(X\leq x|Y=y)=\lim _{h\downarrow 0}P(X\leq x|y-h<Y\leq y)=}
= lim h 0 P ( X x  en  y h < Y y ) P ( y h < Y y ) = {\displaystyle =\lim _{h\downarrow 0}{\frac {P(X\leq x{\text{ en }}y-h<Y\leq y)}{P(y-h<Y\leq y)}}=}
= lim h 0 P ( X x  en  Y y ) P ( X x  en  Y y h ) P ( Y y ) P ( Y y h ) = {\displaystyle =\lim _{h\downarrow 0}{\frac {P(X\leq x{\text{ en }}Y\leq y)-P(X\leq x{\text{ en }}Y\leq y-h)}{P(Y\leq y)-P(Y\leq y-h)}}=}
= lim h 0 F X , Y ( x , y ) F X , Y ( x , y h ) F Y ( y ) F Y ( y h ) {\displaystyle =\lim _{h\downarrow 0}{\frac {F_{X,Y}(x,y)-F_{X,Y}(x,y-h)}{F_{Y}(y)-F_{Y}(y-h)}}}

Men zegt ook: de verdelingsfunctie F X ( x | Y = y ) {\displaystyle F_{X}(x|Y=y)} van X {\displaystyle X} , onder de voorwaarde dat de gebeurtenis Y = y {\displaystyle Y=y} is opgetreden.

Discrete stochastische variabelen

Als de discrete stochastische variabelen X {\displaystyle X} en Y {\displaystyle Y} simultaan verdeeld zijn met kansfunctie

p X , Y ( x , y ) = P ( X = x  en  Y = y ) {\displaystyle p_{X,Y}(x,y)=P(X=x{\text{ en }}Y=y)}

wordt de voorwaardelijke kansfunctie p X ( x | Y = y ) {\displaystyle p_{X}(x|Y=y)} van X {\displaystyle X} gegeven dat de gebeurtenis Y = y {\displaystyle Y=y} is opgetreden, dus voor p Y ( y ) > 0 {\displaystyle p_{Y}(y)>0} , gedefinieerd door de voorwaardelijke kans

p X ( x | Y = y ) = P ( X = x | Y = y ) = p X , Y ( x , y ) p Y ( y ) {\displaystyle p_{X}(x|Y=y)=P(X=x|Y=y)={\frac {p_{X,Y}(x,y)}{p_{Y}(y)}}}

Daarin is

p Y ( y ) = x p X , Y ( x , y ) {\displaystyle p_{Y}(y)=\sum _{x}p_{X,Y}(x,y)}

de marginale kansfunctie van Y {\displaystyle Y} .

Continue stochastische variabelen

Als de continue stochastische variabelen X {\displaystyle X} en Y {\displaystyle Y} simultaan verdeeld zijn met simultane kansdichtheid f X , Y ( x , y ) {\displaystyle f_{X,Y}(x,y)} , wordt de voorwaardelijke kansdichtheid f X ( x | Y = y ) {\displaystyle f_{X}(x|Y=y)} van X {\displaystyle X} gegeven dat de gebeurtenis Y = y {\displaystyle Y=y} is opgetreden, voor f Y ( y ) 0 {\displaystyle f_{Y}(y)\neq 0} gedefinieerd door:

f X ( x | Y = y ) = f X , Y ( x , y ) f Y ( y ) {\displaystyle f_{X}(x|Y=y)={\frac {f_{X,Y}(x,y)}{f_{Y}(y)}}}

Daarin is

f Y ( y ) = f X , Y ( x , y ) d x {\displaystyle f_{Y}(y)=\int f_{X,Y}(x,y)\,\mathrm {d} x}

de marginale kansdichtheid van Y {\displaystyle Y} .

Toelichting

De voorwaardelijke kansdichtheid is de afgeleide van de overeenkomstige voorwaardelijke verdelingsfunctie:

F X ( x | Y = y ) = lim h 0 F X , Y ( x , y ) F X , Y ( x , y h ) F Y ( y ) F Y ( y h ) = lim h 0 1 h ( F X , Y ( x , y ) F X , Y ( x , y h ) ) 1 h ( F Y ( y ) F Y ( y h ) ) {\displaystyle F_{X}(x|Y=y)=\lim _{h\downarrow 0}{\frac {F_{X,Y}(x,y)-F_{X,Y}(x,y-h)}{F_{Y}(y)-F_{Y}(y-h)}}=\lim _{h\downarrow 0}{\frac {{\frac {1}{h}}(F_{X,Y}(x,y)-F_{X,Y}(x,y-h))}{{\frac {1}{h}}(F_{Y}(y)-F_{Y}(y-h))}}}

Voorbeelden

Twee worpen met een dobbelsteen

Een eerlijke dobbelsteen wordt twee keer geworpen. De stochastische variabele X {\displaystyle X} is het ogenaantal bij de eerste worp en Y {\displaystyle Y} is het totale ogenaantal. Het ligt nu voor de hand de voorwaardelijke verdeling van Y {\displaystyle Y} gegeven dat X = x {\displaystyle X=x} op te stellen:

P ( Y = y | X = x ) = 1 6 {\displaystyle P(Y=y|X=x)={\tfrac {1}{6}}}

voor y = x + 1 , , x + 6 {\displaystyle y=x+1,\ldots ,x+6} .

De simultane kansfunctie van beide is:

P ( X = x , Y = y ) = P ( Y = y | X = x ) P ( X = x ) = 1 36 {\displaystyle P(X=x,Y=y)=P(Y=y|X=x)P(X=x)={\tfrac {1}{36}}}

voor x = 1 , , 6 ; y = x + 1 , , x + 6 {\displaystyle x=1,\ldots ,6;\,y=x+1,\ldots ,x+6} .

In veel gevallen zal de voorwaardelijke verdeling zo toegepast worden. Ook in het volgende voorbeeld.

Werpen met een dobbelsteen en een munt

Een eerlijke dobbelsteen wordt geworpen, waarna een zuivere munt zo vaak wordt geworpen als het ogenaantal Y {\displaystyle Y} van de dobbelsteen. Het aantal keren dat 'munt' boven komt is X {\displaystyle X} . Het ligt weer voor de hand direct de voorwaardelijke verdeling van X {\displaystyle X} gegeven Y = y {\displaystyle Y=y} op te stellen. Dat is namelijk een binomiale verdeling met parameters n = y {\displaystyle n=y} en p = 1 / 2 {\displaystyle p=1/2} :

P ( X = x | Y = y ) = ( y x ) ( 1 2 ) y {\displaystyle P(X=x|Y=y)={\binom {y}{x}}\left({\frac {1}{2}}\right)^{y}}

voor x = 0 , , y {\displaystyle x=0,\ldots ,y} .

Bivariate normale verdeling

De stochastische variabelen X {\displaystyle X} en Y {\displaystyle Y} zijn simultaan normaal verdeeld, beide met verwachtingswaarde 0 en standaardafwijking 1. De simultane dichtheid is:

f X , Y ( x , y ) = 1 2 π 1 ρ 2 exp ( x 2 2 ρ x y + y 2 2 ( 1 ρ 2 ) ) {\displaystyle f_{X,Y}(x,y)={\frac {1}{2\pi {\sqrt {1-\rho ^{2}}}}}\exp \left(-{\frac {x^{2}-2\rho xy+y^{2}}{2(1-\rho ^{2})}}\right)}

De marginale kansdichtheid van Y {\displaystyle Y} is

f Y ( y ) = f X , Y ( x , y ) d x = 1 2 π 1 ρ 2 exp ( x 2 2 ρ x y + y 2 2 ( 1 ρ 2 ) ) d x = {\displaystyle f_{Y}(y)=\int _{-\infty }^{\infty }f_{X,Y}(x,y)\,\mathrm {d} x={\frac {1}{2\pi {\sqrt {1-\rho ^{2}}}}}\int _{-\infty }^{\infty }\exp \left(-{\frac {x^{2}-2\rho xy+y^{2}}{2(1-\rho ^{2})}}\right)\,\mathrm {d} x=}
= 1 2 π 2 π ( 1 ρ 2 ) exp ( 1 2 y 2 ) exp ( ( x ρ y ) 2 2 ( 1 ρ 2 ) ) d x = 1 2 π exp ( 1 2 y 2 ) {\displaystyle ={\frac {1}{{\sqrt {2\pi }}{\sqrt {2\pi (1-\rho ^{2})}}}}\exp \left(-{\tfrac {1}{2}}y^{2}\right)\int _{-\infty }^{\infty }\exp \left(-{\frac {(x-\rho y)^{2}}{2(1-\rho ^{2})}}\right)\,\mathrm {d} x={\frac {1}{\sqrt {2\pi }}}\exp \left(-{\tfrac {1}{2}}y^{2}\right)} ,

dus een standaardnormale verdeling.

De voorwaardelijke dichtheid van X {\displaystyle X} gegeven Y = y {\displaystyle Y=y} is:

f X ( x | Y = y ) = f X , Y ( x , y ) f Y ( y ) = 1 2 π ( 1 ρ 2 ) exp ( ( x ρ y ) 2 2 ( 1 ρ 2 ) ) {\displaystyle f_{X}(x|Y=y)={\frac {f_{X,Y}(x,y)}{f_{Y}(y)}}={\frac {1}{\sqrt {2\pi (1-\rho ^{2})}}}\exp \left(-{\frac {(x-\rho y)^{2}}{2(1-\rho ^{2})}}\right)} ,

dus een normale verdeling met verwachtingswaarde ρ y {\displaystyle \rho y} en variantie 1 ρ 2 {\displaystyle 1-\rho ^{2}}

Mengvorm

Het kan ook voorkomen dat de stochastische variabele X {\displaystyle X} discreet verdeeld is en Y {\displaystyle Y} continu. Bijvoorbeeld is Y {\displaystyle Y} unifom verdeeld op het interval [ 0 , 1 ] {\displaystyle [0,1]} en is X {\displaystyle X} gegeven Y = y {\displaystyle Y=y} binomiaal-verdeeld met parameters n = 6 {\displaystyle n=6} en succeskans p = y {\displaystyle p=y} :

P ( X = x | Y = y ) = ( 6 x ) y x ( 1 y ) 6 x {\displaystyle P(X=x|Y=y)={\binom {6}{x}}y^{x}(1-y)^{6-x}}

voor 0 y 1 {\displaystyle 0\leq y\leq 1} en x = 0 , 1 , , 6 {\displaystyle x=0,1,\ldots ,6} .