A QQ (Quantile-Quantile) plot is a visual tool for determining if a collection of data fits a specific theoretical distribution. Although it can be used to evaluate various types of distributions, it is frequently utilized in statistical analysis to test the assumption of normality in data.

When we make a QQ plot, we usually contrast a variable's quantiles with their corresponding theoretical quantiles. In the CFA exam, you may be just be given a very simple QQ plot with x-axis of theoretical distribution, such as a normal or exponential distribution, y-axis of the quantiles of a variable's distribution.

we can use python to model a dummy data and draw a QQ plot for demonstration:

pip install matplotlib statsmodels numpy

import numpy as np
import matplotlib.pyplot as plt
import statsmodels.api as sm

# Generate or load your data
# Here, we'll create a sample dataset using numpy
data = np.random.normal(0, 1, 1000)

# Generate a Q-Q plot
fig = sm.qqplot(data, line ='45')

# Display the plot
plt.show()

image-20240120111252776

A thin-tailed distribution will form a Q-Q plot with very little or no deviation at the ends, making it a perfect fit for the Normal Distribution. In contrast, a distribution with a fat tail will form a Q-Q plot with both of its ends deviating from the straight line and its center following a straight line.

Let's imagine an example,if the right side of the QQ plot is not a straight line, but the dot is above the line. It means there are more data points at a very large standard deviation. So the data is right skewed. On the contrary, if the left side of the QQ plot is not a straight line, but the dot is below the line. It means there are more data points at a very large standard deviation as well, and the data distribution is left-skewed.