I am reading through the text, "Introduction to Probability Theory with Contemporary Applications" by Lester Helms. I am stuck on the attached example. I understand how the author obtained the joint density function, but I am struggling to understand how he got f_x(x) and f_y(y). This is my first post on this website so please excuse any errors.
Any help would be much appreciated. Thanks!
You have the joint probability mass function: $$\begin{align}f_{X,Y}(x,y) =&~\begin{cases}2/(n(n+1)) & : 1\leq y\leq x\leq n ,\, (x,y)\in\Bbb Z^2 \\ 0 & : \textsf{otherwise}\end{cases} \\[1ex] =&~ \frac 2{n(n+1)} \mathbf 1_{x\in\{1..n\}, y\in \{1.. x\}}\end{align}$$
The marginal probability mass function of $X$ is the sum over the possible values of $Y$, for a specified value of $X$ in $\{1..n\}$. When $X$ realises the integer value $x$ then $Y$ can be any integer value from $1$ to $x$. Thus:$$\begin{align}f_X(x) =&~ \sum_{\psi=1}^x f_{X,Y}(x,\psi)\mathbf 1_{x\in\{1..n\}}\\[1ex] =&~ \sum_{\psi=1}^x \frac 2{n(n+1)}\mathbf 1_{x\in\{1..n\}} \\[1ex] =&~ \frac {2x}{n(n+1)}\mathbf 1_{x\in\{1..n\}} \end{align}$$
The marginal probability mass function of $Y$ is the sum of the joint probability over the possible values of $X$, for a specified value of $Y$ in $\{1..n\}$. When $Y$ realises the integer value $y$ then $X$ can be any integer value from $y$ to $n$. Thus:$$\begin{align}f_Y(y) =&~ \sum_{\chi=y}^n f_{X,Y}(\chi,y)\mathbf 1_{y\in\{1..n\}}\\[1ex] =&~ \sum_{\chi=y}^n \frac 2{n(n+1)}\mathbf 1_{y\in\{1..n\}} \\[1ex] =&~ \frac {2(n-y+1)}{n(n+1)}\mathbf 1_{y\in\{1..n\}} \end{align}$$