-
Notifications
You must be signed in to change notification settings - Fork 0
Statistical and Mathematical Tidbits
Some references providing advice for general statistical issues and explanations of common mathematical techniques. See also the note on Reproducible Science, which contains more general material related to the limitations of common statistical procedures.
- Blog post advocating cautious analysis (Russ Poldrack 2016)
- Collection of publications about stats for biologists (Nature 2017)
- Article about visualising data distributions rather than relying on summary stats alone (2017)
- Article about common probability distributions (2015)
- Map interrelating univariate distributions ()
- Greenland et al. - Statistical tests, P values, confidence intervals, and power: a guide to misinterpretations (2016)
- Blog post about how normality assumptions affect p-values (Bill Connelly 2018)
- Textbook on statistics (Larry Wasserman 2004)
- Textbook on high-school / uni maths (Serge Lang 1988)
- Author checklist for statistical reporting (2022)
- Data analysis in R (Michael Franke 2023)
- Coursera course on statistical inference
- Collection of computation neuroscience resources from Gunnar Blohm's lab
- Online textbook for neuroimaging and data science in Python notebooks
- Excellent accessible/visual/intuitive maths videos
- Introductory maths course (Oxford Uni 2022)
- Excellent animated videos on computational neuroscience, often about dynamical systems or machine learning
- Maths lectures
- Paid online maths courses with personalised progression/testing
- Paid online interactive maths courses
- Open source textbook for statistical thinking (Russ Poldrack 2020)
- Stats videos, often in SPSS
- Maths tutorials (West Texas A&M University 2011)
- Book on data analysis and prediction algorithms in R
- Worked examples of common statistical tests in R
- Blitzstein and Hwang - Introduction to Probability, Second Edition (2019)
- Radi and Rasmussen - Principles of Physics for Scientists and Engineers, Second Edition (2024)
- Quantitative neuroscience course in Python from (Gunnar Blohm 2020)
- Open source textbook for learning stats in R (Danielle Navarro 2018)
- Video about simulating statistics in Excel (2021)
- Introduction to data science in R (2022)
- A library for easy stats in R
- Video series about rethinking stats (2024)
- Interpreting correlation coefficients
- How to compare correlations
- Effect of sample size on correlations
- Article about correlation methods in R
- R package for correlations
- Interactive demo of basic concepts in regression
- Course on relationships between common statistical tests (i.e., variants of the GLM)
- Limitations of R^2
- Problems with standardised regression coefficients
- Course on linear regression
- Intro to least squares fitting
- Toolbox for regularised (penalised) GLMs (e.g., lasso, elastic net, etc)
- On different types of regression models
- Ensemble methods - bagging and random forests
- Hierarchical modelling
- Lectures on GLMs
- Tutorial on mixed models
- Pitfalls of interpreting coefficients in linear models
- Sample size calculator
- On longitudinal mixed models and GAMMs
- Python package for GLM-based stats
- Dominance analysis for relative importance of predictors in a GLM
- Primer on logistic analysis
- Limitations of analysis of covariance
- Course and textbook on probability
Materials of an M-plus course are available on the Lab Shared Drive (under Workshops/InStats_Mplus_2022)
M-plus is a popular software for structural equation modelling. The course topics are:
- Regression and Path analysis in Mplus
- From Confirmatory factor analysis to moderated mediation in Mplus
- Longitudinal Structural Equation Modelling in Mplus: Latent growth and cross-lagged models.
- Multilevel Structural Equation Modelling in Mplus.
These folders contain; the slides from the course, the example code in Mplus files, the expected output associated with the code, some exercises / challenges to work through, as well as some relevant references.
In linux, M-Plus is a command line only program. You can load mplus into terminal with the command: $ module load mplus/8.6 scripts must be saved with the file extension .inp and can be run like this $ mplus .inp M-plus will then return a .out file with the associated output. More instructions on running M-plus from terminal can be found here
Some useful info is also contained in the M-plus manual: https://www.statmodel.com/Mplus_Book.shtml
-
Different effect sizes for within-subjects designs: http://jakewestfall.org/blog/index.php/2016/03/25/five-different-cohens-d-statistics-for-within-subject-designs/
-
Effect sizes for comparisons between two groups: https://garstats.wordpress.com/2016/05/02/robust-effect-sizes-for-2-independent-groups/
-
Effect size calculator https://katherinemwood.shinyapps.io/lakens_effect_sizes/
-
Re-evaluating how to interpret effect sizes https://doi.org/10.1177/2515245919847202
-
Avoid using Cohen's 'small/medium/big' heuristic https://doi.org/10.1016/j.tics.2019.12.009
-
Matlab toolbox for effect sizes https://au.mathworks.com/matlabcentral/fileexchange/32398-hhentschke-measures-of-effect-size-toolbox https://doi.org/10.1111/j.1460-9568.2011.07902.x
-
Effect sizes for non-normal distributions https://doi.org/10.1177/0013164404264850
-
Justifying sample sizes https://psyarxiv.com/9d3yf/ And an app: https://shiny.ieis.tue.nl/sample_size_justification/
-
Adjusting alpha based on sample size https://doi.org/10.1177/14761270231214429
Textbooks
An interactive algebra textbook https://textbooks.math.gatech.edu/ila/overview.html
Video-based tutorials https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab
Terence Tao's notes on linear algebra https://terrytao.wordpress.com/wp-content/uploads/2016/12/linear-algebra-notes.pdf
Lecture series on linear algebra https://www.youtube.com/playlist?list=PL54Pt_mZzBqinpMAO6-o1vEzZzzPKx57c
https://www.youtube.com/watch?v=ZK3O402wf1c&list=PL49CF3715CB9EF31D&index=1
Interactive tutorial on matrix multiplication http://matrixmultiplication.xyz/
Interactive textbook on linear algebra https://textbooks.math.gatech.edu/ila/ https://personal.math.ubc.ca/~tbjw/ila/
Tutorial on concepts of linear algebra https://chadtopaz.com/download/an-ill-advised-linear-algebra-tutorial/
Intro to the GLM with matlab code http://www.sbirc.ed.ac.uk/cyril/glm/GLM_lectures.html
MIT course on matrix methods for data analysis, signal processing and machine learning https://www.youtube.com/watch?v=Cx5Z-OslNWE&list=PLUl4u3cNGP63oMNUHXqIUcrkS2PivhN3k&index=2&t=0s
Python package for multivariate stats https://arxiv.org/abs/1907.02088
What is a tensor? an intuitive explanation https://www.youtube.com/watch?v=f5liqUk0ZTw&feature=youtu.be
Textbook on spectral methods for data science https://doi.org/10.1561/2200000079
Guide to longitudinal models https://doi.org/10.1016/j.dcn.2023.101281
Nice explanation of convolutions https://www.youtube.com/watch?v=KuXjwB4LzSA
Textbooks https://www.booktopia.com.au/advanced-engineering-mathematics-erwin-kreyszig/book/9780470646137.html
https://www.mecmath.net/calculus/index.html
Differential geometry:
Some tutorial videos https://www.youtube.com/watch?v=WUvTyaaNkzM&list=PLZHQObOWTQDMsr9K-rj53DwVRMYO3t5Yr
Online tutorials https://www.lem.ma/tracks/ap-calc/search
Video intros to ODEs https://www.youtube.com/watch?v=BRaliLNuvNg&list=PL6hB9Fh0Z1ELbHIAL22dCk173qykDgeoz
Lecture Videos on Differential equations and Dynamical Systems https://www.youtube.com/watch?v=9fQkLQZe3u8&list=PLMrJAkhIeNNTYaOnVI3QpH7jgULnAmvPA&index=2
https://www.youtube.com/playlist?list=PLUl4u3cNGP63oTpyxCMLKt_JmB0WtSZfG
Calculus made easy http://calculusmadeeasy.org/
Crash course in complex analysis https://www.youtube.com/watch?v=_mv0q7-WF4E&list=PLMrJAkhIeNNQBRslPb7I0yTnES981R8Cg&index=2
Great conceptual explanation of PCA https://stats.stackexchange.com/questions/2691/making-sense-of-principal-component-analysis-eigenvectors-eigenvalues
Conceptual overview of multivariate decompositions https://www.cell.com/trends/cognitive-sciences/fulltext/S1364-6613(24)00189-X
Blog post on CCA https://yukifujishima.com/blog/2025/05/09/Canonical-correlation-analysis
Matlab toolbox for dimensionality reduction https://lvdmaaten.github.io/drtoolbox/
Video tutorial on eigendecomposition https://www.youtube.com/watch?v=PFDu9oVAE-g&feature=share
Visual illustration of eigenvectors & eigenvalues http://setosa.io/ev/eigenvectors-and-eigenvalues/ https://youtu.be/5UjQVJu89_Q
Steven Strogatz on eigendecomposition https://soundcloud.com/edwardoneill/steven-strogatz-on-teaching-eigenvectors-and-eigenvalues
Eigenvectors from eigenvalues https://mikesmathpage.wordpress.com/2019/12/06/sharing-the-eigenvectors-from-eigenvalues-paper-with-my-son/
More eigenstuff https://towardsdatascience.com/the-jewel-of-the-matrix-a-deep-dive-into-eigenvalues-eigenvectors-22f1c8da11fd
Eigenvalues in neuroscience https://osf.io/evqhy/
Eigenvectors and eigenvalues in dynamical systems https://www.youtube.com/watch?v=A3TyXDhppto
Nice explanation of affine transformations https://www.youtube.com/watch?v=AheaTd_l5Is
Tutorial on the graph laplacian and graph diffusion https://simonensemble.github.io/pluto_nbs/graph_diffusion_blog.jl.html
Marchenko-Pastur Distribution for identifying ’significant’ eigenvalues https://medium.com/swlh/an-empirical-view-of-marchenko-pastur-theorem-1f564af5603d
Neuroscience applications of connectome eigenmodes https://www.youtube.com/watch?v=jKAZCzATmnk
Overview of SVD https://dustinstansbury.github.io/theclevermachine/singular-value-decomposition
YouTube course on SVD https://www.youtube.com/playlist?list=PLMrJAkhIeNNSVjnsviglFoY2nXildDCcv
Explanation of PCA and examples in R and Python https://www.analyticsvidhya.com/blog/2016/03/practical-guide-principal-component-analysis-python/
Explanation of PCA and other data reduction methods https://medium.com/towards-data-science/reducing-dimensionality-from-dimensionality-reduction-techniques-f658aec24dfe
Cross-validated PCA http://alexhwilliams.info/itsneuronalblog/2018/02/26/crossval/
Great blog on dimension reduction in neuroscience https://xcorr.net/2021/07/26/dimensionality-reduction-in-neural-data-analysis/
Tutorial on PCA https://arxiv.org/pdf/1404.1100
Interactive demo of how PCA works https://setosa.io/ev/principal-component-analysis/
Shared component analysis as an alternative to PCA https://pubmed.ncbi.nlm.nih.gov/33301941/
Some notes on cluster analysis https://www.nature.com/articles/nmeth.4299
Cross-validation with PCA and clustering http://alexhwilliams.info/itsneuronalblog/2018/02/26/crossval/
Tutorial on CCA https://doi.org/10.1016/j.neuroimage.2020.116745
Generalizable CCA https://gist.github.com/mnarayan/733f386bab55653d3f9ec515ddfc280d
Regularized CCA https://doi.org/10.3389/fninf.2016.00049
Other guides to CCA https://scholarscompass.vcu.edu/socialwork_pubs/2/ https://doi.org/10.1207/s15327752jpa8401_09 https://doi.org/10.1002/hbm.25090
Intro and Interactive demo of Fourier transform http://www.jezzamon.com/fourier/index.html
10 tips for dimensionality reduction https://doi.org/10.1371/journal.pcbi.1006907
An introduction and code for Umap https://pair-code.github.io/understanding-umap/
https://umap-learn.readthedocs.io/en/latest/how_umap_works.html
How to use t-SNE https://distill.pub/2016/misread-tsne/
Fast continuous wavelet transform paper: https://www.nature.com/articles/s43588-021-00183-z code: https://github.com/fastlib/fCWT
False discovery rate
-
Original paper https://doi.org/10.1111/j.2517-6161.1995.tb02031.x
-
As applied to neuroimaging https://doi.org/10.1006/nimg.2001.1037
PCA-based correction https://doi.org/10.1002/gepi.20310 https://doi.org/10.1038/sj.hdy.6800717 https://doi.org/10.1093/nar/gkn007
-
Tutorial on bootstrapping and estimating confidence intervals https://garstats.wordpress.com/2016/05/27/the-percentile-bootstrap/
-
Nice visual tutorial on permutation tests https://www.jwilber.me/permutationtest/
-
Randomization tests in brain imaging https://doi.org/10.1002/hbm.1058
-
The shift function as an alternative to the t-test https://garstats.wordpress.com/2016/07/12/shift-function/
-
Great article on limitations of comparing group means and alternative methods https://doi.org/10.1111/ejn.13610
-
Trimmed means https://garstats.wordpress.com/2017/11/28/trimmed-means/
-
A tutorial on different types of permutation tests https://www.ohbmbrainmappingblog.com/blog/a-brief-overview-of-permutation-testing-with-examples
-
An excellent overview of permutation testing with the GLM http://dx.doi.org/10.1016/j.neuroimage.2014.01.060
-
A tutorial on bootstrapping https://journals.sagepub.com/doi/10.1177/2515245920911881
-
The t-bootstrap https://garstats.wordpress.com/2019/07/25/boott/
-
Estimating the number of permutations required for a given precision of p-value https://stats.stackexchange.com/questions/80025/required-number-of-permutations-for-a-permutation-based-p-value
https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Randomise/Theory
-
Statistical consequences of fat-tailed distributions https://doi.org/10.48550/arXiv.2001.10488
-
Comparing group differences with zero-inflated distributions https://doi.org/10.1093/bioinformatics/btv154
Introduction to machine learning http://www.juliabloggers.com/an-introduction-to-machine-learning-in-julia/?utm_source=ReviveOldPost&utm_medium=social&utm_campaign=ReviveOldPost
Matlab tutorial on machine learning https://au.mathworks.com/campaigns/products/ppc/twitter/machine-learning-with-matlab.html?s_eid=PSB_15706
Machine learning in Python https://www.edx.org/learn/machine-learning/massachusetts-institute-of-technology-machine-learning-with-python-from-linear-models-to-deep-learning
Mastering machine learning in matlab https://www.mathworks.com/content/dam/mathworks/ebook/gated/machine-learning-workflow-ebook.pdf
Cross-validation
- Rob Hyndman on why its important http://robjhyndman.com/hyndsight/crossvalidation/
Visual tutorial on numerical optimization
Python tutorials on machine learning and data science
Toolbox for assessing the robustness of ML methods https://arxiv.org/pdf/1707.04131v1
Difference between prediction and inference https://doi.org/10.1016/j.patter.2020.100119
Predictive modelling in neuroimaging https://doi.org/10.1016/j.neuroimage.2019.02.057
Cheat sheets for learning different ML techniques https://stanford.edu/~shervine/teaching/ On error bars & small samples in cross-validation https://www.sciencedirect.com/science/article/abs/pii/S1053811917305311
Tutorials on neural networks https://www.youtube.com/playlist?list=PLZHQObOWTQDNU6R1_67000Dx_ZCJB-3pi
https://arxiv.org/abs/2004.15004
Neuropredict - toolbox for ML in imaging https://github.com/raamana/neuropredict
Scalable ML for large data https://cran.[rproject.org/web/packages/bigmemory/vigneTes/Overview.pdf](http://r-project.org/web/packages/bigmemory/vigneTes/Overview.pdf) https://github.com/YaohuiZeng/biglasso
An illustrated guide to machine learning https://vas3k.com/blog/machine_learning/
A how-to on machine learning for neuroimaging https://www.ohbmbrainmappingblog.com/blog/ohbm-ondemand-how-to-machine-learning-in-neuroimaging
Toolbox for ridge regression https://arxiv.org/abs/2005.03220 https://github.com/nrdg/fracridge
Tensorflow for people without a PhD https://codelabs.developers.google.com/codelabs/cloud-tensorflow-mnist/#0
Key articles and ideas in deep learning https://dennybritz.com/blog/deep-learning-most-important-ideas/
Primer on neural networks for neuroscience https://www.sciencedirect.com/science/article/pii/S0896627320307054
A course on deep learning https://www.youtube.com/playlist?list=PLqPI2gxxYgMKN5AVcTajQ79BTV4BiFN_0
MOOC on machine learning in scikitlearn https://www.fun-mooc.fr/en/courses/machine-learning-python-scikit-learn/
Free Uni courses on machine learning MIT: http://introtodeeplearning.com/ NYU: https://atcold.github.io/pytorch-Deep-Learning/ UC Berkeley: https://t.co/1TFUAIrAKb?amp=1 https://fullstackdeeplearning.com/spring2021/ Cornell: https://www.youtube.com/playlist?list=PL2UML_KCiC0UlY7iCQDSiGDMovaupqc83
Course on recurrent neural networks in cognitive neuroscience https://cbmm.mit.edu/video/tutorial-recurrent-neural-networks-cognitive-neuroscience
Intro to statistical learning in R https://link.springer.com/book/10.1007/978-1-0716-1418-1
MOOC on ML in sickitlearn, one of the most popular ML packages (python) https://www.fun-mooc.fr/en/courses/machine-learning-python-scikit-learn/
Intro to graph neural nets https://distill.pub/2021/gnn-intro/
Diffusion models https://github.com/heejkoo/Awesome-Diffusion-Models
How to avoid pitfalls of ML https://arxiv.org/abs/2108.02497
What's it all about? http://andrewgelman.com/2016/12/13/bayesian-statistics-whats/
How to become a Bayesian https://doi.org/10.3758/s13423-017-1317-5
A primer reading pack https://doi.org/10.7771/1932-6246.1167 https://doi.org/10.1016/j.bpj.2015.03.042 https://doi.org/10.3758/s13423-017-1272-1 https://doi.org/10.1177/0149206313501200 https://www.jstor.org/stable/20012727 https://doi.org/10.1007/s10670-009-9154-1
Course and R code https://github.com/rmcelreath/statrethinking_winter2019
Bayesian stats in R https://www.bayesrulesbook.com/
Understanding probability distributions https://github.com/rasmusab/distribution_diagrams
Tutorials on Bayesian stats https://mvuorre.github.io/post/2017/BEST/ https://www.youtube.com/watch?v=3OJEae7Qb_o
Intro to Bayesian inference for psychologists https://doi.org/10.3758/s13423-017-1262-3
Bayes and MCMC for undergrads https://doi.org/10.1080/00031305.2017.1305289
Bayesian inference for psychologists https://doi.org/10.3758/s13423-017-1343-3 https://doi.org/10.3758/s13423-017-1323-7
Bayesian substitutes for traditional statistical models https://doi.org/10.1186/s12888-018-1761-4
Detailed blog on how to run Bayesian stats https://www.weirdfishes.blog/blog/a-practical-introduction-to-stan/
Tutorial on Hierarchical Bayesian Inference https://doi.org/10.1371/journal.pcbi.1007043 https://payampiray.github.io/manual.html
Learning and teaching Bayes’ rule http://orca.cf.ac.uk/99602/1/Morey%20Teaching%20Bayes.pdf
Tutorial on variational Bayes https://www.youtube.com/watch?v=Moo4-KR5qNg
Intro to Bayesian fitting and optimization https://github.com/lacerbi/bamb2022-model-fitting
Textbook on causal inference methods https://miguelhernan.org/whatifbook
Working through Judea Pearl’s causal graphical models https://medium.com/data-for-science/causal-inference-part-iii-graphs-df043300add1
Courses on causal inference https://www.bradyneal.com/causal-inference-course https://doi.org/10.1201/9781003484080
A course on causal inference and Bayesian statistics https://github.com/rmcelreath/stat_rethinking_2022#calendar--topical-outline
-
Guide to visualzing data from the Royal Statistical Society https://royal-statistical-society.github.io/datavisguide/
-
An overview of different plotting methods

-
E-book on data visualization https://serialmentor.com/dataviz/
-
PLoS CB advice on generating better figures http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1003833
-
Data visualization https://doi.org/10.1201/9781003484080
-
Problems with bar graphs: https://garstats.wordpress.com/2016/05/27/how-to-fix-erroneous-error-bars-for-percent-correct-data/
-
Some general advice https://doi.org/10.1111/ejn.13400
-
Some tips of multivariate analysis and visualisation https://doi.org/10.1146/annurev-statistics-041715-033420
-
Raincloud plots https://micahallen.org/2018/03/15/introducing-raincloud-plots/ https://doi.org/10.12688/wellcomeopenres.15191.1
-
Pitfalls in visualizations http://flowingdata.com/2018/08/08/collection-of-data-visualization-pitfalls/
-
Web-based tool for data vis https://huygens.science.uva.nl/PlotsOfData/
-
Density scatterplots in R: https://github.com/LKremer/ggpointdensity
in matlab: https://www.mathworks.com/matlabcentral/fileexchange/8430-flow-cytometry-data-reader-and-visualization?focused=6779476&tab=function https://www.mathworks.com/matlabcentral/fileexchange/56569-density-scatter-plot
-
What colour scale should you use in your plots? https://blog.datawrapper.de/which-color-scale-to-use-in-data-vis/
-
E-book on visualization in python https://github.com/rougier/scientific-visualization-book#book-gallery
- 0.0 Home
- 0.1 Neuroscience fundamentals
- 0.2 Reproducible Science
- 0.3 MRI Physics, BIDS, DICOM, and data formats
- 0.4 Introduction to Diffusion MRI
- 0.5 Introduction to Functional MRI
- 0.6 Measuring functional and effective connectivity
- 0.7 Connectomics, graph theory, and complexity
- 0.8 Statistical and Mathematical Tidbits
- 0.9 Introduction to Psychopathology
- 0.10 Introduction to Genetics and Bioinformatics
- 0.11 Neural field theory and eigenmodes
- 0.12 Introduction to Programming
- 1.0 Working on the Cluster
- 2.0 Programming Languages
- 2.1 Python
- 2.1.1 Getting Set Up
- 2.1.2 Applications of Python in Neuroimaging
- 2.2 MATLAB
- 2.3 R and RStudio
- 2.4 Programming Intro Exercises
- 2.5 git and GitHub
- 2.6 SLURM and Job Submission
- 2.1 Python
- 3.0 Neuroimaging Tools and Packages
- 3.1 BIDS
- 3.2 FreeSurfer
- 3.2.1 Qdec
- 3.3 FSL
- 3.3.1 ICA-FIX
- 3.4 Connectome Workbench/wb_command
- 3.5 fMRIPrep
- 3.6 QSIPrep
- 3.7 HCP Pipeline
- 3.8 tedana
- 4.0 Quality control
- 4.1 MRIQC
- 4.2 Common Artefacts
- 4.3 T1w
- 4.4 rs-fMRI
- 5.0 Specialist Tools
- 6.0 Putting it all together
- 7.0 Data management