Jump to content

Relation?


Michdd

Recommended Posts

Not easy to work out with just 3 data points.... a few more would be useful.

 

Linear:

y = 757.5 * x + -660

    Goodness of fit (R2) = 0.985794356397

Exponential

y = 51.5465109855 * 3.33166624979^x

    Goodness of fit (R2) = 0.922426601723

Logarithmic

y = 1323.72896595 * ln(x) + 64.3986968534

    Goodness of fit (R2) = 0.929101044641

Power

y = 153.313222805 * x^2.20500567242

    Goodness of fit (R2) = 0.994945588215

Link to comment
Share on other sites

1 - 150.00015

2 - 651.99795

3 - 1568.99168

4 - 2971.98848

 

From those figures, it's a power series:

 

Y = 148.771289841 + X^2.15106867905

    Goodness of fit (R2) = 0.999654455365

 

5 -> 4742.98348305

6 -> 7020.62717237

7 -> 9780.99536149

8 -> 13035.5005931

9 -> 16794.2379656

10 -> 21066.2778238

 

Link to comment
Share on other sites

1 - 150.00015

2 - 651.99795

3 - 1568.99168

4 - 2971.98848

 

From those figures, it's a power series:

 

Y = 148.771289841 + X^2.15106867905

    Goodness of fit (R2) = 0.999654455365

 

5 -> 4742.98348305

6 -> 7020.62717237

7 -> 9780.99536149

8 -> 13035.5005931

9 -> 16794.2379656

10 -> 21066.2778238

I'm not quite to sure how that works.. Are you just plugging the number into the equation Y = 148.771289841 + X^2.15106867905 as X and getting Y? Because then that doesn't make sense..

Link to comment
Share on other sites

I'm not quite to sure how that works.. Are you just plugging the number into the equation Y = 148.771289841 + X^2.15106867905 as X and getting Y? Because then that doesn't make sense..
To get the next values in the series, yes!

You wanted the formula for the relationship between Level and Total EXP.

 

That formula is:

Total EXP = 148.771289841 + Level^2.15106867905

 

The trick was deriving the formula from the 4 data points in the series that you provided; but the work I'm currently doing is a package of classes for linear and non-linear regression... for calculating a best-fit formula from a series of data values.

Link to comment
Share on other sites

I'm not quite to sure how that works.. Are you just plugging the number into the equation Y = 148.771289841 + X^2.15106867905 as X and getting Y? Because then that doesn't make sense..
To get the next values in the series, yes!

You wanted the formula for the relationship between Level and Total EXP.

 

That formula is:

Total EXP = 757.5 * Level - 660

 

The trick was deriving the formula from the 4 data points in the series that you provided; but the work I'm currently doing is a package of classes for linear and non-linear regression... for calculating a best-fit formula from a series of data values.

That still doesn't make sense. For example if I plug 10 into there I get 6915

Link to comment
Share on other sites

Total EXP = 757.5 * Level - 660

 

That still doesn't make sense. For example if I plug 10 into there I get 6915

Formula should have read:

 

Total EXP = 148.771289841 + Level^2.15106867905

 

I'm using the same test script with multiple regressions -Linear, Logarithmic, Exponential and Power - to work out a best fit for each, and I had this Level/Experience data on a page with my own test data as well... and I cut and pasted the wrong one.

Link to comment
Share on other sites

I feel really stupid. But I'm confused... For example:

148.771289841 + (10^2.15106867905) = 290.373059

You're right, I've gone wrong again.

Multiplication rather than addition for power values:

 

Total EXP = 148.771289841 * Level^2.15106867905

 

 

 

If by power you mean exponential, that's not exponential.

 

Exponential: f(x) = x^a +c, x != 1

Link to comment
Share on other sites

If by power you mean exponential, that's not exponential.

No, I do mean a power regression.

With a power regression, you apply the log to both the X and Y values before doing the least square fitting.

 

For an exponential regression, you apply the log only to the Y values before doing the least square fitting.

And the equation for an Exponential regression is

    Y = 70.2572663284 * e(2.67438587323 * X)

And I get a Goodness of fit (R2) of 0.899797719361 for an exponential regression

 

I know that it's definitely a power regression, which gives a Goodness of fit (R2) of 0.999654455365

 

 

Link to comment
Share on other sites

I feel really stupid. But I'm confused... For example:

148.771289841 + (10^2.15106867905) = 290.373059

You're right, I've gone wrong again.

Multiplication rather than addition for power values:

 

Total EXP = 148.771289841 * Level^2.15106867905

 

 

 

If by power you mean exponential, that's not exponential.

 

Exponential: f(x) = x^a +c, x != 1

 

 

x^a should have been a^x, a != 1 x.x.

 

 

 

If by power you mean exponential, that's not exponential.

No, I do mean a power regression.

With a power regression, you apply the log to both the X and Y values before doing the least square fitting.

 

For an exponential regression, you apply the log only to the Y values before doing the least square fitting.

And the equation for an Exponential regression is

    Y = 70.2572663284 * e(2.67438587323 * X)

And I get a Goodness of fit (R2) of 0.899797719361 for an exponential regression

 

I know that it's definitely a power regression, which gives a Goodness of fit (R2) of 0.999654455365

 

 

 

 

 

Hrmm just never heard of a power function before.

 

 

Guess it would be any function in which the highest power is greater 1 (or the absol value) and the base of that power is the value passed to the function.

 

 

Edit:  Guess power is like an "n-th" version of a quadratic, or cubic or whatever ;p.

Link to comment
Share on other sites

Hrmm just never heard of a power function before.

 

 

Guess it would be any function in which the highest power is greater 1 (or the absol value) and the base of that power is the value passed to the function.

It's one of the standard trends available within MS Excel (Linear, Exponential, Logarithmic, Power, Rolling Average and Polynomial). Sometimes also known as Log-log regression.

 

A useful reference is Least Squares Fitting - Power Law at Wolfram Mathworld, which is where I got most of the math for my own PHP implementation.

Link to comment
Share on other sites

Just for luck (I've just got polynomial regression working), a 3rd Order polynomial regression gives a 100% fit.... remembering that this is derived from only 4 data points in the series.

 

The coefficients are:

    -8.00886

    9.68366166667

    136.490825

    11.8345233333

Giving

    Y = -8.00886 + 9.68366166667 * X + 136.490825 * X^2 + 11.8345233333 * X^3

    EXP = -8.00886 + 9.68366166667 * Level + 136.490825 * Level^2 + 11.8345233333 * Level^3

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.