필터 지우기
필터 지우기

How to do paired t test with mean and sd?

조회 수: 29 (최근 30일)
Rita
Rita 2016년 8월 29일
댓글: Aviram Shemen 2020년 8월 15일
I would like to do paired t-test with mean and standard deviation and the number of sampling.
for A:mean =8.37 sd=0.53
B: mean=8.18 sd=0.16 number of samples for both A=B=44
Thanks.

채택된 답변

Star Strider
Star Strider 2016년 8월 30일
To do it with only the means and standard deviations, you would have to write your own functions to calculate the one- and two-tailed t-probabilities, but fortunately with MATLAB that is not difficult:
Amean =8.37;
Asd=0.53;
Bmean=8.18;
Bsd=0.16;
N = 44;
v = 2*N-2;
tval = (Amean-Bmean) / sqrt((Asd^2+Bsd^2)/N); % Calculate T-Statistic
tdist2T = @(t,v) (1-betainc(v/(v+t^2),v/2,0.5)); % 2-tailed t-distribution
tdist1T = @(t,v) 1-(1-tdist2T(t,v))/2; % 1-tailed t-distribution
tprob = 1-[tdist2T(tval,v) tdist1T(tval,v)]
tprob =
0.0253 0.01265
So your groups are significantly different at alpha = 0.05.
The functions are correct, but you may want to check my ‘v’ and ‘tval’ calculations to be certain it they are correct to your experimental design. If they are not, change them appropriately.
  댓글 수: 5
Jeff Miller
Jeff Miller 2020년 8월 10일
This old answer is not correct for a paired t-test. In that case the tval computation depends on the standard deviation of the difference scores A-B. You can compute the required value from Asd and Bsd if you also have the correlation of A with B.
Aviram Shemen
Aviram Shemen 2020년 8월 15일
Thank you!

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

추가 답변 (1개)

Thorsten
Thorsten 2016년 8월 30일
편집: Thorsten 2016년 8월 30일
If you have the Statistics Toolbox, you can use
ttest(A-B)
  댓글 수: 2
Rita
Rita 2016년 8월 30일
Thanks a lot.I have this toolbox but can ttest function work with mean and sd without samples? Thanks again
Thorsten
Thorsten 2016년 8월 30일
No, you need the samples.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by