If I have a set of random variables $X_1\dots X_n$ with joint density $f(x_1,\dots,x_n)$, if I wanted the joint density of any (say) two random variables $X_i$ and $X_j$, can I find this using the following:
$$f_{X_i, X_j}(x_i,x_j)=\int\dots\int f(x_1,\dots,x_n)dx_1\dots dx_{i-1}dx_{i+1}\dots dx_{j-1}dx_{j+1}\dots dx_n$$
Essentially, just integrate $f(x_1,\dots,x_n)$ with respect to the variables that are not in the subset that you're trying to find the joint density of?