One sample t-test

Hypothesis tests · Method and input reference

Tests are two-sided. Normality reports Shapiro–Wilk and D’Agostino–Pearson where sample size permits. Outliers use Tukey 1.5×IQR fences; observations are not removed. Synthetic example: 120 baseline systolic blood pressures (mmHg), with between-person variation. Illustrative data, not clinical evidence.

Open calculator · Compare methods in the decision matrix

When to consider it

  • Compare a numeric population mean against a prespecified reference.

Assumptions and scope

  • Observations must be independent between subjects; repeated rows from one subject are not independent samples.
  • Use the outcome and predictor coding required by the calculator; review missing data and model diagnostics.

Required inputs

  • Observations — Numeric observations; preserve the row and column structure described above.
  • Null mean — Enter the method parameter described above.

Review missing values and data coding before running. Sample inputs are synthetic teaching examples.

Implementation

Lifescio validates inputs and formats results; listed functions are the principal calculation routines, not an exhaustive transitive dependency list.

  • scipy 1.15.3: scipy.stats.ttest_1samp

These are pinned library versions; saved results record the versions actually used at runtime.

Library references