How prove this distributions inequality $cov(\theta_{i},\theta_{j})\ge 0$? Question:
let  random variable $\theta$ has dendity $f_{\phi}(\phi)$,and the random vector $\theta=(\theta_{1},\theta_{2},\cdots,\theta_{n})$,such  $\theta_{i}|\phi$ are all independent from each other and obeys the same distribution.
In other words,we have 
$$f_{\theta}(\theta_{1},\theta_{2},\cdots,\theta_{n}|\phi)=\prod_{i=1}^{n}f_{\theta_{i}|\phi}(\theta_{i}|\phi)$$
and
$$f_{\theta}(\theta_{1},\theta_{2},\cdots,\theta_{n})=\int_{\phi}\prod_{i=1}^{n}f_{\theta_{i}|\phi}(\theta_{i}|\phi)f_{\phi}(\phi)d\phi$$

show that: for any positive integer number $i,j$,such $1\le i<j\le n$, have
  $$cov(\theta_{i},\theta_{j})\ge 0$$

My try :This problem is my teacher take my homework,He said we can take somedays to solve this problem,and  I consider some time to this problem,But I can't work,and I think maybe this is inequality,But I can't prove it.so I hope someone can help,Thank you
$$cov(\theta_{i},\theta_{j})=E(\theta_{i}\theta_{j})-E(\theta_{i})E(\theta_{j})$$
 A: You write
$$
f_{\theta}(\theta_1,\ldots,\theta_n|\phi) = \prod_{i=1}^n f_{\theta_i|\phi} (\theta_i|\phi).
$$
You also say that $\theta_i|\phi$ obeys the same distribution for each $i$. Just to be clear, that means $f_{\theta_i|\phi}$ is precisely the same function for each $i$. Thus, one could write
$$
f_{\theta}(\theta_1,\ldots,\theta_n|\phi) = \prod_{i=1}^n g(\theta_i,\phi)
$$
where $g(\cdot,\cdot)$ is that common function $f_{\theta_i|\phi}(\cdot,\cdot)$. I like writing it this way because it makes clear that all the conditional distributions $\theta_i|\phi$ are the same.
Suppose throughout that $i\ne j$.
Here's a probability view of the problem:
\begin{eqnarray}
\mathrm{Cov}(\theta_i,\theta_j) &=& \mathbb{E}(\theta_i \theta_j) - \mathbb{E}(\theta_i)\mathbb{E}(\theta_j) \\
&=& \mathbb{E}\left( \mathbb{E}(\theta_i \theta_j |\phi) \right) - \left(\mathbb{E}(\theta_i)\right)^2 \\
&=& \mathbb{E}\left( \mathbb{E}(\theta_i |\phi) \mathbb{E}(\theta_j |\phi) \right) - \left(\mathbb{E}\left ( \mathbb{E} (\theta_i |\phi)\right)\right)^2 \\
&=& \mathbb{E}\left( \mathbb{E}(\theta_i |\phi)^2\right) - \left(\mathbb{E}\left ( \mathbb{E} (\theta_i |\phi)\right)\right)^2 \\
&=& \mathrm{Var}\left(\mathbb{E} (\theta_i |\phi)\right) \\
&\ge & 0.
\end{eqnarray}
Here, I've used the law of iterated expectation (also called the tower property), the fact that $\theta_i|\phi$ and $\theta_j|\phi$ are identically distributed, and independence of $\theta_i$ and $\theta_j$ conditional on $\phi$.
To understand the above proof, it's essential to realize that $\mathbb{E}(\theta_i|\phi)$ is a random variable. Its value depends on $\phi$, which is random. I don't think the idea that conditional expectations are just typical random variables is very clear to many students just starting out in probability theory.
Here's more of a direct integration proof. Note how much easier and clearer the problem is when one uses the expectation symbols! Try the expectation symbol approach whenever you approach a problem. It very often results in simple expressions that are the equivalent of really complex integral formulas.
\begin{eqnarray}
\mathrm{Cov}(\theta_i,\theta_j) &=& \int \theta_i \theta_j g(\theta_i,\phi) g(\theta_j,\phi) f_{\phi}(\phi) \ d\theta_i\ d\theta_j\ d\phi - \left(\int \theta_i g(\theta_i,\phi) f_{\phi}(\phi) \ d\theta_i\ d\phi\right)\left(\int \theta_j g(\theta_j,\phi) f_{\phi}(\phi) \ d\theta_j\ d\phi\right) \\
& = & \int \theta_i \theta_j g(\theta_i,\phi) g(\theta_j,\phi) f_{\phi}(\phi) \ d\theta_i\ d\theta_j\ d\phi - \left(\int \theta_i g(\theta_i,\phi) f_{\phi}(\phi) \ d\theta_i\ d\phi\right)^2 \\
& = & \int \left( \int \theta_i g(\theta_i,\phi) \ d\theta_i \right) \left(\int \theta_j g(\theta_j,\phi) \ d\theta_j \right)f_{\phi} \ d\phi - \left(\int\left(\int \theta_i g(\theta_i,\phi)\ d\theta_i\right) f_{\phi}(\phi) \ d\phi\right)^2\\
& = & \int \left( \int \theta_i g(\theta_i,\phi) \ d\theta_i \right)^2f_{\phi} \ d\phi - \left(\int\left(\int \theta_i g(\theta_i,\phi)\ d\theta_i\right) f_{\phi}(\phi) \ d\phi\right)^2\\
& = & \int h(\phi)^2 f_{\phi} \ d\phi - \left(\int h(\phi) f_{\phi}(\phi) \ d\phi\right)^2\\
& = & \int \left( h(\phi) - \int h(\phi) f_{\phi}(\phi)\ d\phi \right) ^2 f_{\phi} \ d\phi \\
&\ge & 0.
\end{eqnarray}
Here, $h(\phi)$ is just shorthand for the following:
$$
h(\phi) = \int \theta_i g(\theta_i,\phi)\ d\theta_i.
$$
$h(\phi)$ is precisely $\mathbb{E}(\theta_i|\phi)$. It is not a pdf, it is a function of the random variable $\phi$, and so is itself a random variable.
