Damien Sonnerat
November 20th 2015
This application allows you to specify normal distribution mean and standard deviation. You also have to give an interval. The normal distribution probability density function calculated within the interval is then plotted and the probability to have a value within this interval is also calculated.
To make it work you have to:
The système will automatically plot the normal distribution probability density function and calculate the probability.
You can access the site using the following URL: [https://dsonnerat.shinyapps.io/shinyProject]
Bellow R code that simulate input from the UI
input <- data.frame(min=-4,max=7,mean=5, sd=2)
Bellow R code taken from server.R file. It plots the corresponding normal distribution probability density function.
x <- seq(from=input$min, to = input$max, length.out = 1000)
plot(x=x, y=dnorm(x,mean=input$mean, sd = input$sd), type='l', main=paste('Normal distribution probability density function\n mean = ', input$mean , ', standard deviation = ', input$sd),
xlab='X',ylab='',col='blue')
abline(v=input$min, col='red')
abline(v=input$max, col='red')
 
Bellow R code taken from server.R file. It calculates the probability to have a value within the selected interval.
pnorm(q=input$max, mean=input$mean, sd=input$sd) - pnorm(q=input$min, mean=input$mean, sd=input$sd)
[1] 0.8413413
User help