# Prediction with circular variable

Suppose I have a set of $N$ observations for a circular variable $\theta_i$. Each trial for which an observation of $\theta_i$ is taken can lead to an outcome $x_i \in \{0,1\}$. Next, suppose that the set of trials for which $x_i = 1$ has a preferred direction, such that the mean resultant length $r$:

$r = \frac{1}{N} \sum_i^{N} e^{i\phi_i}$

is nonzero ($0.1 < r < 0.2$, to be concrete). The set of trials for which $x_i = 0$ is uniform.

Now, with the observations $\theta_i$, the outcomes $x_i$, and the mean resultant length $r$, intuitively it seems possible to predict the outcome for a new observation, either through a classifier, some closed-form expression in terms of $r$, or a parametric fitting approach. After searching, however, a reference clearly addressing this problem appears difficult to find. Could anyone suggest a potential start for thinking about this problem?

A particularly simple approach would be to map angles to 2d Cartesian coordinates on the unit circle. That is, let $z_i = [\cos \theta_i, \sin \theta_i]$. Then, use any off-the-shelf classifier to predict $x$ as a function of $z$. For example, a linear classifier can separate the circle into two regions--one for each outcome. Nonlinear classifiers can fit more complicated functions.
An alternative would be to work directly in angle space. For example, use a generative model: Fit a circular distribution (e.g. a von Mises distribution) to angles observed for each outcome: $p(\theta \mid x = 0)$ and $p(\theta \mid x=1)$. Estimate the prior class probabilities $p(x=0)$ and $p(x=1)$ as the relative frequency of each outcome in the dataset. Then, to predict the outcome for a new angle, use Bayes' rule:
$$p(x=1 \mid \theta) = \frac{ p(\theta \mid x=1) p(x=1) }{ p(\theta \mid x=0) p(x=0) + p(\theta \mid x=1) p(x=1) }$$