Modern astronomical research is beset with a vast range of statistical challenges, ranging from reducing data from megadatasets to characterizing an amazing variety of variable celestial objects or testing astrophysical theory. Linking astronomy to the world of modern statistics, this volume is a unique resource, introducing astronomers to advanced statistics through ready-to-use code in the public domain R statistical software environment. The book presents fundamental results of probability theory and statistical inference, before exploring several fields of applied statistics, such as data smoothing, regression, multivariate analysis and classification, treatment of nondetections, time series analysis, and spatial point processes. It applies the methods discussed to contemporary astronomical research datasets using the R statistical software, making it invaluable for graduate students and researchers facing complex data analysis tasks. A link to the author's website for this book can be found at www.cambridge.org/msma. Material available on their website includes datasets, R code and errata.