Contact

TTEST Function (OpenOffice Calc)

Statistical Intermediate OpenOffice Calc

Apache OpenOffice Calc TTEST covers paired, pooled and Welch mean comparisons, with reproducible p-values and the one-tail direction warning.

Verification status: Official release source and independently calculated examples for TTEST were reviewed. No new Apache OpenOffice Calc application execution is claimed for this guide; the stated version and example limits still apply. How formula examples are checked

Quick answer: TTEST requires two data arrays, a tail mode and a test type. Use type 1 for genuinely paired observations, 2 for independent samples with a common variance model, or 3 for Welch’s unequal-variance comparison.

Availability and version history

  • Introduced: First release not established. The OpenOffice.org 3.3 function appendix documents this name; that establishes historical presence, not its introduction.
  • Supported in: Apache OpenOffice 4.1.16; no final supported release established.
  • Scope: Desktop Calc. Examples use English function names and semicolon argument separators; the numeric contract is release-specific.
  • Checked: October 14, 2026. Retained official sources and independent mathematics checked. No new Apache OpenOffice Calc execution is claimed here.

Syntax and choices

=TTEST(Data1; Data2; Mode; Type)

All four arguments are required. Mode is 1 for one tail or 2 for two tails. The evaluator floors Mode and Type before testing their allowed values, but deliberately enter the integers 1, 2 and 3 rather than rely on that conversion. Function evaluator.

Type 1 requires identically shaped arrays and meaningful row-by-row pairing, such as before and after measurements of the same items. Independent groups should not be paired just because their ranges happen to have the same length. Types 2 and 3 can use unequal sample sizes; each sample needs at least two usable observations.

What the p-value means

The test concerns a population mean difference under the selected model. Independent observations and an appropriate distributional approximation matter. The paired test applies its model to within-pair differences. A p-value does not measure the size or practical importance of the effect, nor the probability that the null hypothesis is true.

The pooled and Welch calculations show an important implementation detail: Welch’s effective degrees of freedom retain their fractional value. Rebuilding that result with a worksheet TDIST call that floors df can change the answer.

Reproducible worksheet and results

Enter these columns. A and B contain five paired observations; C is a separate six-observation sample; D equals A plus 10.

Row A B C D
2 10 12 8 20
3 12 13 9 22
4 13 15 10 23
5 9 10 11 19
6 11 14 12 21
7 (leave blank) (leave blank) 13 (leave blank)

The table gives independent numerical references rounded to twelve decimal places.

Formula Expected result, approximately
=TTEST(A2:A6;B2:B6;2;1) 0.008580918722
=TTEST(A2:A6;B2:B6;2;2) 0.144659850275
=TTEST(A2:A6;B2:B6;2;3) 0.146072492733
=TTEST(A2:A6;B2:B6;1;1) 0.004290459361
=TTEST(B2:B6;A2:A6;1;1) 0.004290459361
=TTEST(A2:A6;C2:C7;2;3) 0.642428427019
=TTEST(A2:A6;D2:D6;2;2) 0.000008488182
=TTEST(A2:A6;A2:A6;2;2) 1

The paired difference A−B is −2, −1, −2, −1, −3. Its mean is −1.8, its sample variance is 0.7, and the absolute t statistic is approximately 4.810702354424 with df=4. The two-tail paired result is approximately 0.008580918722.

Critical one-tail direction warning

Both the paired and independent implementations use the absolute mean difference. Therefore, Mode=1 returns the smaller tail associated with |t|; swapping the input ranges does not select the opposite scientific alternative.

For the prechosen alternative mean(A)>mean(B), the A/B example points in the wrong direction. Its correct directional p-value is approximately 0.995709540639, not the small Mode=1 value. With the paired setup and a nondegenerate result, use =IF(AVERAGE(A2:A6)>=AVERAGE(B2:B6);TTEST(A2:A6;B2:B6;1;1);1-TTEST(A2:A6;B2:B6;1;1)). Choose the alternative before inspecting the result.

Advanced reporting and troubleshooting

Report the estimated difference alongside its uncertainty, sample sizes and test design. For the paired example, the estimated A−B difference is −1.8 in the measurement units. Type 2 estimates a pooled variance; type 3 estimates each sample’s variance separately. Select that model from the design and assumptions rather than using a preliminary FTEST p-value as an automatic switch.

Constant differences and zero-variance samples are degenerate cases; do not transfer another product’s exact error display to this release without testing it. Keep missing pairs aligned and prepare complete numeric ranges. Filling missing observations with zero changes the data and can create a spurious result. A value of 1 for comparing a sample with itself as two independent groups is a numerical check, not evidence that those copies are independent.

Official evidence and calculation scope

The numerical references were recomputed independently against the retained release contract. Native application execution, import paths and locale behavior are not newly verified by these reference calculations.