nan_ttest Hypothesis Tests nan_welchtest

NaN Toolbox >> NaN Toolbox > Hypothesis Tests > nan_ttest2

nan_ttest2

(unpaired) t-test

Calling Sequence

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(...)

Parameters

x:

input vector

y:

input vector

alpha:

significance level (default alpha = 0.05)

tail:

vartype:

supports 'equal' (default value) and 'unequal'.

DIM:

H:

returns whether the Null-Hypotheses must be rejected.

pval:

p-value of the test

ci:

confidence internvals (depending on alpha)

Description

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'.

nan_ttest Hypothesis Tests nan_welchtest