Finding bivariate outliers
Bivariate outliers are usually large or small values that occur in two variables simultaneously. In simple terms, these values differ from other observations when we examine the two variables together. Individually, the values in each variable may or may not be outliers; however, collectively, they are outliers.
To detect bivariate outliers, we typically need to check the relationship between the two variables. One primary method is to visualize the relationship using a scatter plot. Sometimes, we may be interested in identifying extreme values in a numerical variable across categories of a categorical variable or discrete values; in this case, a boxplot can be used. Using the boxplot, we can easily identify contextual outliers, which are usually observations considered anomalous given a specific context. The contextual outlier significantly deviates from the rest of the data points within a specific context. For example, when analyzing house prices, we...