I am trying to come up with a function that takes three set inputs and spits out a number between 0 and 1.

The three inputs are X with values ranging from (0.5,1) Y with values ranging from (.75,1.5) Z with values ranging from (1,7)

The output should be between (0.5 and 1)

I have been using the norm.s.dist command on excel to get the result between 0 and 1 but am struggling with making the mathematical function inside the command work. I am trying functions like ln, log, log10, exp and was curious what else I should try?

Context: I am trying to predict a KPI based off previous data. There are three inputs that trigger the output and I am trying to develop a model to tie all 3 together and match the previous data with a small percent error. Each input has factors into the output, for instance the smaller x is, the smaller the output should be; the larger x is, the higher the output. The input variable z has the same relationship as x. Input Y is inversely related, the lower the input y, the higher the output; and the larger the input y, the smaller the output.

  • 1
    $\begingroup$ Note that $x-0.1 \in (0.0, 1.4)$ and so $\frac{x-0.1}{1.4} \in (0, 1)$. Normalizing all three and adding gives a number in $(0,3)$. Rescaling to $(0,0.5)$ and adding 0.5 gives $$f(x,y,z) = 0.5 + \frac{0.5}{3}(\frac{x-0.1}{1.4}+2(y-0.5) + \frac{z-0.75}{0.75})$$ which is in $(0.5,1)$. $\endgroup$
    – Weaam
    Jul 12, 2017 at 11:48
  • $\begingroup$ My comment was before the edit, the intervals for $x,y,z$ where $(0.1,1.5), (0.5,1), (0.75,1.5)$ respectively. $\endgroup$
    – Weaam
    Jul 12, 2017 at 11:56
  • $\begingroup$ I had a typo on the inputs, just changed them, could you still normalize the new ones? This works perfectly for the original inputs of x,y,z where (0.1,1.5),(0.5,1),(0.75,1.5). $\endgroup$
    – m.car
    Jul 12, 2017 at 11:56
  • $\begingroup$ I think you should be able to carry over what I did to the new intervals. That is, if $x \in (a,b)$ then $\frac{x-a}{b-a} \in (0,1)$. $\endgroup$
    – Weaam
    Jul 12, 2017 at 11:58
  • 2
    $\begingroup$ I think you should edit your question to provide context, what's the problem you're trying to solve exactly? Thanks. $\endgroup$
    – Weaam
    Jul 12, 2017 at 12:08

1 Answer 1


You may need a fair amount of flexibility to make your output match your data. To that end I suggest you experiment with functions of the form $$ f(x,y,z) = 0.5 + 0.5(Af_1(x) + Bf_2(y) + Cf_3(z)) $$ where

  • $f_1$ is an increasing function of $x$ satisfying $f_1(0.5) = 0$ and $f_1(1) = 1$

  • $f_2$ is a decreasing function of $y$ satisfying $f_2(0.75) = 1$ and $f_2(1.5) = 0$

  • $f_3$ similarly defined for $z$


  • $A$, $B$ and $C$ are positive weights that sum to $1$.

Then play with various functions and weights.

This is a generalization of @Weaam 's answer in a comment. That answer uses linear functions and equal weights.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .