In many ecologically situated cognitive tasks, participants engage in self-selection of the particular stimuli they choose to evaluate or test themselves on. This contrasts with a traditional experimental approach in which an experimenter has complete control over the participant's experience. Considering these two situations jointly provides an opportunity to understand why participants opt in to some stimuli or tasks but not to others. We present here a Bayesian model of cognitive and metacognitive processes that uses latent contextual knowledge to model how learners use knowledge to make opt-in decisions. We leverage the model to describe how performance on self-selected stimuli relates to performance on true experimental tasks that deny learners the opportunity for self-selection. We illustrate the utility of the approach with an application to a general-knowledge answering task.