MATLAB Answers

0

Ttest problem with alpha

curoi 님이 질문을 제출함. 9 Apr 2013
So I'm trying to run a one-sample test so that I can determine the confidence intervals at one standard deviation away. However I keep getting the error 'ALPHA must be a scalar between 0 and 1' for the following code.
[ ho1, pv1, ci1, stat1 ] = ttest( New_cor.h, mean( New_cor.h ),'Alpha', 0.32 );
I've tried replacing the 0.32 with other values between 0 and 1 including 0.05 and 0.01 but I still get the same error. If I don't include 'Alpha' and run the ttest as the default 0.05, it works. Any ideas?

  댓글 수: 0

로그인 to comment.

답변 수: 1

bym 님의 답변 9 Apr 2013
 채택된 답변

you do not need to pass 'Alpha' to the function, you are getting the error because you are trying to pass a string when it is expecting a number. Just do this:
[ ho1, pv1, ci1, stat1 ] = ttest( New_cor.h, mean( New_cor.h ), 0.32 );

  댓글 수: 0

로그인 to comment.



Translated by