# 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 $\displaystyle \mathcal{S}$ such that $\displaystyle 0\leq s <\infty$, $\displaystyle s \in \mathcal{S}$.

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

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

Sub-problem

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

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

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

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