I have three variables:
- a = 1
- b = 4
- c = 5
I wanted a linear function which give me a percentage based on that the bigger the value is, the bigger the percentage will be : I's easy, it's the percent of the total : $$y = {x\over (a+b+c)}$$ (With x one of the values above).
And so, for a : 10%, b : 40% and c : 50%.
But now, I would like a linear function for the reverse : The smaller the value, the bigger the percentage. I've tried many things and the "best" function I've find so far is : $$y = {(a+b+c) - x \over 2(a+b+c)}$$ (With x one of the values above).
Which gives me : 45% for a, 30% for b and 25% for c.
But, it's clearly not a linear fonction.
Edit: I was wrong as it's indeed linear, and it was what I wanted. Sorry for bothering you.
So, I'm asking you :
- Can a linear fonction for what I'm asking is even possible ?
- If yes, can you help me in finding a function that suit what I would like ?
Thanks.