ATOT Math Wiz's needed

Accipiter22

Banned
Feb 11, 2005
7,942
2
0
alright, I have 2 constants, A and B

I need a formula such that:

if A=0 then B=2.5
if A=1 then B=4
if A=2 then B=5

any ideas? it would be easy if it was "if A=0 then B=3" because then I could just say B-3=A.
Unfortunately that's not the case...any ideas? Multipication and division may be used, not just addition and subtraction.
 

sao123

Lifer
May 27, 2002
12,653
205
106
Originally posted by: Accipiter22
alright, I have 2 constants, A and B

I need a formula such that:

if A=0 then B=2.5
if A=1 then B=4
if A=2 then B=5

any ideas? it would be easy if it was "if A=0 then B=3" because then I could just say B-3=A.
Unfortunately that's not the case...any ideas? Multipication and division may be used, not just addition and subtraction.


Your equation is quadratic in form (possibly a nth root problem)
in any case, it would be beneficial with a few more data points.
 

chuckywang

Lifer
Jan 12, 2004
20,133
1
0
Originally posted by: Accipiter22
alright, I have 2 constants, A and B

I need a formula such that:

if A=0 then B=2.5
if A=1 then B=4
if A=2 then B=5

any ideas? it would be easy if it was "if A=0 then B=3" because then I could just say B-3=A.
Unfortunately that's not the case...any ideas? Multipication and division may be used, not just addition and subtraction.

I'm not sure what you mean by the bolded part. Can we add/subtract numbers, but not functions of A?

By the way, since you have three points, a simple quadratic would work as your function.
 

BigJ

Lifer
Nov 18, 2001
21,330
1
81
The quadratic regression is y = a x^2 + b x +c
where: a = -0.25
b = 1.75
and c = 2.5
The error is: 0.0
 

SaturnX

Diamond Member
Jul 16, 2000
3,415
0
76
Interpolating the three values, using the Vandermonde method gives:

B = 2.5 + 1.75A - 0.25A^2

It meets the requirements you specified.

 

Accipiter22

Banned
Feb 11, 2005
7,942
2
0
FAHK.....just re-read this thing......A is an ammount of points awarded, based on B......
So A is dependant on B.....I can't use that formula you guys came up with
 

DrPizza

Administrator Elite Member Goat Whisperer
Mar 5, 2001
49,601
167
111
www.slatebrookfarm.com
With 3 points, you can always do a parabola and have it perfectly fit the data...

I see BigJ and Saturn posted the coefficients.

Probably the simplest procedure to understand is using the equation y=ax^2+bx+c, pluging in the 3 points, yielding 3 equations and 3 unknowns a,b,c.


Of course, there's another answer which would be a sideways oriented parabola... :)
And, if you really want, you can use a rotated parabola.
 

Accipiter22

Banned
Feb 11, 2005
7,942
2
0
I don't know how to do that though, that's the point.........B could be any number from 0.0-7.0. "A" is the amount of points awarded, based on B. I was given those 3 examples, and I have to come up with the formula used to get the numbers in that example.