This paper introduces a model of the atrioventricular node function during atrial fibrillation (AF), and describes the related ECG-based estimation method. The proposed model is defined by parameters that characterize the arrival rate of atrial impulses, the probability of an impulse choosing either one of the two atrioventricular nodal pathways, the refractory periods of these pathways, and the prolongation of the refractory periods. These parameters are estimated from the RR intervals using maximum likelihood estimation, except for the shorter refractory period which is estimated from the RR interval Poincaré plot, and the mean arrival rate of atrial impulses by the AF frequency. Simulations indicated that 200-300 RR intervals are generally needed for the estimates to be accurate. The model was evaluated on 30-min ECG segments from 36 AF patients. The results showed that 88% of the segments can be accurately modeled when the estimated probability density function (PDF) and an empirical PDF were at least 80% in agreement. The model parameters were estimated during head-up tilt test to assess differences caused by sympathetic stimulation. Both refractory periods decreased as a result of stimulation, and the likelihood of an impulse choosing the pathway with the shorter refractory period increased.