The thoughts and feelings people have about pain (referred to as 'pain expectations') are known to 21 alter the perception of pain. However little is known about the cognitive processes that underpin pain 22 expectations, or what drives the differing effect that pain expectations have between individuals. This 23 paper details the testing of a model of pain perception which formalises the response to pain in terms of a 24 Bayesian prior-to-posterior updating process. Using data acquired from a short and deception-free 25 predictive cue task, it was found that this Bayesian model predicted ratings of pain better than other, 26 simpler models. At the group level, the results confirmed two core predictions of predictive coding; that 27 expectation alters perception and that increased uncertainty in the expectation reduces its impact on 28 perception. The addition to the model of parameters relating to trait differences in pain expectation, 29 improved its fit, suggesting that such traits play a significant role in perception beyond those expectations 30 triggered by the pain cue. When model parameters were allowed to vary by participant, the model's fit 31 improved further. This final model produced a characterisation of each individual's sensitivity to pain 32 expectations. This model is relevant for the understanding of the cognitive basis of pain expectations and 33 could potentially act as a useful tool for guiding patient stratification and clinical experimentation.