DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 968,547 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Cover image for Find the Mode of Intervals
Jackson Reeves
Jackson Reeves

Posted on • Updated on

Find the Mode of Intervals

A simple Python function for calculating the MQR, a nifty statistical measure of spread that I came up with one night.

I was annoyed that every measure of central tendency had a corresponding measure of spreadβ€”except mode. Mean has standard deviation; median has interquartile range. But what about mode? So for the sake of parity, I made one up.

I call it the Minimal Quintile Range (or MQR), which provides the length of the smallest interval that contains at least a fifth of the data in a set. In other words, the mode of intervals.

Top comments (0)

DEV has this feature:

Settings

Go to your customization settings to nudge your home feed to show content more relevant to your developer experience level. πŸ›