Wednesday, June 24, 2015

What does the Xur sell?

Yes, it's a Ylvis pun. That out of the way, the rest of this is another post about video games.

This one is about the video game Destiny, and one of the NPCs (non-player characters) that sells items to player characters. If you play Destiny you have probably figured out that I'm talking about Xur. If you haven't played Destiny, you've by now figured out I'm talking about Xur.

Xur only shows up on the weekends, and only sells a few things each week. In particular, he sells one exotic (pretty fancy) weapon each week. There are entire websites that are set up to keep track of Xur's history. He's a popular guy.

These lists are easy to find, but I figured there might be some ways to condense this information into easier-to-digest form. That is, to make a picture.

Did I mention that there are three different classes of weapon in the game? Well, there are. Xur has sold a lot more primary weapons than special or heavy weapons, but it also might just be that there are more primary weapons to sell? Easy enough to check out.

Here are the primary weapons that Xur has sold up to this point:

 Hard Light
 MIDA Multi-Tool
 No Land Beyond
 Red Death
 SUROS Regime
 The Last Word
 Universal Remote

And special:

 Ice Breaker
 Patience and Time
 Plan C

And heavy:

 Dragon's Breath

We can incorporate this information to test the assumption that the proportion of each type of weapon sold is related to the proportions of weapons in these groupings.

14 different weapons have been sold, so the expected proportions for primary, special, and heavy weapons are 7/14, 3/14, and 4/14, respectively.

Each type is in the right ballpark, though there is some difference between observed and expected. The effect isn't significant, nor particularly large. The chi-square value with two degrees of freedom is less than 1, if you're curious. With this information it's difficult to say anything in particular, and impossible to say that this is either random or non-random. It certainly doesn't seem to imply that there is any bias in the selection of weapons each week, at least at the level of primary/special/heavy.

While we can't say definitively that choice of type of stock is or isn't random, the information to this point fails to provide any conclusive evidence that it is not.

Before we wrap this one up there's another way to potentially look at the first graph, and that's to be forgetful of less recent values. Over the long run, things tend to smooth out. If we only remember the last month or so of Xur sales, things look at lot less clean. All we have to do is forget everything that happened more than a month earlier, at every given time point:

This chart is probably a better representation of human memory than the earlier one, and might start to explain why people are often complaining how non-random Xur's sales seem. Week 34, for instance, might have felt a little rough without considering the broader picture.

What about Gjallarhorn, you ask? Here's how I feel about Gjallarhorn.