Does Bayes theorem hold for expectations? Is it true that for two random variables $A$ and $B$,
$$E(A\mid B)=E(B\mid A)\frac{E(A)}{E(B)}?$$
 A: $$E[A\mid B] \stackrel{?}= E[B\mid A]\frac{E[A]}{E[B]} \tag 1$$
The conjectured result $(1)$ is trivially true for independent random variables $A$ and $B$ with nonzero means. 
If $E[B]=0$, then the right side of $(1)$ involves a division by $0$ and so $(1)$ is meaningless. Note that whether or not $A$ and $B$ are independent is not relevant.
In general, $(1)$ does not hold for dependent random variables but specific examples of dependent $A$ and $B$ satisfying $(1)$ can be found. Note that we must continue to insist that $E[B]\neq 0$, else the right side of $(1)$ is meaningless. Bear in mind that $E[A\mid B]$ is a random variable that happens to be a function of the random variable $B$, say $g(B)$ while $E[B\mid A]$ is a random variable that is a function of the random variable $A$, say $h(A)$. So, $(1)$ is similar to asking whether 
$$g(B)\stackrel{?}= h(A)\frac{E[A]}{E[B]} \tag 2$$
can be a true statement, and obviously the answer is that $g(B)$ cannot be a multiple of $h(A)$  in general. 
To my knowledge, there are only two special cases where $(1)$ can hold. 


*

*As noted above, for independent random variables $A$ and $B$, $g(B)$ and $h(A)$ are degenerate random variables (called constants by statistically-illiterate folks) that equal $E[A]$ and $E[B]$ 
respectively, and so if $E[B]\neq 0$, we have equality in $(1)$.

*At the other end of the spectrum from independence, suppose that 
$A=g(B)$ where $g(\cdot)$ is an invertible function and thus $A=g(B)$ and $B=g^{-1}(A)$ are wholly dependent random variables. In this case,
$$E[A\mid B]  = g(B), \quad E[B\mid A] = g^{-1}(A) = g^{-1}(g(B)) = B$$
and so $(1)$ becomes
$$g(B)\stackrel{?}= B\frac{E[A]}{E[B]}$$
which holds exactly when $g(x) = \alpha x$ where $\alpha$ can be
any nonzero real number. Thus, $(1)$ holds whenever $A$ is a scalar multiple of $B$, and of course $E[B]$ must be nonzero
(cf. Michael Hardy's answer). The above development
shows that $g(x)$ must be a linear function and that
$(1)$ cannot hold for affine functions $g(x) = \alpha x + \beta$ with $\beta \neq 0$. However, note that Alecos Papadopolous in 
his answer and his comments thereafter claims that if $B$
is a normal random variable with nonzero mean, then for specific
values of $\alpha$ and $\beta\neq 0$ that he provides, 
$A=\alpha B+\beta$
and $B$ satisfy $(1)$. In my opinion, his example is incorrect.
In a comment on this answer, Huber has suggested considering the
symmetric conjectured equality
$$E[A\mid B]E[B] \stackrel{?}=E[B\mid A]E[A]\tag{3}$$
which of course always holds for independent random variables regardless of the values of
$E[A]$ and $E[B]$ and for scalar multiples $A = \alpha B$ also.  Of course, more trivially, $(3)$
holds for any zero-mean random variables $A$ and $B$ (independent or dependent, scalar multiple or not; it does not
matter!): $E[A]=E[B]=0$ is sufficient for equality in $(3)$.
Thus, $(3)$ might not be as interesting as $(1)$ as a topic for discussion.
A: The conditional expected value of a random variable $A$ given the event that $B=b$ is a number that depends on what number $b$ is. So call it $h(b).$ Then the conditional expected value $\operatorname{E}(A\mid B)$ is $h(B),$ a random variable whose value is completely determined by the value of the random variable $B$. Thus $\operatorname{E}(A\mid B)$ is a function of $B$ and $\operatorname{E}(B\mid A)$ is a function of $A$.
The quotient $\operatorname{E}(A)/\operatorname{E}(B)$ is just a number.
So one side of your proposed equality is determined by $A$ and the other by $B$, so they cannot generally be equal.
(Perhaps I should add that they can be equal in the trivial case when the values of $A$ and $B$ determine each other, as when for example, $A = \alpha B, \alpha \neq 0$ and $E[B]\neq 0$, when 
$$E[A\mid B] = \alpha B = E[B\mid A]\cdot\alpha = E[B\mid A]\frac{\alpha E[B]}{E[B]} = E[B\mid A]\frac{E[A]}{E[B]}.$$ But functions equal to each other only at a few points are not equal.)
A: The result is untrue in general, let us see that in a simple example.  Let $X \mid P=p$ have a binomial distribution with parameters $n,p$ and $P$ have the beta distrubution with parameters $(\alpha, \beta)$, that is, a bayesian model with conjugate prior.  Now just calculate the two sides of your formula, the left hand side is $\DeclareMathOperator{\E}{\mathbb{E}} \E X \mid P = nP$, while the right hand side is 
$$
\E( P\mid X) \frac{\E X}{\E P} = \frac{\alpha+X}{n+\alpha+\beta}  \frac{\alpha/(\alpha+\beta)}{n\alpha/(\alpha+\beta)}
$$
and those are certainly not equal. 
A: The expression certainly does not hold in general. For the fun of it, I show below that if $A$ and $B$ follow jointly a bivariate normal distribution, and have non-zero means, the result will hold if the two variables are linear functions of each other and have the same coefficient of variation (the ratio of standard deviation over mean) in absolute terms.
For jointly normals we have 
$$\operatorname{E}(A \mid B) = \mu_A + \rho \frac{\sigma_A}{\sigma_B}(B - \mu_B)$$
and we want to impose
$$\mu_A + \rho \frac{\sigma_A}{\sigma_B}(B - \mu_B) = \left[\mu_B + \rho \frac{\sigma_B}{\sigma_A}(A - \mu_A)\right]\frac{\mu_A}{\mu_B}$$
$$\implies \mu_A + \rho \frac{\sigma_A}{\sigma_B}(B - \mu_B) = \mu_A + \rho \frac{\sigma_B}{\sigma_A}\frac{\mu_A}{\mu_B}(A - \mu_A)$$
Simplify $\mu_A$ and then $\rho$, and re-arrange to get
$$B = \mu_B +\frac{\sigma^2_B}{\sigma^2_A}\frac{\mu_A}{\mu_B}(A - \mu_A)$$
So this is the linear relationship that must hold between the two variables (so they are certainly dependent, with correlation coefficient equal to unity in absolute terms) in order to get the desired equality. What it implies?
First, it must also be satisfied that
$$E(B) \equiv \mu_B = \mu_B+\frac{\sigma^2_B}{\sigma^2_A}\frac{\mu_A}{\mu_B}(E(A) - \mu_A) \implies \mu_B = \mu_B$$
so no other restirction is imposed on the mean of $B$ ( or of $A$) except of them being non-zero. Also a relation for the variance must be satisfied,
$$\operatorname{Var}(B) \equiv \sigma^2_B = \left(\frac{\sigma^2_B}{\sigma^2_A}\frac{\mu_A}{\mu_B}\right)^2\operatorname{Var}(A)$$
$$\implies \left(\sigma^2_A\right)^2\sigma^2_B = \left(\sigma^2_B\right)^2\sigma^2_A\left(\frac{\mu_A}{\mu_B}\right)^2$$
$$\implies \left(\frac{\sigma_A}{\mu_A}\right)^2 = \left(\frac{\sigma_B}{\mu_B}\right)^2 \implies (\text{cv}_A)^2 = (\text{cv}_B)^2$$
$$\implies |\text{cv}_A| = |\text{cv}_B|$$
which was to be shown.
Note that equality of the coefficient of variation in absolute terms, allows the variables to have different variances, and also, one to have positive mean and the other negative.
