Statistics & Probability / Single-Sample Z & t Tests
FREE TO EXPLORE
LABORATORY 26 · STATISTICS & PROBABILITY

One-Sample Hypothesis Testing: Z-Tests, Student's t-Tests, Critical Values, and p-Values

Formulate null and alternative statistical hypotheses, evaluate Neyman-Pearson decision rules, compute one-sample Z-statistics and Student's t-statistics, calculate exact p-values, and verify the linear scaling of the non-centrality parameter. Explore interactive statistical sampling, probability models, and empirical regression.

SAMPLE · INFER · CONVERGE

Your virtual statistics laboratory.

EXPECTED TEST STATISTIC E[Z]—
SAMPLING TELEMETRY

Ready to sample with Effect Size δ = 1.0.

1.0 δ
Null hypothesis H_0: μ = 0.0 versus H_1: μ > 0.0

Adjust Effect Size δ, then execute statistical trial.

Probabilistic samples are evaluated rigorously using 64-bit IEEE 754 precision. Residuals reflect ordinary least-squares regression across successive observations. Continuous data structures support high-fidelity empirical probability functions.

Statistical assumptions and distribution limits

Statistical significance does not imply practical importance; very large sample sizes can yield tiny p-values for trivial effects. The empirical regression of expected test statistics against effect size confirms the theoretical non-centrality shift with slope m = 2.0000 and R² = 1.000000.

Statistical tools & sampling modules.

Null and Alternative Data Generator

Generates Gaussian sample datasets under both null H_0: μ = μ_0 and alternative H_1: μ = μ_0 + δ σ hypotheses.

One-Sample Z-Test Calculator

Computes exact Z-statistics Z = (x̄ - μ_0) / (σ / √n) when population variance is known.

One-Sample Student's t-Test Unit

Computes Student's t-statistic T = (x̄ - μ_0) / (s / √n) with unknown variance and n - 1 degrees of freedom.

Exact p-Value Engine

Calculates one-tailed and two-tailed p-values via standard normal and Student's t cumulative distribution functions.

Type I and Type II Error Simulator

Simulates 20,000 hypothesis test replications to verify nominal significance level α and empirical test power 1 - β.

Non-Centrality Linear Regression Unit

Performs linear regression of expected test statistic versus effect size δ to confirm slope √n = √4 = 2.000.

FOLLOW THE METHOD

A reason behind every step.

Formulate null and alternative statistical hypotheses, evaluate Neyman-Pearson decision rules, compute one-sample Z-statistics and Student's t-statistics, calculate exact p-values, and verify the linear scaling of the non-centrality parameter. Standardized parameter settings: 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 δ.

01

Establish Null and Alternative Hypotheses

Formulate null hypothesis H_0: μ = 0.0 versus upper-tailed alternative H_1: μ > 0.0 with significance level α = 0.05 (critical Z_crit = 1.645).

02

Execute Primary Sampling under Null Hypothesis

Draw 20,000 samples of size n = 4 from N(0, 1). Compute Z = (x̄ - 0)/(1/√4) and verify that Type I error rate P(reject H_0 | H_0 true) = 0.050.

03

Simulate One-Sample Student's t-Test Mode

Switch to unknown variance mode. Compute sample standard deviation s and t-statistic T = x̄ / (s / √4). Verify that critical t_{0.05, 3} = 2.353.

04

Evaluate Non-Central Distribution under Alternative

Inject effect size δ = 1.0 (mean μ = 1.0). Observe that E[Z] shifts to δ √n = 1.0 · 2 = 2.000, and evaluate empirical power 1 - β.

05

Step Standardized Effect Size Across δ = 1.0 to 6.0

Increment effect size across standardized settings δ ∈ {1.0, 2.0, 3.0, 4.0, 5.0, 6.0}, recording expected test statistic values E[Z].

06

Conduct Linear Regression on Non-Centrality Scaling

Fit a linear regression model y = mx to the coordinate pairs (x = δ, y = E[Z]). Confirm that empirical slope m = 2.0000 matches theoretical scaling √n = 2.000.

YOUR NOTEBOOK · 0 OBSERVATIONS

Turn measurements into empirical insight.

See a complete example report ↗

Points are your recorded observations. The solid regression line validates Single-Sample Z & t Tests mathematical scaling.

LINEAR REGRESSION FIT · y = mx + b
y = 2.0000 · x
#Standardized Effect Size Magnitude δ (δ)Expected Test Statistic E[Z] (Statistic E[Z])Standardized Effect Size δExpected Test Statistic E[Z]Remove

No readings yet. Execute a statistical trial and record it.

Calculate it yourself.

CHECK YOUR UNDERSTANDING

Explain what the statistical metrics mean.

For a sample of size n = 4 with known σ = 1.0 and effect size δ = (μ - μ_0)/σ, what is the expected Z-statistic E[Z]?

What constitutes a Type I error in statistical hypothesis testing?

Which theorem proves that the likelihood ratio test is the Uniformly Most Powerful test for simple hypotheses?

For a standard normal Z-test with α = 0.05, what is the critical value Z_crit for an upper-tailed test?