Understand the idea
Before running any test, it helps to just LOOK at your data carefully. A descriptive summary boils each column down to a handful of numbers that describe where its values tend to sit (center), how spread out they are, and what shape the distribution takes, without fitting any model. The one exception is the confidence interval for each mean, which reaches beyond your rows to the wider population and relies on how the data were sampled.
For a numeric column you get both the mean (the arithmetic average, easily pulled around by a few extreme values) and the median (the middle value once everything is sorted, much harder to budge with outliers). When these two disagree noticeably, that itself is informative: a mean well above the median usually signals a long right tail (a few unusually large values dragging the average up). Skewness and kurtosis put numbers on exactly that kind of shape.
For a categorical column you instead get the count and share of each category. This is the natural first check before running a chi-square test or comparing groups: you want to know how many categories there are and how lopsided they are before asking whether they differ.
Descriptive statistics, also called summary statistics, describe the data you have without testing anything. The five-number summary is the minimum, first quartile, median, third quartile and maximum.
Practitioner explanation
KernelStats reports n, missing count, mean, SD, SE (SD/sqrt(n)), the five-number summary (min/Q1/median/Q3/max) plus IQR, bias-corrected sample skewness and excess kurtosis (scipy bias=False), a per-variable normality verdict (Shapiro-Wilk for 8 to 5,000 values, Anderson-Darling at its 5% critical value above that; not assessed below 8), and a 95% CI of the mean built with the t-distribution: x-bar +/- t_(0.975, n-1) * (s/sqrt(n)), the classic Student's-t interval, not a normal-approximation or bootstrap interval, whose exact normal-theory coverage requires suitable independent observations and normality; skew and outliers can affect small-sample coverage. Categorical variables get count and proportion per level, with the rarest levels collapsed into '(other)' once the list of distinct levels gets long, keeping the summary table readable rather than sprawling across dozens of rare categories.
Supplying a grouping column repeats the full numeric summary within each level of that group, producing exactly the side-by-side comparison of means, SDs, and confidence intervals that is the natural descriptive precursor to choosing between a t-test and an ANOVA; this card does not itself run either test, but the group-level summary it produces is what a practitioner reads before deciding which comparison to run and whether its assumptions look plausible.
The card flags strong skew (|skewness| > 1) and high missingness (over 20%) as prompts to look further: at the distribution, and at why values are missing. They are not automatic decisions to transform the data or to trust what remains; missingness below 20% can still bias results, and the card does not test the missingness mechanism.
When to use it
Consider it when
As the first step of nearly any analysis: a quick, trustworthy snapshot of each variable's center, spread, and shape, overall or split by a group, before committing to any inferential test.
Use caution when
When the question requires a formal comparison or model (the summary describes; its one inferential number is the confidence interval for each mean), or when data quality itself is in question: run a data-quality check first, since summaries computed over miscoded values (text-coded numbers, sentinel codes like 999 for missing) look plausible while being wrong.
Formulas and symbols
95% confidence interval of the mean
s is the sample standard deviation. Under independent normally distributed observations the t interval has exact nominal coverage; in other settings coverage may be approximate.
Standard error of the mean
s/sqrt(n) estimates the standard error of the mean: how much the mean itself would vary from sample to sample, which is different from the SD, the spread of individual observations. The formula assumes independent observations.
Sample skewness
The bias-corrected sample skewness (scipy bias=False, the same G1 that R psych::describe type 2 and most packages report). 0 = symmetric; positive = long right tail; negative = long left tail. |skew| > 1 is flagged as strong.
Assumptions and checks
- Descriptive statistics (mean, SD, quartiles, etc.) summarize whatever rows are present; if those rows are not a representative sample of the population of interest, or contain unnoticed duplicate or erroneous entries, the summary is an accurate description of the wrong data rather than a wrong calculation.
In KernelStats: Not checked by KernelStats: the summary is a direct tabulation of the data supplied and needs no distributional assumption (the per-variable normality test the card reports describes shape; it does not validate the rows). Missing values are excluded and counted, but representativeness and correctness of the rows themselves cannot be assessed from the summary alone.
Alternatives
- Exploratory Data Analysis (EDA). You want the full exploratory sweep (correlation structure, data-quality triage, and auto-picked group comparisons) rather than just the per-variable center/spread/shape summary.
- Two-Sample t-Test. The descriptive summary's group comparison (two levels) suggests a real difference worth testing formally, with a p-value and confidence interval for the difference itself.
- Normality Test (Battery). The skewness/kurtosis flags raise a normality question that needs a formal test (Shapiro-Wilk, Anderson-Darling) rather than a descriptive flag alone.
Worked example
Scenario
A descriptive summary of penguin body mass, split by species, across 342 birds.
Result
Overall: mean 4202 g, median 4050 g, SD 802 g and skewness 0.47. The species means are approximately 3701 g for Adelie, 3733 g for Chinstrap and 5076 g for Gentoo. Their 95% t intervals are approximately [3627, 3774] g, [3640, 3826] g and [4986, 5166] g, respectively.
Interpretation
The Adelie and Chinstrap intervals overlap, while the Gentoo interval is separated from both. The combined distribution mixes species with different centers; these summaries alone do not establish why the overall distribution is skewed or whether pairwise differences are statistically significant. A formal comparison requires a suitable design and assumptions.
Dataset: penguins.csv
Common misconceptions
Misconception
The mean is always the right number to report as a variable's 'typical' value.
Correction
The mean is pulled toward extreme values, so for a skewed distribution (many real-world quantities: income, wait times, reaction times) the median is often more representative of what a 'typical' observation actually looks like. When mean and median disagree noticeably, that gap is itself informative about the shape of the distribution, not a discrepancy to resolve by picking one.
Misconception
A variable with 15% of its values missing is fine to summarize as-is, since 85% of the data is still there.
Correction
The PERCENTAGE missing says nothing about whether the missing values are missing for a reason connected to the variable itself (missing not at random). A high missingness flag is a prompt to investigate WHY values are absent before trusting a summary computed only from what remains: the remaining 85% can be systematically unrepresentative of the full picture.
References
- NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.5 Quantitative techniques, NIST/SEMATECH (2012), §1.3.5.
- STAT 415: Confidence Intervals, Penn State Eberly College of Science, 6.
