Understanding Normal Distribution Functions in R

Your Name

2025-07-15

Introduction to Normal Distribution Functions

These functions are essential for working with the normal distribution in R.

dnorm(): Density Function

x <- seq(-4, 4, length.out = 100)
density <- dnorm(x, mean = 0, sd = 1)
plot(x, density, type = "l", main = "dnorm(): Normal Density Function", xlab = "x", ylab = "Density")

pnorm(): Cumulative Distribution Function

x <- seq(-4, 4, length.out = 100)
cdf <- pnorm(x, mean = 0, sd = 1)
plot(x, cdf, type = "l", main = "pnorm(): Cumulative Distribution Function", xlab = "x", ylab = "Cumulative Probability")

qnorm(): Quantile Function

p <- seq(0, 1, length.out = 100)
quantiles <- qnorm(p, mean = 0, sd = 1)
plot(p, quantiles, type = "l", main = "qnorm(): Quantile Function", xlab = "Probability", ylab = "Quantile")

rnorm(): Random Number Generation

set.seed(123)
random_numbers <- rnorm(1000, mean = 0, sd = 1)
hist(random_numbers, breaks = 30, main = "rnorm(): Random Numbers from Normal Distribution", xlab = "Value", col = "lightblue")

Summary

These functions are fundamental for statistical analysis and simulations in R.

Questions?

Feel free to ask any questions! ```

Instructions to Use:

  1. Copy the above content into a new RMarkdown file (.Rmd).
  2. Save the file with a name like normal_distribution_presentation.Rmd.
  3. Open the file in RStudio.
  4. Click the “Knit” button and select “Slidy” as the output format.
  5. The presentation will be generated and displayed in your web browser.

Let me know if you need further assistance!