Skip to content
Back to skills

Bio Applied Statistics For Bioinformatics

ASecurity

Statistical testing for bioinformatics: distributions, hypothesis testing, multiple testing correction (Bonferroni, BH/FDR), parametric vs non-parametric test selection

  • 4 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 27, 2026
data-aipythongoexpresstesting

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add Pavel-Kravchenko/Bioinformatics --skill bio-applied-statistics-for-bioinformatics --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Bio Applied Statistics For Bioinformatics?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Bio Applied Statistics For Bioinformatics
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/pavel-kravchenko-bio-applied-statistics-for-bioinformatics/badge)](https://www.skillsdirectory.com/skills/pavel-kravchenko-bio-applied-statistics-for-bioinformatics)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: bio-applied-statistics-for-bioinformatics
description: "Statistical testing for bioinformatics: distributions, hypothesis testing, multiple testing correction (Bonferroni, BH/FDR), parametric vs non-parametric test selection"
tool_type: python
primary_tool: NumPy
---

# Statistics for Bioinformatics

## Distribution Selection Guide

| Distribution | Biology use case | Example |
|---|---|---|
| Normal | Continuous measurements | Log-transformed expression |
| Poisson | Count data (rare events) | Mutations per gene |
| Negative binomial | Overdispersed counts | RNA-seq reads (DESeq2) |
| Binomial | Success/failure in n trials | Methylated CpGs |
| Exponential | Waiting times | Distance between mutations |
| Uniform | p-values under null | Expected p-value distribution when H0 true |

## Test Selection Guide

| Situation | Parametric | Non-parametric |
|---|---|---|
| Two independent groups | Independent t-test | Mann-Whitney U |
| Two paired groups | Paired t-test | Wilcoxon signed-rank |
| 3+ independent groups | One-way ANOVA | Kruskal-Wallis |
| Categorical association | — | Chi-squared / Fisher's exact |

**Use parametric** when: ~normal distribution (or n>30), roughly equal variances, continuous data.
**Use non-parametric** when: small samples, skewed/outlier-heavy, ordinal data.

```python
from scipy import stats

# Two-group comparison
t_stat, t_p = stats.ttest_ind(treated, control)           # assumes equal var
tw_stat, tw_p = stats.ttest_ind(treated, control, equal_var=False)  # Welch's
u_stat, u_p = stats.mannwhitneyu(treated, control, alternative='two-sided')
```

## Multiple Testing Correction

Testing 20,000 genes at alpha=0.05 yields ~1,000 false positives.

### Bonferroni
- alpha_adj = alpha / m — controls family-wise error rate (FWER)
- Very conservative; misses many true positives

### Benjamini-Hochberg (FDR)
- Controls false discovery rate (expected proportion of FP among discoveries)
- Sort p-values, find largest k where p_(k) <= k/m * q
- Standard choice for genomics (q=0.05)

```python
from statsmodels.stats.multitest import multipletests

reject_bonf, pvals_bonf, _, _ = multipletests(p_values, alpha=0.05, method='bonferroni')
reject_bh, pvals_bh, _, _ = multipletests(p_values, alpha=0.05, method='fdr_bh')
```

## Pitfalls

- **Multiple testing**: Always apply FDR correction when testing thousands of features
- **Skewed data + t-test**: outliers distort t-test results; Mann-Whitney is robust
- **P-value histogram diagnostic**: uniform = all null; spike near 0 = true signal present

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.