## Let's calculate the Angels 2014 Pythagorean Expectation
## The Angels had 773 Runs Scored and 630 Runs Allowed
## We should get an output close to .600
pyth(773,630,2)
## The function is currently defined as
function (rs, ra, alpha = 2)
{
pyth <- (rs^alpha)/(rs^alpha + ra^alpha)
return(pyth)
}
Run the code above in your browser using DataLab