Seemingly arbitrary upper bound on correlation between two binomials I know I'm doing something wrong, but I cannot find what it is, although it's a rather simple deduction. The context is genotypes as binomial random variables, but I managed to express the problem in purely mathematical terms.
I define two sets of Bernoulli random variables, with different probabilities. Their variances are defined:
$$
X_{1},\dots,X_{n}\overset{\text{iid}}{\sim}\text{Ber}(\pi) \Rightarrow\text{var}(X_{i})=\pi(1-\pi) \\
Y_{1},\dots,Y_{n}\overset{\text{iid}}{\sim}\text{Ber}(\theta) \Rightarrow\text{var}(Y_{j})=\theta(1-\theta)
$$
I establish some constant correlation between any pair of variables where one is from the first group and the other one from the second group:
$$
\rho_{X_{i},Y_{j}}=r\quad\forall\left(i,j\right)
$$
And now I introduce two binomial variables, which are the sum of each group:
$$
A =\sum_{i=1}^{n}X_{i}\sim\text{Bin}(n,\pi)\Rightarrow\text{var}(A)=n\pi(1-\pi) \\
B =\sum_{j=1}^{n}Y_{j}\sim\text{Bin}(n,\theta)\Rightarrow\text{var}(B)=n\theta(1-\theta)
$$
After this, I want to find the correlation between A and B, given the known correlation between any pair of $\left(X_{i},Y_{j}\right)$, which seems straightforward:
$$
\begin{aligned}
\rho_{A,B} &=\frac{\text{cov}(A,B)}{\left[\text{var}(A)\text{var}(B)\right]^{1/2}} \\[1.4ex]
 &=\frac{\text{cov}(\sum_{i=1}^{n}X_{i},\sum_{j=1}^{n}Y_{j})}{\left[n\pi(1-\pi)n\theta(1-\theta)\right]^{1/2}} \\[1.4ex]
 &=\frac{\sum_{i=1}^{n}\sum_{j=1}^{n}\text{cov}(X_{i},Y_{j})}{n\left[\pi(1-\pi)\theta(1-\theta)\right]^{1/2}} \\[1.4ex]
 &=\frac{1}{n}\sum_{i=1}^{n}\sum_{j=1}^{n}\frac{\text{cov}(X_{i},Y_{j})}{\left[\text{var}(X_{i})\text{var}(Y_{j})\right]^{1/2}} \\[1.4ex]
 &=\frac{1}{n}\sum_{i=1}^{n}\sum_{j=1}^{n}\rho_{X_{i},Y_{j}} \\[1.4ex]
 &=\frac{1}{n}\sum_{i=1}^{n}\sum_{j=1}^{n}r \\[1.4ex]
 &=\frac{1}{n}n^{2}r \\[1.4ex]
 &=nr
\end{aligned}
$$
Since $r$ and $\rho_{A,B}$ are both correlations, they must be in $[0,1]$. But then, a seemingly arbitrary constrain on $r$ appears, which depends on any arbitrary $n$ that I might choose to build the binomial variables:
$$
\rho_{A,B}=nr\leq1\Longleftrightarrow r\leq\frac{1}{n}
$$
So the correlation $\rho_{X_i, Y_j}$ is now bound by $\frac{1}{n}$, where $n$ can be any natural number. I must be missing some error along the way, but I can't find it after hours of struggling with these equations. Any ideas?
 A: I see nothing "wrong" per-say with any of the steps in your derivation. Rather, I think you have established the following fact:

Suppose that $\text{Cov}(X_i, Y_j) = r$ for all $i$ and $j$, and this
  property holds for all $n$. Then it must be the case that $r=0$.

In other words, it is not possible to have constant (non-zero) correlation between every $X_i$ and every $Y_j$. 

A weaker condition, that might be of interest to you, is: 

For all $i=1,2,\cdots n$, we have  $$\text{Cov}(X_i, Y_i) = r$$ and
  for all $i\neq j$, we have $$\text{Cov}(X_i, Y_j) = s.$$

In the limit, $n\rightarrow\infty$, we can show that $s$ must be $0$, and we can infer some convenient covariance/correlation relationships. If we repeat your calculations under this modified assumption we have
\begin{align*}
\text{Cor}(A, B) &= \cdots \\[1.2ex]
&=\frac{1}{n}\sum_{i=1}^n\sum_{j=1}^n \text{Cor}(X_i, Y_j) \\[1.2ex]
&= \frac{1}{n}\left(\sum_{i=1}^n \text{Cor}(X_i, Y_i) + 2\sum_{1\leq i < j \leq n} \text{Cor}(X_i, Y_j)\right) \\[1.2ex]
&= r + \frac{2}{n}\binom{n}{2} s \\
&= r + (n-1)s
\end{align*}
Since $\text{Cor}(A,B) \in [-1,1]$ for all $n$, it must be the case that $s=0$. 

Under the stated assumptions, we now have 
  $$\text{Cor}(A, B) =\text{Cor}(X_i, Y_i)$$ and $$\text{Cov}(A, B) = n\text{Cov}(X_i,
 Y_i)$$

