  The dark energy, dark matter and baryon densities in the Universe are
observed to be similar, with a factor of no more than 20 between the largest
and smallest densities. We show that this coincidence can be understood via
superhorizon domains of randomly varying densities when the baryon density at
initial collapse of galaxy-forming perturbations is determined by anthropic
selection. The baryon and dark matter densities are assumed to be dependent on
random variables \theta_{d} and \theta_{b} according to \rho_{dm} ~
\theta_{d}^{\alpha} and \rho_{b} ~ \theta_{b}^{\beta}, while the effectively
constant dark energy density is dependent upon a random variable \phi_{Q}
according to \rho_{Q} ~ \phi_{Q}^{n}. The ratio of the baryon density to the
dark energy density at initial collapse, r_{Q}, and the baryon-to-dark matter
ratio, r, are then determined purely statistically, with no dependence on the
anthropically-preferred baryon density. We compute the probability distribution
for r_{Q} and r and show that the observed values of r_{Q} and r can be
naturally understood within this framework. In particular, for the case \alpha
= 2, \beta = 1 and n = 4, which can be physically realized via a combination of
axion dark matter, Affleck-Dine baryogenesis and frozen quintessence with a
\phi_{Q}^4 potential, the range of r_{Q} and r which corresponds to the
observed Universe is a quite natural, with a probability which is broadly
similar to other ranges of r_{Q} and r.
