Needed a math function, Don't know what to call it?

92 Views Asked by At

I need a math function $f(\ell)\to n$ whose input is a list of numbers and whose output is a noisy value (random value added to original input to get noisy output). The function $f(\cdot)$ should have the property that for two lists $\ell_1$ and $\ell_2$, and their corresponding outputs $n_1$ and $n_2$ we should have: If $\ell_1$ is identical to $\ell_2$, then $n_1$ is identical to $n_2$. If $\ell_1$ is very close to $\ell_2$ (i.e. less than $1\%$ difference), the $n_1$ should be very close to $n_2$.

Is there any function that can do that?

1

There are 1 best solutions below

1
On BEST ANSWER

Maybe this could be decent enough:

Take the arithmetic (Or any other) average of the numbers in the list: $$\hat\ell \equiv \frac{1}{n}\sum_i\ell_i$$ And let $f$ be defined as: $$f(\ell)=\sum(\ell_i-\hat\ell)^2$$

Hhmm..?