MATLAB: Problem in statistical test

statistics

I tried to perform statistical test like below (T-test about two samples)
[h,p,ci,stats] = ttest2(Conf(:,2), Affn(:,2), 'tail', 'both', 'alpha', 0.05)
The results are
h = 0
p = 0.9510
ci = -0.0044
0.0042
stats =
tstat: -0.0615
df: 4798
sd: 0.0758
According to 'h' and 'p-value', hypothesis is not rejected, but statistics('tstat') is not in range of confidence interval('ci').
(As I know, statistics is must be in the range of confidence interval not to reject the test.)
In this case, how do I determine my opinion about the result of the statistical test?? (rejection or not)

Best Answer

The terminology can be confusing. From the Wikipedia article Null hypothesis (Basic definitions):
"The statement being tested in a test of statistical significance is called the null hypothesis. The test of significance is designed to assess the strength of the evidence against the null hypothesis. Usually, the null hypothesis is a statement of 'no effect' or 'no difference'."
and from the ttest2 documentation:
‘If h = 0, this indicates a failure to reject the null hypothesis at the Alpha significance level.’
So the hypothesis that there is no difference (null hypothesis) is accepted (i.e. not rejected).
There is no difference between the two groups at the chosen significance level, and assuming that they conform to the conditions of the t-test.
At least that is the way I have always read it.
.