Create statistic to judge moisture distribution 'quality' I am working with an agricultural dryer that gradually dries grain. During each drying run, many data are taken, including information about the moisture content distribution. The moisture content distribution is collected by a moisture meter which measures what proportions of the grain are in what moisture % bin from 8-9% up to 49-50%. This distribution is often plotted as a histogram and looks like this:

The distribution above is an example of a "bad" distribution at the start of the drying run. At this time the mean moisture is typically centered around 25-30% moisture.
Here is an example of a "good" distribution:

You can see that it has a rough gaussian shape and that the mean is around 14% moisture. You can imagine that there is a huge variety of distributions between these two.
What I would like to do is develop a statistic to judge a distribution's 'quality'.
Features of a 'quality' distribution:

*

*low moisture (but not too low)

*narrow

*smooth

*unimodal

*low skew

Requirements
I want this statistic to

*

*smoothly increase (or decrease)

*have a minimum number of inflections (ideally none)

*peak at the end of drying

*have a reasonably small range

*be useful for judging any given distribution

So far I've tried a variety of ways of combining the base statistics of the distribution: the mean, standard deviation, IQR, skew, kurtosis, etc, but nothing so far has given me a value that has the above requirements.
Here is an example:
$$\text{'Quality'} = \frac{\text{normality test}}{\mu \times \sigma \times \text{IQR}}$$
The normality test I am using is the D'Agostino and Pearson statistic. Note that I min-max normalize each of the values in this equation.
A plot showing the 'quality' through time:

You can see that it has multiple peaks (bad) and does not gradually increase.
Maybe I'm getting close, but I feel like this approach is too simplistic. I appreciate any other ideas for solving this seemingly easy problem.

You are juggling a lot of balls there.
The five features you require of a "good" distribution already are nontrivial to operationalize all by themselves.

*

*"Low moisture" can refer to the mean of the distribution - or the median. And what does "but not too low" mean? Is there some threshold below which a mean moisture indicates a problem? Or would you need to compare such a threshold not to the mean, but to a quantile (e.g., if more than 20% of your grains are below the threshold, that is a problem)? And how bad is it when your statistic, whichever it is, goes further below the threshold?

*Narrowness: you can measure the distance between two quantiles. You used the interquartile range (IQR), but of course you could also look at the difference between the 10% and the 90% quantile, or between the 25% and the 90% quantile, or just the entire width of the support of your distribution.

*Smoothness: one possibility would be to sum the absolute differences in bin counts between neighboring bins (but there are also others).

*Unimodality: if you look at your "good" distribution, you already see lots of local maxima there, so it's definitely not unimodal in a strict sense. You would need to decide whether you just want to use a binary variable (unimodal vs. not), or count the number of "modes", and decide what counts as a local peak so you are not distracted by inconsequential peaks as in your "good" example.

*Low skew: well, there is a definition of skewness, which you can use. It may or may not correspond to what you are looking for. Best to look at some of your distributions, ordered by skewness, and eyeball whether this makes sense.

Once you have operationalized each separate aspect, you will need to put everything together into a single KPI. You could use a linear combination, and then need to decide on weights, but perhaps you need something nonlinear, like your proposal.
And finally, whether this KPI satisfies the requirements you posit will depend on how your drying process proceeds. If each separate feature satisfies your requirements, then the total KPI should also do so, unless you are too creative in putting it together. It sounds reasonable to assume this works reasonably well, with e.g. the number of peaks decreasing over time - but you would need to use your domain knowledge and run your method over a number of processes to see what happens.
