Many chronic disease processes feature acute episodic conditions which warrant therapeutic intervention to alleviate symptoms or reduce the risk of further complications. Examples of such disease processes arise in fields such as neurology, where migraineurs experience recurrent attacks of migraine, and respirology, where patients suffering from asthma, cystic fibrosis, or chronic obstructive pulmonary disease may experience recurrent exacerbations. In randomized clinical trials, patients suffering from diseases of this sort are often randomized to one of several treatments and followed over a fixed period of time, during which any episodes are treated with the assigned treatment. When the outcome of interest is a response to treatment at each episode, the data have a similar structure to longitudinal data from studies with prescheduled follow-up assessments, and it is commonplace for analyses to be based on the corresponding methodology. However, this approach ignores the fact that the timing of episodes, and hence the number observed in any given period, is stochastic. In this tutorial we demonstrate the biases that result from naive analyses, discuss analyses that account for the complete stochastic nature, and use a recent migraine trial for illustration. We conclude with some considerations for the design of randomized trials where the unit of analysis is the episode rather than the patient. Copyright © 2010 John Wiley & Sons, Ltd.