Justin B. Post

Director of Online Education
Associate Teaching Professor
Justin_Post@ncsu.edu (NC State)
919.515.0637

View the Project on GitHub


R Shiny Apps

Creating visuals to explain concepts or to show nuances can make a huge impact on student learning.

Hex sticker from RStudio

Having visuals that can be modified by a user allows students to ask their own questions, explore, and deepen their understanding.

R Shiny is a package in R that allows for the creation of dynamic visuals that can run R code on the back end. I use these types of apps in my teaching quite often. Below are some of the apps I use in my classes. All of the code for these apps is available in github repos.


Basic Bayes App

This is a basic prior/posterior visualization app. You can see how the posterior changes under different likelihoods and prior distribution settings. Specifically, the Beta distribution as the conjugate prior for the Binomial and the Gamma distribution as the conjugate prior for the Poisson are implemented.


MCMC App

Metropolis Hastings visualization for an example where we know the posterior distribution. Specifically, this app demonstrates a basic implemention of the MH algorithm for the use of a Beta prior on a Binomial likelihood.


Normal Approx App

The commonly used Normal approximations to the Binomial distribution and to the Poisson distribution are visualized in this app. Continuity corrections are shown visually and compared to the exac and non-corrected probabilities.


Sampling Dist App

This applet visualizes the sampling distribution of different statistics. The parent population can easily be changed to many of the commonly named distributions. Great for debunking the $n>30$ myth.


Order Statistics App

This applet simulates the distribution of an order statistic from a random sample of beta random variables. One of the biggest issues in teaching this material is to get the students to understand that there is a distribution for, say, the smallest value from the sample! The theory is given in the app along with a visualization of the joint distribution of two order statistics.


Normal Power App

A power applet to demonstrate the ideas surrounding power for a one sample mean test from a normal population with known variance.


Z Score App

A basic applet to visualize probabilities for a Normally distributed random variable and the corresponding calculation for a Standard Normal random variable.


Delta Method App

An applet to visualize and compare the first and second order delta method approximations. Exact values for the transformation’s mean can be compared to the approximated values.


Transformation App

An applet to visualize the transformation from a Gamma to an Inverse Gamma Random Variable. The app attempts to show how the CDFs of the original random variable and the transformed random variable behave.


Comparing the T distribution to the Standard Normal App

This application visualizes the standard normal distribution and t distributions with user specified degrees of freedom. Probabilities can be calculated from each distribution and compared.


Visualizing Multiple Linear Regression Models

This app allows users to fit polynomial regression models, visualize the fitted models, and employ standardizations. Users can also visualize a variety of multiple linear regression models that include interactions and quadratic terms.


Visualizing Sampling Distributions in Simple Linear Regression

This app is meant to help visualize the variability of the fitted intercept and slope parameters of a simple linear regression line. The user can specify the true line to generate data from as well as the samples size and standard deviation on the errors.


Confidence Interval Coverage Visualization

This app is meant to help visualize the idea of confidence interval coverage rates. Specifically, this app simulates data from a normal distribution of the user’s preference and fits the standard ‘one-sample Z interval’ where the population standard deviation is assumed known. The user can also specify the sample size and confidence level.


Visualizing the PDF and CDF Relationship

This basic app gives a visual representation of how the PDF and CDF are related in terms of probabilities.


Investigating Type I Error Control when Sampling from the Binomial

An applet to simulate data from a Bin(n, 0.5), dynamically set the rejection region, and observe the proportion of falsely rejected null hypotheses (the empirical type I error rate).


kNN Visual

This application is taken from https://github.com/schoonees/kNN. The app provides a visual of the KNN algorithm for an example taken from the Elements of Statistical Learning.


Relating Bootstrapping to Sampling Distributions

This app has two parts. One part that uses visuals to reinforce the idea of a sampling distribution. The second part of the app is meant to show how bootstrapping mimics the idea of the sampling distribution via a non-parametric bootstrap.


Other Useful Vis and App Sites