# How to create a standard normal distribution curve with 3-sigma limits in R?

R ProgrammingServer Side ProgrammingProgramming

#### Artificial Intelligence : The Future Of Programming

15 Lectures 54 mins

#### Beyond Basic Programming - Intermediate Python

Most Popular

36 Lectures 3 hours

#### C Programming from scratch- Master C Programming

Best Seller

60 Lectures 8 hours

A standard normal distribution has mean equals to zero and the standard deviation equals to one. Therefore, when we plot it with three sigma limits, we have six points on the X-axis referring to the plus and minus around zero. If the limits are defined then the plotting can be shown with larger width and that will change the display of the curve. We can do this by creating a sequence for the length of the standard normal variable and its density.

Consider the below vectors corresponding to the limits and density−

x<-seq(-3,3,length=5000)
y<-dnorm(x,mean=0,sd=1)

## Example

Creating the standard normal distribution curve −

plot(x,y,xlim=c(-3,3))

## Example

Creating the same plot with larger width −

plot(x,y,xlim=c(-4,4))

## Output

Updated on 07-Oct-2020 16:29:52