Shiny apps for distributions

For years I have taught students to read printed statistical tables: the Standard Normal Distribution, the t-Distribution, the chi-square Distribution. I want them to do certain tasks (e.g., construct a confidence interval) “by hand” a few times, rather than in Stata, so that they understand what it is doing. I also want them to be able to do it with no more than a calculator, in the final exam.

For the past few years I’ve been working with R-Shiny to develop web-apps, which allow exploration of a concept, self-learning exercises and self-marking assessments. I also use it increasingly in class to demonstrate ideas. I’ve been tempted to replace the paper distribution tables with online versions, but have been holding back because of the pen and paper exam.

This year, everything changes. It’s likely we can’t schedule a sit-down exam, so I’m going on-line. So instead of tables, I’m using Shiny apps that give an interface to the internal R distribution functions:

Apart from having a dynamic graph that shows what is being calculated, these offer more flexibility than the tables. The SND calculates p above or below any z, above or below zero, eliminating the extra steps the printed table requires. For t and chi-square we get results for any value of the input statistic (given an input for the degrees of freedom), whereas the tables are restricted to critical values for given tail probabilities and degrees of freedom. For the SND and t, the ability to show one or two tails (both the resulting p and the graph) helps make it more intuitive for the student.

I think this is much better than referring students to the printed tables, for all that it requires me to re-write my instructions and worked-examples for the related exercises. The one downside is that it cuts off the option of a pen and paper exam. I somehow suspect that even after the COVID-19 shutdown, I won’t go back to those either.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.