The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 statistical comparison of two gaussian means
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

elisepost

Canada
5 Posts

Posted - 07/22/2002 :  2:06:43 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I am trying to understand the meaning of the error values generated with a gaussian (or any other) fit. For example, if a single gaussian is fit to a frequency histogram the program generates a mean +/- an error value. Say I fit a second distribution from a different data set and generate a second mean +/- error. Can these error values be used to carry out a statistical comparision between two such gaussian means? Are they equivalent to SDs or SEs and if so, what are the degrees of freedom.

[I posted this question earlier as part of a different thread - appologies for any confusion]

Thanks
Elise

Gary Lane

USA
150 Posts

Posted - 07/22/2002 :  3:45:18 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

The +/- value is an estimate of the standard error. The exact mathematical definition of the standard error is complicated and is included the Origin 7 Help file under the CurveFitting>Nonlinear Least Squares Fitter>Starting the Fitting>The Fitting Session Concept>The Error List Boxes.

The Origin GUI includes an Independent Two Sample t-Test but requires the actual sample values in order to run. Origin does not support the input of sample means and standard errors (alone) when performing a Two Sample t-Test but I believe this can be done programmatically. Try the following example script in the Script window

// This script assumes that the underlying populations have equal standard deviations

// Hypothetical Sample Values
ave1=-.14511; // or xc1
ave2=-.10522; // or xc2
se1=.23685; // standard error 1
se2=.21599; // standard error 2
n1=20; // size of sample 1
n2=20; // size of sample 2

// Computations
var1=(se1*sqrt(n1))^2;
var2=(se2*sqrt(n2))^2;
df=n1+n2-2;
svar=((n1-1)*var1+(n2-1)*var2)/df;
tval=(ave1-ave2)/sqrt(svar*(1/n1+1/n2));
P=incbeta(df/(df+tval*tval),df/2,1/2);

// Output
tval=;
P=;
df=;

I am by no means an expert (and my degree expires in 3 weeks!) but I hope this gets you started in the right direction. I recommend independent confirmation of my mathematics.

-Gary



Edited by - Gary Lane on 07/22/2002 3:47:44 PM
Go to Top of Page

elisepost

Canada
5 Posts

Posted - 07/23/2002 :  05:30:44 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Gary,

Thanks for the reply - and for help finding the relevant help section. I think I have a program that will do the relevant t-test from means and SEs (but thanks for the script) but I still needs some help with the degrees of freedom. I am actually carrying out multiple gaussian fits to a single data set. What are the df associated with each mean if there are, say, three peaks? I would guess N-3?

Elise
Go to Top of Page

Gary Lane

USA
150 Posts

Posted - 07/23/2002 :  1:24:05 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Elise,

As I understand it, when you have more than two means to compare the appropriate analaysis is a One-Way ANOVA and not a t-Test. One-Way ANOVA has two degrees of freedoms, one for the numerator of the F ratio which is the number of datasets or N - 1 and one for the denominator of the F ratio which is the number of all datapoints - the number of datasets which for your case (of N=3 datasets) would be n1 + n2 + n3 - 3. I think you also need to consider the case that if you have overlapping peaks in one dataset the sample sizes might somehow be different.

I must say I feel I am treading on thin ice here because this is closer to statistical consulting than to software support. I am happy to give my thoughts and help as much as I can but we generally do not provide and I am not qualified to give advice of this nature. Other people have asked similar questions so there must be some literature out there on this subject but Origin does not support any such feature.

Good luck...

-Gary



Edited by - Gary Lane on 07/23/2002 1:27:22 PM
Go to Top of Page

Gary Lane

USA
150 Posts

Posted - 07/23/2002 :  1:50:39 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi again,

I am still thinking about this problem...Origin 7 does contain a Fit Comparison tool available by selecting the Origin Statistics:Hypothesis Testing:Fit Comparison menu item. This tool compares two data sets by fitting the same function to the data. It then uses an F-test to determine whether the two data sets are significantly different from each other. Thus, the tool determines if the two data sets are representative samples from the same population or not. The tool includes the same Guassian function as the Non-linear Curve Fitter.

For a more complete description of the tool press the F1 function key when the dialog is active for context sensitve help.

-Gary



Go to Top of Page

elisepost

Canada
5 Posts

Posted - 07/23/2002 :  3:03:06 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Gary,

This tool is fine if you can fit both data sets with the same function(s). However, I may fit one set with two gaussians and another with four - and yet wish to compare the means of the first peak in either case. Thus, I still have to figure out the DFs.

Keep thinking!!
Thanks
Elise
Go to Top of Page

elisepost

Canada
5 Posts

Posted - 08/16/2002 :  12:45:39 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I think I found the answer - which might be useful to anyone wishing to compare fit parameters between two separate data sets (say the mean of a gaussian.

The degrees of freedom for a t-test is the number of data points minus the number of parameters fitted. Thus, a straight line takes two parameters (a,b,) and the DF=N-2; a gaussian takes three DF=N-3 etc.

Elise
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000