Shiny apps for introduction to statistics
Switch branches/tags
Nothing to show
Clone or download
Failed to load latest commit information.
ch03-histograms ch03-histograms: add app files Mar 18, 2017
ch08-corr-coeff-diagrams ch08-corr-coeff: fix arguments of runGitHub()' Mar 29, 2017
ch08-football-shape added app for ch08 football-shaped clouds Apr 14, 2016
ch10-heights-data ch10-heights-data: scatterplot with Pearson's data Mar 29, 2017
ch10-regression-strips append ch10 to regression strips app Apr 30, 2016
ch11-regression-errors appended ch11 to regression errors app Apr 29, 2016
ch12-regression-heteroscedastic appended ch12 to regression heteroscedastic with ropes Apr 16, 2016
ch16-chance-error appended ch16 to chance error app (John Kerrich's experiment) Apr 27, 2016
ch17-demere-games ch17-demere-games: fix call of runGitHub() Mar 30, 2017
ch17-expected-value-std-error ch17-expected-value-std-error: add app Apr 1, 2017
ch17-roulette-wheel added app for ch17 about roulette wheel Apr 10, 2016
ch18-coin-tossing ch18-coin-tossing: add app Apr 2, 2017
ch18-roll-dice-product ch18-roll-dice-product: substitute ui.R and server.R with app.R Apr 2, 2017
ch18-roll-dice-sum ch18-roll-dice-sum: fix y-axis label Oct 13, 2018
ch18-tossing-coins ch18-tossing-coins: better axis labels Oct 11, 2018
ch20-sampling-men update header in R files of ch20 app Apr 12, 2016
ch21-percentage-estimation added colors to confidence intervals of ch21 app Apr 14, 2016
ch23-average-number changed some colors in plots of ch23 app Apr 14, 2016
regression-effect Initial commit Mar 9, 2016
regression-galton Initial commit Mar 9, 2016
regression-ropes Initial commit Mar 9, 2016
scatterplot-ropes Initial commit Mar 9, 2016
.gitignore Initial commit Mar 9, 2016
LICENSE Initial commit Mar 9, 2016 readme: extend content, and links to install software Mar 27, 2017

Shiny Apps for STAT 2, 20, 21, 131A

This is a collcetion of Shiny apps for introductory statistics courses based on the classic textbook Statistics by David Freedman, Robert Pisani, and Roger Purves (2007). Fourth Edition. Norton & Company.

I originally developed these apps for the course Stat 2, and refined them for Stat 20 / Stat 131A, at UC Berkeley. The main motivation behind the apps is to have teaching materials (in the form of interactive graphics) that I can use for living demos during lecture.

The apps are not specifically intended for Stat 2, 20 or 131A. They can be used for any of the introductory Statistics courses at UC Berkeley: STAT 2, STAT 20, STAT 21, STAT W21, STAT 131A, etc. And pretty much in any statistics introductory course in general.

Running the apps

The required software is R and RStudio (preferably a recent version).

Both R and RStudio are free, and are available for Mac OS X, Windows, and Linux.

Assuming that you have both R and RStudio, the other thing you need is the R package "shiny". In case of doubt, run:


The easiest way to run an app is with the runGitHub() function from the "shiny" package. For instance, to run the app contained in the regression-galton folder, run the following code in R:


# Run an app from a subdirectory in the repo
runGitHub("shiny-introstats", "gastonstat", subdir = "regression-galton")

Another way to run the apps is by cloning the git repository, then use runApp():

# First clone the repository with git. If you have cloned it into
# ~/regression-galton, first go to that directory, then use runApp().


This work is licensed under a FreeBSD License.

Author: Gaston Sanchez