Lilliefors Test Calculator

Lilliefors Test Calculator. Enter your sample data into the Lilliefors Test Calculator to test whether your data follows a normal distribution when population parameters are unknown. Input a comma- or space-separated data series and set your significance level (α) — the calculator estimates the mean and variance from your sample, computes the Lilliefors test statistic (D), compares it against the critical value, and returns a clear pass/fail normality decision along with the p-value. Also try the Fisher's Exact Test Calculator.

Lilliefors Test Calculator inputs

Enter numeric values separated by commas, spaces, or new lines. You may paste directly from Excel or Google Sheets.

Common choice is 0.05 (5%). Lower values require stronger evidence to reject normality.

Choose whether to include or exclude outliers (values beyond 1.5×IQR from quartiles).

Results

Lilliefors Test Statistic (D)

--

p-value (approx.)

--

Critical Value

--

Sample Mean (μ̂)

--

Sample Std Dev (σ̂)

--

Sample Size (n)

--

Normality Decision

--

Results Table

Lilliefors Test Calculator gives you what most statistical tools cannot: an objective, simulation-based verdict on the normality of your data column even when the true mean and variance of your population are unknown. Imagine trying to run a t-test or ANOVA on a clinical trial dataset: without clear evidence that your data are approximately normally distributed, your entire statistical inference might be at risk. With this calculator, you get robust results that guide whether to trust parametric tests—or if a nonparametric approach is warranted—helping you make defensible decisions for research, quality control, or coursework in seconds. See also our calculate Chi-Square Goodness of Fit Chi-Square Statistic (χ²).

Understanding the Lilliefors Test: When Population Parameters Are Unknown

Core Purpose and When to Use the Kolmogorov-Smirnov Approach

  • The lilliefors test is designed to check if your data plausibly come from a normal distribution when you must estimate the mean and standard deviation from the sample itself—an extremely common scenario in both social science and laboratory statistics.
  • It addresses the real-world case where the sample parameters (not the population ones) are all you have during your evaluation.
Purpose: Use the lilliefors correction when the normal distribution parameters (mean and variance) are unknown and must be estimated from your actual sample data. The test is an essential step before running parametric statistical analysis such as t-tests, ANOVA, or linear regression.
  • Use the lilliefors test calculator prior to any normal-theory test (e.g., t-test, anova, linear regression) when the assumption of normality is in doubt and the parameters are not specified a priori.

Comparison: Lilliefors vs Kolmogorov-Smirnov Test

kolmogorov-smirnov test
Compares your data against a fully specified theoretical distribution—parameters like mean and variance for a normal distribution must be known in advance.
lilliefors correction
Applies the same D statistic but uses new, simulation-derived reference values that account for using estimated parameters. This adjustment restores validity to the significance threshold when your model is fit to the observed data.
MethodParameters RequiredIdeal ForCritical Value Tableproscons
Kolmogorov-SmirnovFully specifiedAny distribution testStandard KS tablenonparametric, works with any continuous CDF, simple metricconservative if parameters estimated, loses power
lillieforsEstimated from samplenormality test with unknown mean/varianceSimulated / LillieforsAppropriate for most real data, correct type I errorFor normal distribution only, Monte Carlo needed

Key Assumptions and Limitations for the Lilliefors Normality Test

  • Data should be continuous and measured at least on an ordinal scale; categorical or heavily tied data can invalidate the results.
  • Uses the same d statistic as the kolmogorov-smirnov test calculator, but with tailored simulated reference values.
  • Observations must be independent and come from a single distribution.
  • Most sensitive to deviations in the center of the distribution—may miss extreme points in the tails.
  • Power declines for very small (n < 8) or very large (n > 5000) group sizes; for big sets, even trivial deviations become “statistically significant.”
When NOT to use the lilliefors test
  • To check non-normal distributions (e.g., exponentiality, Weibull)—specific distribution tests or corrections are needed.
  • With discrete or highly rounded numeric columns (e.g., strongly integer scores with few unique values)—see the shapiro-wilk test instead.

How to Use the Lilliefors Test Calculator for Simulation-Based Inference

Step 1: Preparing Your Data Column for Analysis

  • Your data column for the normality test calculator should be a single, numeric vector—one observation per row. Remove or mark missing values; non-zero variance is required.
  • Accepted formats: paste a column from spreadsheet or CSV—just ensure all entries are measured values.
Tip: If your numbers are ordinal, continuous, and have at least 5 observations, you are good to go.

Step 2: Running the Calculator on the Web, in Excel, and with R Code

  • Online calculator: Paste your numbers into the lilliefors test calculator input; set alpha, select output sections like Q-Q plot, histogram, or descriptive statistics, and click calculate.
  • excel: There is no built-in lilliefors function, but with some programming or add-ins, you can automate the calculation. Most commonly, your dataset is loaded into R or Python for accurate monte carlo probability value calculation.
  • google sheets: As of now, direct lilliefors support is not native. Export your data column and use the lilliefors test calculator online for reliable results.
  • R code:
library(nortest)
result <- lillie.test(your_data)
print(result)

Step 3: Reading the Output Sections—Interpretation at a Glance

Result panels will often include:

  • Sample summary: n, sample mean, sample sd, variance, skewness, kurtosis
  • Test metric: D, D+, D-; these quantify the maximum vertical difference between the empirical and fitted normal cdf
  • monte carlo p-value: Simulation-derived result—see below
  • Normality verdict: "Fail to reject" if p ≥ alpha; "Reject" if p < alpha
  • Visuals: Q-Q plot chart, histogram, and ecdf plot
Formula: How the D Statistic is Calculated
  1. Sort your numeric values: \(x_{(1)} \leq x_{(2)} \leq \dots \leq x_{(n)}\)
  2. Estimate mean (\(\hat{\mu}\)) and standard deviation (\(\hat{\sigma}\)) from the entries.
  3. Compute empirical cdf: \(F_n(x) = \frac{1}{n}\sum_{i=1}^{n} I(x_{i} \leq x)\)
  4. Compute model cdf: \(\Phi\left(\frac{x - \hat{\mu}}{\hat{\sigma}}\right)\), where \(\Phi\) is the normal cdf
  5. Find maximum absolute difference for all x:\n$$D = \max_{x} |F_n(x) - \Phi\left(\frac{x - \hat{\mu}}{\hat{\sigma}}\right)|$$
Also compute:
  • \(D^+ = \max (F_n(x) - \Phi(...))\)
  • \(D^- = \max (\Phi(...) - F_n(x))\)
  • \(D = \max(D^+, D^-)\)

Decoding Your Normality Test Calculator Results: Interpreting D Statistic, Monte Carlo p-value, and Effect Levels

What Does the Test Statistic: D Mean?

The test statistic: D represents the maximum absolute deviation between your sample's empirical cdf and the fitted normal cdf. Large D values signal a significant departure from normality. For granularity, the separate components D+ (upward deviation) and D- (downward deviation) may be reported—these specify whether the numbers are skewed high or low relative to the fitted curve.

D statistic: $$D = \max_x \left| F_n(x) - \Phi\left(\frac{x - \hat{\mu}}{\hat{\sigma}}\right) \right|$$
D+: largest upward deviation
D-: largest downward deviation
  • In the output sections, look for D values along with descriptive statistics and Q-Q plot chart for comprehensive interpretation.

Understanding Significance Level and Monte Carlo p-value:

  • Significance level (alpha, often 0.05): the threshold for "Reject"/"Fail to reject" normality.
  • monte carlo p-value: The proportion of simulated D statistics (from repeated resampling under the null) that are greater than or equal to the observed D. Small p-values mean strong evidence against normality.

Interpret like this:

  • p-value < significance level: Reject the null hypothesis—your values significantly deviate from normality.
  • p-value ≥ significance level: Insufficient evidence to say your numbers aren't normal.
Null hypothesis: Data follow a normal distribution
Alternative hypothesis: Data do not follow a normal distribution

Because the lilliefors test uses *simulation-based inference*, there will be slight variation if you rerun the monte carlo computation repeatedly on the same group size—especially if the observed D falls close to the simulated reference values.

Evaluating Normality Effect Sizes (Effect Levels: Small, Medium, Large)

Interpreting just "significance" can be misleading. Use effect size to gauge the practical difference from normal:

Effect LevelD Statistic RangeDescription
SmallD ≈ 0.05–0.09Trivial departures from the normal curve; may not matter for many analyses.
MediumD ≈ 0.09–0.14Expected for moderate difference; worth investigating unusual points or skew.
LargeD > 0.14Substantial departure—parametric results may be unreliable.
Reference: Typical Critical Values by Sample Size (n)
  • n = 10: Dcrit ≈ 0.258 (@ α=0.05)
  • n = 40: Dcrit ≈ 0.137
  • n = 80: Dcrit ≈ 0.100

Alternatives and Limitations: When to Choose a Different Normality Test or Method

When Should You Use a Different Test? (Kolmogorov-Smirnov, D’Agostino, and More)

  • If your data column has repeated values (ties), small group, or is discrete/ordinal, consider the shapiro-wilk test or anderson-darling test.
  • Kolmogorov-smirnov test (no correction) is valid only when normal distribution parameters are fully specified—rare in practice.

Alternative Tests: Shapiro-Wilk, Anderson-Darling, More (Comparison Table)

TestProsConsBest for
Shapiro–Wilkexcellent power, detects both skewness and kurtosis, robust for small/medium nSensitive to ties, not for highly discrete/rounded distributionsSmall to moderate sets, continuous variables
Lilliefors / Kolmogorov-smirnov (corrected)Nonparametric, works with minimal distribution assumptions, automaticLower power in tails, less sensitive to subtle variationsGeneral checks, moderate n, center deviations
Anderson–DarlingWeights tails heavily, high powerCan over-react to single anomalies, less robust to roundingTails, reliability/risk, visual assessment
Cramér–von MisesIntegrates squared difference, less sensitive to single large deviationsLess interpretable, less commonGeneral normality checking
Runs testAssesses randomness not normalityNo distribution verdictCheck residuals/structure
  • When in doubt, compare results from both shapiro-wilk and lilliefors normality calculators, and always inspect a qq-plot chart.

Visual Methods: Q-Q Plots, Histogram, and Graphical Diagnostics

A Q-Q plot chart shows your scores versus the expected normal quantiles. If points fall along the straight line, your values appear normally distributed.

  • Histogram: Quick check for unimodality, outliers, or tail deviations
  • ECDF: Step-function plot of the cumulative distribution—overlay model cdf for visual fit
Best Practices with Graphical Checks
  • Use graphical methods to catch deviations that are “statistically significant” but not practically relevant.
  • Always pair formal tests with histogram, qq-plot chart, or ecdf plots for full statistical evaluation.

Lilliefors Test Test Calculator in Practice: Worked Examples, Analysis, and R Code

Worked Example: Blood Pressure Baseline Data (sbp_baseline, patient_id)

Suppose you want to check normality of baseline systolic blood pressure for 60 patients, using Lilliefors:

patient_idsbp_baseline
1138
2152
3127
......
60149
  1. Data column: sbp_baseline, a numeric data column.
  2. Calculate the average (≈143.9), sd (≈13.6); check for non-zero variance.
  3. Run the lilliefors test calculator (online or with R code):
library(nortest)
lillie.test(sbp_baseline)
  1. Suppose output is:
    D = 0.069, p-value = 0.68 (Monte Carlo, 5,000 repetitions)
  2. Conclusion: p ≥ 0.05 → consistent with normality; data appear consistent with normal distribution.

Running the Test in R (With Code and Output)

This analysis reproduces calculator output in R with real code:

# Install, then load the nortest package
install.packages("nortest")
library(nortest)
# Run test
test_result <- lillie.test(sbp_baseline)
print(test_result)
# Output:
#
#	Lilliefors (Kolmogorov-Smirnov) normality test
# data:  sbp_baseline
# D = 0.069, p-value = 0.6827
R code matches calculator: D = 0.069, monte carlo p-value = 0.6827, with no indication of departure from normality detected at α = 0.05 for n = 60.

Comparison: Lilliefors, Shapiro-Wilk, Anderson-Darling Results on the Same Data

TestD or W/A²p-valueInterpretation
LillieforsD = 0.0690.68No evidence to reject normality
Shapiro–WilkW = 0.980.62No evidence to reject normality
Anderson–DarlingA² = 0.480.31No evidence to reject normality
  • In this blood_pressure_trial example, all three normality tests agree; always check effect size and Q-Q plot as a visual verdict!

Answers to Frequently Asked Questions on Lilliefors, Data, and Output

How does the lilliefors test calculator calculate the p-value?

It runs thousands of runs from a standard normal, estimates values from each created group, recomputes D each time, and returns the fraction where Dsim ≥ Dobs. This process-based method maintains the correct type I error and is reproducible (with enough repetitions).

Should I trust a calculator or run the r code?

Both should yield very similar results if implemented correctly. Our web tool follows the R package nortest, producing checked, reliable metrics for your statistical review.

Why doesn’t Excel or Google Sheets have a native function for the Lilliefors test?

Because the correct method requires randomization. Excel lacks built-in statistical simulation for these calculators, but you can export your data column and use the web calculator or R code for proper calculation.

“A lilliefors-corrected kolmogorov-smirnov test found no significant departure from normality for baseline systolic blood pressure, D = 0.069, p = .683 (n = 60).”
  • Reporting results: Always specify test name, p-value, group size, and if you rejected or failed to reject the null hypothesis.

References:

  • nortest package (R) documentation
  • Wikipedia: Lilliefors Test
  • NIST/SEMATECH Handbook: Normality Tests

Use the lilliefors test calculator as a core part of your statistical workflow when normality matters and population parameters are unknown. Pair it with graphical methods, compare to other normality tests, and make informed, reliable decisions in research and practice. The Lilliefors test calculator is especially helpful when assessing measurement systems, statistical test requirements, and process capability. Its sensitivity ensures you maintain accuracy with numeric data and valid confidence intervals, making it a powerful goodness-of-fit and test for normality alongside classic chi-squared and non-parametric approaches. You might also find our use the F-Statistic Calculator useful.

What is the Lilliefors test?

The Lilliefors test is a normality test derived from the Kolmogorov–Smirnov test. Unlike the standard KS test, it accounts for the fact that the population mean and variance are unknown and must be estimated from the sample data. This makes it more realistic for practical use and reduces the conservatism of the original KS test.

What is the difference between the Lilliefors test and the Kolmogorov–Smirnov test?

The standard Kolmogorov–Smirnov test requires that the population parameters (mean and standard deviation) be fully specified in advance. The Lilliefors test relaxes this requirement by estimating those parameters from the sample, then using adjusted critical values that account for the additional uncertainty. This makes Lilliefors more appropriate when you only have sample data.

What are the hypotheses of the Lilliefors test?

The null hypothesis (H₀) states that the sample comes from a normal distribution with unknown mean and variance. The alternative hypothesis (H₁) states that the data do not follow a normal distribution. A small p-value (below your chosen α) leads you to reject H₀ and conclude non-normality.

How is the Lilliefors test statistic (D) calculated?

The test statistic D is the maximum absolute difference between the empirical cumulative distribution function Fn(x) and the theoretical normal CDF Φ((x − μ̂)/σ̂), where μ̂ and σ̂ are estimated from the sample. Formally: D = sup|Fn(x) − Φ((x − μ̂)/σ̂)|. A larger D indicates greater departure from normality.

How do I interpret the Lilliefors test result?

If the p-value is less than your significance level α (e.g., 0.05), you reject the null hypothesis and conclude the data are likely not normally distributed. If the p-value is greater than α, you fail to reject H₀ — meaning there is insufficient evidence of non-normality. Keep in mind that with small samples, the test has low power.

What sample size does the Lilliefors test require?

The Lilliefors test can be applied to samples as small as n = 4 or 5, but its power increases substantially with larger samples. For very small samples (n < 10), the test may not detect non-normality reliably. For large samples (n > 200), even trivial deviations from normality may become statistically significant.

When should I use the Lilliefors test instead of Shapiro–Wilk?

The Shapiro–Wilk test is generally considered more powerful for small to medium sample sizes and is often the preferred normality test. The Lilliefors test is a good alternative when your data contains many tied (repeated) values, which can affect Shapiro–Wilk, or when you specifically need a KS-based approach with estimated parameters.

What are the limitations of the Lilliefors test?

The Lilliefors test is less powerful than Shapiro–Wilk for detecting non-normality in small samples. It is sensitive to outliers, and critical values are tabulated for specific sample sizes. Additionally, like all normality tests, it only tells you whether to reject normality — not how far from normal the data are. Consider complementing the test with a Q–Q plot or histogram.