  To better understand the evolution of stars in binary systems as well as to
constrain the formation of binary stars, it is important to know the binary
mass-ratio distribution. However, in most cases, i.e. for single-lined
spectroscopic binaries, the mass ratio cannot be measured directly but only
derived as the convolution of a function that depends on the mass ratio and the
unknown inclination angle of the orbit on the plane of the sky. We extend our
previous method to deconvolve this inverse problem (Cure et al. 2014), i.e., we
obtain as an integral the cumulative distribution function (CDF) for the mass
ratio distribution. After a suitable transformation of variables it turns out
that this problem is the same as the one for rotational velocities $v \sin i$,
allowing a close analytic formulation for the CDF. We then apply our method to
two real datasets: a sample of Am stars binary systems, and a sample of massive
spectroscopic binaries in the Cyg OB2 Association.} {We are able to reproduce
the previous results of Boffin (2010) for the sample of Am stars, while we show
that the mass ratio distribution of massive stars shows an excess of small mass
ratio systems, contrarily to what was claimed by Kobulnicky et al. (2014). Our
method proves very robust and deconvolves the distribution from a sample in
just a single step.
