Statistical difference between population and sample

4 次查看(过去 30 天)
Hey folks, I'm not sure what MATLAB function to use for this problem:
I've got one test-measurement that I chopped in two sets of data (unequal in size), one before triggering something and one after.
Now I want to know if there is a statistical difference between those two. Tried ttest (didnt work) and ttest2, but the results were confusing (subjectively there should be no difference but the ttest2 returns results like h=1 with p=3e-69). Is this the wrong function for my application or am I using it wrong?
  3 个评论
Riados
Riados 2016-10-29
First of all, thank you dpb for responding so quickly.
I used [h,p]=ttest2(blue,orange,'Vartype','unequal'), but as you can see the samplesize is too different and so produces completely different means.
Then I tried comparing blue with blue+orange, but still got h=1.
Any ideas on what I am doing wrong here?
Riados
Riados 2016-10-29
编辑:Riados 2016-10-29
Ok I got it now! The issue was that I picked an outlier sample. 95% of the other samples return h=0 as expected, when I use ttest2 or even better when kstest2 (as dpb suggested) is used.
Thanks for your help!

请先登录,再进行评论。

回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by