Making a function for unbounded variables that is bounded

147 Views Asked by At

Ok here is what I need I want to build a formula to implement into a ranking system on my website its been like 20 years since I was in school so help me out

I need like 6 variables that equal at its highest value the number 10

I would like to build an index that ranks people on the following critieria

number of twitter followers
age being 18-24 =10 an other older ages lesser values
number of starring films
number of google search results being the high value = 10
years active (I dont know hoy to implement it)
variable that would be 0 or 1 for (yes or no)

INDEX =  TW + A +NSF + NGSR +YA + V  /6

how do I get it to equal 10 at its highest value

Hopefully someone can help me

1

There are 1 best solutions below

0
On

In order for it to have a highest value, and therefore be bounded, all the functions you derive it from must be bounded!

Therefore you have to come up with the specific ratios (regarding importance), say number of twitter followers in $[0,12)$, where you get the number $0$ for no followers, the number $10$ for a huge amount of followers and $11.9999$ for holy sh*t that's close to infinite followers. You should look for bounded, increasing functions, like $\arctan(x)$.

$\arctan(x)$ has a range of $(\frac{-\pi}2,\frac\pi 2)$, and for $x\geq 0$ it has range $[0,\frac\pi 2)$. To get a range of $[0,12)$, you should consider the function $$\frac{12}{\frac{\pi}2}\arctan(x)=\frac{24}\pi \arctan(x)$$ For $x$ being the amount of followers (of course $\geq0$), this function goes from $0$ to $12$ (where $12$ can be changed into every number). Note that the function $\arctan$ increases quite fast, so you could consider changing $x$ to $\frac x{1000}$ or something like that. Just plot the functions and see what looks good to you!

Same can be done for all other unbounded functions, like number of starring films, years active (and maybe also Google search results since I think most people get more then 10 hits). You could also scale up your last variable by any factor.

To get their sum equal to $10$, just take the sum of all upper-bounds, like $12$ in our example. So say we have upper bounds $12,3,5,10,2,6$. To get their sum equal to $10$ is done by summing the bounds and dividing your six variables by $\frac{12+3+5+10+2+6}{10}$, so $$i=\frac{T_w+a+N_{sf}+N_{gsr}+y_a+v}{\frac{12+3+5+10+2+6}{10}}=10\frac{T_w+a+N_{sf}+N_{gsr}+y_a+v}{12+3+5+10+2+6}$$

Hope this helps