The study of memory for texts has had an long tradition of re-search in psychology. According to most general accounts oftext memory, the recognition or recall of items in a text is basedon querying a memory representation that is built up on the ba-sis of background knowledge. The objective of this paper is todescribe and thoroughly test a Bayesian model of this generalaccount. In particular, we develop a model that describes howwe use our background knowledge to form memories as a pro-cess of Bayesian inference of the statistical patterns that areinherent in a text, followed by posterior predictive inference ofthe words that are typical of those inferred patterns. This pro-vides us with precise predictions about what words will be re-membered, whether veridically or erroneously, from any giventext. We then test these predictions using data from a memoryexperiment using a relatively large sample of randomly chosentexts from a representative corpus of British English.