# Mapping a range of values such that the resulting distribution is uniform [duplicate]

I have a set of values. Let's call the set X with values ... . Those values in [0, 1] have a non uniform distribution (empirically measured). I would like to re-map those values on [0, 1] such that the distribution of the mapped values is uniform and the values order preserved.

In other words, I would like to find the function f() such that the distribution of f(X) is uniform, and such that iff then .

What would be a good approach to do that?

There is probably a name for this transformation but I do not know it. I would love to learn it if you know it.

## marked as duplicate by whuber♦ distributions StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Apr 10 at 18:24

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.