Shapiro–Wilk test
The Shapiro–Wilk test is a statistical hypothesis test assessing whether a sample is consistent with a normal distribution.
Statistics Every Programmer Needs
The Shapiro–Wilk test is a statistical hypothesis test for whether a sample is consistent with a normal distribution.
- How it is used
- Uses formal normality testing to validate numeric data before analysis rather than relying solely on visual inspection.
- How deep it goes
- Defines the null hypothesis, applies a 5% decision rule, and demonstrates SciPy execution, but does not develop the test statistic formula.
- Examples
- Tests the stage1 and stage2 columns of a 20-row mds dataset using SciPy.
- What you can do after
- Evaluate normality with SciPy and interpret returned p-values against a 5% threshold.
Read how Statistics Every Programmer Needs explains Shapiro–Wilk test →
Statistics Slam Dunk
The Shapiro-Wilk test is a statistical test that evaluates whether a sample is consistent with a normal distribution.
- How it is used
- Screens variables for normality before correlation analysis and linear modeling.
- How deep it goes
- Defines the null hypothesis and cutoff, demonstrates R output, and stops short of deriving the test statistic.
- Examples
- Tests NBA hustle variables such as deflections, charges, wins, and points per game.
- What you can do after
- Diagnose distributional assumptions with base R and decide which variables remain regression candidates.
What to know first
- density plotA density plot is a visualization that estimates and displays the shape of a continuous variable’s probability distribution as a smooth curve.
- histogramA histogram is a representation that groups observations into bins and records their frequencies or other aggregate values.
- normal distributionA normal distribution is a continuous probability distribution with a symmetric, bell-shaped density determined by its mean and variance.
- probability distributionA probability distribution is a mathematical specification assigning probabilities or probability densities to the possible values or outcomes of a random variable.
Related concepts
- p-valueproduces · A p-value is the probability, assuming a specified null hypothesis, of obtaining a test statistic or result at least as extreme as the observed one.
- shapiro.test() functionused by · The base R shapiro.test() function performs the Shapiro-Wilk test of whether numeric data are plausibly drawn from a normal distribution.
- histogramalternative to · A histogram is a representation that groups observations into bins and records their frequencies or other aggregate values.
- SciPyimplemented by · SciPy is an open-source Python library providing algorithms and numerical utilities for scientific and technical computing.
Questions about Shapiro–Wilk test
What is Shapiro–Wilk test?
The Shapiro–Wilk test is a statistical hypothesis test assessing whether a sample is consistent with a normal distribution.
Which Manning books explain Shapiro–Wilk test?
Statistics Every Programmer Needs and Statistics Slam Dunk.
What should I know before learning Shapiro–Wilk test?
Manning books that teach Shapiro–Wilk test usually introduce density plot, histogram, normal distribution and probability distribution first.
What is the difference between Shapiro–Wilk test and histogram?
The Shapiro–Wilk test is a statistical hypothesis test assessing whether a sample is consistent with a normal distribution. A histogram is a representation that groups observations into bins and records their frequencies or other aggregate values.
What is Shapiro–Wilk test a kind of?
Shapiro–Wilk test is a kind of normality test. A normality test is a statistical procedure for assessing whether data are plausibly drawn from a normal distribution.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

