# About identically distributed random variables

I am reading a paper and wanted to check if the following random variables are identically distributed.

Let $$X_1,X_2,\cdots,X_n$$ be iid and $$X_j\sim \mu$$ for all $$j\in\{1,\cdots,n\}$$ where $$\mu$$ is some distribution. Let $$Z=f(X_1,X_2,\cdots,X_j,\cdots, X_n)$$ and $$Z_j=f(X_1,X_2,\cdots,X_j',\cdots,X_n)$$ where $$X_j'\perp \!\!\! \perp X_j, X_j'\sim \mu$$ and

\begin{align} f(x_1,\cdots,x_n) &= P(\sum_{i=1}^n X_i=\sum_{i=1}^n x_i) \\ f_j(x_1,\cdots,x_n) &= P(\sum_{i\neq j} X_i=\sum_{i\neq j} x_i) \end{align}

It is given in the paper that $$Z-f_j(X_1,\cdots,X_n)$$ and $$Z_j-f_j(X_1,\cdots,X_n)$$ are identically distributed because $$X_j'$$ is an independent copy of $$X_j$$ and $$f_j$$ does not depend on the $$j^{th}$$ variable.

Q1) Is it true that $$Z$$ and $$Z_j$$ are identically distributed?

Q2) If the above is true, then $$Z-f_j$$ and $$Z_j-f_j$$ are also identically distributed. So may I know where we use the fact that $$f_j$$ does not depend on the $$j^{th}$$ variable?

• If $f(x_1,\dots,x_n):=P\left(\sum_{i=1}^nX_i=\sum_{i=1}^nx_i\right)$ then it seems to me that: $$f(X_1,\dots,X_n)=P\left(\sum_{i=1}^nX_i=\sum_{i=1}^nX_i\right)=1$$ Similarly $f_j(X_1,\dots,X_n)=1$. Is that really intended? Commented Apr 3, 2021 at 8:14
• @drhab We are looking at different instances of $X_1,\cdots,X_n$. So $f(X_1(w),\cdots,X_n(w))=P(\eta \in \Omega | \sum_{i=1}^n X_i(\eta)=\sum_{i=1}^n X_i(w))$ where $\Omega$ is the underlying probability space.
– user621937
Commented Apr 3, 2021 at 8:17

It's false as you state it. Instead of the condition $$X'_j\perp X_j$$, you need that $$X'_j\perp(X_i, i\ne j)$$, so that $$X_1, X_2, \dots, X'_j, \dots, X_n$$ is also an i.i.d. collection.

Under that condition, the vectors $$(X_1, \dots, X_j, \dots, X_n)$$ and $$(X_1, \dots, X'_j, \dots, X_n)$$ have the same distribution. So if $$g$$ is any function, then $$W:=g(X_1, \dots, X_j, \dots, X_n)$$ and $$W':=g(X_1, \dots, X'_j, \dots, X_n)$$ have the same distribution.

Now if you've got some further thing that "does not depend on the $$j$$th variable", say $$Y=h(X_1, \dots, X_{j-1}, X_{j+1}, \dots, X_n)$$, then $$W-Y$$ and $$W'-Y$$ have the same distribution. This is just another application of the previous paragraph, since $$W-Y$$ is a function of $$X_1,\dots,X_j,\dots, X_n$$ and $$W'-Y$$ is "the same function" of $$X_1,\dots, X'_j,\dots, X_n$$.

However, if you had a second quantity that did depend on the $$j$$th coordinate, say $$Z=r(X_1, \dots, X_j, \dots, X_n)$$, then you couldn't conclude that $$W-Z$$ and $$W'-Z$$ have the same distribution. In that case $$W'-Z$$ would be a function of all $$n+1$$ variables $$X_1,\dots,X_j, X'_j, \dots, X_n$$.

• $X_j'\perp X_j$ means that $X_j' \perp X_i$ for all $i$ because $X_j\perp X_i$ for all $i\neq j$. So indeed $X_1,\cdots,X_j',\cdots,X_n$ is an iid collection. So I guess as you stated in second paragraph, indeed $Z$ and $Z_j$ are identically distributed?
– user621937
Commented Apr 3, 2021 at 11:11
• Just because $U\perp V$ and $V \perp W$, it does not follow that $U \perp W$!! Just check the case where you define $W=U$, for example. (Assuming that "$U\perp V$" is meaning "$U$ and $V$ are independent", right?) Commented Apr 3, 2021 at 11:15
• I see, that's true.
– user621937
Commented Apr 3, 2021 at 11:22
• May I know why $(X_1,\cdots,X_j,\cdots,X_n)$ and $(X_1,\cdots,X_j',\cdots,X_n)$ have the same distribution when $X_1,\cdots,X_j,\cdots,X_n$ and $X_1,\cdots,X_j',\cdots,X_n$ are iid collections?
– user621937
Commented Apr 3, 2021 at 11:39
• If you know a vector is i.i.d., and you know the common distribution of its entries, then, well, you know everything there is to know about its distribution! That's a complete description of the distribution. Say for example $(X_1, X_2)$ and $(Y_1, Y_2)$ are both i.i.d. with the same common distribution $\mu$. Then for any $A$, $B$, you have $P(X_1\in A, X_2\in B)=P(X_1\in A)P(X_2\in B)=\mu(A)\mu(B)$ $=P(Y_1\in A)P(Y_2\in B)=P(Y_1\in A, Y_2\in B)$. So $(X_1, X_2)$ and $(Y_1, Y_2)$ have the same distribution. Commented Apr 3, 2021 at 11:49

Can we look at it this way?

$$Z$$ depends on the $$j^{th}$$ variable, because: \begin{align} Z=f(x_1,\cdots,x_n)&=P(\sum_{i=1}^n X_i=\sum_{i=1}^n x_i)\\ &=f_j(x_1,\cdots,x_n)P(X_j=x_j)+(1-f_j(x_1,\cdots,x_n))P(X_j=\sum_{i=1}^n x_i-\sum_{i\neq j} X_i) \end{align}

We can then compare with the similar expression for $$Z_j$$ to see that they are identically distributed.

If $$f_j$$ depended on $$X_j$$, then $$Z=f_j(x_1,\cdots,x_n\vert_{X_j=x_j})P(X_j=x_j)+P(X_j=??)\dots$$ I don't know what follows. And we couldn't claim that $$Z$$ and $$Z_j$$ are identically distributed anymore.