A statistical approach to rhythm diagnosis of cardiograms