least-square fit in Gnuplot


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers least-square fit in Gnuplot
# 1  
Old 05-18-2009
least-square fit in Gnuplot

Does anyone know how to find the best least square fit in Gnuplot?
# 2  
Old 05-18-2009
# 3  
Old 05-18-2009
Quote:
Originally Posted by jim mcnamara
What if I don't have the function f(x), I mean I have a set of data plotted and I want gnuplot to search any function that fit my data. Is that possible?
# 4  
Old 05-18-2009
Does the question make sense? please let me know if more info are needed ...
# 5  
Old 05-18-2009
No it does not. Here's why:

Least squares can be viewed as a way of fitting data.

In the least-squares sense, the best fit is that instance of the
function for which the sum of squared
residuals has its least value. A residual is the difference
between an observed value and the value given by the function.

Most text books start out using the equation of a line (a function). Do you have
such an equation? I'm guessing no.

I have not done stats for years, but somebody here will know what you need.

Tell us what population you sampled, how many samples you took, the size of the potential population - and what your data are. And the hypothesis you are testing.
# 6  
Old 05-18-2009
Computer

Quote:
Originally Posted by jim mcnamara
No it does not. Here's why:

Least squares can be viewed as a way of fitting data.

In the least-squares sense, the best fit is that instance of the
function for which the sum of squared
residuals has its least value. A residual is the difference
between an observed value and the value given by the function.

Most text books start out using the equation of a line (a function). Do you have
such an equation? I'm guessing no.

I have not done stats for years, but somebody here will know what you need.

Tell us what population you sampled, how many samples you took, the size of the potential population - and what your data are. And the hypothesis you are testing.
Thanks for the reply,
ok, I have 2 sets of data, that are supposed to measure the same thing, but with different methods, which means that ideally the relation would be linear... but my plot shows scattered points all over the place, so I was trying to find a function that fits the larger number of values... does it make sense now? Smilie
# 7  
Old 05-18-2009
I think you want analysis of variance (really the student's 2 sample T test) - you need to prove that the mean of first set of measurements is from the same population as the mean second set of measurements.

If this is true, then the two measurement methods give equal results. If it is not the case then your hypothesis should be rejected - 'the two measurement methods are not the same'

See:
Student's t-test - Wikipedia, the free encyclopedia
 
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Grep final set of parameters from fit.log gnuplot file

I would like to grep the final set of fit parameters from a gnuplot log file to form columns that look like this. a_1001 b_1001 x_1001 a_1002 b_1002 x_1002 a_1003 b_1003 x_1003 . . . . . . . . . a_1250 b_1250 c_1250 At... (8 Replies)
Discussion started by: kayak
8 Replies

2. Shell Programming and Scripting

Delete text between square brackets and also delete those square brackets using sed or awk

Hi All, I have a text file which looks like this: computer programming systems engineering I want to get rid of these square brackets and also the text that is inside these brackets. So that my final text file looks like this: computer programming systems engineering I am using... (3 Replies)
Discussion started by: shoaibjameel123
3 Replies

3. UNIX for Dummies Questions & Answers

Area of a square

I am just starting out with bash scripting. I tried a simple script to find the area of a square and it didnt run. #!/bin/bash #script to find area of a square based on user input if then echo " Usage -$0 x " echo " where x is the dimension of the square " exit 1 n1=$1 ... (2 Replies)
Discussion started by: SnydeMz
2 Replies

4. Linux

relocation truncated to fit

Hi, I am getting linking error i.e. /ade/aime_urtk/oracle/has/include/caa_ResStateListener.hxx:79: relocation truncated to fit: R_PPC_GO T16 vtable for CAA::ResourceStateListener /ade/aime_urtk/oracle/has/lib//libcaad.a(caa_Main.o)(.text+0x88e6): In function `CAA::ResourceStateL... (0 Replies)
Discussion started by: jgobbur
0 Replies

5. Programming

relocation truncated to fit errors

I have 2 directories: a1 and b1 Directory b1 depends on directory a1 Using directory a1, I create a1.lib Using directory b1, I create b1.lib Now, using a1 and b1, I create a shared object ab1.so I've been able to build ab1.so just fine. I made an update to file b1.c and am now getting a... (1 Reply)
Discussion started by: houdini_1
1 Replies

6. UNIX for Dummies Questions & Answers

does APUE fit for linux?

i am reading APUE now,and the OS in the book seems different from RH9,which i installed in my computer. can you tell me if a linux environment can help me really understand the APUE?If not,which OS i should try,the BSD? THANKS (1 Reply)
Discussion started by: mayuhao
1 Replies

7. UNIX for Dummies Questions & Answers

FreeBSD or Linux, which one is more fit for new man

Hello everyone. I'm a Chinese student.I want to learn something about OS, someone suggests me start with FreeBSD or Linux. Please tell me which one is more fit for new man. Thanks. (4 Replies)
Discussion started by: discoverer8713
4 Replies
Login or Register to Ask a Question