This Demonstration models the 24-hour (circadian) variation of heart rate as a sinusoid with superimposed random noise. The methods of cosinor biorhythm analysis are used to estimate the magnitude, phase, and statistical significance of the modeled rhythm.
The cosinor method fits data to a cosine function, , where and are the mean and amplitude of the sinusoidal rhythm, is the period, and is the time of peak heart rate. In cosinor phraseology, the mean is called the mesor [1, 2, 3].
Plots are shown for the cosinor best-fit solution of and the bivariate error ellipse with amplitude and acrophase of 0.95 confidence intervals, which are dynamically computed and plotted on the polar graph.
The cosinor 0.95 confidence error ellipse is centered at the tip of the amplitude-acrophase vector on the polar plot. The eccentricity and orientation (i.e., tilt) of the ellipse depend on the degree of nonuniformity in data collection, as occurs, for example, when data is missing or otherwise irregularly sampled. When the error ellipse overlaps the pole the amplitude estimate fails the test of significance (). This indicates the absence of a sinusoidal rhythm. In the case of pole overlap, amplitude and acrophase confidence intervals do not have calculable bounds .
Solving the nonlinear estimating function is straightforward after linearizing the parameters and applying least-squares techniques. Computing the amplitude and acrophase confidence intervals is more difficult, since efficient close-formed solutions do not exist. We therefore derive the relevant nonlinear implicit equations and apply Mathematica numerical root-finding techniques. This approach is efficient and permits dynamic updating of parameter values in the Demonstration.
The implicit equations defining amplitude and acrophase confidence limits are relevant to detection of circle-ellipse collisions and locating line-ellipse tangency points.
 W. Nelson, Y. L. Tong, J. K. Lee, and F. Halberg, "Methods for Cosinor-Rhythmometry," Chronobiologia, 6(4), 1979 pp. 305–323.
 M. A. Rol de Lama, J. P. Lozano, V. Ortiz, F. J. Sánchez-Vázquez, and J. A. Madrid, "How to Engage Medical Students in Chronobiology: an Example on Autorhythmometry," Advances in Physiology Education,29(3), 2005 pp. 160–64. advan.physiology.org/content/29/3/160.full.pdf+html.