Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2011-07-04 00:18:17

Old_Trafford
Member
Registered: 2011-07-04
Posts: 44

Finding the equation from a set of numbers

Hello all,

nice to join this forum.

I have a question about maths. I want to create an equation from data values. The equation should be something like A=B+k*C
I have a set of values for A, B and C and i want to connect them in order to find k. Which software should i use for that?

Thank you very much.

Offline

#2 2011-07-04 00:19:26

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Finding the equation from a set of numbers

Hi Old_Trafford;

Welcome to the forum!

Paste the data into a post and I will fit it for you.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#3 2011-07-04 00:20:49

Old_Trafford
Member
Registered: 2011-07-04
Posts: 44

Re: Finding the equation from a set of numbers

Hello Mr. BobbyM

the data is huge and i cannot post it. Can you please tell me a methodology, so i can do it in the future again?

Thank you very much!

Offline

#4 2011-07-04 00:26:05

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Finding the equation from a set of numbers

Hi;

You will need a program to do the fit for you. That would mean learning a complicated program.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#5 2011-07-04 00:27:14

Old_Trafford
Member
Registered: 2011-07-04
Posts: 44

Re: Finding the equation from a set of numbers

Can you please suggest a program? I am good at learning software, and i would like to learn one powerful program.

If you cannot tell me a program here, please ''private message'' me.

Offline

#6 2011-07-04 00:28:40

Old_Trafford
Member
Registered: 2011-07-04
Posts: 44

Re: Finding the equation from a set of numbers

I know how to use Matlab and Mathematica, but only for specific jobs. Can any of those two do the job?

Offline

#7 2011-07-04 00:29:41

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Finding the equation from a set of numbers

R should be able to do it. Sage can do it.

Mathematica, Maple and Derive can do it easily but they cost money.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#8 2011-07-04 00:31:44

Old_Trafford
Member
Registered: 2011-07-04
Posts: 44

Re: Finding the equation from a set of numbers

Which program would you use to do it for me before?

Is it easy to tell me the method so that i can do it?

We already own mathematica, and the other two are free(R and Sage).

Offline

#9 2011-07-04 00:37:21

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Finding the equation from a set of numbers

Curve fitting requires you solve a big set of simultaneous equations at the very least. If you have a lot of data it can not be done by hand. I would use Mathematica or Maple because I am familiar with them.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#10 2011-07-04 00:38:05

Old_Trafford
Member
Registered: 2011-07-04
Posts: 44

Re: Finding the equation from a set of numbers

Can you please tell me how to do it in Mathematica?

Offline

#11 2011-07-04 00:45:12

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Finding the equation from a set of numbers

It is a single command:

This is some mock data:

data={{1,3,8},{2,5,13},{3,8,17}}

Fit[data,{1,b,c},{b,c}]

This is the result.

a= 7 b- c+4


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#12 2011-07-04 00:53:39

Old_Trafford
Member
Registered: 2011-07-04
Posts: 44

Re: Finding the equation from a set of numbers

Thank you very much, i will try it now and see if it worked.

Thanks for your time

Offline

#13 2011-07-04 00:57:50

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Finding the equation from a set of numbers

It will be a little bit more complicated then that, You will have to do some alignment with your data. Come back if you have a problem.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#14 2011-07-04 00:59:00

Old_Trafford
Member
Registered: 2011-07-04
Posts: 44

Re: Finding the equation from a set of numbers

ΟΚ i will try and come back if any problems occur

Offline

#15 2011-07-04 01:03:09

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Finding the equation from a set of numbers

Hope it goes okay. But if not I will try to help.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#16 2011-07-07 03:42:50

Old_Trafford
Member
Registered: 2011-07-04
Posts: 44

Re: Finding the equation from a set of numbers

I get this message:

Fit::fitd:  First argument {{5.463`,5.271`},{2,5,13},{3,8,17}} in Fit is not a list or a rectangular array.

Can you imagine what is problem?

I have the excel file and i could send it to you, so you can also try to do it(if you have available time).

Offline

#17 2011-07-07 03:49:38

Old_Trafford
Member
Registered: 2011-07-04
Posts: 44

Re: Finding the equation from a set of numbers

508.463    29.8554    33.3831
515.271    29.8752    33.5417
522.866    29.9544    33.6408
A                B              C


The first column is 3 values of A, the second is three values of B and the third is three values of C

Offline

#18 2011-07-07 03:53:48

Old_Trafford
Member
Registered: 2011-07-04
Posts: 44

Re: Finding the equation from a set of numbers

how am i supposed to enter these into mathematica?

Offline

#19 2011-07-07 04:00:00

Old_Trafford
Member
Registered: 2011-07-04
Posts: 44

Re: Finding the equation from a set of numbers

I remind you that i want  an equation of this format: A=B+k*C , mainly i want to find k, but from inserting 4000 A,B and C values.

Last edited by Old_Trafford (2011-07-07 04:01:54)

Offline

#20 2011-07-07 04:11:23

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Finding the equation from a set of numbers

Hi;

Give me a second to examine the output.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#21 2011-07-07 04:12:27

Old_Trafford
Member
Registered: 2011-07-04
Posts: 44

Re: Finding the equation from a set of numbers

I could make it on excel, finding a linear connection between A,B and C, but i want to make it a little more complicated. I want to use the multiple correlation coefficient, which would also help me find more accurate values.

Offline

#22 2011-07-07 04:14:25

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Finding the equation from a set of numbers

Hi Old_Trafford;

One problem at a time. I am still looking at your first questions.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#23 2011-07-07 04:15:44

Old_Trafford
Member
Registered: 2011-07-04
Posts: 44

Re: Finding the equation from a set of numbers

Hello! Sorry, take your time.

Offline

#24 2011-07-07 04:16:45

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Finding the equation from a set of numbers

Here is the first problem:

{{5.463`,5.271`},{2,5,13},{3,8,17}}

The first element {5.463`,5.271`} only has two numbers in it.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#25 2011-07-07 04:18:44

Old_Trafford
Member
Registered: 2011-07-04
Posts: 44

Re: Finding the equation from a set of numbers

Alright, thats really bad from my part

Offline

Board footer

Powered by FluxBB