How to use two -tail t-test?

조회 수: 29 (최근 30일)
Weiyan Chen
Weiyan Chen 2016년 10월 23일
댓글: Star Strider 2016년 10월 23일
I have two set of data (x and y)and I want to show that x is bigger than y by using the two-tail t-test. I know that the if I want to check the tail I need to type 'Tail','right','left', or 'both'. But I do not understand how to show this.

채택된 답변

Star Strider
Star Strider 2016년 10월 23일
If your hypothesis is ‘greater than’ or ‘less than’, use a one-tailed test. If your hypothesis is ‘different than’, use a two-tailed test.
The way to code it (for ttest2), is for example to test that the mean of ‘x’ is less than the mean of ‘y’:
[h,p,ci,stats] = ttest2(x, y, 'Tail','left');
Examine your data and consult the documentation to determine the correct option.
  댓글 수: 2
Weiyan Chen
Weiyan Chen 2016년 10월 23일
If I want to show x is greater than y , I need to use 'right'?
Star Strider
Star Strider 2016년 10월 23일
Yes!
You are exactly correct in the context of the syntax I posted, with ‘x’ as the first argument and ‘y’ the second.

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

추가 답변 (0개)

카테고리

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