Skip to main content

Command Palette

Search for a command to run...

Where Does Box Plot Shines?

While histograms are great, they are inefficient when comparing multiple data sets. Substitute histograms for box plots and new patterns emerge.

Published
•2 min read•View as Markdown
Where Does Box Plot Shines?
V

I am a software engineer with over two years of professional experience. I specialize as a backend engineer but also work in full-stack capabilities. I use JavaScript/TypeScript, Python, and PHP to solve real-world problems every day.

Here are some benefits of using box plots over histograms:

Below is a box plot in case this is the first time you have heard of it:

Source: upscfever.com

Comparing Multiple Data Sets

Box plots are particularly useful when you need to compare the distribution of multiple data sets side by side. They provide a clear visual comparison of medians, quartiles, and potential outliers across different groups, as you can see from the diagram above.

In trading software, for example, box plots are used in the following ways:

  1. Visualizing Price Distributions: Box plots can be used to visualize the distribution of asset prices over a specific period. This helps traders understand the range, median, and variability of prices.

  2. Identifying Outliers: Box plots help in identifying outliers in price data, which can indicate unusual trading activity or potential market anomalies.

  3. Analyzing Trading Volumes: Box plots can also be used to analyze the distribution of trading volumes.

Dealing with Small Sample Sizes

When dealing with small sample sizes (also known as number of data points), box plots can be more informative than histograms. Histograms may not provide a clear picture of the distribution with limited data points, whereas box plots can still summarize the key aspects of the data.

Non-Normal Distributions

Box plots do not assume any distribution shape, making them suitable for non-normal distributions. They can represent data in various shapes and spread without the need for binning, which is required for histograms. See my previous article on plotting and interpreting histograms.

💡
A non-normal distribution is a type of data distribution that does not follow a normal (Gaussian) distribution pattern, which is characterized by a symmetric, bell-shaped curve. They can be skewed (asymmetric), have heavy tails (kurtosis), or exhibit other irregularities that deviate for the normal distribution.

Disclaimer: On the paragraphs where I mapped out an example using trading software, it is important to note that I am neither an expert in trading nor do I know how to build one. Someday, I hope I will.

ByteBite Wisdom

Part 2 of 6

This series breaks the mold of our other series with articles under 600 words. These concise pieces offer bitwise information aimed at creating awareness or presenting alternative approaches to common tasks.

Up next

Key Terms to Understand When Plotting a Histogram

What type of graph is in the cover picture above😉?