Log in

View Full Version : Math: How to solve ranking equation


alextound
10-03-2015, 08:39
I no do math, can someone give me a quick math lesson on solving the ranking equation.

Thanks!

microbuns
10-03-2015, 08:56
Do you mean in Qualifications? They just take your average score from each game you played in quals, then rank the teams from highest to lowest.

The_ShamWOW88
10-03-2015, 09:03
They average your alliance's score as your Qualification Average and they go in the following order:

Qual Avg
Cooperative pts
Auto pts
RC pts
Tote pts
sum of Noodle pts
Random FMS sorting

See 5.3.4 of the Game Manual.

Alan Anderson
10-03-2015, 09:03
What ranking equation do you mean? Ranking is simple: more points is better. To a first approximation, a team ranks above other teams with fewer points, and below other teams with more points.

alextound
10-03-2015, 09:37
i mean this:

http://www.usfirst.org/sites/default/files/uploadedFiles/Robotics_Programs/FRC/Game_and_Season__Info/2015/FRC_District_Standard_Points_Ranking_System_2015%2 0Summary.pdf (http://www.usfirst.org/sites/default/files/uploadedFiles/Robotics_Programs/FRC/Game_and_Season__Info/2015/FRC_District_Standard_Points_Ranking_System_2015%2 0Summary.pdf)

ATannahill
10-03-2015, 09:41
This was discussed in Frank's blog (http://www.usfirst.org/roboticsprograms/frc/blog-Standard-District-Points-System-for-2015).

There is a document (http://www.usfirst.org/sites/default/files/uploadedFiles/Robotics_Programs/FRC/Game_and_Season__Info/2015/2015%20FRC%20District%20Qualification%20Points%20F ormula%20Breakdown.pdf) that elaborates further on the equation. You can scroll to the bottom to see what values would come out for a 32, 40, 55, 60 and 64 team event.

Alan Anderson
10-03-2015, 10:16
That formula is only relevant for district events. It converts ranking to "District Qualification Points". A comprehensive explanation of the Inverse Error Function belongs in an advanced statistics class. All you need to know is that it is built in to tools like Matlab.

ArtemusMaximus
10-03-2015, 11:15
That formula is only relevant for district events. It converts ranking to "District Qualification Points". A comprehensive explanation of the Inverse Error Function belongs in an advanced statistics class. All you need to know is that it is built in to tools like Matlab.

I was curious about the function, did a little digging found someone already made one for Excel VBA. I hope this helps.
http://www.mrexcel.com/forum/excel-questions/234208-code-inverse-erf-function.html#post1146833

Function invERF(y As Double) As Double
Dim pi As Double, x As Double, d As Double
pi = 3.14159265358979
If y < 0 Then
invERF = 0 'interval includes the mean only
Exit Function
ElseIf y >= 1 Then
invERF = 10 'makes the interval include everything
Exit Function
'for my purposes, I only want the function to process input from 0 to 1
ElseIf y < 0.596 Then
x = sqr(pi) / 2 * y * (1 + (pi / 12) * y * y)
Else
x = sqr(-Log((1 - y) * sqr(pi)))
End If
d = (y - ERF(x)) / (2 * Exp(-x * x) / sqr(pi))
x = x + d
Do While Abs(d) >= 0.00000001
d = (y - ERF(x)) / (2 * Exp(-x * x) / sqr(pi))
x = x + d
Loop
invERF = x
End Function

Function ERF(x As Double) As Double

Dim f As Double, c As Double, pi As Double
Dim j As Integer
c = 0
pi = 3.14159265358979
If 1.5 < x Then
c = 2 - c
j = 3 + Int(32 / x)
f = 0
Do While j <> 0
f = 1 / (f * j + x * sqr(2))
j = j - 1
Loop
f = f * c * (3 - c * c) * Exp(-x * x) / sqr(2 * pi) + (c - 1) * (3 * c * c + c - 8) / 6
Else
j = 3 + Int(9 * x)
f = 1
Do While j <> 0
f = 1 + f * x * x * (0.5 - j) / j / (0.5 + j)
j = j - 1
Loop
f = c + f * x * (2 - 4 * c) / sqr(pi)
End If
ERF = f
End Function

MasterMentor
10-03-2015, 14:21
I was curious about the function, did a little digging found someone already made one for Excel VBA. I hope this helps.
http://www.mrexcel.com/forum/excel-questions/234208-code-inverse-erf-function.html#post1146833
You just have to be careful about this, the input into InvERF with the District Qual Points Formula will be negative on one side of the [-1, 1] range, and this function can only handle positive input values. Also at the midpoint it's possible to get a divide-by-zero error with this function too. Both issues are easily worked around with a little formula/programming magic, but it's important to know this isn't a perfect drop-in solution.

-MM

who716
10-03-2015, 15:42
Basically the formula is given you just have to plug and chug, some calculators will have an inverse error function ability, if your does you find it use it and plug in the necessary values for the variables, N= number of teams at event, R=your final ranking position and alpha is a constant set by the committee based on averages of event size at 1.07. The lines on each end tell you just to round up to the nearest whole number give it a shot for our first event it would look like this:

invERF[( 33-2x13+2)/(1.07*33)]X(10/(invERF 1/1.07)+12) 13. ....... rounded up to nearest whole integer =14

remember inverse is NOT the same as going to the power of -1 if you don't have a calculator with the function already...

if you don't have this function at all on your calculator then it gets much more complicated solving for invERF as its a function itself requiring integrals and such

Ether
10-03-2015, 17:56
invERF[( 33-2x13+2)/(1.07*33)]X(10/(invERF 1/1.07)+12) 13. ....... rounded up to nearest whole integer =14

remember inverse is the same as going to the power of -1 if you don't have a calculator with the function already...

The inverse of a function f(x) is not 1/f(x).

The inverse of f(x) is g(x), such that g(f(x))=x

For example, the inverse of f(x)=x2 is g(x)=sqrt(x), not 1/x2

octave-3.6.4.exe:10> erfinv(0.33)
ans = 0.301332146133706
octave-3.6.4.exe:11> 1/erf(0.33)
ans = 2.78335488667249

MooreteP
10-03-2015, 18:09
Plus, for Qualifications, if the number of teams is not divisible by six, there are surrogate matches, which are the third match for teams that fill the surrogate role.

More Math!

ArtemusMaximus
10-03-2015, 18:10
The inverse of a function f(x) is not 1/f(x).

The inverse of f(x) is g(x), such that g(f(x))=x

For example, the inverse of f(x)=x2 is g(x)=sqrt(x), not 1/x2

octave-3.6.4.exe:10> erfinv(0.33)
ans = 0.301332146133706
octave-3.6.4.exe:11> 1/erf(0.33)
ans = 2.78335488667249



I knew Ether would show up and clear all this up :D

Richard Wallace
10-03-2015, 18:15
I knew Ether would show up and clear all this up :D

When the student is ready, the master appears.

Rachel Lim
10-03-2015, 19:00
i mean this:

http://www.usfirst.org/sites/default/files/uploadedFiles/Robotics_Programs/FRC/
Game_and_Season__Info/2015/FRC_District_Standard_Points_Ranking_System_2015%2 0Summary.pdf (http://www.usfirst.org/sites/default/files/uploadedFiles/Robotics_Programs/FRC/Game_and_Season__Info/2015/FRC_District_Standard_Points_Ranking_System_2015%2 0Summary.pdf)

If you're looking for a more visual explanation (or a simpler one), I wrote up this summary for my team: http://goo.gl/lx2I2l

I tried to explain the math behind it without calculus or too much statistics, which makes it easier to read but not nearly as in depth as the official explanation (in my opinion). It's mostly a graphical / algebra based analysis to get at the basics of what district ranking is and how your ranking at an event factors into it.

Note: I haven't taken any statistics classes and we're not yet in districts, so I'm not sure if everything I wrote is completely accurate. Please let me know if anything is wrong and I'll try to correct it.

Ether
10-03-2015, 19:07
Please let me know if anything is wrong and I'll correct try to correct it.

There's an extra word in that sentence.

Rachel Lim
10-03-2015, 19:11
There's an extra word in that sentence.

Thanks for catching that. :) Did you find any errors in my analysis?

Ether
10-03-2015, 19:19
Thanks for catching that. :) Did you find any errors in my analysis?

Based on the paper you wrote (http://goo.gl/k778i9) for Math Quiz 6, I wouldn't expect to find any :-)

ATannahill
11-03-2015, 06:48
Plus, for Qualifications, if the number of teams is not divisible by six, there are surrogate matches, which are the third match for teams that fill the surrogate role.

More Math!
Not quite correct.

If the number of teams * the number of matches per team is not a multiple of six, then you will have surrogates.

Michigan (and I believe most other district systems) gives each team 12 matches. A benefit to this is that there will never be a surrogate.

Danny Diaz
11-03-2015, 09:42
If you're looking for a more visual explanation (or a simpler one), I wrote up this summary for my team: http://goo.gl/lx2I2l

Impressive.

-Danny

who716
11-03-2015, 12:22
If you're looking for a more visual explanation (or a simpler one), I wrote up this summary for my team: http://goo.gl/lx2I2l

I tried to explain the math behind it without calculus or too much statistics, which makes it easier to read but not nearly as in depth as the official explanation (in my opinion). It's mostly a graphical / algebra based analysis to get at the basics of what district ranking is and how your ranking at an event factors into it.

Note: I haven't taken any statistics classes and we're not yet in districts, so I'm not sure if everything I wrote is completely accurate. Please let me know if anything is wrong and I'll try to correct it.

this was actually helpful and understandable, helped me grab the actual meaning behind the inverse error function instead of just plugging it into a calculator too solve.

Danny Diaz
12-03-2015, 14:59
In case you're looking for something in Excel, here's something I whipped up.

http://www.chiefdelphi.com/media/papers/3117

-Danny