Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculation of xOPS #1

Open
kevinsherman opened this issue Sep 7, 2013 · 0 comments
Open

Calculation of xOPS #1

kevinsherman opened this issue Sep 7, 2013 · 0 comments

Comments

@kevinsherman
Copy link

In ValuesBuilder.php, within the buildXOPS method, you're double counting AB's in your calculation. Where you have:

$OBPDenominator = $this->addArray($player, array("AB", "BB", "HBP", "SF"));
$player["xOPS"] = ($OBPDenominator + $player["AB"]) * ($player["OPS"] - $overallAverage);

I think you should just have:

$OBPDenominator = $this->addArray($player, array("AB", "BB", "HBP", "SF"));
$player["xOPS"] = ($OBPDenominator) * ($player["OPS"] - $overallAverage);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant