# car racing game win factors

I play a car racing video game on my tablet computer and I have collected data from 224 races. In the game, two cars are matched up head-to-head and race over a quarter-mile. I would like to determine the relative impact of certain factors on the likelihood of winning the race.

A data file is available at http://csr.datamustflow.com/csr_racing_times.csv . This file contains the columns listed below. In the file, a 'y' means 'yes/present' and 'n' means 'no/not present'.

Looking forward to any feedback you can give me on the best way to go about this analysis.

Edit: A new file with the race pairings is now available at http://csr.datamustflow.com/csr_times_paired.csv

Data fields:

Make_Model: name of the car

E: Engine upgrade that can be purchased with in-game cash; if present, should lower race time

N: Nitrous oxide upgrade: if present, should lower race time

T: Tire upgrade; if present, should lower race time

B: "Blogger" if you lose the race, you don't lose any "game points"; not expected to have any effect on race time

win: whether the car won the race or not

time: The race time over a quarter-mile; lower time = equals faster race

me: whether it was me racing the car in that race or not

PP: An integer that describes the overall performance of the car; a higher number means a better, faster car

• This reminds me of a similar problem I'm working on. I'm thinking logistic regression, but you violate the independent observations assumption if you use both players in each race as separate observations. You probably ought to reorganize your data so that win reflects whether you won the race, and all your opponents' info is included in each race's row (in separate columns after the columns with your info) for use in predicting whether you beat your opponent that race. Also, for feature selection tips, check out this question. – Nick Stauner Mar 14 '14 at 11:35
• Do you have the race order available? You are likely improving as a result of playing more, so it could be useful to take that into account. – Underminer Mar 14 '14 at 20:16
• @Underminer Both of the .csv data files are listed in chronological order even though there is no column specifying that. – grachtdog Mar 14 '14 at 20:34

## 1 Answer

I would consider omitting the opponents' data entirely. The reason is that you cannot account for their skill level and how that affects their car choice. For instance, if long time players unlock certain cars, and start using them, they will likely have a great number of wins even if the car is not very good objectively (they are winning because they are good at the game). This would make the car look like it is good, but really the player who is using that car is good. You can, however, correct for your own skill level by using your "race #" as a covariate. Also, this eliminates the problem of not having "independent observations" that @Nick Stauner brought up.

Then you could use logistic regression with "W/L" as the response variable, and "E", "N", "T", "B", "PP", and "race#" as regressors. I don't think "time" should be included either, since it is more or less a response variable assuming all tracks are equivalent. Maybe you could even substitute "time" as your response variable, but this largely depends on the game itself.