Your math seem off here, 4 C gives you a 19% chance of getting one level on an S, that seems pretty far from average. Same thing with your A example, 2 C's will give you a 33% chance of gaining one level up for an A, again not really average.
We are both wrong, but I was close, just messed up on one detail.
You're not looking for the probability of getting the level up
on the 4th C. You're looking for the probability of getting the level up
by the 4th C. You can't ignore the probability that you will get it on the 1st, 2nd, or 3rd.
Independently, the probabilities look like this:
1st C - 10% success, 90% failure
2nd C - 13% success, 87% failure
3rd C - 16% success, 84% failure
4th C - 19% success, 81% failure.
The probability of
not getting the skillup after 4 Cs is therefore (0.9)(0.87)(0.84)(0.81) = 53.28%, and thus the probability of getting the skillup on or before the 4th C is therefore 1 - .5328 = 46.7%
Anyway, my mistake was that I used the 50% point as the expected value. This isn't correct. Instead you need to look at the independent probability of getting the skillup only exactly the N'th attempt, for every value of N, and then sum the products of each of those probabilities with the corresponding N.
A few such values are:
On the 1st C - 10%
On the 2nd C - 11.7%
On the 3rd C - 12.53%
On the 4th C - 12.5%
On the 5th C - 11.72%
On the 6th C - 10.39%
As you can see this is kind of like a lognormal distribution, which makes sense given the multiplicative effect of successive trials.
If you do this for all possible values of N and sum over this, this gives an expected # of attempts of 5.23 using C's to skillup an S
So we can say that on average, it takes about 31 Cs to max an S