How can I perform linear regression for sports?

I was told by a professor that in order to do regression, I need to have "fixed treatments," as in all of the $X_i$'s should have fixed levels. How can I do such a thing for something as volatile as sports? For example, suppose we tried modeling whether turnovers influence wins in an NFL season. How do I "assign" treatments of turnovers to a given team so that I may perform the analysis?

• This sounds like something a psychology or a sociology prof would say. – Sean Roberson Sep 4 '17 at 19:36
• This is a stats professor who I had a discussion with the other day. Is it not true? – John Sep 4 '17 at 19:37

Your question is not sufficiently specific. That may be what your prof is trying to tell you. What is your objective? To predict final league standing from early-season information? To model how various factors affect win/loss ratio? Etc.?

In a simple linear regression you have the model $Y_i = \beta_0 + \beta_1x_i + e_i,$ where you have data pairs $(Y_i, x_i),$ the $e_i$ are normally distributed errors, and you seek to estimate coefficients $\beta_0$ and $\beta_1$ from the data.

You are assuming a linear relationship between the $x_i$ and the $Y_i$ and you are hoping to approximate the correct line by using data. What then?

As a very simple example, maybe you have data on flight times (gate departure to landing) $Y_i$ and distances $x_i$ for major US airline nonstop flights on wide-body jets.

A prediction problem might be that you know the distance of your flight and want to estimate the flight time (presumably, you have lost the link to the online schedule). For a 1000-mile flight you might find that the flight time is about $2.5 \pm .25$ hours.

A modeling problem might be that you want to understand about how fast commercial planes fly and how much of the flight time is actually used in taxiing from the gate to the runway and waiting in the queue for takeoff. You might find that that $\beta_0 \approx 0.65$ hours (40 min) of taxi/queue time, and that $\beta_1 = 0.0019$ hours/mile, for a cruising speed of about 525 mph (not so fast that a sudden dive would likely reach supersonic speed and tear the wings off the plane).

Looking into the matter more carefully, you might find that eastbound flights go faster (because of jet stream tailwinds) and westbound flight slower. Or that congestion at some times of day influences taxi time or air speed. So you may decide to add additional predictor variables ($x$'s) to your model.

Once you have some idea what measurable quantity $Y$ you want to predict or understand, and what measurable quantities (roughly linearly related to $Y$) might be reasonable predictor variables, then you are ready to do business.

• To be more specific, it is a modeling problem to create a model that THEN can be used to predict the number of wins a team will earn in one season. So it would start as one predictor (in this case turnovers) and then maybe I could add more later (rush yards, pass yards, etc). The prof knows the specifics so I was confused when she said that I needed fixed treatments. – John Sep 4 '17 at 22:40
• Have you plotted data to see if 'Y=wins in a season' and 'x=turnovers per season' are linearly related across several teams (or several years)? If Pearson's $r$ is not near substantially different from $0$, try Spearman's correlation and look at a scatterplot to see if some function of $Y$ (sqrt, log, exp, power, etc.) is more nearly linear. // I did not overhear the discussion with your prof and so do not want to speculate on the context or your report of what she said. (I have heard astonishing versions of my own quotes.) Maybe ask her for clarification--preferably with scatterplot in hand. – BruceET Sep 5 '17 at 0:13
• I've actually done a full correlation analysis on the topic out of curiosity. I used 5 years worth of data for each of the 32 teams and obtained a correlation coefficient of .659. It was significant. This was a conversation by email and I've followed up but it hasn't gotten any clearer. – John Sep 5 '17 at 0:49
• If you have 32 teams for 5 years, then you don't have 160 indep data points. Maybe that has something to do with your prof's objection. // We are about to get busted for 'chatting' in Comments, so please clarify with your prof. Then maybe we can discuss regression results when you're on her track. – BruceET Sep 5 '17 at 2:08
• I have asked her, and the independent data points don't matter. She says as an example for turnovers, I could sample at 0 turnovers, 3, 6, 9, etc and see the corresponding wins. I don't get why I have to do that or if that's even possible. – John Sep 6 '17 at 18:47