To answer your question: not really. Statistics is very good at rejecting or not rejecting hypotheses, but confirming hypotheses is very hard (some say impossible). This is more a philosiphical than a statistical problem. An accessible introduction to this issue can be found in:
Ian Hacking (2001) "An Introduction to Probability and Inductive Logic". Cambridge: Cambridge University Press.
As an aside: With a t-test you are not testing whether the samples are equal, but only whether or not the means are equal. Below is a silly example using Stata: the three variables x
, y
, and z
are clearly from different distributions, but we (correctly) cannot reject the hypothesis that the means are equal.
. clear
. set obs 10000
obs was 0, now 10000
. gen x = rnormal()
.
. gen u = runiform()
. gen y = (u < .5)*( rnormal() - 2 ) + ///
> (u >= .5)*( rnormal() + 2 )
.
. gen z = rchi2(2) - 2
.
. twoway kdensity x || ///
> kdensity y || ///
> kdensity z

.
. ttest x = y, unpaired unequal
Two-sample t test with unequal variances
------------------------------------------------------------------------------
Variable | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
---------+--------------------------------------------------------------------
x | 10000 -.0169198 .010027 1.002698 -.0365747 .0027351
y | 10000 -.0180979 .022326 2.232599 -.0618613 .0256655
---------+--------------------------------------------------------------------
combined | 20000 -.0175089 .0122368 1.730549 -.0414941 .0064763
---------+--------------------------------------------------------------------
diff | .0011781 .0244743 -.0467948 .049151
------------------------------------------------------------------------------
diff = mean(x) - mean(y) t = 0.0481
Ho: diff = 0 Satterthwaite's degrees of freedom = 13875
Ha: diff < 0 Ha: diff != 0 Ha: diff > 0
Pr(T < t) = 0.5192 Pr(|T| > |t|) = 0.9616 Pr(T > t) = 0.4808
. ttest x = z, unpaired unequal
Two-sample t test with unequal variances
------------------------------------------------------------------------------
Variable | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
---------+--------------------------------------------------------------------
x | 10000 -.0169198 .010027 1.002698 -.0365747 .0027351
z | 10000 .0086713 .0198435 1.98435 -.0302259 .0475686
---------+--------------------------------------------------------------------
combined | 20000 -.0041242 .0111166 1.572121 -.0259136 .0176652
---------+--------------------------------------------------------------------
diff | -.0255912 .022233 -.0691705 .0179882
------------------------------------------------------------------------------
diff = mean(x) - mean(z) t = -1.1510
Ho: diff = 0 Satterthwaite's degrees of freedom = 14792.6
Ha: diff < 0 Ha: diff != 0 Ha: diff > 0
Pr(T < t) = 0.1249 Pr(|T| > |t|) = 0.2497 Pr(T > t) = 0.8751