Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Performs medical biostatistics hypothesis testing, power analysis, sample size calculation, and survival analysis.
82% 95%+14 ptsof test cases passed
Passed 21 of 22 test cases with the skill, and 18 of 22 without it.
3 of 3 safety checks passed
42 agent runs
2 forksA fork is a copy of this skill that someone made so they could edit it for their own use. The original doesn't change.
Medical biostatistics for hypothesis testing, clinical trial design, and survival analysis. Covers t-tests, ANOVA, chi-square, Fisher exact, Mann-Whitney, Kruskal-Wallis, sample size calculation, power analysis, and multiple testing correction.
uv pip install scipy statsmodels
import numpy as np
from scipy import stats
# Two-sample t-test
t_stat, p = stats.ttest_ind(np.random.normal(100, 15, 30), np.random.normal(110, 15, 30))
# Mann-Whitney
u_stat, p = stats.mannwhitneyu(np.random.normal(100, 15, 30), np.random.normal(110, 15, 30))
# Chi-square
chi2, p, dof, _ = stats.chi2_contingency(np.array([[30, 10], [20, 40]]))
from statsmodels.stats.power import TTestIndPower
n = TTestIndPower().solve_power(effect_size=0.5, power=0.80, alpha=0.05)
print(f"N per group: {np.ceil(n):.0f}")
Next to this one in the catalogue, plus more from the same author.