Skip to content

Latest commit

 

History

History
45 lines (37 loc) · 1.97 KB

presentation.md

File metadata and controls

45 lines (37 loc) · 1.97 KB

Course Project: Shiny Application and Reproducible Pitch

author: dguedo date: Feb 27th, 2016

An educational data product

I developed an educational data product used to illustrate the Central limit theorem, by repeatedly taking the mean from a set of independent and identically distributed random variables and plotting the results. This application was developed for the Developing Data Products course.

Users of the application can manipulate the application three different ways by;

  • Controlling the size of IID sets
  • Increasing or decreasing the number of sample mean observations
  • Changing the size of bins for the histogram

How it works

This applications was designed using [Shiny](http://shiny.rstudio.com/), and bulit in R. As you manipulate the number of observations the histogram of sample means fluctuates, converging on a normal distribution as the number observations increase.

This is achieved by first finding the mean for a set of IID random variables, then repeating this process a number of times. The code below executes this algorithm, with inputs from the user.

# server.R
means <- data.frame(
  x=sapply(1:input$n_simulations,
           function(x) 
             {mean(rnorm(input$n_size))}))  

Histogram output

The code on the previous slide, when plotted, would look similar to the histogram below. ![plot of chunk unnamed-chunk-2](presentation-figure/unnamed-chunk-2-1.png)

Central limit theorem application

Central limit theorem illustrated