Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

$X=\{x_{i}\}$ and $Y=\{y_{i}\}$ are numeric samples: $y_i \ge 0, x_i \ge 0, i \in [0..N]$. I need to find the mapping $F(X)=\{F(x_i)\}$ with fairly simple formula such that:

  1. Euclidean distance $\rho(F(X),Y)$ between samples is minimal: $\sum_{i=1}^n(F(x_i) - y_i)^2 \rightarrow min$;
  2. Expectations of the samples F(X) and Y are equal: $E[F(X)] = E[Y]$, i.e. $\sum_{i=1}^nF(x_i) = \sum_{i=1}^ny_i$;
  3. Standard deviation of the samples F(X) and Y are close: $\sum_{i=1}^n(F(x_i) - E[F(X)])^2 - \sum_{i=1}^n(y_i - E[Y])^2 \le \varepsilon$

In addition:

  1. $F(x_i) \ge 0$;
  2. $\rho(F(X),Y) \le \rho(X,Y)$;
share|cite|improve this question


$$F(x)=\sum_i\prod_{j\neq i}\frac{x-x_j}{x_i-x_j}y_i\;,$$

all three conditions are satisfied identically.

share|cite|improve this answer
Lagrange interpolation – yasmar May 5 '11 at 18:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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