A **Q-Q plot,** short for “quantile-quantile” plot, is used to assess whether or not a set of data potentially came from some theoretical distribution.

In most cases, this type of plot is used to determine whether or not a set of data follows a normal distribution.

As a rule of thumb, **the more that the points in a Q-Q plot lie on a straight diagonal line, the more normally distributed the data**.

Conversely, **the more that the points deviate from a straight diagonal line, the less normally distributed the data**.

It’s important to note that a Q-Q plot doesn’t represent a formal statistical test to check for normality.

Instead, it’s a visual way to check if a dataset roughly follows a normal distribution.

The following examples show how to interpret various Q-Q plots in R.

**Example 1: Q-Q Plot for Normal Data**

The following code shows how to generate a normally distributed dataset with 500 observations and create a Q-Q plot for the dataset in R:

#make this example reproducible set.seed(1) #generate dataset that follows a normal distribution normal_data <- rnorm(500) #create Q-Q plot to visualize distribution of dataset qqnorm(normal_data, main='Q-Q Plot of Normally Distributed Data')

From the plot we can see that the points mostly fall along a straight diagonal line with some minor deviations along each of the tails.

Based on this plot, we could safely assume that this dataset is normally distributed.

**Example 2: Q-Q Plot for Left-Skewed Data**

The following code shows how to generate a left-skewed dataset with 500 observations and create a Q-Q plot for the dataset in R:

#make this example reproducible set.seed(1) #generate left-skewed dataset left_skewed <- rbeta(500,7,2) #create Q-Q plot to visualize distribution of dataset qqnorm(left_skewed, main='Q-Q Plot of Left-Skewed Distribution')

We can see that the points have an “arch” on the top left side of the plot, which is indicative of a left-skewed distribution.

**Example 3: Q-Q Plot for Right-Skewed Data**

The following code shows how to generate a right-skewed dataset with 500 observations and create a Q-Q plot for the dataset in R:

#make this example reproducible set.seed(1) #generate right-skewed dataset right_skewed <- rbeta(500,2,7) #create Q-Q plot to visualize distribution of dataset qqnorm(right_skewed, main='Q-Q Plot of Right-Skewed Distribution')

We can see that the points have a “dip” on the bottom right side of the plot, which is indicative of a right-skewed distribution.

**Example 4: Q-Q Plot for Non-Normal Data**

The following code shows how to create a Q-Q plot for a dataset that follows an exponential distribution with 200 observations:

#make this example reproducible set.seed(1) #generate dataset that follows an exponential distribution exponential_data <- rexp(200, rate=5) #create Q-Q plot to visualize distribution of dataset qqnorm(exponential_data, main='Q-Q Plot of Exponential Distribution'))

We can see that the points deviate significantly from the straight diagonal line.

This is an indication that the dataset is not normally distributed.

This makes sense considering we generated the dataset using based on an exponential distribution.

**Additional Resources**

The following tutorials explain how to create Q-Q plots using various statistical software:

How to Create a Q-Q Plot in R

How to Create a Q-Q Plot in Excel

How to Create a Q-Q Plot in Python

This explanation is amazing. Thank you very much!!!