# Make equation from data set

• Jun 28th 2011, 03:48 AM
PellePiraten
Make equation from data set
Greetings math-people!

(I was not sure where to post this, hope it is not the wrong sub-forum)

I have a data-set and I am trying to make an equation out of it. Specifically, I have a distance-sensor and have measured readings at different distances. (Below is my data set.) The reading is about halved when the distance is doubled. What sort of equation does this correspond to? My stomach feeling says the answer is simple, but my creativity is a bit low at the time...

Thanks a lot for helping me out! (Hi)

25cm::205
50cm::105
75cm::73
100cm::53
125cm::43
150cm::36
175cm::29
200cm::26

PS: I am aware that the sensor readings are a bit crappy. I made the sensor myself from two laser beams and a camera. The readings are camera image pixels between the laser beams.
• Jun 28th 2011, 03:51 AM
Prove It
Re: Make equation from data set
Have you tried plotting the data on a scatterplot to at least get an idea of what function might be best for the data?
• Jun 28th 2011, 03:57 AM
PellePiraten
Re: Make equation from data set
Yes. As I said, the reading is about halved when the distance is doubled. So if distance is "x" and reading is "y": y converges towards infinity when x goes towards zero, and towards zero when x goes towards infinity. In between these extremes, the scatterplot would look like a curve

EDIT: I plotted it at wolfram alpha:
EDIT2: link did not work. but you can see it by going to Wolfram|Alpha: Computational Knowledge Engine and typing in
{25, 205},{50, 105},{75, 73},{100, 53},{125, 43},{150, 36},{175, 29},{200, 26}
• Jun 28th 2011, 03:58 AM
PellePiraten
Re: Make equation from data set
And I forgot to thank you for the quick reply! thanks! :D
• Jun 28th 2011, 04:02 AM
TKHunny
Re: Make equation from data set
What tools have you for this project? Excel and a quick Power Series Trendline might be good.
• Jun 28th 2011, 04:08 AM
PellePiraten
Re: Make equation from data set
Thanks. I will try it in Excel. I also have matlab available.
• Jun 28th 2011, 04:13 AM
PellePiraten
Re: Make equation from data set
Wow. That worked really well. Excel came up with 5173,6X^-0,9986. Fits my data perfectly :D
• Jun 28th 2011, 04:18 AM
Prove It
Re: Make equation from data set
This is what I get using a Power Regression on my CAS...

http://i22.photobucket.com/albums/b3...regression.jpg
• Jun 28th 2011, 02:13 PM
TKHunny
Re: Make equation from data set
And look at thst lovely exponent. This is very consistent with doubling d and halving r. Intuition is good, today.