NormalCurve Shiny App

Emilio Gonzalez
March 21st 2015

Synopsis

This symple application shows some controls allowing the user to enter a mean, a standard deviation and an x value to calculate the probability. It plots a normal curve with the area to the left of the value, and computes the probability.

  • To enter the mean a slider is provided (default is 0)
  • To enter the standard deviation a slider is provided (default is 1)
  • To enter the x value an input box allows to key any number

The user can interact with the sliders and the input box at any moment and automatically the calculus is updated and the graph plotted again.

Layout

Output

As output the application plots a normal curve with the X axis labeled according to the x value introduced.

A shade area with the probability to the left is shown graphically, and on top of the plot the correct probability is shown. For example if the input is mean=10, standard deviation=3 and x=7 the calculus will be computed as:

pnorm(7, 10, 3)
[1] 0.1586553

Output

The plot for the previous example will be like this one (this plot is produced by R code in the presentation) plot of chunk unnamed-chunk-2