nan_ttest Hypothesis Tests utility functions

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,p,ci,stats] = nan_ttest2(...)

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.

TTEST2 treads NaNs as "Missing values" and ignores these.

H=1 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 support only 'equal' (default value); the value 'unequal' is not supported.

H returns whether the Null-Hypotheses must be rejected. The p-value of the test is returned in PVAL.

TTEST2 works on the first non-singleton dimension or on DIM.

If no output argument is given, the p-value of the test is displayed.

Authors

nan_ttest Hypothesis Tests utility functions