Weighted logarithmic ranking

1.4k Views Asked by At

I want to have a ranking of players by percentage of shots made, weighted by the total number of shots attempted. The weighting should follow a log scale, so for example

Player A has 100% accuracy, and has shot 5 times

Player B has 90% accuracy, and has shot 50 times

So even though Player B has lower accuracy, in this case you can imagine that he has higher rank (B > A). However, because it's log scale, as the number of shots increases, the weighted effect should matter less, so maybe

Player C has 80% accuracy, and has shot 1000 times

Player D has 75% accuracy, and has shot 2000 times

So even though Player D shot twice as many times, with a pretty good accuracy, he is still ranked lower (C > D).

My question is how can define some function f(percent, num_shots, tuning_var) that I can tune, such that the threshold at which number of shots begins to have less of an impact decreases? Would it just be making the rank = percent*log(num_shots * tuning_var) or something like that?