Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am a bit confused by using Probability Mass Function and Probability Density Function.

I understand that for discrete case like Bernoulli or Binomial, we call it pmf. For continuous case like normal distribution we call it pdf.

I have encounter question involving multivariate distribution for many times and I've solved them but I just want to verify my concept.

For 2 discrete random variable $X_1$ and $X_2$ with $P$($X_1$=$x_1$,$X_2$ = $x_2$) = $f(x_1,x_2)$

if we want to find $Y$ = a$X_1$ + b$X_2$, I used to do

$P(y)$ = ∑ $P$($X_1$=$x_1$,$X_2$ = ($y$-a$x_1)/b$) = ∑$f(x_1$,($y$-a$x_1$)/$b$))

for which I know P(y) is the PMF of Y

For the continuous case if we have similar problem:

For 2 continuous random variable $X_1$ and $X_2$ with PDF = $f(x_1,x_2)$

now I want to find the distribution of $Y$ = a$X_1$ + b$X_2$

From my understanding, I just need to replace the summation with integration(Please correct me if I am wrong)

So I would obtain the PDF of y as

$f_y$($y$) = ∫ $f(x_1$,($y$-a$x_1$)/$b$)) $dx_1$

Would appreciate if anyone could tell me if I am wrong and where could I be wrong. Thanks!

share|cite|improve this question
up vote 0 down vote accepted

$\def\R{\mathbb R}$The density of $Y$ is by definition the function $f_Y \colon \R \to \R$, such that for every $\eta$ we have \[ P(Y < \eta) = \int_{-\infty}^\eta f_Y(y)\, dy \] We have using Fubini's theorem (supposing $b > 0$) \begin{align*} P(Y < \eta) &= P(aX_1 + bX_2 < \eta)\\ &= \int_{\{x:ax_1 + bx_2 < \eta\}} f_{X_1,X_2}(x) \, dx\\ &= \int_{-\infty}^\infty \int_{\{x_2:ax_1 + bx_2 < \eta\}} f_{X_1,X_2}(x)\, dx_2\,dx_1\\ &= \int_{-\infty}^\infty \int_{\{x_2: x_2 < b^{-1}({\eta -ax_1})\}} f_{X_1,X_2}(x)\, dx_2\, dx_1\\ &= \int_{-\infty}^\infty\int_{-\infty}^{b^{-1}(\eta - ax_1)} f_{X_1,X_2}(x)\, dx_2\, dx_1 & \text{substitute $y = ax_1 + bx_2$}\\ &= \int_{-\infty}^\infty\int_{-\infty}^\eta f_{X_1, X_2}\bigl(x_1, b^{-1}(y - ax_1)\bigr)\; b\,dy\; dx_1\\ &= \int_{-\infty}^\eta \left(b\int_{-\infty}^\infty f_{X_1,X_2}\bigl(x_1, b^{-1}(y -ax_1)\bigr)\, dx_1 \right)\, dy \end{align*} So the density is (as you up to an factor $b$ correctly guessed) \[ f_Y(y) = b\int_{-\infty}^\infty f_{X_1,X_2}\bigl(x_1, b^{-1}(y -ax_1)\bigr)\, dx_1. \]

Addendum: If $a \ne 0$, you can compute $f_Y$ also the other way round \[ f_Y(y) = a\int_{-\infty}^\infty f_{X_1,X_2}\bigl(a^{-1}(y-bx_2), x_2\bigr)\, dx_2\] If $a = b = 0$, then $Y = 0$ and so $Y$ doesn't have a density (with respect to Lebesgue measure).

share|cite|improve this answer
I am surprised that there is a $a$ and a $b$ in front... Where have I gone wrong with my working above? Thanks! – K_R Sep 28 '12 at 7:23
@K_R As you can see, the $b$ resp. $a$ comes from the substitution. In the discrete case, it won't be there. Analogies can guide you, but you should always check. Without the $a$ resp. $b$ it isn't a density, as the integral isn't 1 then. – martini Sep 28 '12 at 7:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.