Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

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

Suppose that random variables $X$ and $Y$, each with a finite number of possible values, have joint probabilities of the form $$P(X=x, Y=y) = f(x)g(y)$$ for some functions $f$ and $g$. How in the world would you find formulae for this? That doesn't even make sense.

share|cite|improve this question

We have \begin{align*} P(X=x) &= \sum_y P(X=x, Y=y)\\ &= \sum_y f(x)g(y)\\ &= f(x) \cdot \sum_y g(y) \end{align*} and analogously \begin{align*} P(Y=y) &= \sum_x P(X=x, Y=y)\\ &= \sum_x f(x)g(y)\\ &= g(y) \cdot \sum_x f(x) \end{align*} Summing over all $x$ and $y$ gives \[ 1 = \sum_x\sum_y f(x)g(y) = \sum_x f(x) \cdot \sum_y g(y) \] So \[ P(X=x) = \frac{f(x)}{\sum_{x'} f(x')}, \quad P(Y=y) = \frac{g(y)}{\sum_{y'} g(y')}- \]

share|cite|improve this answer
Great answer, by the way! – Alex Oct 15 '12 at 22:48
@martini Yes I definitely agree with Alex this is an outstanding answer thanks. Just one question. What is the last step you did there in the very last line? When you put $P(X=x) = \frac {f(x)}{\sum_x' f(x')}$ Where did the summation of $f(x')$ come from? – TheHopefulActuary Oct 16 '12 at 2:49
@Kyle When we summed over $x$ and $y$ the line before, we concluded that $(\sum_x f(x))^{-1} = \sum_y g(y)$. We want to use that in $P(X=x) = f(x) \cdot \sum_y g(y)$. There is an $x$ in this equation, so I renamed the summation variable in $\sum_{x'} f(x')$ and got $f(x) \cdot \sum_y g(y) = f(x) \cdot (\sum_{x'} f(x'))^{-1}$ – martini Oct 16 '12 at 4:56

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.