Let $X$ be an integer chosen uniformly at random from the set $\{1,2,...,n\}$ and $Y$ be an independent integer chosen uniformly at random from the set $\{1,2,...,m\}$. Find the probability mass function of $X+Y$.

My attempt: Without loss of generality suppose $n<m$. Possible values of $X+Y: 2,3,...,m+n.$ For $2\leq k\leq n$ using independence of $X$ and $Y$ we have $P(X+Y=k)=\sum_{i=2}^{n}P(X=k)P(Y=n-k)=\frac{n-1}{mn}.$

I'm stuck here and don't know how to proceed. What other cases are needed to be considered?

  • $\begingroup$ Perform the simple combinatorics to find the number of ways (and hence relative probability) of obtaining each output, $1, \ldots, m+n$. $\endgroup$ – David G. Stork Nov 28 '18 at 5:08

You have confused a little your variables and indexes. The sum for the case $2\le k\le n$ should be $$\sum_{i=1}^{k-1}P(X=i)P(Y=k-i).$$

Also consider the cases $$n<k\le m,\quad 1\le i \le n$$ and $$m<k\le n+m,\quad k-m\le i\le n.$$

To see this, think that $i$, the values that $X$ take, can be from $1$ to $n$, as long as the respective values for $Y$, that is $k-i$ are between $1$ and $m$. This implies: $$1\le k-i \le m \iff -m \le i-k \le -1 \iff k-m \le i \le k-1.$$

So we have $i\ge 1$ and also $i\ge k-m$. This means that if $k\le m$, $i$ can take the value $1$, but if $k>m$, then the minimum value for $i$ has to be $k-m$ (actually, this is also $1$ for $k=m+1$, but this does not contradicts what we said).

In the same way, $i$ has to be smaller or equal than $n$ and $k-1$, so if $k\le n$, the maximum value for $i$ is $k-1$, but when $k>n$, the maximum value for $i$ is $n$. Combining these results, we get the three cases mentioned above.

  • $\begingroup$ Is there an intuitive way to understand how we choose the boundaries for different cases? $\endgroup$ – dxdydz Nov 28 '18 at 5:53
  • $\begingroup$ I added that to the answer. $\endgroup$ – Alejandro Nasif Salum Nov 28 '18 at 6:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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