In Music and Probability, David Temperley explores issues in music perception and cognition from a probabilistic perspective. The application of probabilistic ideas to music has been pursued only sporadically over the past four decades, but the time is ripe, Temperley argues, for a reconsideration of how probabilities shape music perception and even music itself. Recent advances in the application of probability theory to other domains of cognitive modeling, coupled with new evidence and theoretical insights about the working of the musical mind, have laid the groundwork for more fruitful investigations. Temperley proposes computational models for two basic cognitive processes, the perception of key and the perception of meter, using techniques of Bayesian probabilistic modeling. Drawing on his own research and surveying recent work by others, Temperley explores a range of further issues in music and probability, including transcription, phrase perception, pattern perception, harmony, improvisation, and musical styles. Music and Probability -- the first full-length book to explore the application of probabilistic techniques to musical issues -- includes a concise survey of probability theory, with simple examples and a discussion of its application in other domains. Temperley relies most heavily on a Bayesian approach, which not only allows him to model the perception of meter and tonality but also sheds light on such perceptual processes as error detection, expectation, and pitch identification. Bayesian techniques also provide insights into such subtle and advanced issues as musical ambiguity, tension, and "grammaticality," and lead to interesting and novel predictions about compositional practice and differences between musical styles.