Lawrence M.

asked • 01/14/22

Algorithm - factoring sample size weighted average

I've created an algorithm used to measure season performance across multiple soccer teams. Each team plays a different # of games. I have assigned weights to time periods to calculate a weighted average so that more of the calculation is based on time periods with more games, therefore more consistent / larger sample. My issue is that each team plays a different number of games so I'm having trouble determining how to factor the number of games into the equation to accurately compare teams with different # of games. i.e. If team A plays 100 games and Team B plays 10, the calculation will be more stable for team A since the sample size is larger, therefore I want that to be factored into the weighted average in some way. How do I factor sample size (#of games) into an equation that will affect the weighted average when comparing teams with different number of games / sample size?

i.e. 

A(x)+ B(y)+C(z)+D(n) = Weighted %

Time periods:

A = Goals in last 20 days

B = Goals in last 7 days

C = Goals in last 3 days

D = Goals in last day

Weight:

x = 40%

y = 25%

z = 25%

n = 10%

Lawrence M.

Thanks Corban. I don't think I explained the issue clearly. I can calculate the weighted avg. My issue is comparing weighted avgs from 2 different teams that play a different number of games. The more games, the heavier I want to weigh it since the sample is larger therefore result more reliable. Does that clarify? i.e. compare percentages of vastly different denominators
Report

01/14/22

1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.