How to do an unpaired t-test?

조회 수: 62 (최근 30일)
rtn
rtn 2020년 5월 10일
답변: Jeff Miller 2020년 5월 11일
I have data that changes gradually across 120 trials. I would like to do an unpaired t-test to see if the first 5 trials are significantly different from the last 5 trials across all my subjects. Should I use ttest2 for this?
  댓글 수: 1
Star Strider
Star Strider 2020년 5월 10일
Another option for unpaired tests is the ranksum function.

댓글을 달려면 로그인하십시오.

채택된 답변

Jeff Miller
Jeff Miller 2020년 5월 11일
I'm guessing you have some kind of numerical score in each of 120 trials for each of (say) 30 subjects and you want to know if the scores tend to be higher vs lower in the first 5 trials than in the last 5 trials.
If that's right, then the answer is no, don't use ttest2. Instead, compute two averages for each subject--one average of the first 5 trials and one average of the last 5 trials. Then, use ttest to do a paired t-test comparing the first-5 and last-5 averages.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 ANOVA에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by