function ztest not found in R2015a

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

 Respuesta aceptada

Star Strider
Star Strider el 8 de Mzo. de 2015
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 comentarios

Guilherme Barbosa
Guilherme Barbosa el 9 de Mzo. de 2015
Thanks a lot for your help! Much appreciate it!
Star Strider
Star Strider el 9 de Mzo. de 2015
My pleasure!

Iniciar sesión para comentar.

Más respuestas (0)

Productos

Preguntada:

el 8 de Mzo. de 2015

Comentada:

el 9 de Mzo. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by