Archive for fantasy

To Fill A Mocking Board

Spring training is happening in Florida and Arizona and as baseball players shake the rust of the off-season from themselves, so do fantasy baseball players. Fantasy drafts — be it snake or auction — will be happening soon (hopefully yours didn’t already occur!) and as such, some level of preparation would be expected. Believe it or not, there is more to fantasy baseball than mere spreadsheets, and I say that knowing full well it could cost me my job here!

The truth is perception, hype, momentum or whatever you’d like to call it can play a huge factor in determining where or for how much any given player goes for. One way of getting a firmer grip on the fantasy baseball community’s collective value on a player is to conduct a mock draft. There is no shortage of mock draft platforms around, but for the purposes of exposure to a great crowd, I’ll be overlooking the ESPN, Yahoo! and CBS mock draft capabilities. Instead we’ll be looking at some premium (read: paid membership required) websites, specifically Mock Draft Central, Couch Managers and RT Sports. And just to get in front of this, no, this isn’t a sponsored post, I promise! Now with any of these three websites you don’t need a paid membership to join a draft, but you may need one to create a custom draft.

Contestant No. 1
Mock Draft Central
Premium Options: $4.99 monthly (auto renew) OR $24.99 annually

If nothing else, MDC has an incredible pre-purchase walk-through and example of options. For example, if one opts to go for the annual package, you’re given just about any level of access that a commissioner would have in a real draft. That is to say moving picks, editing or fixing picks, etc. A full breakdown of the differences are listed in this helpful chart from MDC, though it should be noted the highlighted areas were my doing.
Note: Click to embiggen any picture in this piece.

MDC

The ability to join unlimited mock drafts is great, however one per day (for a maximum of three in a week) seems like more than enough, even for the most addicted fantasy baseball player around. MDC’s “Coach Karma” is basically a way of the site protecting their users from one another. For example if you join a mock draft, but fail to show up, leaving the other mock drafters to wait while your slot gets auto picked, you’ll lose Karma. Similarly, rudeness and other poor behavior can lower your Karma as more and more users report you. There is a threshold of low Karma that if reached, will not allow you to participate in a mock draft. So basically, just follow Wheaton’s Law and you won’t have to worry about your Coach Karma. I really like the user interface at MDC, something that can’t be overstated enough as it’s intuitive and straightforward. Mock Draft Central’s ADP is currently limited to the top-255 picks, though that number can float depending on the recent qualifying mocks.

Contestant No. 2
Couch Managers
Premium Options: $2.99 monthly (auto renew) OR $9.99 annually (auto renew)

My enthusiasm for the MDC user interface doesn’t carry over to CM here. Couch Managers, despite also color coordinating things similarly to MDC, just doesn’t have the same level of eye candy.

CM1

The notes section is helpful when typing on the fly, but for me, I have my spreadsheets open during the draft and can make notes or highlight things there. One thing I really enjoyed was the Good Pick/Bad Pick voting system on CM. Unfortunately during the draft you can’t see who voted for which pick, however after the draft is wrapped up there is a section to see the full break down with Good Pick votes on the left and Bad Pick votes in the right column. The ADP is limited to the top 265 picks at CM, similar to MDC where deep leagues or 14-teamers could be left out in the cold a bit.

CM2

For example, the picture above shows three Good Picks casted on the Marcus Stroman pick at 7.76 pick.

Contestant No. 3
RT Sports
Premium Options: N/A, it’s free, though regular season (non-mock draft) packages are available

Given I picked nits with the draft lobby from Couch Managers, I’ll do the same thing to RT Sports. I’d say that RT is even more boring and less visually appealing as it’s all white board with no color coded positions. The drafting itself is nice and safe in that you have to click the blue “+” sign either in your player queue or from the primary board, then click the blue draft button. Think of the “+” sign as a way to take a closer look at a player before immediately drafting them, and RT even calls the preview window.

RT

Unfortunately, along with their minimal design, RealTime Fantasy Sports also limits you to the standard 5×5 categories with no customization. That said, one of my favorite features RT Sports offers is probably the post-draft analysis. I drafted (first overall, of course) against a slate of bots and somehow didn’t manage to project to win the hitting categories, though the system loves my pitching staff.

RT1

There is a FAQ section for the numbers their projection system spits out, and I encourage you to check it out. I’ll leave the selling points of RT Sports to those lovely folks, but know that you can create mock drafts with a free, basic account, albeit only standard 5×5 format. For custom league settings, you will be required to upgrade. Really the biggest drawback to RT is probably their top-300 ADP is shown in PDF form, a sub-optimal viewing format if you’re attempting to export and compare ADP’s across different websites.

The Pick
It should be clear there are more mock draft platforms out there — many more — but I only felt comfortable discussing the ones I use semi-regularly to frequently. If I had to pick one, I like RT Sports the most, even accounting for their lack of customization. Second place would be Couch Managers, with Mock Draft Central coming in with the bronze placing.

Now, who’s up for a mock draft?

(Header image via my RT Sports post-draft board. Bots are mostly easy to pick against!)

DFS Losers Seek to Recoup Losses in Class Actions Against FanDuel, DraftKings

Last week, a DeKalb County, Georgia resident, Aaron Hodge, filed two proposed class action lawsuits in federal court in Atlanta against daily fantasy sports (DFS) websites FanDuel and DraftKings in an attempt to recover money he lost playing games on both sites, which, he alleges, amount to little more than “illegal gambling.”

As DFS gained popularity and attention this summer and fall, in large part due to broad advertising campaigns by both FanDuel and DraftKings, users may have noticed that residents of a small number of states– including Washington, Louisiana, Arizona, and Iowa– were not allowed to play games for cash prizes.

While these early restrictions did little to slow the momentum of DFS and its two largest sites, the industry recently has come under more substantial public scrutiny following New York Attorney General Eric T. Schneiderman’s initiation of an investigation of and request for an injunction against FanDuel, DraftKings, and Yahoo!, which also hosts DFS games.

Last week’s suits by Hodge are believed to be the first legal challenges to FanDuel and DraftKings brought by a private citizen. (Hodge’s attorneys have since filed a similar lawsuit in Alabama.) Hodge’s complaints (available here and here) are basically identical. The essence of his allegations is that the DFS games offered by FanDuel and DraftKings constitute unlawful gambling under Georgia law and he therefore is entitled to restitution for his losses at both sites. Hodge does not reveal how much money he lost playing DFS, but he does allege that the aggregated losses of the proposed classes — comprised of “All persons in the State of Georgia who participated in Defendant’s DFS, deposited money in a [FanDuel/DraftKings] account, and lost money in any game or contest” —  exceed $5 million in each case.

Hodge’s complaints allege only state law claims, and the legal centerpiece of these cases is O.C.G.A. § 13-8-3, Georgia’s gambling contracts statute. That law provides that all “[g]ambling contracts are void” and that a loser may recover his or her losses from a winner under a gambling contract:

(a) Gambling contracts are void; and all evidences of debt, except negotiable instruments in the hands of holders in due course or encumbrances or liens on property, executed upon a gambling consideration, are void in the hands of any person.

(b) Money paid or property delivered upon a gambling consideration may be recovered from the winner by the loser by institution of an action for the same within six months after the loss and, after the expiration of that time, by institution of an action by any person, at any time within four years, for the joint use of himself and the educational fund of the county.

Hodge argues that DFS contests on FanDuel and DraftKings are not skill games but rather games of chance; that these sites therefore are doing little more than taking bets on sporting events; and therefore he and the sites are parties to gambling contracts for which the user entry fees constitute the gambling consideration that Hodge is entitled to recover under O.C.G.A. § 13-8-3(b).

Among his other claims, Hodge also contends that the sites violate Georgia criminal laws pertaining to commercial gambling and the advertising thereof, and he argues that the sites’ claims that their DFS contests were lawful games fraudulently induced him to participate.

An interesting allegation Hodge sprinkles throughout his complaints is that both FanDuel and DraftKings “failed to disclose the use of ‘bots’ or fake accounts designed to operate as ‘shills'”:

Upon information and belief, [FanDuel/DraftKings] uses “bots” or fake accounts to act as “shills” in the gambling scheme in order that certain winnings go to the “house” ([FanDuel/DraftKings]), and also creating the illusion to the [FanDuel/DraftKings] user of interacting with a gambler on equal footing. The employment of “shills” (or “bots”/fake accounts) employs a similar concept to those “shills” that are permitted by law in states with casinos such as Nevada, but Georgia does not permit any gambling, never mind the use of “shills” in the form of “bots” or otherwise fake accounts. And regardless, in states where such devices are employed, there is no illusion, nor effort to create the illusion, that the “house” is not winning the losing bets (in the form of monies that are attributed to “shills”) and in the case of [FanDuel/DraftKings], there is no disclosure of the use of “shills” nor any legal basis for doing so in Georgia.

One of the first procedural hurdles Hodge will need to clear to proceed with his proposed class actions in federal court are the sites’ terms of use. He wants to avoid the applicability and enforcement of these terms of use because they contain arbitration, jurisdiction, and venue provisions that would neutralize his ability to maintain these class action lawsuits against FanDuel (terms of use) and DraftKings (terms of use) in court. On one hand, Hodge is arguing that a contract — albeit a gambling contract that’s void under Georgia law — existed between him and each DFS site. On the other hand, though, he argues that the sites’ terms of use are not part of any contract or binding agreement between him and each site.

If Hodge is able to keep these lawsuits in the U.S. District Court for the Northern District of Georgia, where he has filed them, his further success will depend upon his ability to convince the court that the DFS contests FanDuel and DraftKings host really are gambling, not skill games. On this point, in addition to the well-publicized New York AG investigation and Nevada’s determination that DFS constitutes gambling, he may find some in-state assistance as well. Georgia Attorney General Sam Olens now has opened his own investigation into the legality of DFS, and the court in Hodge’s cases could find Olens’ conclusions on the matter persuasive.

Another issue possibly lurking in these cases is preemption, a legal concept based on the supremacy of federal law over state law. In general terms, preemption means that if a federal law and a state law conflict, the federal law controls. On the question of whether their sites’ contests constitute gambling, FanDuel and DraftKings may argue that their contests are permissible under the Unlawful Internet Gambling Enforcement Act (UIGEA), a federal law that prohibits certain activities and transactions connected with betting and wagering. Part of that Act provides that “[t]he term ‘bet or wager’ . . . does not include . . . participation in any fantasy or simulation sports game . . . in which (if the game or contest involves a team or teams) no fantasy or simulation sports team is based on the current membership of an actual team that is a member of an amateur or professional sports organization . . . and that meets the following conditions:

(I) All prizes and awards offered to winning participants are established and made known to the participants in advance of the game or contest and their value is not determined by the number of participants or the amount of any fees paid by those participants.
(II) All winning outcomes reflect the relative knowledge and skill of the participants and are determined predominantly by accumulated statistical results of the performance of individuals (athletes in the case of sports events) in multiple real-world sporting or other events.
(III) No winning outcome is based—
(aa) on the score, point-spread, or any performance or performances of any single real-world team or any combination of such teams; or

(bb) solely on any single performance of an individual athlete in any single real-world sporting or other event.”

If FanDuel and DraftKings fit within this exception to the Act, because, for example, their contests involve forming “fantasy” teams of selected individual players, as opposed to simply picking an existing team, like the Detroit Lions, to win, the sites may contend that the federal UIGEA preempts the conflicting state laws Hodge argues make their contests illegal and entitle him to recoup his losses. (For what it’s worth, the congressman who drafted the UIGEA, Jim Leach, doesn’t buy any part of this argument. According to the Associated Press, Leach’s view is that “the carve out for Fantasy sports in the [UIGEA] does not provide them with immunity against other federal and state laws that could limit their activities. . . . ‘Quite precisely, UIGEA does not exempt fantasy sports companies from any other obligation to any other law.'”)

Meanwhile, as legal scrutiny over DFS heats up in the United States, FanDuel and DraftKings are hoping to find friendlier regulatory environs abroad. Some wonder whether their expansion into the United Kingdom may come back to haunt them stateside, however. Calling themselves “gambling software” companies, both sites have applied to U.K. regulators for gambling licenses. DraftKings received a gambling license in August, while FanDuel, which applied this month, still is waiting on a decision. DraftKings’ Chief Internal Officer says he doesn’t see a contradiction between the site’s representations in the U.S. and U.K., but American officials, including the judge or judges handling Hodge’s lawsuits, may see things differently.

(Header image via Karsten Bitter)

How To Use R For Sports Stats, Part 3: Projections

In this series, we’ve walked through how exactly you can use R for statistical analysis, from the absolute basics of R coding (in part 1) to visualizing data and correlation tests (in part 2).

Since you’re reading this on TechGraphs, though, you might be interested in statistical projections, so that’s how we’ll wrap this up. If you’re just joining us, feel free to follow along, though looking through parts 1 and 2 first might help everything make more sense.

In this post, we’ll use R to create and test a few different projection systems, focusing on a bare-bones Marcel and a multiple linear regression model for predicting home runs. I’ve said a couple times before that we’re just scratching the surface of what you can do — but this is especially true in this case, since people write graduate theses on the sort of stuff we’re exploring here. At the end, though, I’ll point you to some places where you can learn more about both baseball projections and R programming.

Baseline

Let’s get everything set up. We’ll have to start by abandoning –well, modifying– that test data set that served us so well in Parts 1/2; we’ll add another two years of data (2011-14), trim out some unnecessary stats, and add a few which might prove useful later on. It’s probably easiest just to download this file.

Then we’ll load it:

fouryr = read.csv("FG1114.csv")

convert some of the percentage stats to decimal numbers:

fouryr$FB. = as.numeric(sub("%","",fouryr$FB.))/100
fouryr$K. = as.numeric(sub("%","",fouryr$K.))/100
fouryr$Hard. = as.numeric(sub("%","",fouryr$Hard.))/100
fouryr$Pull. = as.numeric(sub("%","",fouryr$Pull.))/100
fouryr$Cent. = as.numeric(sub("%","",fouryr$Cent.))/100
fouryr$Oppo. = as.numeric(sub("%","",fouryr$Oppo.))/100

and create subsets for each individual year.

yr11 = subset(fouryr, Season == "2011")
colnames(yr11) = c("2011", "Name", "Team11", "G11", "PA11", "HR11", "R11", "RBI11", "SB11", "BB11", "K11", "ISO11", "BABIP11", "AVG11", "OBP11", "SLG11", "WAR11", "FB11", "Hard11", "Pull11", "Cent11", "Oppo11", "playerid11")
yr12 = subset(fouryr, Season == "2012")
colnames(yr12) = c("2012", "Name", "Team12", "G12", "PA12", "HR12", "R12", "RBI12", "SB12", "BB12", "K12", "ISO12", "BABIP12", "AVG12", "OBP12", "SLG12", "WAR12", "FB12", "Hard12", "Pull12", "Cent12", "Oppo12", "playerid12")
yr13 = subset(fouryr, Season == "2013")
colnames(yr13) = c("2013", "Name", "Team13", "G13", "PA13", "HR13", "R13", "RBI13", "SB13", "BB13", "K13", "ISO13", "BABIP13", "AVG13", "OBP13", "SLG13", "WAR13", "FB13", "Hard13", "Pull13", "Cent13", "Oppo13", "playerid13")
yr14 = subset(fouryr, Season == "2014")
colnames(yr14) = c("2014", "Name", "Team14", "G14", "PA14", "HR14", "R14", "RBI14", "SB14", "BB14", "K14", "ISO14", "BABIP14", "AVG14", "OBP14", "SLG14", "WAR14", "FB14", "Hard14", "Pull14", "Cent14", "Oppo14", "playerid14")

(We’re renaming the columns for each subset because the merge() function has some problems if you try to merge too many sets with the same names. If you want to explore the less hacked-together way of reassembling data frames in R, take a look at the dplyr package.)

Anyway, we’ll merge these all back into one set:

set = merge(yr11, yr12, by = "Name")
set = merge(set, yr13, by = "Name")
set = merge(set, yr14, by = "Name")

Still with me? Good. Thanks for your patience. Let’s start testing projections.

Specifically, we’re going to see how well we can use the 2011-2013 data to predict the 2014 data. For simplicity’s sake, we’ll focus mostly on a single stat: the home run. It’s nice to test with–it’s a 5×5 stat, it has a decent amount of variation, it gives us experience with testing counting stats while being more player-controlled than R/RBI… and, come on, we all dig the long ball.

Now when you’re testing your model, it’s nice to have a baseline–a sense of the absolute worst that a reasonable model could do. For our baseline, we’ll use previous-year stats: we’ll project that a player’s 2013 HR count will be exactly what they hit in 2014.

To test how well this works, we’ll follow this THT post and use the mean absolute error–the average number of HRs that the model is off by per player. So if a system projects two players to each hit 10 homers, but one hits zero and the other hits 20, the MAE would be 10.

(If you end up doing more projection work yourself, you may want to try a more fine-tuned metric like r² or RMSE, but I like MAE for a basic overview because the value is directly measurable to the stat you’re examining.)

To find the mean absolute error, take the absolute value of the difference between the projected and actual stats, sum it up for every player, then divide by the number of players you’re projecting:

sum(abs(set$HR13 - set$HR14))/length(set$HR14)
> [1] 6.423729

So the worst projection system possible should be able to beat an average error of about six and a half homers per player.

Marcel, Marcel

Now let’s try a slightly-less-than-absolute-worst model.

Marcel is the gold standard of bare-bones baseball projections. At its core, Marcel predicts a player’s stats using the last 3 years of MLB data. The previous year (Year X) gets a weight of 5, the year before (X-1) gets a weight of 4, and X-2 gets a weight of 3. As originally created, Marcel also includes an adjustment for regression to the mean and an age factor, but we’ll set aside such fancies for this demonstration.

To find Marcel’s prediction, we’ll create a new column in our dataset weighing the last 3 years of HRs. Since our weights are 5 + 4 + 3 = 12, we’ll take 5/12 from the 2013 data, 4/12 from the 2012 data, and 3/12 from the 2011 data. Then we’ll round it to the nearest integer.

set$marHR = (set$HR13 * 5/12) + (set$HR12 * 4/12) + (set$HR11 * 3/12)
set$marHR = round(set$marHR,0)

Voila! Your first (real) projections. How do they perform?

sum(abs(set$marHR - set$HR14))/length(set$HR14)
> [1] 5.995763

Better by nearly half a home run. Not bad for two minutes’ work. 6 HR per player still seems like a lot, though, so let’s take a closer look at the discrepancies. We’ll create another column with the (absolute) difference between each player’s projected 2014 HRs and actual 2014 HRs, then plot a histogram displaying these differences.

set$mardiff = abs(set$marHR-set$HR14)
hist(set$mardiff, breaks=30, col="red")

Histogram of Marcel HR errors

Not as bad as you might have thought. Many players are only off by a few home runs, some off by 10+, and a few fun outliers hanging out at 20+. Who might those be?

set = set[order(-set$mardiff),]
head(set[c(1,72,90,91)], n=10)

(In that last line, we’re calling specific column names so we don’t have to search through 100 columns for the data we want when we display this. You can find the appropriate numbers using colnames(set).)

List of players with largest Marcel HR errors

A list headlined by a season-ending injury and two players released by their teams in July; fairly tough to predict in advance, IMO.

While we’re here, let’s go ahead and create Marcel projections for the other 5×5 batting stats:

set$marAVG = (set$AVG13 * 5/12) + (set$AVG12 * 4/12) + (set$AVG11 * 3/12)
set$marAVG = round(set$marAVG,3)
set$marR = (set$R13 * 5/12) + (set$R12 * 4/12) + (set$R11 * 3/12)
set$marR = round(set$marR,0)
set$marRBI = (set$RBI13 * 5/12) + (set$RBI12 * 4/12) + (set$RBI11 * 3/12)
set$marRBI = round(set$marRBI,0)
set$marSB = (set$SB13 * 5/12) + (set$SB12 * 4/12) + (set$SB11 * 3/12)
set$marSB = round(set$marSB,0)

And, for good measure, save it all in an external file. We’ll create a new data frame from the data we just created, rename the columns to look nicer, and write the file itself.

marcel = data.frame(set$Name, set$marHR, set$marR, set$marRBI, set$marSB, set$marAVG)
colnames(marcel) = c("Name", "HR", "R", "RBI", "SB", "AVG")
write.csv(marcel, "marcel.csv")

Before we move on, I want to quickly cover one more R skill: creating your own functions. We’re going to be using that absolute mean error command a couple more times, so let’s create a function to make writing it a bit easier.

modtest = function(stat){
 ame = sum(abs(stat - set$HR14))/length(set$HR14)
 return(ame)
}

The ‘stat’ inside function(stat) is the argument you’ll be including in the function (here, the column of projected data we’re testing); the ‘stat’ shows up inside the bracketed text where your projected data did when we originally used this command. The return() is what your function outputs to you. Let’s make sure it works by double-checking our Marcel HR projection:

modtest(set$marHR)
> [1] 5.995763

Now we can just use modtest() to find the absolute mean error. Functions can be as long or as short as you’d like, and are incredibly helpful if you’re using a certain set of commands repeatedly or doing any sort of advanced programming.

Hold The Line

With Marcel, we used three factors–HR counts from 2013, 2012, and 2011–with simple weights of 5, 4, and 3. For our last projection model, let’s take this same idea, but fine-tune the weights and look at some other stats which might help us project home runs. This, basically, is multiple linear regression. I’m going to handwave over a lot of the theory behind regressions, but Bradley’s how-to from last week does a fantastic job of going through the details.

Remember back in part 2, when we were looking at correlation tests in r² and we mentioned how we were basically modeling a y = mx + b equation? That’s basically what we did with Marcel just now, where ‘y’ was our projected HR count and we had three different mx values, one each for the 2013, 2012 and 2011 HR counts. (In this example, ‘b’, the intercept, is 0.)

So we can then use the same lm() function we did last time to model the different factors that can predict home run counts. We’ll give R the data and the factors we want it to use, and it’ll tell us how to best combine them to most accurately model the data. We can’t model the 2014 data directly in this example–since we’re testing our model against it, it’d be cheating to use it ‘in advance’–but we can model the 2013 HR data, then use that model to predict 2014 HR counts.

This is where things start to get more subjective, but let’s start by creating a model using the last two years (2013/2012) of HR data, plus the last year (2012) of ISO, Hard%, and Pull%. In the lm() function, the data we’re attempting to model will be on the left, separated by a ‘~’; the factors we’re including will be on the right, separated by plus signs.

hrmodel = lm(set$HR13 ~ set$HR12 + set$HR11 + set$Hard12 + set$Pull12 + set$ISO12)
summary(hrmodel)

Screenshot of initial linear model

There’s a lot of stuff to unpack here, but the first things to check out are those “Pr(>|t|)” values in the right corner. Very simply, a p-value less than .05 there means that that factor is significantly improving your model. (The r² for this model, btw, is .4611, so this is accounting for roughly 46% of the 2013 HR variance.) So basically, ISO and Pull% don’t seem to add much value to this model, but Hard% does.

It’s generally a good practice to remove any factors that don’t have a significant effect and re-run your model, so let’s do that:

hrmodel = lm(set$HR13 ~ set$HR12 + set$HR11 + set$Hard12)
summary(hrmodel)

Screenshot of R model with significant factors

And there’s your multiple linear regression model. The format for the actual projection formula is basically the same as what we did for Marcel, except your weights will take the coefficient estimates and you’ll include the intercept listed above them. Remember that “HR12”, “HR11”, etc., are standing in for “last year’s HR total”, “the year before that’s HR total”, etc., so make sure to increment the stats by a year to project for 2014.

set$betHR = (-5.3 + (set$HR13 * .32) + (set$HR12 * .13) + (set$Hard13 * 40))
set$betHR = round(set$betHR,0)

Survey says…?

modtest(set$betHR)
> [1] 5.95339

…oh. Yay. So that’s an improvement of, uh…

modtest(set$marHR) - modtest(set$betHR)
> [1] 0.04237288

1/20th of a home run per player. Isn’t this fun? Some reasons why we might not have seen the improvement we expected:

  • We probably overfit the data. Since we ran the model on 2013 data, it probably did really well on 2013 data, but not as great on 2014. If we check the model on the 2013 data:
set$fakeHR = (-5.3 + (set$HR12 * .33) + (set$HR11 * .13) + (set$Hard12 * 40))
set$fakeHR = round(set$fakeHR,0)
sum(abs(set$fakeHR - set$HR13))/length(set$HR13)
> [1] 4.877119

It runs pretty well.

  • We didn’t include useful factors we could have. We just tested a few obvious ones; maybe looking at Cent% or Oppo% would be more helpful than Pull%? (They aren’t, just so you know.) More abstract factors like age, ballpark, etc., would obviously help–but including these would also require a stronger model.
  • Finally, projections are hard. Even if you have an incredibly customized set of projections, you’re going to miss some stuff. Take a system like Steamer, one of the most accurate freely-available projection tools around. How did their 2014 preseason projections stack up?
steamer = read.csv("steamer.csv")
steamcomp = merge(yr14, steamer, by = "playerid14")
steamcomp$HR = as.numeric(paste(steamcomp$HR))
steamcomp$HR = round(steamcomp$HR, 0)
steamcomp$HR[is.na(steamcomp$HR)] = 0
sum(abs(steamcomp$HR - steamcomp$HR14))/length(steamcomp$HR14)
> [1] 4.892157

That said, the lesson you should not take away from this is “oh, our homemade model is only 1 HR/player worse than Steamer!” Our data set is looking at players for whom we have several seasons’ worth of data —   the easiest players to project. If we had to create a full-blown projection system including players recovering from injury, rookies, etc., we’d look even worse.

If anything, this hopefully shows how much work the Silvers, Szymborskis, and Crosses of the world have put in to making projections better for us all. Here’s the script with everything we covered.

This Is Where I Leave You

Well, that about wraps it up. There’s plenty, plenty more to learn, of course, but at this point you’ll do well to just experiment a little, do some Googling, and see where you want to go from here.

If you want to learn more about R coding, say, or predictive modeling, I’d definitely recommend picking up a book or trying an online class through somewhere like MIT OpenCourseWare or Coursera. (By the end of which, most likely, you’ll be way beyond anything I could teach you.) If there’s anything particular about R you’d still like to see covered, though, let me know and I’ll see if I can do a writeup in the future.

Thanks to everyone who’s joined us for this series — the kudos I’ve read here and elsewhere have been overwhelming — and thanks again to Jim Hohmann for being my perpetual beta tester/guinea pig. Have fun!


Yahoo! Is Now in the Daily Fantasy Business

You didn’t seriously expect Yahoo Sports to ignore the daily fantasy boom, did you?

That’s the first line of Yahoo!’s introduction to their newly-announced daily fantasy offering. It’s bluntness leans on the cute side, but it’s now without merit. Daily fantasy sports (DFS) seem to be exploding in popularity, and the funding numbers certainly back that up.

Yahoo! is going up against two well-established DFS platforms — FanDuel and DraftKings. Each have their own strengths and weaknesses, but what they both possess is strong market saturation. FanDuel, especially, has been making a huge push in partnerships of late, teaming up with both Major League Baseball and NASCAR. And it’s become increasingly difficult to watch any kind of sporting event without seeing commercials for either DraftKings or FanDuel. Yahoo! has an uphill climb ahead of them if they plan on making a big dent in the DFS market. But they do have a few aces up their sleeve.

Their first advantage is that that are already a huge player in the fantasy sports market. It’s true that their reputation has taken some hits as of late, but they’re still one of the big providers. Millions of traditional fantasy players are already visiting Yahoo! on a frequent basis. All Yahoo! has to do is entice them to give DFS a try (or seven). Whereas FanDuel or DraftKings have to either pay for advertising or enter in partnerships if they want exposure on the popular fantasy sites. Yahoo! has it all baked right in. They just have to convince people it’s worth a shot.

While it hasn’t been up long enough to do a full review, a quick glance at the new DFS site shows a nice, clean interface. The nuts and bolts of it work much like DraftKings or FanDuel, but Yahoo! is taking a different approach with their salary caps. Instead of working within a $50,000 cap, Yahoo! works within a $200 limit. Of course, everything is prorated. Instead of dropping $9,500 on a top-notch player, Yahoo! users would spend something like $60 within their lower cap limit. This is most likely a stab at simplicity — making the the financials easier to manage across a whole roster. It’s a novel idea, one that separates them from the rest of the field. We’ll have to see how it plays out as the season goes on.

yahoofantasy2

The first game of the NFL season comes on September 10th. The second half of the baseball season is clearly the proving grounds for Yahoo!’s new platform — a time to iron out all the bugs before the real money starts rolling in. Whether it works or not, you have to give Yahoo! credit for trying. DFS is eating into their user base and they’re making a move to try and stop the bleeding. Perhaps they can leverage their place in the market into some higher revenues. They certainly have the foothold. Being valued at $40 billion probably doesn’t hurt, either.


A Newbz Guide to Daily Fantasy

I don’t play fantasy baseball. Baseball simulations are more my thing. In 1998 I started a Strat-O-Matic league which grew to a league of 24 of us that play each other online. I’m completely in on Out of the Park Baseball, trying to lead my 2017 Miami Marlins – sans Jose Fernandez, Giancarlo Stanton and Carlos Santana (acquired) following season-ending injuries – in my second season as general manager/manager after starting my career managing the Pawtucket Red Sox. For whatever reasons, fantasy baseball just never caught on with me.

Then came advertising for Draft Kings and FanDuel. Lots and lots and lots and lots of it. My curiosity grew and finally, after a year of brain washing, the mad men won. Yesterday I threw down a whopping $10 and signed up for Draft Kings to see what the big deal was. It was a fact-finding mission, mostly. But a part of me, say my right pinky toe, wanted it to become a source of income for my beer fund. After my first 25 cent game, I realized that beer fund was going to stay dry.

And now I bring the experience to you, the TechGraphs readers. Learn from me, what and what not, to do.

Grab a promo code

Before you sign up for an account, make sure you have a promo code. It’s free money. I Googled and ran with the first bigger-looking site that didn’t seem sketchy. It promised a matching bonus up to $600 for the first deposit. The one I signed up for isn’t free money, though. It’s contingent upon me earning Frequent Player Points. I earned one point for my one game, and only have 99 left points left before my bonus kicks in. Geesh. So, search around a bit, see if you can find a better deal.

PayPal?!? YES

I wanted a royalty-related username, since the site is about kings and such, and discovered that landgrave is a German title. My last name is quite German, so you can find me at LandgraveK on the site. My wallet sits in the glove compartment of my car, because I roll dangerously. Fortunately PayPal is an option to make a deposit, as are major credit cards. Otherwise I would’ve had to walk outside … where there are people … that might want to wave or talk to me.

Take a deep breath

I was anxious to find a game once they had my money. I landed in the lobby, skimmed my options, and felt completely overwhelmed. It was like walking in to a major casino for the first time. Bright, bold colors illuminated a dark background. My eyes fixated on the big ads. I gathered my over-stimulated self and decided to proceed cautiously.

Slugfest, Perfect Game, Moonshot, Gold Glove. What is going on here? Guaranteed, Qualifiers, Head-to-Head, 50/50 Leagues, Multipliers, Steps. And then I found it. My peoples. The Beginner games.

draftkingscapture

The lowest entry fee was a dollar. I’m stupid cheap and looked around for quarter games. In my search, I found some free games that may appeal to those that want to try it out and keep a buck. One I came across sported a $10 prize spread among five players, so $2 winning each.

Bam. Quarter Arcade. This is where I belong. I joined a game that maxed out at 14,100 players. The first place prize was $150, a 500 percent return. With a $3,000 prize pool, those that finished in the top 2,800 would minimally double their entry fee, or better. Optimism warmed my belly.

Prepare, prepare, prepare

Things started off well, actually. Fellow TechGraphs writer David Wiers is a Draft Kings boss and Tweeted a tip.

Dan Haren was my first pick. And then things went totally wrong. I analyzed the pitching match ups, looking for the worst pitchers to draft a lineup against. Trevor Cahill’s a bum, so I drafted Kevin Plawecki in his major league debut and Lucas Duda. For fun I took Mike Trout, because I’m a huge homer, and Jose Bautista. A handy tool is that after each pick, it calculates the cost for average player remaining. For example, if I had five slots left to fill and $24,000 remaining (my funds started at $50,000), then I had an average of $4800 to spend on each player. I filled the rest of my roster utilizing this tool, my own instincts and figuring out best matchups. Without analytics.

Our brethren over at RotoGraphs do a fantastic job providing readers with quality research to help you select players for traditional and daily fantasy sports. Roto Riteup, which Wiers contributes to, and The Daily Grind are daily musts if you want to make educated decisions with your lineup. Or you can trust your guts and guile, like I did, and have Brett Anderson whiff in your face.

Pick your crew

Selecting players to add to your lineup is as easy as clicking a plus button. Each day’s games are listed with starting time and weather. If lineups have been officially announced, a check mark appears next to the player’s name. It’s no fun picking Buster Posey if it’s his off day. Each player’s profile features stats, updates and analysis for easy-access info.

Once you’ve set your lineup, you get the option of joining other games with that same lineup, which is handy if you’re looser with your pocket change than I am, or join other contests with a different lineup.

So how’d I do?

I was dreadful. I finished 11,527 out of those 14,100 players with a final score of 75.9. The aforementioned Anderson went negative on me against a crap Giants offense for -2.4. The Wiers pick, Haren, netted 15.3 points and was only bested by Bautista’s 16. I don’t believe he earned me any extra machismo points, however, after Tuesday night’s game.

I’d be remiss if I didn’t add that I downloaded the DraftKings iOS app, which performed as I’d hoped.

So what say you, TechGraph readers? Do you play? Are you curious? Comment below. All tips/tricks/advice are appreciated as well.


NBA Announces Exclusive FanDuel Deal

The NBA just agreed to a 4-year deal with fantasy website FanDuel according to both TechCrunch and ESPN. For daily fantasy players, this means FanDuel will be the exclusive website to get your hoops fix at. Already on the NBA Fantasy site you can be linked to FanDuel and expect the association to promote it on their apps as well as their streaming ads and commercials.

Currently FanDuel offers both free and pay-to-win leagues. The prizes for these range from cash to game tickets to merchandise. Now with the association in their pockets, FanDuel and the NBA, along with money from venture groups such as Shamrock Capital Advisors and NBC Sports Ventures, will be able to reach and attract even more customers.The growth in the daily fantasy industry is on a massive rise, as FanDuel has increased by 650,000 paying players in the past three months after never before having even a third of that many in a single quarter. FanDuel claims they project to make approximately $600 million in entry fees this calendar year while handing back $540 million in prizes.

While this is new territory for the NBA as a whole, five teams had prior deals with FanDuel; the Brooklyn Nets, New York Knicks, Orlando Magic, Dallas Mavericks and Chicago Bulls. The move also includes NBA league executive Sal La Rocca as a FanDuel board member, further strengthening the ties between the two entities.

With competitor DraftKings snapping up the NHL, this deal makes sense for FanDuel. Given the massive interest and ease of use for daily fantasy leagues, it appears as though both FanDuel and DraftKings will the main entities of daily leagues going forward. With both sides throwing around millions of dollars, the money is driving even more attention to fantasy sports.

(Image credit to NBA.com) 

FanDuel Hits Server Trouble at Critical Time

Daily fantasy sports site FanDuel, fresh off their recent cash influx, ran into a bit of a problem on Sunday. Mainly, a whole host of fantasy players were unable to access the web site or mobile app to enter new contests or update current rosters. About 30 minutes before the 1 pm ET kick-offs, an important window for fantasy as this is usually when teams announce active and inactive players, FanDuel began performing poorly, with slow load times and spotty page loads. Eventually, the site degraded to the point of unusability. With only a few minutes before some teams kicked off — at which point rosters would lock — this left many people high and dry with unentered contests, unwanted rosters, and even injured players destined to gain zero points.

There was, shall we say, a fair deal of unhappiness among fans. A simple search of Twitter can tell you as much. And some of it was, in fact, justified. Many of FanDuel’s games cost money to play, and they run high-stakes tournaments like the World Fantasy Football Championships. When so much is on the line, the ability to change a roster in the final minutes is a necessity.

At the time, FanDuel did not seem to be responding to concerns on Twitter, but did offer one concession about a half hour after the opening kickoffs.

This gave users about 30 minutes to request a refund, assuming said users even saw the singular tweet.

Fantasy sports is becoming an ever-growing business. But, as FanDuel found out, a bigger user base can create bigger problems down the road.


Funding Numbers Show Daily Fantasy is Here to Stay

We’ve all been there. Our draft goes swimmingly. We get most of the players we were targeting, and feel like we improvised well when the need arose. Our roster looks great, and we’re daydreaming about fantasy dominance. Then, the hammer drops. Our RB1 is out for the year with a torn ACL. Our ace pitcher needs Tommy John. The dependable veterans we drafted become benchwarmers. We do our best to fix the situation, but it is basically untenable. Another fantasy season down the toilet.

That scenario, or rather the lack thereof, is one of the biggest appeals of so-called daily fantasy games. Rather than toiling away on a roster that can fall apart with one mistake or a little bad luck, daily fantasy sites offer the chance to start anew every day or week. Pick any players you want, stay under the salary cap, and have a chance at multiple payouts in a season. Players are not beholden to one team, either. Every team could have Tom Brady if they stay within the cap. It’s a great idea for those who want a change from the traditional system, or who want the opportunity to flex their fantasy smarts multiple times a year. And the money is showing that the idea is catching on.

Two of the biggest players in the game, DraftKings and FanDuel, recently went through successful funding rounds. DraftKings raised $41 million while FanDuel brought in $70 million. The new players in fantasy sports look promising, at least as far as investors see it.

FanDuel is looking to increase its visibility as well, announcing the World Fantasy Football Championships for 2014. They are set up as a set of weekly survivor pools, where the best performers will be flown to Las Vegas for the championship rounds. Pools are separated by entry fee, with $2 million of possible earnings for the biggest tournament.

Players can use either a web site or a mobile app to enter games from both companies, and a quick viewing of each shows hundreds of games available the first week of football season at many different price points. Baseball contests are also still available.

Fantasy players looking to try a little something different can invest very little (or even no) money to try their hand at these games. And if the funding results for places like FanDuel and DraftKings are any indication, every self-proclaimed fantasy guru will have a chance to prove their mettle for some time.

(Header photo via Tony Ibarra)