Performs a t-test (one-sample, two-sample, or paired) to compare means and determine statistical significance.