Statistical model for describing heart rate variability in normal rhythm and atrial fibrillation