The ERA Equation

Fictional Fantasy Baseball – The Studyball Kurmudgeons

Rarely do I freely venture into the land of mathematics, but as that pertains to statistics, one could say there is love, not anger, death and PAIN. I’m not sure my endeavors serves any other purpose other than to fascinate my brain and make it work in a different way to figure out the solution to a problem, but regardless of notoriety, the task is noble. Back in the good ol’ days I was writing equations while manic that Excel couldn’t resolve, because they were written stupidly and abhorrently complex, ah yes, sweet memory… wait, this is a not good memory… however, I was able to do most of what I wanted, but not all. Fortunately I have found a middle ground between epiphany and practicality. The mechanism of my learning has been a logical argument within Microsoft Excel (or Google Sheets): IF/AND.

Excel allows one to look at or through data in a variety of ways, and boy is there a lot of data around Baseball. I take real 7-day MLB sums from players across the league and the results tell me something about how my own scoring configuration might balance, or scale in certain areas, as appropriate. The things that are hard to write equations for are those that modify or scale a result, or have an array of possible outcomes but somehow need to all be accounted for. Building a massive array by entering all the possible outcomes is not practical when dealing in hundreds. Equations need to be sleek, quick and able to return a sensible answer under any circumstances.

My task over the last couple of days was to make a logical equation using AND, IF or both, and try to weight the ERA over a game period like ranking the scoring/yardage surrendered by NFL team defenses. ERA becomes a scaling reward for low totals, and becomes a worthless (or a negative total) after 4. I had a similar equation already written for the NFL spreadsheet but all the values and references had to be changed.

=SUM[this is just the mechanism that will total the result as an integer]

(IF([condition/test],[result if Y],[result if N]

IF(AND[condition/test],[result if Y],(IF(AND[nested IF as negative response triggers second criteria in the next argument while building off the previous argument, as long as AND is present]

My initial equation looked like this:

=SUM(IF(D1=0,””,(IF(D1<.001,[value cell 0],(IF(D1=0,[value cell 1](AND(D1<.99,D1>.001,[value cell 2],(IF(AND(D1<1.99,D1…….. so on and so forth, moving the needle higher as the ranges of ERA are graded as they fall between one of the equations areas. But I was acting like there was a value below zero I had to be worried about, which is a product of using the equation from the NFL Fantasy Scorecard where those values are possible in the net yardage equation. After taking notice of the parameter change, I rewrote the beginning. 

There is a little “housekeeping” to settle up front, taking into account all numbers that COULD BE RENDERED on the spreadsheet. The D1, lets just say is the cell where the manual ERA will be entered on the sheet.

This specific line means, if D1 has no value in it, show nothing (represented by a text quote with no text “”) since zero is an ERA value there should be nothing to render if the cell is empty. 

After the above action, the next is to squarely assign a value to 0, since bridging ranges on it is problematic. The, the lowest value in the first range, mathematically expressed in greater-than less-than form. This can be repeated over and over, laying one on top of the other as the N condition until a result is returned.

The whole equation on the spreadsheet itself looks like this:

 

=SUM(IF(C21=“”,0,(IF(AND(C21=0),Rules!B40,(IF(AND(C21>0,C21<1),Rules!B40,(IF(AND(C21>0.99,C21<2),Rules!B41,(IF(AND(C21>1.99,C21<3),Rules!B42,(IF(AND(C21>2.99,C21<4),Rules!B43,(IF(AND(C21>3.99,C21<5),Rules!B44,(IF(AND(C21>4.99,C21<6),Rules!B45,(IF(C21>5.99,Rules!B46))))))))))))))))))

Those values triggered a result dependent on the integer in the cell, and were located on a separate page within the file:

The parallel between the NFL DEF/ST is undeniable because it is pretty much the same fucking thing. Beautiful how those two very different stats have a parallel in that scale, plus the way that can be whittled until bare at times, much like watching one’s team getting tired in the 4th quarter,defending the lead… this should give something additional for my nonexistent owners to fuss about. I wish there was someone who would fuss.

Making the equation and seeing the result it had on the scorecard was very rewarding, adding a boom-or-bust possibility to the pitcher’s slots on the roster. I like potential, and I like unexpected, crushing agony. Both remind me of how nice normal is.

 

 

Now I have a new scaling toy to play with, but another though I had is that pitchers aren’t the only ones with an ERA these days. Position players are now often used as a bullpen if a game is out of reach for example, and the manager wants to save his relief bullets. This could be hell for your average owner, when suddenly your 2B throws 17 pitches and has 4 ER with zero K, HR allowed and a 9.00 ERA!!

Fantasy Football League Career Statistics (Retired)

The image below captures all aspects of my FFL history. Judge me as you see fit. It was very stressful to have that going on year after year.

In one of my leagues there was money every time, if I finished 3rd. I finished in the top three on FIVE occasions. That’s 5 times in the 6 years we had a league.

Interesting stats:

Finished in First: Twice

Finished in Second: Four Times

Finished in Third: Three Times

The Studyball Kurmudgeons: Fantasy Baseball League?

I know I have said at other times that I was “satisfied” with the tinkering of the scoring. I wanted to do a “past 7 days” filter so I could see what a scoring summary might look like for that interval. I had whole season numbers, but I wanted the Head-to-Head games to be competitive, not boring and incrementally relevant despite the season’s length. I saw what a above average season point output would look like, and there were clearly some areas that needed adjusting.opportunity to scale some things back. The I ran a new set of season numbers with mid level talent and tinkered with the balance some more.

The latest set of numbers came from a pretty high-output names, and some not so much. I think this latest tinkering is the best to date, since I am very concerned with the individual games not being monotonous. I also added a handful of “high level” achievement in the game, like a grand slam, a no hitter… etc.

The overall model is balanced enough to keep things competitive among similarly knowledgeable players, mind you. The bonus FPs from a big play is probably enough to lift someone who is trailing late, or crush your foe into the turf with a massive play that sets you on the path to victory.

Let me first show you the scorecard, which was totally redone as of last time I wrote about it.

 

 

 

 

95% of that is real data from active players over the last week, and it helped me to see where the final adjustments to the scoring were to be made. With the recent live-data scenario, I can say that the current scoring setup promotes intense and interesting games, and that’s the main point. Here are the (maybe) final scoring tweaks.

 

Clearly position players other than pitchers do well in this mode, but the pitchers come out looking like NFL fantasy quarterbacks. When they’re hot, they’re lighting everyone up and things are generally: yay! When they’re not, they become a vast, expanding black hole consuming all nearby fantasy points if they stray too close.

 

Big plays get rewarded, sometimes massively. Emongously. Trabookafred!

 

 

Maybe one day I might run this league… probably not though.

It’s just fun to think about.

Another, differently shaped golden trophy would look nice in my castle.

5-4 Triple Play

Two Texas Rangers infielders made 3 outs all by themselves, which is among the more insane things I’ve seen happen during live sports over the years. I’ve never seen two pickles in one play, or any of those shenanigans.

Pretty miraculous play (this being the third time since 1961 that it has ever happened)

https://www.youtube.com/watch?v=OqcdoLUB4Jwhttp://www.espn.com/video/clip?id=24395792

**Sorry, that other link broke

Revised: Fantasy Baseball Scoring PERFECTED(?)

I was reading over my last post and I didn’t like the way the roster was breaking down into relevant and irrelevant levels of worth/value. Nearly every roster spot should have ways of achieving success based on a focused study of statistical output.

With that in mind, I went after trying to understand how the points were being accumulated, and how my weights were amplifying/deflating some values over others. I decided on a core format style which I feel would make for the best type of gameplay: steady accumulation with rare bursts of point gain interspersed. This likely leads to close games decided decisively (on one scoring event) or juggernauts demolishing their foes as they “go off” for big points. Steady accumulation on events like walks, singles, strikeouts (pitchers), assists, RBI or runs scored keep things close, hopefully, allowing for talented drafters to show how they set their lineups well in anticipation of big games for a given player. Only 7 bench slots means you can’t keep one of every position player on your bench for replacement, you will be FORCED to play the wire, like all good owners should if they expect to do well.

So, after some tweaking, I came up with a scoring set I like. I added Innings Pitched (.1 rounded down, .2 rounded up) as a trickle stat for pitchers that makes them better producers on a consistent basis. I changed the value of some of the offensive stats to neuter the distance between them and pitchers. The result is a dog that won’t impregnate any other dogs ever again.

 

 

So, the output of this needed to be judged somehow with actual data, which I provided the scorecard long before I began tweaking values. I have included my sample line up card here so we can look together and see how the values are expressed as fantasy points. Please note, this data is the ASB benchmark I have mentioned in other posts. The idea here is to highlight a “best case scenario” data-set to judge how high, potentially, the ceiling of exclusivity can go. On a game-to-game basis, this is going to be a more interesting thing to see. Looking towards a high point of 7,000+ fantasy points of season accumulation, and an unknown number of games in which to disperse them. I am THAT unfamiliar with the format that right now, I don’t know how long a MLB fantasy season is, or how frequently “games” occur as daily would be impossible. I can imagine daily maintenance being necessary, but having as many match-ups as there are games is a nauseating thought.

 

In my first post I talked about my points of emphasis in the game itself, and among the values that have endured to arrive at the final cut is Pickoffs. A rare but consequential event, the point value of which is devastating. 12 points for this event is the most heavily weighted event I score in this league template. Why? Because it’s a tease. Like picking a really good punt/kickoff returner in the NFL, you’re hoping your lousy pitcher redeems himself because his Pickoff move is phenomenal. Will he reward you with an unprecedented point total, or will he leave you starved for an event that, at best occurs less than 20 times a year for the league leaders? If he goes off, your cushy seat to victory is more likely than it was a minute ago, but your bet is on the rare event, or the steady churning motion of a consistent, winning pitcher with no rad move to first.

 

 

 

 

 

 

 

 

 

 

 

 

 

I have achieved a balance that now seems both competitive and enjoyable. It is the best I have achieved in my limited experimentation with the format, and really brings an element of uncertainty to drafting. I also foresee players making (nearly) irrelevant contributions due to lousy performances being more harsh than in the NFL. A zero is never ever wanted, but expected from time to time, but maybe in this league three days of .25 fantasy points might be just as terrible, if not worse.

Maybe one day I will know.  It’s a fun to think about.

UPDATE: Mid-Afternoon

For the sake of comparisons, I ran a simulation based on an actual head-to-head matchup, which in the regular season collect data over 7 days or so. I wanted to see what a high-output production would look like, which would be an approximation of having a “good week.” See below, though this is an unlikely final lineup, it is a possible one, and definitely a Cubs fan.

Looking over the 7 day output, I can see now that with 18 roster slots, some of those position players are bound to crater, while one or two others rocket up. These scores remind me of the FNFL scale which goes something like this:

0 – 5 = Wretched
6 – 10 = Minimal
11 – 15 = Average
16 – 20 = Above Average
21 + = Exceptional

We had a “200” barrier in my Detail Oriented league a few years ago… whoever gets there first is almost certain to win. That seems accurate as reflected here, but the flexibility of upward expansion for some of the roster slots seems outstanding. I like the way this looks, but also recognize how vital fielding the right players is, and making sure your roster is up to date. The restricted bench makes for a more competitive free-agent market, inciting wire competition.