Skip to content

Latest commit

 

History

65 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Statistical Methods in R and Python

A curated collection of statistical methods implemented from first principles, with mathematical intuition, reproducible code, practical examples, and applications to real-world scientific problems.

GitHub last commit License Language


About

Statistics is far more than a collection of tests.

Every statistical method is built upon mathematical assumptions about uncertainty, variability, dependence, and inference. Understanding these foundations is essential for applying statistical methods correctly in scientific research.

This repository is an ongoing collection of statistical methods that I have implemented, studied, or applied throughout my work in computational science, statistical genetics, biomedical research, and machine learning.

Rather than presenting statistical methods as "recipes", each tutorial aims to explain

  • the underlying mathematical intuition,
  • the statistical assumptions,
  • implementation in R and/or Python,
  • visualization,
  • interpretation of results,
  • practical applications,
  • and common pitfalls.

The emphasis is on learning why a method works, not simply how to call a software function.


Repository Contents

Category Topics
Classical Statistics t-test, ANOVA, Chi-square Test, Fisher's Exact Test
Regression Models Linear Regression, Logistic Regression, Generalized Linear Models
Survival Analysis Kaplan–Meier, Cox Proportional Hazards Model
Mixed Models Linear Mixed Models, Random Effects
Multivariate Statistics PCA, MANOVA, PERMANOVA
Bayesian Statistics Bayesian inference (planned)
Multiple Testing Bonferroni, Benjamini–Hochberg
Resampling Methods Bootstrap, Permutation Tests
Statistical Genetics Heritability, GWAS-related methods (growing)
Machine Learning Statistics ROC curves, Cross-validation, Model evaluation

What is there?

The goal of this repository is to bridge the gap between mathematical statistics and practical data analysis.

Each tutorial attempts to answer five questions:

  1. What problem does this method solve?
  2. What mathematical assumptions does it make?
  3. How is the method derived?
  4. How can it be implemented in R or Python?
  5. How should the results be interpreted?

Whenever possible, tutorials include

  • mathematical derivations,
  • intuitive explanations,
  • reproducible code,
  • figures,
  • simulated examples,
  • references to the original literature.

Current Tutorials

Tutorial Status
Covariance Matrix
Survival Analysis
PERMANOVA
Statistical Tests
Linear Regression 🚧
Logistic Regression 🚧
Mixed Models 🚧
Bayesian Statistics 🚧
Statistical Genetics 🚧

Technologies

  • R
  • Python
  • NumPy
  • SciPy
  • pandas
  • statsmodels
  • survival
  • ggplot2
  • matplotlib

Intended Audience

This repository is intended for

  • Data Scientists
  • Computational Biologists
  • Statistical Geneticists
  • Graduate Students
  • Researchers
  • Machine Learning Practitioners
  • Anyone interested in learning statistical methods from first principles

Future Topics

Some topics currently planned include

  • Linear Mixed Models
  • Generalized Linear Mixed Models
  • REML
  • Bayesian Regression
  • Mediation Analysis
  • Structural Equation Models
  • Bootstrapping
  • Permutation Testing
  • Multiple Testing Correction
  • Meta-analysis
  • Mendelian Randomization
  • Polygenic Risk Scores
  • GWAS Quality Control
  • Heritability Estimation
  • Principal Component Analysis
  • Canonical Correlation Analysis

Contributing

Suggestions, discussions, and corrections are always welcome.

If you notice an error, have an idea for a new tutorial, or would like to improve an existing implementation, feel free to open an issue or submit a pull request.


Author

Nivedita Bhadra, PhD

Computational Scientist

Physics → Statistics → Machine Learning → Statistical Genetics → Biomedical Data Science

GitHub: https://github.com/BNTechie

Medium: https://medium.com/@nivedita.home

LinkedIn: https://www.linkedin.com/in/nivedita-bhadra-b5149130


License

This repository is released under the MIT License.

About

Statistical methods implemented from first principles in R and Python, with mathematical derivations, reproducible code, and applications to computational biology, statistical genetics, and machine learning.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages