A novel approach to derive constraints from cosmological datasets on the total neutrino mass $M_\nu$ while taking into account our ignorance of the neutrino mass ordering, either normal (NH) or inverted (IH) is presented.
This novel approach is carried out in the framework of hierarchical problems in Bayesian analysis. In this context,
the choice of the neutrino mass ordering is modeled via the discrete hyperparameter $h_\mathrm{type}$, which we introduce in the usual
Markov chain analysis. The preference for either the NH or the IH
scenarios is then simply encoded in the posterior distribution of $h_\mathrm{type}$ itself. Current cosmic microwave
background (CMB) and baryon acoustic oscillation (BAO) measurements show a
weak preference for the NH scenario, with odds of 3:2.
Concerning next-generation cosmological experiments, forecasts suggest that the combination of
upcoming CMB (COrE) and BAO surveys (DESI) may determine the neutrino mass hierarchy
at a high statistical significance if the mass is very close to the minimal value allowed by oscillation experiments (9:1 preference of NH versus IH for NH and a fiducial value of
$M_\nu=0.06$ eV).
On the contrary, if the sum of the masses is of the order of $0.1$ eV or larger, even future cosmological observations
will be inconclusive. The unbiased limit on
$M_\nu$ we obtain is crucial for ongoing and planned neutrinoless double beta decay searches.