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.

Two-Sample T-Test and CI: Rating, Hospital

Method μ₁: mean of Rating when Hospital = A µ₂: mean of Rating when Hospital = B Difference: μ₁ - µ₂ Equal variances are not assumed for this analysis.
Descriptive Statistics: Rating Hospital N Mean StDev SE Mean A 20 80.30 8.18 1.8 B 20 59.3 12.4 2.8
Estimation for Difference 95% CI for Difference Difference 21.00 (14.22, 27.78)
Test Null hypothesis H₀: μ₁ - µ₂ = 0 Alternative hypothesis H₁: μ₁ - µ₂ ≠ 0

T-Value DF P-Value 6.31 32 0.000

By using this site you agree to the use of cookies for analytics and personalized content.  Read our policy