data-statistical-analysis
When to use
Use this when a decision rides on whether an effect is signal or noise: "is this difference real?", "are these correlated?", "is the trend significant?", "which points are outliers?" Reach for it instead of eyeballing a chart.
Not for: the raw business answer without rigor (use data-analyze), profiling data quality (use data-explore), or building the chart itself (use data-create-viz).
Method
- Frame the question statistically: estimation, comparison, association, or trend. State the population and unit of analysis.
- Describe first. Report n, center (mean/median), spread (SD/IQR), and shape. Visualize the distribution before testing.
- Choose the test by data type and assumptions:
- Two-group means → t-test (Welch if variances differ); non-normal/small → Mann-Whitney.
2 groups → ANOVA / Kruskal-Wallis.
- Categorical association → chi-square / Fisher (small cells).
- Numeric association → Pearson (linear) or Spearman (monotonic).
- Trend → regression, test the slope.
Decision point: check normality, independence, and variance; if an assumption fails, drop to the nonparametric option.
- Report effect size and confidence interval, not just p. A significant p with a trivial effect is not actionable.
- Outliers: detect (IQR or z-score), investigate cause, decide keep/exclude with justification — never drop silently.
- Correct for multiple comparisons (Bonferroni/BH) when running many tests.
Example
A/B test: control 4.0% conversion (n=5,000), variant 4.6% (n=5,000). Two-proportion z-test → p=0.03. But the 95% CI on the lift is [+0.05pp, +1.15pp] — the effect could be near-zero. Verdict: statistically significant, practically marginal; ship only if the +0.6pp point estimate clears the cost of the change.
Pitfalls
- Reporting p<0.05 with no effect size, implying an important result from a trivial one.
- Running a t-test on skewed or tiny samples where its normality assumption fails.
- Reading correlation as causation, ignoring a confounder.
- Testing 20 metrics, celebrating the one that hits p<0.05, and not correcting for multiplicity.
Output format
Question: hypothesis in plain + statistical terms
Descriptives: n, center, spread, distribution shape
Test: method + why + assumption checks
Result: statistic, p-value, effect size, confidence interval
Interpretation: what it means for the decision, plain language
Caveats: sample size, violated assumptions, confounders
Distinguish statistical from practical significance. Say when the sample is too small to conclude anything.
1---2name: data-statistical-analysis3version: 1.0.04description: Run descriptive stats, trend, outlier, correlation, and hypothesis tests with correct method selection and honest effect sizes.5author: matrixx00706tags: [statistics, hypothesis-testing, correlation, trend, outliers, effect-size]7capabilities: []8metadata:9 source: https://skillmd.com/skills/matrixx0070/data-statistical-analysis10---1112# data-statistical-analysis1314## When to use1516Use this when a decision rides on whether an effect is signal or noise: "is this difference real?", "are these correlated?", "is the trend significant?", "which points are outliers?" Reach for it instead of eyeballing a chart.1718**Not for:** the raw business answer without rigor (use data-analyze), profiling data quality (use data-explore), or building the chart itself (use data-create-viz).1920## Method21221. **Frame the question statistically:** estimation, comparison, association, or trend. State the population and unit of analysis.232. **Describe first.** Report n, center (mean/median), spread (SD/IQR), and shape. Visualize the distribution before testing.243. **Choose the test by data type and assumptions:**25 - Two-group means → t-test (Welch if variances differ); non-normal/small → Mann-Whitney.26 - >2 groups → ANOVA / Kruskal-Wallis.27 - Categorical association → chi-square / Fisher (small cells).28 - Numeric association → Pearson (linear) or Spearman (monotonic).29 - Trend → regression, test the slope.30 Decision point: check normality, independence, and variance; if an assumption fails, drop to the nonparametric option.314. **Report effect size and confidence interval,** not just p. A significant p with a trivial effect is not actionable.325. **Outliers:** detect (IQR or z-score), investigate cause, decide keep/exclude with justification — never drop silently.336. **Correct for multiple comparisons** (Bonferroni/BH) when running many tests.3435## Example3637A/B test: control 4.0% conversion (n=5,000), variant 4.6% (n=5,000). Two-proportion z-test → p=0.03. But the 95% CI on the lift is [+0.05pp, +1.15pp] — the effect could be near-zero. Verdict: statistically significant, practically marginal; ship only if the +0.6pp point estimate clears the cost of the change.3839## Pitfalls4041- Reporting p<0.05 with no effect size, implying an important result from a trivial one.42- Running a t-test on skewed or tiny samples where its normality assumption fails.43- Reading correlation as causation, ignoring a confounder.44- Testing 20 metrics, celebrating the one that hits p<0.05, and not correcting for multiplicity.4546## Output format4748```49Question: hypothesis in plain + statistical terms50Descriptives: n, center, spread, distribution shape51Test: method + why + assumption checks52Result: statistic, p-value, effect size, confidence interval53Interpretation: what it means for the decision, plain language54Caveats: sample size, violated assumptions, confounders55```5657Distinguish statistical from practical significance. Say when the sample is too small to conclude anything.