Code for 'The Art of Statistics'
UK hardback: UK paperback: US hardback:
The UK and US hardback versions are identical in content. Errata and additions are listed below for all versions.
This file is produced by R Markdown, and there is also a web-page produced by Github.
The repository contains data and R code for the Figures and Tables in Art of Statistics. They should all work in RStudio.
It is not yet complete, and will change and improve.
The graphics were originally mainly produced in basic R, but (with much appreciated assistance) these have been mainly revised into ggplot2 - sometimes both versions are provided for comparison. However I do not pretend to have any particular skill in using R or ggplot, and no doubt many improvements could be made.
Many packages are used and will need to be installed, for example using install.packages(“ggplot2”)
While the individual files can be downloaded, it is probably easiest to download a zipped repository using the green download button.
Suggestions for improvements to [email protected]
Many apologies that errors are still there (sob).
page 385 Glossary entry for chi-squared tests. Add at end 'For small counts a 'continuity correction' can be applied, and this is used for the data in Table 10.2'
page 409 note 5 replace "https://esa.un.org/unpd/wpp/Download/Standard/Population/" by "https://population.un.org/wpp/Download/Standard/Population/"
page 413 note 4 replace with "https://www.kdd.org/kdd2016/papers/files/rfp0573-ribeiroA.pdf"
The bootstrap analysis in Chapter 7 contained some errors which have been corrected in the version on Github, where the analysis is clarified by using only data on men reporting less than 50 partners. Corresponding edits to the text are shown below.