Context. For 61 transiting hot Jupiters, the projection of the angle between the orbital plane and the stellar equator (called the spinorbit angle) has been measured. For about half of them, a significant misalignment is detected, and retrograde planets have been observed. This challenges scenarios of the formation of hot Jupiters. Aims. In order to better constrain formation models, we relate the distribution of the real spin-orbit angle Ψ to the projected one β. Then, a comparison with the observations is relevant. Methods. We analyse the geometry of the problem to link analytically the projected angle β to the real spin-orbit angle Ψ. The distribution of Ψ expected in various models is taken from the literature, or derived with a simplified model and Monte Carlo simulations in the case of the disk-torquing mechanism.Results. An easy formula to compute the probability density function (PDF) of β knowing the PDF of Ψ is provided. All models tested here look compatible with the observed distribution beyond 40 degrees, which is so far poorly constrained by only 18 observations. But only the disk-torquing mechanism can account for the excess of aligned hot Jupiters, provided that the torquing is not always efficient. This is the case if the exciting binaries have semi-major axes as large as ∼10 4 AU. Conclusions. Based on comparison with the set of observations available today, scattering models and the Kozai cycle with tidal friction models can not be solely responsible for the production of all hot Jupiters. Conversely, the presently observed distribution of the spin-orbit angles is compatible with most hot Jupiters having been transported by smooth migration inside a proto-planetary disk, itself possibly torqued by a companion.