PC Wealth Table formula - help me!

Thanks folks, I knew that it was something. I know that it can't be calculated exactly, I'm just trying to get something close.

Quadratic expressions, hmmm, don't know anything about those. Look out search engines, here I come again!

Thanks again, I'll let you know what I come up with.
 

log in or register to remove this ad


You think your's hurts? I'm trying to learn about logarithims and quadratic equations while I'm trying to figure this out:eek: :heh: ! Gods, I love Math! (What a geeky statement that was.)


Excuse me, I need to take a Motrin (or 2).
 

brief tutorial

OK, suppose you've gotten some increasing function. Increasing means that the bigger x is (the number you plug in), the bigger y is (the number you get out).

It might be a power function: y=x, y=x^2, y=x^3, y=x^4, and so forth. These form a hierarchy. The higher the exponent, the faster the function grows. Now sometimes we talk more generally about linear growth, quadratic growth, cubic growth, quartic growth, etc. That means a function that looks somewhat like x, x^2, x^3, x^4 respectively. A quadratic function might not be x^2, it might be 10000*x^2. But it amounts to (almost) the same thing. If you multiply by a constant, you're not moving up the hierarchy, you're staying at the same level. If you compare, say, x^3 to 10000*x^2, the factor of 10000 makes the latter much bigger for small values of x. But once x gets big enough, x^3 is going to be much bigger. That's why we consider it a higher level of the hierarchy.

You might also tack a smaller term on. It's basically the biggest term that tells you where in the hierarchy you are. y=x^2+500x+20 is quadratic, because the x^2 term is the biggest -- it basically controls the approximate size of the function when x gets big.

If you're looking for a moderately simple function to approximate some data, you can probably get away with making it a single-term function. If you have a quadratic function, just assume it's y=b*x^2, no smaller terms. If cubic, y=b*x^3, no smaller terms. The smaller terms, if they exist, probably don't have that much effect, at least for large x. (For small x, they may make a much bigger difference).

So if you think your function is anywhere in this hierarchy, think of it as y=b*x^n. The task then is to find b and n that most closely approximate your data.

Now, your function might be somewhere above this whole hierarchy -- growing faster than x^2, faster than x^3, faster than x^10000. An example is an exponential function: y=2^x, y=3^x, y=10^x, etc. A lot of students confuse exponential functions (the base is constant, the variable is the exponent) with power functions (the exponent is constant, the variable is the base). There's a huge difference. Any exponential function eventually grows much faster than any power function.

The flip side (the technical term is "inverse") of an exponential function is a logarithm function. If y=10^x, then x=log(y). The inverse of a power function is another power function; e.g., if y=x^2 then x=y^0.5. Note that the faster a function grows, the slower its inverse grows. So logarithm functions grow slower than x, slower than x^0.5 (square root of x), slower even than x^0.000001.

So you have some data and want to find a function to fit it. First thing is, decide where in the hierarchy the function belongs. One thing you might do is to look at differences between successive terms. If you have any power function, its differences will give you a power function of one lower degree. If the differences are constant, you have a linear function. For example, the sequence 1,3,5,7,9,... gives you differences 2,2,2,2,2,..., so it's linear. If you have a quadratic function like 1,4,9,16,25,..., the differences are linear (in this case 1,3,5,7,...). So the differences of the differences are constant. With a cubic sequence, the differences of the differences of the differences are constant. And so forth.

On the other hand, if you have an exponential sequence, its differences will give you... another exponential sequence. For example, the sequence 1,2,4,8,16,... has differences 1,2,4,8,... So no matter how often you take differences, you don't stop seeing the growth rate.

The way to recognize an exponential sequence is by looking at the ratio of successive terms. In the sequence 1,2,4,8,... if you divide two consecutive terms you get a ratio of 2. So the sequence is something like y=2^x. If the ratios between consecutive terms is constant, you're looking at an exponential function. On the other hand, try dividing consecutive terms of a power sequence, and you'll find the ratios get smaller and smaller, until they're almost 1. In other words, power functions don't grow nearly as fast as exponential functions.
 

If this is for some character generator, you could always plug in the hard values manualy with if statements into excel or something of that nature.
 

I puzzled it out once for the NPC gear value. In all but the first few level, (level X wealth) is (level X-2 wealth)×1.7, rounded to the nearest number so that there's always at most two significant numbers. It only really starts to work at level 5, though.

Maybe it's the same thing for PC wealth. Doesn't follow the same formula consistantly.
Code:
Level  PC Wealth / NPC Wealth
 1st:                    900
 2nd:      900         2 000
 3rd:    2 700         2 500
 4th:    5 400         3 300
 5th:    9 000         4 300
 6th:   13 000         5 600
 7th:   19 000         7 200
 8th:   27 000         9 400
 9th:   36 000        12 000
10th:   49 000        16 000
11th:   66 000        21 000
12th:   88 000        27 000
13th:  110 000        35 000
14th:  150 000        45 000
15th:  200 000        59 000
16th:  260 000        77 000
17th:  340 000       100 000
18th:  440 000       130 000
19th:  580 000       170 000
20th:  760 000       220 000
 

Treasure Values per Encounter is also quite irregular.

Code:
 1st    300 +    300
 2nd    600 +    300 +     0
 3rd    900 +    300 +     0
 4th  1,200 +    300 +     0
 5th  1,600 +    400 +   100
 6th  2,000 +    400 +     0
 7th  2,600 +    600 +   200
 8th  3,400 +    800 +   200
 9th  4,500 +  1,100 +   300
10th  5,800 +  1,300 +   200
11th  7,500 +  1,700 +   400
12th  9,800 +  2,300 +   600
13th 13,000 +  3,200 +   900
14th 17,000 +  4,000 +   800
15th 22,000 +  5,000 + 1,000
16th 28,000 +  6,000 + 1,000
17th 36,000 +  8,000 + 2,000
18th 47,000 + 11,000 + 3,000
19th 61,000 + 14,000 + 3,000
20th 80,000 + 19,000 + 5,000

Bye
Thanee
 

least squares regression

I did a quick least squares regression on the wealth by level.
It looks like a powers function with x^5 being the highest.

Dependent Variable: Y
Method: Least Squares
Date: 06/13/05 Time: 16:53
Sample(adjusted): 2 20
Included observations: 19 after adjusting endpoints

Variable Coefficient Std. Error t-Statistic Prob.

X_5 1.067607 0.180215 5.924083 0.0001
X_4 -39.18063 9.946498 -3.939138 0.0017
X_3 633.6522 203.6772 3.111061 0.0083
X_2 -4388.632 1896.720 -2.313800 0.0377
X 15793.35 7815.995 2.020645 0.0644
C -18415.63 10993.36 -1.675160 0.1178

R-squared 0.999930 Mean dependent var 166105.3
Adjusted R-squared 0.999903 S.D. dependent var 218371.0
S.E. of regression 2152.316 Akaike info criterion 18.43857
Sum squared resid 60222008 Schwarz criterion 18.73681
Log likelihood -169.1664 F-statistic 37055.28
Durbin-Watson stat 1.827239 Prob(F-statistic) 0.000000


I hope this helps.

Paul
 

Well, in general, the formula to express the table precisely will probably be more complicated, than just writing down the table itself. ;)

Bye
Thanee
 

True, Thanee, True. But I love the challange and I really think I'm close.


Exponential function, hmmmm. Here we go again. WoooHoooo! Gods, I'm such a geek!

ROFLMAOTID!:lol: !!!!!!!!!!!!:lol: !
Thanks guys, you've given me food for thought and new avenues for search. Now, where did I put that Motrin?
 

Remove ads

Top