Contact

Gnumeric · Statistical analysis · Advanced

Compare Independent Sample Means in Gnumeric

Choose Gnumeric's unpaired equal-variance t, Welch t or known-variance z tool and check one original example without confusing independent and paired data.

Gnumeric 1.12.62 released manual and calculation source reviewed; independent arithmetic checked; native analysis-tool execution pending · Editorial standards

For two independent groups, use Gnumeric’s Unpaired Samples tools. Choose the pooled t-test only when equal population variances are a defensible model assumption; choose the unequal-variance t-test when you are not making that assumption. The known-variance z-test is different: it requires population variances supplied independently of these samples, not their calculated sample variances.

Scope: This guide follows the English menus, dialog and calculation code released with Gnumeric 1.12.62. The calculations below were independently checked, but the graphical dialog, generated report and native worksheet execution were not run for this guide. These are synthetic teaching numbers, not an experimental conclusion or advice for a consequential decision.

First distinguish independent and paired observations

The two columns below represent different items measured in two groups. Row alignment does not establish pairing. A before-and-after measurement of the same item belongs to the paired t-test workflow instead.

Independent sampling and a suitable distributional model matter. Small-sample t inference is particularly dependent on the underlying assumptions; inspecting a tiny dataset does not prove them. The NIST two-sample t-test explanation gives the pooled and unequal-variance formulations. Do not pick whichever test gives the smallest p-value or switch to a one-sided question after seeing the sign.

Enter two unequal-length groups

Enter headings in A1 and B1, then the values shown. Leave A7 empty, not zero.

Row A: Group A B: Group B
2 10 7
3 12 9
4 14 11
5 16 13
6 18 15
7 leave empty 17

These are five observations in A and six in B. Their arithmetic checks are:

Quantity Group A Group B
Numeric count 5 6
Mean 14 12
Sample variance, denominator n−1 10 14

The observed mean difference is A minus B = 2. The exercise’s null is population mean A minus population mean B = 0, with a two-sided alternative and α = 0.05.

You can inspect the inputs with =COUNT(A2:A6), =AVERAGE(A2:A6) and =VAR(A2:A6), repeating for B2:B7. These formulas are provided as worksheet checks, not a claim that this article’s workbook was executed in Gnumeric.

Configure the unpaired tool

The released menu definitions and labels distinguish the three choices under Statistics → Two Sample Tests → Claims About Two Means:

  • Unpaired Samples, Equal Variances…
  • Unpaired Samples, Unequal Variances…
  • Unpaired Samples, Known Variances…
  1. Start with Unequal Variances for the worked Welch calculation. On Input, set Variable 1 range to A1:A6, Variable 2 range to B1:B7, and enable Labels. Alternatively select only numeric rows and leave Labels off.
  2. On Populations, confirm Unpaired, Unknown, and Unequal. The shared dialog exposes these separate choices. Unequal sample counts do not themselves imply unequal population variances.
  3. On Test, set Hypothesized mean difference to 0 and Alpha to 0.05, not 5.
  4. On Output, choose New sheet so the report does not overwrite the data. Formulæ retains calculations; Values is a snapshot. A fixed range does not automatically grow when more observations are appended.
  5. Run the tool and compare the report with the independently calculated reference values below. A sheet-qualified range inserted by the selector is normal.

Check pooled and Welch results separately

The following values reconstruct the formulas in the released t-test implementation. They are not captured Gnumeric report output.

For the pooled calculation, the common variance estimate is:

((5−1)×10 + (6−1)×14) / (5+6−2) = 110/9 ≈ 12.222222

The standard error is SQRT((110/9)×(1/5+1/6)) ≈ 2.116951. Therefore t = 2 / standard error ≈ 0.944755, with 9 degrees of freedom and two-sided p ≈ 0.369455.

For Welch’s unequal-variance calculation, the standard error is SQRT(10/5+14/6) = SQRT(13/3) ≈ 2.081666. Thus t ≈ 0.960769. The Welch–Satterthwaite degrees of freedom are:

(10/5+14/6)^2 / ((10/5)^2/(5−1) + (14/6)^2/(6−1)) = 845/94 ≈ 8.989362

The two-sided p-value is approximately 0.361797. Keep the fractional degrees of freedom for this reference calculation. The released Gnumeric TDIST implementation accepts fractional degrees of freedom; do not introduce rounding merely because another application’s procedure does so.

Both reference p-values exceed 0.05. That means this exercise does not reject the chosen null under the respective model. It does not prove the means equal, establish practical equivalence, or certify the assumptions.

Use known variances only when genuinely supplied

For a separate arithmetic demonstration, suppose population variances 9 and 16 were genuinely known before collecting these samples. They are exercise assumptions, not estimates justified by this small dataset.

Choose Known Variances, keep the same ranges and null difference, and enter 9 and 16 in the population variance fields. Do not enter standard deviations 3 and 4: those are different quantities.

The standard error is SQRT(9/5+16/6) = SQRT(67/15) ≈ 2.113449. Then z ≈ 0.946320, and the independently calculated two-sided normal probability is approximately 0.343985. This calculation does not have a t-test degrees-of-freedom row to interpret.

Troubleshoot a different result

  • Count is 6 rather than 5 in A: check whether the empty cell was replaced with zero. Zero is an observation, not missing data.
  • Count is one too small: a numeric first row may have been discarded because Labels was enabled without a heading.
  • Sign is reversed: swapping the two groups reverses the observed difference and statistic. For the zero-difference, two-sided exercise, the p-value is unchanged. For a nonzero null difference, also reverse that specified difference when swapping groups.
  • One-tail is smaller: the t-tool code evaluates the upper tail at ABS(t). That row is not automatically the p-value for your preselected directional alternative. Use the two-tail row for this exercise; for directional work, check the sign and alternative explicitly.
  • Errors or implausible counts: inspect text numbers, errors, empty selections and too few numeric observations. A sample variance needs at least two numeric observations. Do not replace unknown measurements with zero to remove an error.
  • Both groups are constant: zero standard error is a degenerate case, not evidence of an infinite-quality estimate. This guide does not certify native boundary behavior.

Related: compare two sample variances, inspect normality and one-way ANOVA. These address different questions rather than interchangeable routes to a preferred result.