2
$\begingroup$

Given some combination of mean/mode/median, how would I go about generating a distribution that can fit an arbitrary combination?

For cases where mean = mode = median, I would just use a normal distribution. How could I generate a distribution with, say, mean=3.0, mode=4.0, and median=5.0?

I've searched around and couldn't find an answer for this, which suggests maybe it's a silly question. Apologies if that's the case

Edit: I'm looking to create a visualization that plots a distribution that reacts as you change the mean/mode/median with sliders. Partially for teaching purposes and partially as a programming exercise, I just want to make something I can show students to demonstrate why it's important to have those numbers.

Are there distributions with parameters that are easy to set up some optimization algorithm for, to hit a target mean/median/mode?

$\endgroup$
3
  • 1
    $\begingroup$ Your question is not silly, but it's not specific enough, because there are just too many answers and too many ways to answer it. You need to narrow (considerably) the range of possible solutions. This is one purpose of using various families of distributions, of which there are many. But it would be rare indeed to have information only about the mean, median, and mode, so could you explain the context in which this question arises? That might give us clues to the nature of a good answer. $\endgroup$
    – whuber
    Jan 24 at 19:06
  • $\begingroup$ I'm looking to create a visualization that plots a distribution that reacts as you change the mean/mode/median with sliders. Partially for teaching purposes and partially as a programming exercise, I just want to make something I can show students to demonstrate why it's important to have those numbers. Are there distributions with parameters that are easy to set up some optimization algorithm for, to hit a target mean/median/mode? $\endgroup$
    – mohger
    Jan 25 at 20:22
  • $\begingroup$ There are plenty, of many different shapes. You will find satisfactory flexibility among the Pearson distribution family, for instance. You can also fix the median and change the mean by arbitrarily large amounts by mixing one outlier on one side and an "inlier" on the other side. The mode is problematic because any continuous distribution can be given any number of modes at arbitrary locations without changing its salient properties. See my second diagram at stats.stackexchange.com/a/86503/919 for an illustrated example. $\endgroup$
    – whuber
    Jan 25 at 20:53

1 Answer 1

0
$\begingroup$

For roughly normal distributions, the median is roughly the weighted average of the mean, the mean and the mode. So a roughly normal distribution with mean of $3$ and mode of $4$ would have median of roughly $10/3$, nowhere near $5$.

In other words, the example above is implausible. Without some explanation for why the median is so unusual, not even between the median and the mode, it's hard to find a reasonable distribution matching the parameters.

Reasonable values of mean, median and mode can often be fit exactly to either a triangular or split-normal distribution.

$\endgroup$
2
  • $\begingroup$ What is a "roughly normal" distribution? $\endgroup$
    – whuber
    Jan 26 at 18:27
  • $\begingroup$ @whuber, I use “roughly” in the sense of ordinary English, but the first link in the post has ways (which you may well know already) to state and prove that formula for the median rigorously. $\endgroup$
    – Matt F.
    Jan 26 at 20:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.