Contact

LibreOffice Calc Β· Analysis and modeling Β· Intermediate

Compare samples with hypothesis-test tools

A worked Calc example to compare samples with hypothesis-test tools, with source checks, changed inputs and recovery.

Documentation-qualified for Calc 26.2; native workflow and persistence checks pending Β· Editorial standards

Choose a test from the sampling design, not from whichever menu yields the smallest p-value. A paired t-test concerns matched differences, one-factor ANOVA compares group means, an F-test compares variances, and a z-test requires justified population variances. They are not interchangeable ways to β€œprove a difference.”

Scope and a paired fixture

Use LibreOffice Calc 26.2 desktop with English standard menus on Windows/Linux. The procedures follow versioned Help; calculations below are independent expectations, not native test results. Use synthetic data in an ODS practice copy and blank output areas.

On Pairs, enter A1:C6:

Item Before After
P1 10 11
P2 12 14
P3 14 15
P4 16 19
P5 18 21

Before/After belong to the same item. For Variable 1 minus Variable 2, the differences are βˆ’1, βˆ’2, βˆ’1, βˆ’3, βˆ’3. Their mean is βˆ’2, sample variance 1 and standard error sqrt(1/5). Thus t=βˆ’4.472136 with 4 degrees of freedom. The two-sided p-value is approximately 0.0110565.

Run and interpret the paired t-test

Choose Data > Statistics > Paired t-test. Set Variable 1 range to $Pairs.$B$2:$B$6, Variable 2 to $Pairs.$C$2:$C$6, Grouped By Columns, and Results to E1. Confirm. In the report, check observations 5 for each series, hypothesized mean difference 0, alpha 0.05, observed difference βˆ’2 and the expected t statistic.

Use the two-tail probability for the predeclared question β€œis the average paired change nonzero?” Here it is below 0.05. The mean After increase is 2 units; report that direction and size along with uncertainty, not only a significance label. Valid inference also needs independent pairs and a plausible model for their differences. Five fabricated pairs are an arithmetic demonstration, not evidence of treatment effectiveness.

Change the last After value from 21 to 19 and rerun into a fresh output area. Differences become βˆ’1, βˆ’2, βˆ’1, βˆ’3, βˆ’1, mean βˆ’1.6, variance 0.8 and t=βˆ’4 with 4 degrees of freedom; two-sided p is about 0.01613. Restore 21. Never sort Before and After separately to make the test stronger.

Compare independent groups with ANOVA

On Groups, enter three numeric columns without headers in A1:C3: column A is 1, 2, 3; column B is 2, 3, 4; column C is 3, 4, 5. These represent three independent groups, not repeated measures on the same items.

Choose Data > Statistics > Analysis of Variance (ANOVA). Set Input Range A1:C3, Grouped By Columns, Single factor, Alpha 0.05 and Results to E1. Confirm. Group means are 2, 3, 4; each sample variance is 1. Between-group SS=6 with df 2; within-group SS=6 with df 6; F=3 and p=0.125. At 0.05 this does not reject equal population means. It does not prove the means equal.

Do not use this single-factor independent-group model for matched/repeated measurements. Its usual assumptions include independent observations, appropriately modeled within-group errors and comparable variances. A significant omnibus result would still not identify which particular pairs of means differ without further justified comparisons.

F-test and z-test: know the different questions

For a variance check in a separate synthetic example, enter 1, 2, 3, 4, 5 in one column and 2, 4, 6, 8, 10 in another. Choose Data > Statistics > F-test, assign those five-row numeric ranges and a blank destination. Expected sample variances are 2.5 and 10, so the reported variance ratio for Variable 1/Variable 2 is 0.25, with 4 degrees of freedom each. Read the labeled two-tail result if the question is any variance difference. This classical test is sensitive to non-normality; it is not a substitute for a mean comparison.

Data > Statistics > Z-test uses two variable ranges and a results destination, but the report includes Known Variance inputs. The Help example leaves them at zero and consequently shows division errors. Do not substitute zero, or automatically copy estimated sample variances into fields claiming they are known. Without defensible population-variance information, stop this branch and choose a method appropriate to the design rather than treating the generated report as a valid z-test.

Keep an auditable result

Label each report with its source range, design, null hypothesis, chosen tail and alpha. Leave source records intact and rerun after edits; do not patch a p-value cell. Save and reopen the ODS, checking report parameters and all original data. Numbers stored as text can silently change observation counts, so reconcile counts before interpreting any output. Statistical significance is not practical importance, and a nonsignificant result is not proof of no effect.

Official references

Sources were captured on 20 October 2026 and reviewed from retained snapshots. All outcomes above are expected checks, not a claim of native execution.