Skip to main content

Change of Variable

Discrete

Let XX be a discrete random variable with PMF pXp_X. Let Y=h(X),h:RRY=h(X), h:\R\to \R is some function. Then YY is also discrete with PMF pY(y)=xh1(y)pX(x)p_Y(y)= \sum_{x\in h^{-1}(y)}p_X(x)

Continuous

Let XX be a absolute continuous random variable with PDF fXf_X. Let Y=h(X),h:RRY=h(X), h:\R\to \R is a differentiable and strictly function. Then YY is also absolutely continuous with PDF fY(y)=fX(h1(y))h(h1(y))f_Y(y)= \frac{f_X(h^{-1}(y))}{|h'(h^{-1}(y))|}

Joint

Let X,YX,Y be jointly absolute continuous random variables with PDF fXYf_{XY}. Let Z=h1(X,Y),W=h2(X,Y),h1,h2:R2RZ=h_1(X,Y),W=h_2(X,Y), h_1,h_2:\R^2\to \R are differentiable function. Let one-to-one h=(h1,h2):R2R2h = (h_1,h_2):\R^2\to\R^2. Then the joint density function fZ,W(z,w)=fX,Y(h1(z,w))/J(h1(z,w))f_{Z,W}(z,w) = f_{X,Y}(h^{-1}(z,w))/|\mathcal{J}(h^{-1}(z,w))| where J(x,y)=det[h1xh2xh1yh2y]\mathcal{J}(x,y) = \det\begin{bmatrix}\frac{\partial h_1}{\partial x} & \frac{\partial h_2}{\partial x} \\ \frac{\partial h_1}{\partial y} & \frac{\partial h_2}{\partial y}\end{bmatrix} is the determinant of the Jacobian matrix

Let X,YX,Y be independent, let Z=X+YZ = X+Y. Then:

  • pZ(z)=ypX(zy)pY(y)p_Z(z) = \sum_{y}p_X(z-y)p_Y(y) for discrete XX and YY
  • fZ(z)=fX(zy)fY(y)dyf_Z(z) = \int_{-\infty}^{\infty} f_X(z-y)f_Y(y)dy for continuous XX and YY