How to find t test of two independent samples in MatLab?

조회 수: 31 (최근 30일)
Gargi
Gargi 2015년 6월 23일
댓글: Star Strider 2015년 6월 24일
I have two independent samples of data with different n's (i.e number of data). The file is attached with this. I want to calculate t test of both the samples. Kindly, help me regarding this.
  댓글 수: 1
Salaheddin Hosseinzadeh
Salaheddin Hosseinzadeh 2015년 6월 23일
I don't undertand what the question is at all.
Please explain more

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

채택된 답변

Udit Gupta
Udit Gupta 2015년 6월 23일
Use the function ttest2 from matlab statistics toolbox.
(<http://www.mathworks.com/help/stats/ttest2.html>)

추가 답변 (1개)

Star Strider
Star Strider 2015년 6월 23일
That depends on your experimental design. If you have an unpaired design (intervention on one group and not on another) use ttest2. If you have a paired design (before an after an intervention on the same group), use ttest.
Of course this requires that your data are normally distributed and meet the other assumptions of the t-test for both groups. If they do not, or you do not know the distribution, use the ranksum and signrank tests, respectively for unpaired or paired data.
  댓글 수: 2
Gargi
Gargi 2015년 6월 24일
Thanku for the answer. It is working
Star Strider
Star Strider 2015년 6월 24일
My pleasure, although I would have appreciated your having Accepted my Answer if it solved your problem.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by