Standard Gaussian
The PDF of a gaussian random variable does not have an antiderivative expressable in closed-form (expression that uses a finite amount of standard operations (basic functions and basic arithmetic operations)).
The common solution is to numerically approximate operations regarding the CDF of Gaussian(0, 1).
Definition: The standard Gaussian/normal random variable X∼N(0,1) has a :
- PDF: fX(x)=1√2πe−x22.
- CDF: Φ(x)=FX(x)=1√2πx∫−∞e−t22dt
Theorem: Let X∼N(μ,σ2), then FX(x)=Φ(x−μσ)
# Gaussian(mean = 0, variance = 1)
x <- seq(-3, 3, 0.01)
mean <- 0
standard_deviation <- 1
plot(
x, dnorm(x, mean, standard_deviation), type = 'l',
main = "PDF", xlab = "x", ylab = ""
)
plot(
x, pnorm(x, mean, standard_deviation), type = 'l',
main = "CDF", xlab = "x", ylab = "",
ylim = c(0,1)
)