← ClaudeAtlas

statistical-significance-annotationlisted

Guide for annotating statistical significance (p-value asterisks) on comparison plots. Covers standard notation (ns, *, **, ***, ****), matplotlib bracket+asterisk implementation, and use with seaborn box/violin/bar plots. Use when preparing publication-ready figures with significance markers.
jaechang-hits/SciAgent-Skills · ★ 193 · AI & Automation · score 79
Install: claude install-skill jaechang-hits/SciAgent-Skills
# Statistical Significance Annotation on Plots ## Overview Statistical significance annotations (asterisk notation) are visual markers placed on comparison plots to indicate the results of hypothesis tests between groups. They consist of brackets connecting two groups and asterisk symbols denoting the p-value range. Proper annotation ensures that the visual claims in a figure match the quantitative evidence, making plots publication-ready and scientifically rigorous. This guide covers the standard conventions, when and how to annotate, and a reusable matplotlib implementation. ## Key Concepts ### Standard Asterisk Notation The widely adopted convention maps p-value ranges to asterisk symbols: | Symbol | P-value Range | Meaning | |--------|--------------|---------| | ns | p > 0.05 | Not significant | | \* | p <= 0.05 | Significant | | \*\* | p <= 0.01 | Highly significant | | \*\*\* | p <= 0.001 | Very highly significant | | \*\*\*\* | p <= 0.0001 | Extremely significant | The conversion function: ```python def pvalue_to_asterisk(p: float) -> str: """Convert a p-value to standard asterisk notation.""" if p <= 0.0001: return "****" elif p <= 0.001: return "***" elif p <= 0.01: return "**" elif p <= 0.05: return "*" else: return "ns" ``` ### Adjusted vs Raw P-values - **Single comparison** (one t-test): Use raw p-value. - **Multiple comparisons** (pairwise tests across 3+ groups, multiple genes): Use adjus