Dear all,
when searching for ztest in R2015a I cannot find it. Does anyone know how can I add it? I did the same for ttest getting the same issue.
Regards,
Gilly

 채택된 답변

Star Strider
Star Strider 2015년 3월 8일

0 개 추천

The core MATLAB functions erfc and erfcinv can emulate the normal probability distributions:
P = @(z) erfc(-z/sqrt(2))/2; % Equivalent to ‘normcdf’
CV = @(alpha) -sqrt(2) * erfcinv(2*alpha); % Equivalent to ‘norminv’
and the t-distribution is a one-line anonymous function:
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
where ‘t’ is the t-statistic and ‘v’ the degrees-of-freedom.

댓글 수: 2

Guilherme Barbosa
Guilherme Barbosa 2015년 3월 9일
Thanks a lot for your help! Much appreciate it!
Star Strider
Star Strider 2015년 3월 9일
My pleasure!

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

추가 답변 (0개)

제품

Community Treasure Hunt

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

Start Hunting!

Translated by