Determining rare state populations in nucleic acid ensembles