# When does replacing one random variable with another not change the joint distribution

Suppose $X_1, \dots, X_n$ are random variables with some joint distribution.

I wonder if there is some concept or condition for that if replacing $X_i$ with some other random variable $Y$, then $X_1, \dots, X_{i-1}, Y, X_{i+1}, \dots, X_n$ still have the same joint distribution?

One condition I know is that when $X_1, \dots, X_n, Y$ are independent, and $X_i$ and $Y$ are identically distributed. I wonder if there are weaker conditions?

Thanks!

-
I think what you're looking for is that $X_1, \ldots, X_n, Y$ are exchangeable.