I am looking for a formula $y_i = f(i, \kappa)$, for $i=1...K$ data points, that generates a convex function like this one:

enter image description here

The function should contain a parameter, e.g. $\kappa$ that can handle the amount of convexity. Ideally, setting this parameter to a certain value should give equal weights (e.g. $y_i = y_j$ for all $i=1...K$)

  • $\begingroup$ Are $y_i$ data points? Is so, they are given and the property of adding up to 1 is either given or not. $\endgroup$ – Hellen Sep 28 '17 at 14:35
  • $\begingroup$ No $y$ is not given. $x_i$ is just 1...K. Maybe I should rewrite it as $y_i = f(i, \kappa)$ $\endgroup$ – JohnAndrews Sep 28 '17 at 14:50

You can combine basic convex functions, e.g. $$y_1(x) = \sum_{i=1}^K (x-i)^2$$ and then renormalise them to obtain $$y(x) = \frac{y_1(x)}{\sum_{i=1}^K y_1(i)}$$

  • $\begingroup$ Makes sense. How do I include the convexity parameter? $\endgroup$ – JohnAndrews Sep 28 '17 at 14:56
  • 1
    $\begingroup$ @JohnAndrews depends on what you want exactly. You could try with weighting the terms in the sum, or scaling using $(cx-i)$, or increasing the powers to $(x-i)^{2+c}$ (for $c>0$), or in a million other ways. I'd go with the first option. $\endgroup$ – TZakrevskiy Sep 28 '17 at 15:09
  • $\begingroup$ For which c can I have that all y_i are equal? $\endgroup$ – JohnAndrews Sep 28 '17 at 15:21
  • $\begingroup$ Also, what exactly is the difference between x and i in your function. $\endgroup$ – JohnAndrews Sep 28 '17 at 15:23
  • 1
    $\begingroup$ If you are scaling $x$, then for $c=0$ the function $y(x)$ is constant. $\endgroup$ – TZakrevskiy Sep 28 '17 at 15:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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