statistical-significance-annotation

Solid

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.

AI & Automation 362 stars 36 forks Updated 1 weeks ago NOASSERTION

Install

View on GitHub

Quality Score: 81/100

Stars 20%
85
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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...

Details

Author
jaechang-hits
Repository
jaechang-hits/SciAgent-Skills
Created
6 months ago
Last Updated
1 weeks ago
Language
Python
License
NOASSERTION

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category