MedCalc

# Independent samples t-test - computational notes

In the Independent samples t-test, the difference between the observed means in two independent samples is calculated. A significance value (P-value) and 95% Confidence Interval (CI) of the difference is reported. The P-value is the probability of obtaining the observed difference between the samples if the null hypothesis were true. The null hypothesis is the hypothesis that the difference is 0.

The program first calculates the pooled standard deviation s:

$$s = \sqrt { \frac { (n_1-1) s_1^2 + (n_2-1) s_2^2 } { n_1+n_2-2 } }$$

where s1 and s2 are the standard deviations of the two samples with sample sizes n1 and n2.

The standard error se of the difference between the two means is calculated as:

$$se(\bar{x_1} - \bar{x_2}) = s \times \sqrt{ \frac{1}{n_1} + \frac{1}{n_2} }$$

The significance level, or P-value, is calculated using the t-test, with the value t calculated as:

$$t = \frac {\bar{x_1} - \bar{x_2}} { se(\bar{x_1} - \bar{x_2}) }$$

The P-value is the area of the t distribution with n1 + n2 − 2 degrees of freedom, that falls outside ± t (see Values of the t distribution table).

Note that in MedCalc P-values are always two-sided.

The P-value is the probability of finding the observed difference (or larger) between samples, under the null-hypothesis. The null-hypothesis is the hypotheses that between the two populations (from which the samples are drawn) the difference is 0.

### Logarithmic transformation

If you selected the Logarithmic transformation option, the program performs the calculations on the logarithms of the observations, but reports the back-transformed summary statistics.

For the t-test, the difference and 95% confidence are given, and the test is performed, on the log-transformed scale.

Next, the results of the t-test are transformed back and the interpretation is as follows: the back-transformed difference of the means of the logs is the ratio of the geometric means of the two samples (see Bland, 2000).

## Literature

• Altman DG (1991) Practical statistics for medical research. London: Chapman and Hall.
• Bland M (2000) An introduction to medical statistics, 3rd ed. Oxford: Oxford University Press.