Example of 2-Sample t

A healthcare consultant wants to compare the patient satisfaction ratings of two hospitals. The consultant collects ratings from 20 patients for each of the hospitals.

The consultant performs a 2-sample t-test to determine whether there is a difference in the patient ratings between the hospitals.

  1. Open the sample data, HospitalComparison.MTW.
  2. Choose Stat > Basic Statistics > 2-Sample t.
  3. From the drop-down list, select Both samples are in one column.
  4. In Samples, enter Rating.
  5. In Sample IDs, enter Hospital.
  6. Click OK.

Interpret the results

The null hypothesis states that the difference between ratings for the two hospitals is 0. Because the p-value is 0.000, which is less than the significance level of 0.05, the consultant rejects the null hypothesis and concludes that the ratings for the two hospitals differ.

Method

μ₁: population mean of Rating when Hospital = A
µ₂: population mean of Rating when Hospital = B
Difference: μ₁ - µ₂
Equal variances are not assumed for this analysis.

Descriptive Statistics: Rating

HospitalNMeanStDevSE Mean
A2080.308.181.8
B2059.312.42.8

Estimation for Difference

Difference95% CI for
Difference
21.00(14.22, 27.78)

Test

Null hypothesisH₀: μ₁ - µ₂ = 0
Alternative hypothesisH₁: μ₁ - µ₂ ≠ 0
T-ValueDFP-Value
6.31320.000