  [Abridged] The analysis of a sample of 52 clusters with precise and
hypothesis-parsimonious measurements of mass shows that low mass clusters and
groups are not simple scaled-down versions of their massive cousins in terms of
stellar content: lighter clusters have more stars per unit cluster mass. The
same analysis also shows that the stellar content of clusters and groups
displays an intrinsic spread at a given cluster mass, i.e. clusters are not
similar each other in the amount of stars they contain, not even at a fixed
cluster mass. The stellar mass fraction depends on halo mass with (logarithmic)
slope -0.55+/-0.08 and with 0.15+/-0.02 dex of intrinsic scatter at a fixed
cluster mass. The intrinsic scatter at a fixed cluster mass we determine for
gas mass fractions is smaller, 0.06+/-0.01 dex. The intrinsic scatter in both
the stellar and gas mass fractions is a distinctive signature that the regions
from which clusters and groups collected matter, a few tens of Mpc, are yet not
representative, in terms of gas and baryon content, of the mean matter content
of the Universe. The observed stellar mass fraction values are in marked
disagreement with gasdynamics simulations with cooling and star formation of
clusters and groups. We found the the baryon (gas+stellar) fraction is fairly
constant for clusters and groups with 13.7<lg(mass)<15.0 solar masses and it is
offset from the WMAP-derived value by about 6 sigmas. The offset could be
related to the possible non universality of the baryon fraction pointed out by
our measurements of the intrinsic scatter. Our analysis is the first that does
not assume that clusters are identically equal at a given halo mass and it is
also more accurate in many aspects. The data and code used for the stochastic
computation are distributed with the paper.
