# Distributing arbitrary values over a given range and target mean

• Jan 10th 2010, 11:01 AM
ihavethedumb
Distributing arbitrary values over a given range and target mean
Hey folks,

Forgive my lack of math nomenclature and probably ham-fisted notation/explanation; I'm very very rusty in this department. First post here, and I'm liking the LaTeX.

Larger problem:

I need possible approaches to re-distribute a set of positive real numbers $\mathcal{S}$ such that $0\leq s <\infty$, $s \in \mathcal{S}$.

I need the re-distributed set $\mathcal{T}$ to follow:

• the same ordering
• to be in the interval $min\leq t \leq 1$ for a given value $min$ where $0\leq min < 1$
• the mean of $\mathcal{T}$ is a given value $mean$ where $0\leq mean < 1$

Sub-problem

In fact, I would also be happy if there's an approach which satisfies the case where $min=0$. My solution in this case was to divide all the elements of $\mathcal{S}$ by the max value giving $\mathcal{S}_\prime$ (to get between 0 and 1) and to apply some power $x$ such that:

$\displaystyle\sum_{s_{\prime}\in\mathcal{S}_\prime } s_{\prime}^{x} = mean * |\mathcal{S}_\prime|$

But, I have no idea how to solve for $x$ given $\mathcal{S}_\prime$ and $mean$.

Any help for either suggesting an approach to creating $\mathcal{T}$ from $\mathcal{S}$ or solving for $x$ would leave me fawning in gratitude.