# Normality Test

Learn how to run normality tests for errors.

## We'll cover the following

The Gauss-Markov theorem doesn’t require that the error term is normally distributed. However, inferences based on $z$- or $t$-statistics do need the error term to be normally distributed. In addition, when the error term isn’t normally distributed, it can be skewed or heavy tailed, affecting the efficiency of estimation.
The quantile comparison plot from the `car`

package is an effective way to check whether the residuals from the regression are approximately normally distributed or not.

## Quantile comparison plot using `qqplot()`

The `qqPlot()`

function plot compares the empirical quantiles of studentized residuals from `model1`

against the theoretical or expected quantiles of a benchmark $t$ or normal distribution, with a `simulate=TRUE`

means that the confidence envelope is based on parametric bootstrap.

Note:In case we want to compare the quantiles of studentized residuals against a theoretical normal distribution, we can simply replace`t`

in the R code with`norm`

instead. The option`simulate=TRUE`

means the confidence envelope is based on parametric bootstrap.

Get hands-on with 1400+ tech skills courses.