Statistics Glossary → Random seed
Random seedconcept
The number that sets the starting point of the computer's random number generator, so that the same 'random' results are obtained again whenever the same value is used.
Methods such as the bootstrap, permutation tests, Monte Carlo p values, fold assignment in cross-validation, random forests and the starting points of k-means all rely on random numbers. Computers actually produce these numbers with a deterministic algorithm, and the seed decides where that algorithm starts. With the same seed, data and settings, every run gives exactly the same result; with a different seed the results differ slightly.
A seed makes a result reproducible, but it does not make it 'correct'. If the result changes noticeably from seed to seed, the number of resamples (B), permutations or random starts is too small. Trying different seeds to find the most favourable result is a form of selective reporting; the seed should be chosen beforehand and the value used should be reported.
An everyday example
A prize draw is carried out by computer. If the organiser notes 'seed = 2024', anyone who disputes the draw can run the same program with the same seed and get exactly the same order. Without the seed there is no way to reproduce the draw.
In MerQur
The 'Seed' field in the bootstrap CI, 'Random seed' in k-means, t-SNE and UMAP, 'Seed' in mediation analysis (default 42) and multiple imputation, 'Simulation seed (prediction interval)' in exponential smoothing, and 'Seed (0 = automatic)' in Moran's I and point pattern analysis all serve this purpose. Many other analyses, including the permutation test, machine-learning methods and latent class and profile analysis, have a seed field or run their bootstrap and Monte Carlo computations with a fixed seed (e.g. 12345 or 42).
Analyses where this concept appears
Normality TestsOne-Sample t-TestIndependent-Samples t-TestBootstrap CIPermutation TestKruskal-WallisFriedmanChi-Square IndependenceChi-Square Goodness of FitCohen's Kappa (including Fleiss κ and Krippendorff α)CrosstabMR × Categorical CrosstabCorrelation AnalysisLasso RegressionROC CurveTrue Skill Statistic (TSS)Confusion Matrix MetricsRandom ForestSupport Vector Machine (SVM)Gradient BoostingDecision Tree (CART)Neural Network (MLP)K-Means ClusteringLatent Class Analysis (LCA)Latent Profile Analysis (LPA)t-SNE (t-Distributed Stochastic Neighbor Embedding)UMAP (Uniform Manifold Approximation and Projection)Cronbach's Alpha and Reliability AnalysisExploratory Factor Analysis (EFA)Structural Equation Modeling (SEM)Weighted Mean (Survey Means)Weighted Frequency (Survey Freq)Weighted Total (Survey Total)Weighted Linear Regression (Survey Regression)Weighted Logistic Regression (Survey Logistic Regression)Nonlinear RegressionQuantile RegressionRegularized Regression (LASSO / Ridge / ElasticNet)Hierarchical Bayesian RegressionMediation AnalysisPath AnalysisMultiple ImputationInterval-Censored SurvivalExponential Smoothing (Holt-Winters)Anomaly DetectionVAR (Vector Autoregression)k-Nearest Neighbors (KNN)PLS-SEM (Partial Least Squares Path Modeling)Moran's I (Spatial Autocorrelation)Getis-Ord Gi* HotspotPoint Pattern Analysis (Ripley K/L, G/F/J, CSR)
Related concepts
Bootstrap (resampling)Monte Carlo p-valuek-fold cross-validation