Test for Normality : QQ Plot & PP Plot - Statistics-and-Machine-Learning-with-R/Statistical-Methods-and-Machine-Learning-in-R GitHub Wiki

Click for R-Script for PP-Plot

Click for R-Script for QQ-Plot

Click for R-Script for Shapiro-Wilks-Test

QQ Plot

qq plot

The line does not pass closely from all the points. 2 points are fairly distant. This shows that the distribution is not normally distributed

Q-Q Plot, (Quantile-Quantile Plot), is a is a probability plot, which is a graphical method for comparing two probability distributions by plotting their quantiles against each other. If both sets of quantiles came from the same distribution, we should see the points forming a line that's roughly straight

PP Plot

pp plot

P-P (probability–probability) plot is a visualization that plots CDFs of the two distributions (empirical and theoretical) against each other.

  • P-P plots are well suited to compare regions of high probability density (centre of distribution) because in these regions the empirical and theoretical CDFs change more rapidly than in regions of low probability density.
  • P-P plots can be used to visually evaluate the skewness of a distribution.

Source : https://towardsdatascience.com/explaining-probability-plots-9e5c5d304703

Shapiro-Wilk Test

The Shapiro-Wilk test examines if a variable is normally distributed in some population.

SHapiro Test code#

Shapiro-Wilk Test Result in R

  • If W is very small then distribution is probably not normal
  • p-value > 0.05 implies that the distribution of the data are not significantly different from normal distribution.