ttest : independent and dependent samples

14 views (last 30 days)
laurie on 13 Feb 2013
sorry this is a statistics question as well as a Matlab question...
i have two groups of data that i want to compare using ttest2. the two groups are independent. but among each group, there are some data-points that are dependent (because they come from the same samples).
so i guess that if i don't declare this, i get way more degrees of freedom (and hence significance) than what is "real". worst is, samples can be of very different sizes, and sometimes they can be huge (from 0 to more than 10000 data points per sample).
how can i declare to the ttest2 function that some data-points in both compared groups come from the same sample ? :-/
thank you..

Accepted Answer

Thorsten on 13 Feb 2013
If the two groups contain data from the same sample both groups are not independent. You can use paired-sample t-test if you have the same number of measurements in each group (like the same 100 patients before and after treatment). You seem to have some strange mixture were you cannot apply a t-test. I would suggest to throw away the dependent data points and then run a t-test on the remaining data.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!