LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

t test

Hi, all:
 
I got a statistics question regarding to running t test in LabView. I have two 1-D groups of independent data in different sizes. One has more than 1,200,000 data, and another has 1,000,000 data. I need to run t test to see if the difference between them is significant. However, I found that LabView's t test function only accepts 1-D data as input. Does it mean that I should combine these 2 groups into 1 group of 2,200,000 data? Also, why does it require the mean and the significant values? Is the input of mean value equal to the mean of any group, or the mean of the 2 groups? I am confused and did not get clear explanation in the help menu. Hope someone can help me for this. Thank you very much in advance.
0 Kudos
Message 1 of 9
(3,753 Views)
I think what you want is to validate you data against a control set. Not the computed error of variation.  Attached is a sample VI that will do this.  In the diagram is a 'diagram disable' structure.  One case is for performance testing, it replicates your array sizes and computes, the second is an example with references cited, and the third is what is currently enabled and should compute what you want, based on asymetrical set sizes, individual data sets. If nothing else, it should put you in the ball park. Thanks for the statistics referesher!

Paul
0 Kudos
Message 2 of 9
(3,735 Views)
Thank you, Paul. You update your LV so fast! I am still using LV 8.2, so I can not open your examples. Would you please send the examples in LV 8.2? Also, my data are independent to each other and there is no control group. They were collected at different time, and I need to run t test to make sure there is no significant difference between them. Hope I am clear for my question this time. Thank you for your help!
0 Kudos
Message 3 of 9
(3,706 Views)
Sorry it took so long to respond.  I missed that you had made this request.  Attached is LabVIEW 8.2. 
I disagree.  Your control group is your previous sample.  My observation anyway.  good luck

Paul
Message 4 of 9
(3,672 Views)
Thanks Paul! I think I got your point. Could you please also figure out why T Test built-in function in LabVIEW requires 1-D array data as input? There should be 2 groups of data for comparison to run the t test, but 1-D means 1 group, right? I am confused here, which is why I posted my question. Anyhow, thank you again for your help.
0 Kudos
Message 5 of 9
(3,637 Views)
Hi ccyang and Stradis,
Correct me if I were wrong.  I think the VI Stradis posted allow you to compare one set of data (sample) against a control set of data (control), and calculate the t distribution based on that.  That's two sets of data, and each set is a 1D array.  LabVIEW does not natively provide VIs that calculate the t distribution. The primatives LabVIEW provides only figure out the mean, standard deviation and variance of a given set of data, and t distribution is calculated based on those values.

Yi Y.
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 6 of 9
(3,595 Views)
Hi Yi Y. Thanks for your interest in my post. I am using LV 8.2 I went to Functions / Mathematics / Probability & Statistics / Hypothesis / and found t test function there. When I drag the function and drop to read the help for this function, I found that the sample set for input is 1-D array. This is what really confuses me. Paul's function is excellent to obtain t test result, but I would like to know more about this function. Get any idea? Thanks again for your interest.
0 Kudos
Message 7 of 9
(3,576 Views)
Hi ccyang,
If you click on the Detailed Help link under the context help, there's more details regarding this VI.

"sample set specifies the randomly sampled data from the population of interest.
mean specifies the hypothesized mean value of the population. The null hypothesis is that the population mean is equal to mean.
The mean of a normal distribution is a value of a normal random variable such that the probability that an observed value of the variable is less than or equal to the mean and the probability that the observed value is greater than or equal to the mean are both 50%.
significance level specifies the probability that the hypothesis test conclusion is wrong based on the sample set and the hypothesized mean."

My impression from reading this (somebody please correct me if I were wrong) is that you are suppose to figure out the mean and significance level from your control data set, and the sample data set  is just a 1-D array of data that you are suppose to analyze based on the control.  It's very similar to what Paul's function does, except you'll have to some extra calculation to figure out what the mean and significance level is for your control data set.

Yi Y.
Applications Engineer
National Instruments
http://www.ni.com/support
Message 8 of 9
(3,556 Views)
Thanks Yi Y. I got your point. I will look into the detailed code in that function. Thank you.
0 Kudos
Message 9 of 9
(3,524 Views)