Skip to content
LoveToCalc

Definition — what does that mean?

Confidence interval for a difference of means

The interval for how much two population means differ, from two independent samples.

In Swedish: Konfidensintervall för differens av medelvärden

Confidence interval for a difference of means

The relation

dlimit=x̄₁−x̄₂±tα/2s₁²n₁+s₂²n₂

An interval for the difference between two population means from two independent samples, without assuming equal spreads: the difference of the sample means plus and minus t times the square root of s₁²/n₁ + s₂²/n₂.

Solve for
Solved for dlimit

dlimit=x̄₁−x̄₂+tα/2s₁²n₁+s₂²n₂

dlimit≈7.8284

d limit equals (50 minus 45) plus (2 times the square root of ((6 squared divided by 36) plus (8 squared divided by 64))), equals 5 plus (2 times the square root of ((36 divided by 36) plus (64 divided by 64))), equals 5 plus (2 times the square root of (1 plus 1)), equals 5 plus (2 times the square root of (2)), is approximately 5 plus (2 times 1.4142), is approximately 5 plus 2.8284, is approximately 7.8284. The lower limit is 2.1716.

Working7 steps

Practice questions

You are given

  • x̄₁=100
  • x̄₂=92
  • tα/2=1.984
  • s₁=15
  • n₁=50
  • s₂=15
  • n₂=50

Round to 2 decimals.

The formula

(x̄₁ − x̄₂) ± t · √( s₁²/n₁ + s₂²/n₂ )

Holds for two independent random samples from roughly normal populations, or large ones. This is Welch’s form, which does not assume the two standard deviations are equal. t has the Welch–Satterthwaite degrees of freedom, which a statistics package prints; by hand, the smaller of n₁ − 1 and n₂ − 1 is a conservative choice. Read t in the t-table.

The square root is the standard error of the difference. The variances of the two means add, as variances of independent variables do.

Means 50 and 45, s = 6 and 8, n = 36 and 64, t = 2: the root is √(1 + 1) = 1.414, so the interval is 5 ± 2 · 1.414, from 2.17 to 7.83. It does not contain 0.

Extra sleep with two drugs

R’s sleep data, 10 patients per drug: means 0.75 and 2.33, s = 1.789 and 2.002. The root is √(0.320 + 0.401) = 0.849 and t = 2.103 (17.8 degrees of freedom), so the interval for the first minus the second is −1.58 ± 1.785, from −3.37 to 0.21. It contains 0, so the data do not separate the drugs at 5%.

Common mistakes

For one mean, see the confidence interval for a mean.

Looking for another letter? The formula solved for each one
Solved for each letter
Solve forRearrangedWith the numbersComes to
dlimitx̄₁−x̄₂+tα/2s₁²n₁+s₂²n₂50−45+26²36+8²647.8284
x̄₁x̄₂+dlimit−tα/2s₁²n₁+s₂²n₂45+7.8284−26²36+8²6450
x̄₂x̄₁−(dlimit−tα/2s₁²n₁+s₂²n₂)50−(7.8284−26²36+8²64)45
tα/2dlimit−(x̄₁−x̄₂)s₁²n₁+s₂²n₂7.8284−(50−45)6²36+8²642

Last reviewed October 11, 2026 ·How pages are reviewed

Statistics and probabilityAll formulas

Put this formula on your site

Copy the code into your page where the formula card should appear. It loads from lovetocalc.com, so it stays current on its own — all we ask is that the credit line comes with it.