Blog ›How Much Do You Have to Spend to Collect Every Character?

MathematicsStatistics

Translated from Korean by Claude · Read the original

Gacha (loot boxes) is an evil invention.

If you're wondering why I'm suddenly talking about gacha, it's because you can hardly talk about games these days without mentioning "randomized items." Of course, most of the games I play have randomized items too. But I'm pretty far from the kind of wise consumer who debates the ethics of randomized items, so I'll go in the completely opposite direction and talk about "How much do I have to spend to collect every character?" (Shut up and take my money) in a few games.

Probability basics

In statistics, there are some concepts used to express probabilities mathematically. Random variables, probability mass functions, and expected values are among them.

A random variable is a number that has values and probabilities. It's usually written in uppercase. For example, the number you get from rolling a die can be called a random variable XX.

A probability mass function is a function that maps a random variable's values to their probabilities. It's written like P(X=x)P\left(X=x\right). Put simply, P(X=x)P\left(X=x\right) is the probability that XX equals xx. Taking the die roll mentioned above as an example,

P(X=x)=16(x=1,2,3,4,5,6)P\left(X=x\right) = \dfrac{1}{6} \left(x = 1, 2, 3, 4, 5, 6\right)


is how we could write it.

And the expected value is, literally, the value you expect from a random variable. Also called the mean, the expected value is written as E(X)E\left(X\right). For the faces of a die, the mean is E(X)=3.5E\left(X\right) = 3.5.

A loaded die. It gives you a 7 or 11 almost every time.

But imagine a die with something like a piece of metal stuck inside, so that one face comes up abnormally often. For example, say 6 comes up with probability 95100\dfrac{95}{100}, and each of the others only with probability 1100\dfrac{1}{100}. Can we still say that the mean is E(X)=3.5E\left(X\right) = 3.5 after many rolls?

Nope. In this case it'll land on 6 almost every time, so the mean will be close to 6 if anything, not 3.5. That's why, when computing the mean, i.e. the expected value, you have to multiply the values by their probabilities. Here, the expected value can be computed like this.

E(X)=1×1100+2×1100+ 3×1100+ 4×1100+ 5×1100+ 6×95100=5.85E\left(X\right) = 1\times\dfrac{1}{100} + 2\times\dfrac{1}{100} + 3\times\dfrac{1}{100} + 4\times\dfrac{1}{100} + 5\times\dfrac{1}{100} + 6\times\dfrac{95}{100} = 5.85

5.85 seems a bit more believable than 3.5!

Anyway, generalizing this, when P(X=xi)=pi(i=1,2,…,n)P\left(X=x_i\right) = p_i \left(i=1, 2, \ldots, n\right) we can write it as follows.

E(X)=∑i=1nxipiE\left(X\right) =\sum_{i=1}^{n} {x_i}{p_i}


Also, as you can see, since E(X)E\left(X\right) is made up of a sum of xipi{x_i}{p_i}s, E(aX+b)=aE(X)+bE\left(aX+b\right)=aE\left(X\right)+b, ∑ E(X)=E(∑X)\sum E\left(X\right)=E\left(\sum_{}^{} X\right), and so on also hold.

Getting every card – with no rarity weighting

I'll go through a few different games, but let's start with SOUND VOLTEX. SOUND VOLTEX is a rhythm game, but pulling high-rarity cards is almost essential for progressing through the story. The cards are divided into rarities, and people say you can really feel that duplicate cards are deliberately set to show up more often, but since the actual rates aren't disclosed, I'll assume there are no per-rarity rates and every card has the same chance of appearing.

One of the PUR cards from SOUND VOLTEX IV. I have it too.

First, let's make a few assumptions.

  1. Each card pull costs 1,000 won.

  2. Cards are pulled one at a time, and you check the card before pulling the next one.

  3. There are nn kinds of cards in total. Each kind appears with probability 1n\dfrac{1}{n}.

  4. Once you've pulled all nn kinds, you stop pulling.

  5. In the game, if you pull an already-owned card 10 times, the next one is guaranteed not to be a duplicate, but we'll ignore that here.

Then, on average, how many cards do we need to pull in total to get every kind? In other words, if we let the number of cards we need to pull be the random variable XX, what is (X)\left(X\right)?

Trying to compute it directly feels hopeless. Let's think of an easier way. If we let the random variable YiY_i be the number of pulls it takes to get a new kind of card when you've already collected i−1i-1 kinds, we can think of it as X=Y1+Y2+Y3+…+YnX = Y_1 + Y_2 + Y_3 + \ldots + Y_n.

 

 

This way, P(Yi=k)P\left(Y_i = k\right) means that, having already pulled i−1i-1 kinds, you pulled a new kind on the kk-th pull. So for k−1k-1 pulls you got one of the i−1i-1 kinds you already had, and on the last one you got one of the n−(i−1)n-\left(i-1\right) remaining kinds. That is,

P(Yi=k)=(i−1n)k−1(1−i−1n)P\left(Y_i = k\right) = {\left(\dfrac{i-1}{n}\right)}^{k-1}{\left(1-\dfrac{i-1}{n}\right)}

Now that we have a formula, we can find the expected number of pulls needed to get a new kind of card when there are i−1i-1 kinds. Theoretically, you might never get a new kind even after infinitely many pulls, so kk can effectively range from 1 to infinity. Therefore,

E(Yi)=∑k=1∞kP(Yi=k)E\left(Y_i\right) =\sum_{k=1}^{\infty} kP\left(Y_i = k\right)


=∑k=1∞k(i−1n)k−1(1−i−1n)=\sum_{k=1}^{\infty} k{\left(\dfrac{i-1}{n}\right)}^{k-1}{\left(1-\dfrac{i-1}{n}\right)}

The expression is messy, so let's substitute i−1n=r\dfrac{i-1}{n} = r and keep going:

=∑k=1∞krk−1(1−r)=\sum_{k=1}^{\infty} k{r^{k-1}{\left(1-r\right)}}


=(1−r)∑k=1∞krk−1=\left(1-r\right)\sum_{k=1}^{\infty} kr^{k-1}

Here, since rr is less than 1, the power series above can be computed using the sum of an infinite geometric series. Differentiating both sides of the identity ∑k=1∞rk=11−r\sum_{k=1}^{\infty} r^{k} = \dfrac{1}{1-r} with respect to rr gives ∑k=1∞krk−1=1(1−r)2\sum_{k=1}^{\infty} kr^{k-1} = \dfrac{1}{{\left(1-r\right)}^2}, and using this to simplify,

E(Yi)=(1−r)1(1−r)2E\left(Y_i\right) = \left(1-r\right)\dfrac{1}{{\left(1-r\right)}^2}


=11−r= \dfrac{1}{1-r}

we get a pretty simple formula. Finally, substituting r=i−1nr = \dfrac{i-1}{n} back in and simplifying,

E(Yi)=nn−i+1E\left(Y_i\right) = \dfrac{n}{n-i+1}

is what we get.

At the start we split XX into nn YiY_is, so we can write X=∑i=1nYiX = \sum_{i=1}^{n} Y_i. By the definition of expected value mentioned earlier,

E(X)=E(∑i=1nYi)=∑i=1nE(Yi)E\left(X\right) = E\left(\sum_{i=1}^{n} Y_i\right) = \sum_{i=1}^{n} E\left(Y_i\right)

so substituting E(Yi)=nn−i+1E\left(Y_i\right) = \dfrac{n}{n-i+1},

E(X)=∑i=1nnn−i+1E\left(X\right) = \sum_{i=1}^{n} \dfrac{n}{n-i+1}

is what we get. If we now substitute u=n−i+1u = n-i+1, i.e. i=n−u+1i = n-u+1, the range of ii from 1 to nn becomes the range of uu from nn to 1, and since a sigma gives the same result even with the range reversed, the formula becomes

E(X)=∑u=n1nu=n∑u=1n1uE\left(X\right) = \sum_{u=n}^{1} \dfrac{n}{u} = n\sum_{u=1}^{n} \dfrac{1}{u}

There's no other way to simplify ∑u=1n1u\sum_{u=1}^{n} \dfrac{1}{u}, so let's be satisfied here and leave it to Wolfram|Alpha.

Applying it

Now all that's left is plugging in numbers! Suppose a card set has 31 cards in total and cards only come from those 31. Then when n=31n = 31, E(X)E\left(X\right) is

E(X)=31∑u=1311u ≈124.84460E\left(X\right) =31\sum_{u=1}^{31} \dfrac{1}{u} \approx 124.84460

which means you can collect every card by putting in about 124,845 won! Of course, in the actual game, pulling an already-owned card 10 times guarantees the next one isn't a duplicate, and since we ignored that, the number does feel noticeably inflated.

Producing every idol – with rarity weighting

But many games aren't that easy on you. That's because they assign probabilities to rarities too.

An SSR envelope from THE IDOLM@STER CINDERELLA GIRLS STARLIGHT STAGE.

A prime example is THE IDOLM@STER CINDERELLA GIRLS STARLIGHT STAGE, which has cards in 4 rarities: Normal, Rare, S Rare, and SS Rare. It's a rhythm game where you form a unit of 5 idols, and SS Rare idols have much higher total appeal stats, which directly affect your score, and much better skills too. A deck of 5 SS Rares scores far better than a deck of 5 S Rares, so SS Rare idols are essential if you want high scores. And most decisively, the illustrations are really pretty, which triggers the urge to collect them.

However, the game announces that the chance of getting an SSR is 1.5%. That means 98.5% are S Rare or lower. So how much money do you need to get every SSR idol?

Let's make a few assumptions.

  1. Scouting an idol once takes 250 Star Jewels. 0.85 Star Jewels cost 1 yen.

  2. Idols are scouted one at a time, and you memorize the idol's name before scouting the next one.

  3. There are nn SS Rare idols in total. Within the rarity, each idol appears with probability 1n\dfrac{1}{n}. Limited idols are not treated as limited.

  4. The probability of an SS Rare idol appearing is pp.

  5. Once you've scouted all nn SS Rare idols, you stop scouting.

Like we did for SOUND VOLTEX, let's split the random variable XX into nn YiY_is. But this time, we don't consider non-SSR idols. As before, P(Yi=k)P\left(Y_i = k\right) means that, having scouted i−1i-1 idols, you scouted a new idol on the kk-th try. For k−1k-1 tries you got one of the i−1i-1 SSR idols you already had or an SR-or-lower idol, and on the last one you got one of the n−(i−1)n-\left(i-1\right) SSR idols you haven't scouted yet.

Here, the probability of scouting one of the n−(i−1)n-\left(i-1\right) remaining SSR idols is p(1−i−1n)p\left(1-\dfrac{i-1}{n}\right). Scouting one of the i−1i-1 SSR idols you already had or an SR-or-lower idol covers every case except scouting one of the n−(i−1)n-\left(i-1\right) SSR idols you haven't gotten yet, so its probability is 1−p(1−i−1n)1 - p\left(1-\dfrac{i-1}{n}\right). Therefore,

P(Yi=k)=(1−p(1−i−1n))k−1(p(1−i−1n))P\left(Y_i = k\right) = {\left(1 - p\left(1-\dfrac{i-1}{n}\right)\right)}^{k-1}{\left(p\left(1-\dfrac{i-1}{n}\right)\right)}

To make it easier to compute, let p(1−i−1n)=sp\left(1-\dfrac{i-1}{n}\right) = s:

P(Yi=k)=(1−s)k−1(s)P\left(Y_i = k\right) = {\left(1 - s\right)}^{k-1}{\left(s\right)}

Letting 1−s=r1-s=r,

P(Yi=k)=rk−1(1−r)P\left(Y_i = k\right) = r^{k-1}{\left(1-r\right)}

we get exactly the same form as last time. The only difference is the expression inside rr.

Again, theoretically it might never show up even after infinitely many pulls, so doing the same calculation as before,

E(Yi)=11−r=1sE\left(Y_i\right) = \dfrac{1}{1-r} = \dfrac{1}{s}


=np(n−i+1)= \dfrac{n}{p\left(n-i+1\right)}

is what we get. Computing E(X)E\left(X\right) as well,

E(X)=∑i=1nnp(n−i+1)E\left(X\right) = \sum_{i=1}^{n}\dfrac{n}{p\left(n-i+1\right)}


=1pn∑i=1n1(n−i+1)= \dfrac{1}{p}n\sum_{i=1}^{n}\dfrac{1}{\left(n-i+1\right)}


so, just like the earlier computation with ∑i=1n1(n−i+1)=∑u=1n1u\sum_{i=1}^{n}\dfrac{1}{\left(n-i+1\right)} = \sum_{u=1}^{n}\dfrac{1}{u},

E(X)=np∑u=1n1uE\left(X\right) = \dfrac{n}{p}\sum_{u=1}^{n}\dfrac{1}{u}

is what we get. So we can see that the expected value is inversely proportional to the appearance rate.

Applying it

According to a site called Deresute SSR Ownership Rate, there are currently (August 13, 2017) 127 SSR idols in total (70 regular, 57 limited). Also, since the SSR rate is 1.5%, p=3200p = \dfrac{3}{200}.

Ignoring limited idols and assuming all 127 can come out of the gacha, when n=127n = 127,

E(X)= 200×1273∑u=11271uE\left(X\right) = \dfrac{200\times 127}{3}\sum_{u=1}^{127}\dfrac{1}{u}

≈200×1273×5.4253346≈45934.5\approx\dfrac{200\times 127}{3}\times 5.4253346\approx45934.5

so on average you'd need 11,483,625 Star Jewels, which, going by the efficiency by purchase amount, means you can collect every SSR idol by spending 13,353,052 yen on average (≈\approx 135 million won).

On the other hand, if we only consider the 70 regular idols, when n=70n = 70,

E(X)= 200×703∑u=1701uE\left(X\right) = \dfrac{200\times 70}{3}\sum_{u=1}^{70}\dfrac{1}{u}

≈200×703×4.8328368≈22553.2\approx\dfrac{200\times 70}{3}\times 4.8328368\approx22553.2

so in this case you need 5,638,300 Star Jewels. Therefore, you can collect all the regular SSR idols by spending 6,633,294 yen on average (≈\approx 67.0 million won).

A Cinderella Fes limited idol, SSR Miku Maekawa. A single idol usually appears on multiple cards.

During the Cinderella Fes at the end of June, the SSR rate was fixed at 3%. In that case p=3100p = \dfrac{3}{100}, so if you only pull during Fes periods, since the cost is inversely proportional to the appearance rate, you can now expect to scout everyone for half the prices listed above.

There are also ways to get Star Jewels besides paying, though they're a pretty small fraction compared to the amount you need, so taking those into account it might cost less than the prices above.

Getting every hero – considering rarity weighting and purchase-only characters

Crusaders Quest, a game where heroes have ranks, but from 4★ up you can promote them, so to fill your collection you'd actually rather get 4★ heroes than 5★ or higher

Crusaders Quest is an unusual game. Excluding "Legendary Heroes," which can't be obtained from the gacha, 1–3★ heroes are classified as "Normal Heroes" and 4–6★ as "Advanced Heroes." Heroes having ranks is no different from other games, but with a bit of effort heroes can be promoted to a higher rank. Promotions into 2–4★ are completely random, but promotions into 5–6★ are fixed. For example, the 3★ Gacha Ranger B can promote into the 4★ Violet, but once she's the 4★ Violet, promoting her always gives the 5★ Puppeteer Violet and then the 6★ Magic Puppeteer Violet.

The Legendary Hero "Chick." You get it as soon as you start the game.

But Advanced Heroes are further divided into "Promotion Heroes" and "Contract-only Heroes." Contract-only Heroes come out randomly from the "Golden Contract," which costs 5–6 gems. So how much do you need to get every Contract-only Hero?

The conditions this time are as follows.

  1. We assume heroes are contracted consecutively. Ignoring the price of the first contract, each contract costs 55 gems. 1 gem costs 550 won.

  2. Heroes are contracted one at a time, and you check the hero's name before contracting the next one.

  3. There are nn heroes of 4★ or higher in total. Each hero appears with probability 1n\dfrac{1}{n}. Of these, mm are exclusive heroes.

  4. Once you've contracted all nn kinds of heroes, you stop contracting.

  5. In the game, contracting 10 at a time guarantees the last one is 4★ or higher, but we won't consider that here.

  6. In the game, certain heroes get boosted contract rates for limited periods, but we won't consider that here.

Earlier, the expected value for scouting all nn idols of a rarity with probability pp was

E(X)=np∑u=1n1uE\left(X\right) = \dfrac{n}{p}\sum_{u=1}^{n}\dfrac{1}{u}

If we treat "all Contract-only Heroes" as yet another rarity within 4–6★, the probability of contracting a Contract-only Hero within 4–6★ is mn\dfrac{m}{n}, so without any more complicated calculation, the expected number of contracts to get every Contract-only Hero is

E(X)=nmnp∑u=1m1uE\left(X\right) = \dfrac{n}{\dfrac{m}{n}p}\sum_{u=1}^{m}\dfrac{1}{u}

=n2mp∑u=1m1u= \dfrac{n^2}{mp}\sum_{u=1}^{m}\dfrac{1}{u}

There we go.

Applying it

The probability of getting a 4★ or higher hero from a Golden Contract is 19%. Also, according to the hero tier list, Crusaders Quest currently (August 13, 2017) has 43 Promotion Heroes and 58 Contract Heroes, excluding event and Legendary Heroes that can't be obtained from contracts. So setting n=43+58=101n = 43 + 58 = 101, m=58m = 58, p=19100p = \dfrac{19}{100},

E(X)=1012×10058×19∑u=1581uE\left(X\right) = \dfrac{101^2 \times 100}{58 \times 19}\sum_{u=1}^{58}\dfrac{1}{u}

≈1012×10058 ×19×4.646254≈4300.95\approx \dfrac{101^2 \times 100}{58 \times 19} \times 4.646254 \approx 4300.95

so on average you can get every Contract Hero by buying 21,505 gems, i.e. spending 11,827,750 won. Of course, this game has tons of ways to get gems besides paying, and we didn't account for the guaranteed contract heroes, so the actual spending is expected to be much lower than this.

Wrapping up

THE IDOLM@STER CINDERELLA GIRLS STARLIGHT STAGE, a prime example of a game where randomized items are a key part of progressing. Sure, it might be better to spend this money on something else, but if you spend it on a car, at least the car won't dance and sing for you.

I expected large values going into the calculations, but I was really surprised when the numbers came out way beyond what I'd expected.

Especially for THE IDOLM@STER CINDERELLA GIRLS STARLIGHT STAGE, after calculating that collecting every idol takes tens of millions of won on average, you might think you'd be better off buying a car. But then again, a car won't dance and sing, so I think it has its own meaning.

Finally, none of the games mentioned require you to collect every character to progress without much trouble, so unless you're planning to collect them all, please just take these prices as "wow, the numbers get this big."

3 comments

  1. 익명

    잘봤습니다.

  2. Undefined control sequence \dfrac 뜨는데 확률좀 보게 해주세요 ㅋㅋ

    1. Park SuhyunAuthor

      고쳤습니다.