  We present the complete Bayesian statistical analysis of the HArps-n red
Dwarf Exoplanet Survey (HADES), which monitored the radial velocities of a
large sample of M dwarfs with HARPS-N at TNG, over the last 6 years. The
targets were selected in a narrow range of spectral types from M0 to M3, $0.3$
M$_\odot < M_\star < 0.71$ M$_\odot$, in order to study the planetary
population around a well-defined class of host stars. We take advantage of
Bayesian statistics to derive an accurate estimate of the detectability
function of the survey. Our analysis also includes the application of Gaussian
Process approach to take into account stellar activity induced radial velocity
variations, and improve the detection limits, around the most-observed and
most-active targets. The Markov chain Monte Carlo and Gaussian process
technique we apply in this analysis has proven very effective in the study of
M-dwarf planetary systems, helping the detection of most of the HADES planets.
From the detectability function we can calculate the occurrence rate of small
mass planets around early-M dwarfs, either taking into account only the 11
already published HADES planets or adding also the 5 new planetary candidates
discovered in this analysis, and compare them with the previous estimates of
planet occurrence around M-dwarf or Solar-type stars: considering only the
confirmed planets, we find the highest frequency for low-mass planets ($1$
M$_\oplus < m_p \sin i < 10$ M$_\oplus$) with periods $10$ d$ < P < 100$ d,
$f_\text{occ} = 85^{+5}_{-19}\%$, while for short-period planets ($1$ d$ < P <
10$ d) we find a frequency of $f_\text{occ} = 10.3^{+8.4}_{-3.3}\%$,
significantly lower than for later-M dwarfs. These results, and their
comparison with other surveys focused on different stellar types, confirms the
central role that stellar mass plays in the formation and evolution of
planetary systems.
