Compare two independent means

Estimate the difference between two population means, with its uncertainty.

Guides · Basic statistics · 4 min read

Example: cushioning force

64 independent specimens: 32 of each cushioning material.

Download the example data (CSV)

This is the same example used in Help. Import the CSV to follow the steps, or use Open example in a practice copy in Help to prefill the inputs.

1. Create the workspace

In the sidebar, open Basic Statistics and choose Means: Two-Sample (t). Create an analysis, name it, select New blank worksheet, then choose Create analysis.

2. Import the example data

Download the CSV above and import it into the worksheet. Choose Comma as the delimiter, Dot as the decimal separator and First row contains column names.

3. Assign the input columns

On Inputs, Choose Two sample (independent) for Test type. Assign sample_1 to Sample 1 and sample_2 to Sample 2. These columns contain Foam A and Foam B respectively. The specimens are independent; sharing a worksheet row does not make a pair. Blank cells outside each 32-specimen sample are intentional, not missing paired readings.

4. Set the test and plots

Enter 0.05 in Significance level (α) and choose Two-sided (≠) for Alternative hypothesis. Leave Assume equal variances unchecked. Choose Integer — validation dataset convention for Degrees of freedom to reproduce this Welch result. This rounds 56.3241 down to 56. Open Additional comparisons and leave Include Mann–Whitney U test unchecked.

Open Plot options. Set Histogram binning to Automatic and Histogram scale to Frequency. Leave Show normal curve unchecked and check Show confidence interval for mean difference.

Means: Two-Sample (t): Inputs with the example’s assignments and settings
Inputs with the example columns and settings before running the analysis. View full-size image (opens in a new tab)

5. Run analysis

Choose Run analysis, then open Results.

6. Interpret results

  1. Identify the independent samples

    Each material has 32 different specimens. Sample 1 is Foam A and Sample 2 is Foam B. The comparison is their population mean compression force, using Welch’s test.

  2. Read the difference and interval

    Foam A minus Foam B averages 5.625 N. The 95% interval is −0.901–12.151 N and crosses zero; p = 0.08975. At the 5% level, the study does not establish a difference. It also does not establish equivalence. This example uses 56 integer degrees of freedom.

    Difference confidence interval
    Difference confidence interval View full-size chart (opens in a new tab)
  3. Compare the sample shapes

    The boxes show each sample’s middle half, with the median inside. Whiskers and fence flags describe the observations, not acceptance limits. Foam B has a larger sample SD: about 14.96 N versus 10.77 N for Foam A.

    Sample boxplots
    Sample boxplots View full-size chart (opens in a new tab)
  4. Read the histogram

    Bar heights count measurements in value intervals. Compare shape and spread, without treating the bars as confidence limits. Independence comes from using different specimens, not from this chart.

    Sample histogram
    Sample histogram View full-size chart (opens in a new tab)
  5. Decide what the result supports

    Compare the full difference interval with the improvement needed for the cushioning decision. More data may be useful if that interval is too wide; p above 0.05 does not prove equal performance.

More details: read each result section

Complete result tables use six significant digits, as in Help.

Two-sample t-test

Mean difference is Sample 1 minus Sample 2; Standard error measures its uncertainty. t statistic is difference divided by Standard error. Degrees of freedom, Alpha, Alternative, Method and Confidence level document the inference. CI lower and CI upper bound the population mean difference. DF convention records integer Welch degrees of freedom. Unrounded Welch DF is 56.3241; DF used is 56. This setting affects p-values and interval width.

Two-sample t-test · 14 rows
StatisticValue
t statistic1.72662
Degrees of freedom56
DF conventionInteger — validation dataset convention
Unrounded Welch DF56.3241
DF used56
p-value0.0897498
Mean difference5.625
Standard error3.25782
Alpha0.05
Alternativetwo-sided
MethodWelch t-test
Confidence level (%)95
CI lower-0.90119
CI upper12.1512
  • Fail to reject H₀ (μ₁ − μ₂ = 0) at α=0.05 (p=0.0897)
  • H₀: μ₁ − μ₂ = 0
  • H₁: μ₁ − μ₂ ≠ 0

Sample summaries

n counts readings; Mean, Median, Min, Max and Range describe each sample. SD is sample spread, SE is uncertainty in its mean, and IQR is the middle-half spread. Each material has 32 independent specimens.

Sample summaries · 2 rows
SamplenMeanSDSEMedianMinMaxRangeIQR
Sample 132184.92510.7661.90318185.15168.4209.240.816.9
Sample 232179.314.95732.6441178.2145.7211.76620.9

Boxplot coordinates

Q1 and Q3 bound the middle half, with Median between them. IQR is Q3 minus Q1. Lower and Upper fences use 1.5 × IQR; whiskers end at the extreme observations inside the fences. These coordinates are not acceptance limits.

Boxplot coordinates · 2 rows
SampleQ1MedianQ3IQRLower fenceUpper fenceLower whiskerUpper whisker
Sample 1175.85185.15192.7516.9150.5218.1168.4209.2
Sample 2170.275178.2191.17520.9138.925222.525145.7211.7

Boxplot flags

Each row would identify a Sample, Worksheet row and Value beyond a fence. This empty table means neither sample has fence flags. A flag would call for investigation, not automatic deletion.

Boxplot flags · 0 rows
SampleWorksheet rowValue

No rows were returned for this section.

7. Create a report

Keep the complete Two-sample t-test, Sample summaries, boxplot coordinates and flags, difference interval, boxplots and histogram. State Sample 1 minus Sample 2 and the integer Welch degrees-of-freedom convention.

Choose Add to report from the completed run. Open Choose individual items and advanced options to select tables and charts, then choose Add to draft. Hidden items stay in the saved analysis.

Name the report and add the purpose of the study and your interpretation. Choose Save, review Preview, then use Export → Download HTML. The example below contains the full selected content, including results beyond one screen.

Complete native output for this Help example, including applicable tables, charts and run notes. Report numbers use the app’s displayed precision. Exported charts are static. On narrow screens, scroll wide charts and tables sideways.
View example report: Compare independent cushioning materials

We use Microsoft Clarity to understand how visitors use this website, including session recordings and heatmaps. You can use the website without accepting analytics.

Your choice is saved in this browser for six months. Privacy notice

Current choice: Not chosen.