ttest2
Hypothesis testing for the difference in means of two samples
Syntax[h,significance,ci] = ttest2(x,y)
[h,significance,ci] = ttest2(x,y,alpha)
[h,significance,ci,stats] = ttest2(x,y,alpha)
[...] = ttest2(x,y,alpha,tail)
h =
ttest2(x,y,alpha,tail,'unequal')Descriptionh =
ttest2(x,y) performs a t-test to determine whether two samples from
a normal distribution (in x and y) could have the same mean when
the standard deviations are unknown but assumed equal. The vectors
x and y can have different lengths. The result, h, is 1 if you can
reject the null hypothesis that the means are equal at the 0.05
significance level and 0 otherwise. significance is the p-value
associated with the t-statistic where s is the
pooled sample standard deviation and n and m are the numbers of
observ