(unpaired) t-test
H = nan_ttest2(x,y) H = nan_ttest2(x,y,alpha) H = nan_ttest2(x,y,alpha,tail) H = nan_ttest2(x,y,alpha,tail,vartype) H = nan_ttest2(x,y,alpha,tail,vartype,DIM) [H,pval] = nan_ttest2(...) [H ,pval,ci,stats] = nan_ttest2(...)
input vector
input vector
significance level (default alpha = 0.05)
supports 'equal' (default value) and 'unequal'.
returns whether the Null-Hypotheses must be rejected.
p-value of the test
confidence internvals (depending on alpha)
For two samples x and y from normal distributions with unknown means and unknown equal variances, perform a two-sample t-test of the null hypothesis of equal means. Under the null, the test statistic T follows a Student distribution with DF degrees of freedom.
nan_ttest2 treads NaNs as "Missing values" and ignores these.
H=%t indicates a rejection of the Null-hypothesis at a significance level of alpha (default alpha = 0.05).
With the optional argument string TAIL, the Alternative of interest can be selected. If TAIL is '~=' or '<>' or 'both', the null is tested against the two-sided Alternative `mean (X) ~= mean (Y)'. If TAIL is '>' or 'right', the one-sided Alternative `mean (X) > mean (Y)' is used. Similarly for '<' or 'left', the one-sided Alternative `mean (X) < mean (Y)' is used. The default is the two-sided case.
vartype supports 'equal' (default value) and 'unequal'.