Skip to content

Dan Adrian’s Happy Apps

Dan has written a new set of apps to help in teaching intro stats. In this post, Dan lists and briefly describes his “Happy Apps.”

How do the Happy Apps relate to the StatPREP project’s Little Apps? The Little Apps are rooted in displays of data; statistical concepts are always directly put in the context of such displays. The Happy Apps have graphics oriented to methods and the statistical theory behind them. These are two different pedagogies for teaching statistics.

And now, here’s Dan Adrian …

Introducing the Happy Apps collection, a baker’s dozen of R Shiny apps for introductory statistics at the undergraduate (or AP Stats) level. Each is a dynamic visual aid addressing a specific concept or topic in intro stats. They make nice visual aids to add to a lecture, or teachers can develop in-class activities or homework problems in which teachers provide students with guided exploration of a concept through the app. Most of the apps contain a “Click for more info” checkbox under the title, which will expand upon clicking to describe the different parts of the app in detail.

I will organize the apps here by variable type, as that has been our approach to intro stats at Grand Valley State University for a number of years. I will list all the apps first and the write a description of each below. The links named “app” will go to the apps themselves, and the links named “description” will go to the description of the app below. The screenshots of the apps below are links as well.

Sampling distribution of sample proportion

This app shows a dynamic graph of the sampling distribution of p-hat that reacts to user supplied values of the population proportion p and the sample size n. It shows the result of checking the conditions for approximate normality of the sampling distribution of p-hat and the value of the mean and standard deviation. Upon request, the app also plots a normal density curve with the same mean and standard deviation as the sampling distribution of p-hat and compares probabilities based on the true sampling distribution of p-hat (from the binomial distribution) and based on the normal approximation.

Confidence interval for the population proportion

This app demonstrates the different parts of the calculation of the confidence interval. The user specifies the values of the sample proportion p-hat, the sample size n, and the confidence level CC. The app first checks the large-sample conditions associated with the normal approximation and displays a warning (and no confidence interval) if they are not met. Provided the conditions are met, the app displays the confidence interval multiplier z* with a normal curve showing the confidence level as the area between -z and  + z. It is also displays the value of the standard error and the margin of error and a plot of the confidence interval. The app is ideal for answering questions about how the sample size and confidence level affect the width of the interval and how this follows from the formula.

Hypothesis test for a single proportion

This app contains three tabs, one which focuses on the test statistic, one which focuses on the p-value, and one which combines the two. The test statistic tab focuses on how the different parts of the formula affect the result. The p-value tab focuses on the changing graph of the p-value as an area under the normal curve depending on the test statistic value and the alternative hypothesis. The combined tab is then ideal for answering questions about how the difference (p-hat –  p_0) or the sample size n affect the p-value.

Descriptive statistics for a single quantitative variable

In this app, the user enters their own data and the app interactively updates numerical and graphical summaries. A histogram is shown with the option of choosing the number of bins and a boxplot with the option of showing the “fences” used in determining whether data points are outliers. The app is well-suited to demonstrate concepts such as how the mean and standard deviation are sensitive to outliers while the median and interquartile range are resistant to them.

The Central Limit Theorem

The app first directs users to select one of nine population distributions varying in direction and degree of skewness. Next, the user can change the sample size and note how the sampling distribution of the sample mean x-bar changes relative to the population distribution. The app also compares the distribution of x-bar to that of a normal distribution with the same mean and standard deviation. The app will demonstrate to students that the distribution of x-bar approaches a normal distribution as n increases and that larger values of n are needed for the sampling distribution of n to be approximately normal when the population is more skewed.

Using the standard normal distribution

The app performs calculations from the standard normal distribution and shows the corresponding graphs. This includes “forward problems” where users find a probability from a specified range in normal quantiles (z values) and “backward problems” where users find a range of z’s from a specified probability.

Comparing the t distribution to the standard normal distribution

This app displays a plot of both the t and standard normal (z) densities on the same axes for a user-specified value of the degrees of freedom. It also allows for shaded areas representing a specified confidence level to be added to the plot, along with values of t* and z*. The app demonstrates that the  t distribution approaches the zz distribution as the degrees of freedom increases.

Confidence interval for the population mean

This app is quite similar to the app for the confidence interval for the population proportion, demonstrating the different parts of the calculation of the interval.

Hypothesis test for a single mean