asymmetric joint distributions with symmetric marginals Suppose $f:[0,1]\times [0,1]\to \mathbb R_+$ is Lebesgue integrable function. We say $f$ is symmetric if $f(x,y)=f(y,x)$ for almost all $x,y\in[0,1]$.
$$\int_0^1f(x,y)dy=g(x),  a.e. x $$
$$\int_0^1f(x,y)dx=g(y),  a.e  y $$
Does it imply $f$ is symmetric almost everywhere?
Thanks.
 A: No.  Consider the 3 by 3 matrix $$\begin{pmatrix}0&1&0\\0&0&1\\1&0&0\end{pmatrix}$$ and note that its row sums are equal to its column sums and that it is not symmetric.  Use this as a blueprint for building a counterexample $f$, as the sum of three characteristic functions of $1/3\times1/3$ squares.
That is, let $S=([0,1/3]\times[1/3,2/3])\cup([1/3,2/3]\times[2/3,1])\cup([2/3,1]\times[0,1/3])$ be the set in $\mathbb R^2$ formed by taking the union of three small squares. Now let $f(x,y)=1$ if $(x,y)\in S$, and $0$ otherwise.  It is easy to see that $g(x)=1/3$ for almost all values of $x\in[0,1]$, but yet $f(x,y)\ne f(y,x)$ for almost all values of $(x,y)\in[0,1]$.
A slightly different counterexample:  Let $f(x,y)=1$ if $(y-x)\bmod 1 \le 1/2$ and $0$ otherwise.  (That is, $f(x,y)=1$ if $0\le y\le x+1/2$ or $0\le y \le x-1/2$ for $(x,y)\in [0,1]\times[0,1]$, and $0$ otherwise.)  Then $g(x)=1/2$ for all $x\in[0,1]$ but yet  $f$ is not symmetric.
In each of these cases it might make sense to sketch the region in the square where $f=1$, say by shading with a pencil.  
