I have a df of players and their penalty points. It looks something like this:
# playerID penalty
# A 0
# B 2
# A 4
# C 2
# A 0
# B 0
# B 2
I want to get a "player rank" which depends on the "penalty" and number of played games (A three games, C one game). If there is a player X with average penalty = 3 over 10 games and player Y with average penalty = 3 over 4 games then the "player rank" of the player X should be lower then the "player rank" of the player Y.
My idea was to divide the average penalty of player i by sqrt(n(i)), where n(i) is number of games played by player i. Second idea was to divide average penalty by log(n(i)+1).
Do you think its the right approach? Was somebody dealing with a similar problem?
Thanks for your responses.