  Ten binary black-hole mergers have already been detected during the first two
observing runs of advanced LIGO and Virgo, and many more are expected to be
observed in the near future. This opens the possibility for gravitational-wave
astronomy to better constrain the properties of black hole binaries, not only
as single sources, but as a whole astrophysical population. In this paper, we
address the problem of using gravitational-wave measurements to estimate the
proportion of merging black holes produced either via isolated binaries or
binaries evolving in young star clusters. To this end, we use a Bayesian
hierarchical modeling approach applied to catalogs of merging binary black
holes generated using state-of-the-art population synthesis and N-body codes.
In particular, we show that, although current advanced LIGO/Virgo observations
only mildly constrain the mixing fraction $f \in [0,1]$ between the two
formation channels, we expect to narrow down the fractional errors on $f$ to
$10-20\%$ after a few hundreds of detections.
