Skip to content

Statistical and Mathematical Tidbits

Isaac Pope edited this page Feb 27, 2026 · 5 revisions

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.

General advice and resources

Some introductions

Correlations

GLMs and regression


Structural equation modelling

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:

  1. Regression and Path analysis in Mplus
  2. From Confirmatory factor analysis to moderated mediation in Mplus
  3. Longitudinal Structural Equation Modelling in Mplus: Latent growth and cross-lagged models.
  4. 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


Power and effect sizes


Linear algebra, multivariate stats, and other

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

Calculus

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


Clustering, PCA, CCA, and eigendecomposition

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

https://medium.com/fintechexplained/what-are-eigenvalues-and-eigenvectors-a-must-know-concept-for-machine-learning-80d0fd330e47

https://towardsdatascience.com/eigen-intuitions-understanding-eigenvectors-and-eigenvalues-630e9ef1f719

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/


Signal processing

Fast continuous wavelet transform paper: https://www.nature.com/articles/s43588-021-00183-z code: https://github.com/fastlib/fCWT


Multiple comparison correction

False discovery rate

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


Non-parametric & alternative statistics

https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Randomise/Theory


Machine learning & cross-validation

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

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


Intro to Bayesian stats

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

A tutorial with R https://www.analyticsvidhya.com/blog/2016/06/bayesian-statistics-beginners-simple-english/?utm_content=buffer1f15c&utm_medium=social&utm_source=twitter.com&utm_campaign=buffer

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


Causal inference

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


Visualization

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

Clone this wiki locally