{"accepted_status": [false, false, true, false], "candidate_answers": [{"answer_html": "
The principal components (PCs) are not guaranteed to be good predictors. PCA is performed without any regard for an outcome ($y$) variable and, alone, is not a prediction technique. However, the PCs most definitely can be entered into a regression model. See below for an example in R.
\nset.seed(2026)\n\n# Set up a regression\n#\nN <- 100\np <- N - 3\nX <- matrix(rnorm(N * p), N, p)\nB <- rbinom(p, 1, 0.3)\nEy <- X %*% B\ne <- rnorm(N, 0, 8)\ny <- Ey + e\n\n# Fit to all X variables using OLS\n#\nL_ols <- lm(y ~ X)\n\n# Calculate the MSE, considering the parameter count\n#\nmse_ols <- sum((y - predict(L_ols))^2)/(N - p - 1)\n\n# Now apply PCA\n\npca <- prcomp(X)\n\n# Extract the first five PCs (adjust this and see what happens to the performance)\n#\nX_pca <- pca$x[, 1:(5)]\n\n# Fit a regression to the PCs\n#\nL_pca <- lm(y ~ X_pca)\n\n# Calculate the MSE, considering the parameter count\n#\nmse_pca <- sum((y - predict(L_pca))^2)/(N - dim(X_pca)[2] - 1)\n\n# Compare performance (smaller is better)\n#\nprint(mse_ols)\nprint(mse_pca)\n\n# I get 37.17123 and 78.09094, respectively, so the regression on five PCs\n# is much worse, but the regression on the PCs is possible, definitely!\n\nI did this with a linear regression, but if you have a categorical outcome (“classification” type of problem), you could use the PCs in a (multinomial) logistic regression or a sigmoid/softmax neural network and then measure performance by log loss, Brier score, or any of the other measures of performance used for classification-type problems.
\n", "answer_id": 676875, "answer_text": "The principal components (PCs) are not guaranteed to be good predictors. PCA is performed without any regard for an outcome ($y$) variable and, alone, is not a prediction technique. However, the PCs most definitely can be entered into a regression model. See below for an example in R.\n\n\n\n\nset.seed(2026)\n\n# Set up a regression\n#\nN <- 100\np <- N - 3\nX <- matrix(rnorm(N * p), N, p)\nB <- rbinom(p, 1, 0.3)\nEy <- X %*% B\ne <- rnorm(N, 0, 8)\ny <- Ey + e\n\n# Fit to all X variables using OLS\n#\nL_ols <- lm(y ~ X)\n\n# Calculate the MSE, considering the parameter count\n#\nmse_ols <- sum((y - predict(L_ols))^2)/(N - p - 1)\n\n# Now apply PCA\n\npca <- prcomp(X)\n\n# Extract the first five PCs (adjust this and see what happens to the performance)\n#\nX_pca <- pca$x[, 1:(5)]\n\n# Fit a regression to the PCs\n#\nL_pca <- lm(y ~ X_pca)\n\n# Calculate the MSE, considering the parameter count\n#\nmse_pca <- sum((y - predict(L_pca))^2)/(N - dim(X_pca)[2] - 1)\n\n# Compare performance (smaller is better)\n#\nprint(mse_ols)\nprint(mse_pca)\n\n# I get 37.17123 and 78.09094, respectively, so the regression on five PCs\n# is much worse, but the regression on the PCs is possible, definitely!\n\n\n\n\n\nI did this with a linear regression, but if you have a categorical outcome (“classification” type of problem), you could use the PCs in a (multinomial) logistic regression or a sigmoid/softmax neural network and then measure performance by log loss, Brier score, or any of the other measures of performance used for classification-type problems.", "answer_url": "https://stats.stackexchange.com/a/676875", "author": "Dave", "author_url": "https://stats.stackexchange.com/users/247274/dave", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-08-15T10:57:03+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:06.169765+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/9155f81b0f1dac4b0f83fad58469033af46ad34ee8d731e569d063b41b3df6b6_1790825226563497500_0.json", "raw_sha256": "cbac4b1b24e2159f1c17ea9902eaf89a0a5260344e6dba6f75790ba955f0d04b", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/677298;677295;677280;677279;677278;677275;677269;677266;677262;677256;677245;677243;677242;677226;677225;677217;677211;677201;677194;677193;677186;677183;677179;677177;677171;677169;677168;677151;677149;677147;677137;677135;677131;677129;677115;677110;677109;677101;677099;677098;677096;677095;677094;677085;677083;677079;677078;677075;677071;677066;677065;677062;677058;677045;677041;677035;677033;677023;677021;676999;676997;676991;676982;676981;676979;676977;676975;676971;676966;676961;676958;676956;676952;676947;676945;676937;676935;676933;676924;676922;676899;676898;676893;676889;676888;676879;676874;676873;676870;676867;676865;676858;676855;676850;676842;676832;676830;676824;676823;676821/answers?filter=withbody&order=asc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 676874, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Dave", "profile_url": "https://stats.stackexchange.com/users/247274/dave", "user_type": "registered"}, "created_at": "2026-08-15T10:57:03+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "7A2458ED-B2DA-472F-BF39-53D6AC4C1287", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/7A2458ED-B2DA-472F-BF39-53D6AC4C1287/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Dave", "profile_url": "https://stats.stackexchange.com/users/247274/dave", "user_type": "registered"}, "created_at": "2026-08-15T11:09:18+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "9698C0C6-9232-4A7F-8A30-A5C0AA5D85D2", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/9698C0C6-9232-4A7F-8A30-A5C0AA5D85D2/view-source"}], "score": 6, "updated_at": "2026-08-15T11:09:18+00:00"}, {"answer_html": "Prediction is not the only thing we do, so whether PCA can be used for prediction is not the only question to ask.
\nWikipedia lists the following
\nA long time ago I did some of the last, looking at patterns from quantitative electroencephalography, where we had data on a huge number of neurons. We tried to use the PCA results to categorize people into various injuries, determine if they had had a concussion, and so on, with less need for a neurologist. This could then be done e.g. on a battlefield, or a sporting event, or emergency room that lacked a neurologist.
\nI haven't kept up with that field, so I'm not sure what happened there, but our initial results were promising.
\n", "answer_id": 676876, "answer_text": "Prediction is not the only thing we do, so whether PCA can be used for prediction is not the only question to ask.\n\n\n\n\nWikipedia (https://en.wikipedia.org/wiki/Principal_component_analysis#Applications) lists the following\n\n\n\n\n\nIntelligence testing\n\n\n\n\nResidential differentiation\n\n\n\n\nDevelopment indexes\n\n\n\n\nPopulation genetics\n\n\n\n\nMarket research\n\n\n\n\nVarious uses in quantitative finance\n\n\n\n\nVarious uses in neuroscience\n\n\n\n\n\nA long time ago I did some of the last, looking at patterns from quantitative electroencephalography, where we had data on a huge number of neurons. We tried to use the PCA results to categorize people into various injuries, determine if they had had a concussion, and so on, with less need for a neurologist. This could then be done e.g. on a battlefield, or a sporting event, or emergency room that lacked a neurologist.\n\n\n\n\nI haven't kept up with that field, so I'm not sure what happened there, but our initial results were promising.", "answer_url": "https://stats.stackexchange.com/a/676876", "author": "Peter Flom", "author_url": "https://stats.stackexchange.com/users/686/peter-flom", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-08-15T11:16:14+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:06.169765+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/9155f81b0f1dac4b0f83fad58469033af46ad34ee8d731e569d063b41b3df6b6_1790825226563497500_0.json", "raw_sha256": "cbac4b1b24e2159f1c17ea9902eaf89a0a5260344e6dba6f75790ba955f0d04b", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/677298;677295;677280;677279;677278;677275;677269;677266;677262;677256;677245;677243;677242;677226;677225;677217;677211;677201;677194;677193;677186;677183;677179;677177;677171;677169;677168;677151;677149;677147;677137;677135;677131;677129;677115;677110;677109;677101;677099;677098;677096;677095;677094;677085;677083;677079;677078;677075;677071;677066;677065;677062;677058;677045;677041;677035;677033;677023;677021;676999;676997;676991;676982;676981;676979;676977;676975;676971;676966;676961;676958;676956;676952;676947;676945;676937;676935;676933;676924;676922;676899;676898;676893;676889;676888;676879;676874;676873;676870;676867;676865;676858;676855;676850;676842;676832;676830;676824;676823;676821/answers?filter=withbody&order=asc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 676874, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Peter Flom", "profile_url": "https://stats.stackexchange.com/users/686/peter-flom", "user_type": "registered"}, "created_at": "2026-08-15T11:16:14+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "5F1D4B92-63F4-42E2-B24E-133C561E4D0A", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/5F1D4B92-63F4-42E2-B24E-133C561E4D0A/view-source"}], "score": 2, "updated_at": "2026-08-15T11:16:14+00:00"}, {"answer_html": "(a) Principal components absolutely can be used for making predictions. Principal component analysis (PCA) is not a prediction method itself, but you can compute principal components on your predictors and then use these to predict the response. This can be done in linear regression (principal components regression), but also with other prediction models and algorithms.
\n(b) It is true that PCA, when run on the predictors, does not use the response, and therefore there is no guarantee whatsoever that the first PCs are actually good at predicting the response. PCA reduces information in the first place, and because there is no guarantee that what is kept really has the most relevant information for prediction, in many situations reducing dimension by principal components will not improve the predictive model and may very well make it worse. That said, occasionally it can be good (there is no guarantee that the information kept by PCA is not the most useful either). You could use independent test data or cross-validation and the like to find that out. But be careful then to compute principal components only on the training data and make sure that there is no "information leakage" otherwise, for example by model selection like number of PCs, which may require double cross-validation or a three-fold split when running on top of comparing PC regression and the like with alternative prediction methods. If the number of observations is healthy compared to the number of variables, not doing any dimension reduction at all and just using the original variables is often better than PC regression and any other dimension reduction.
\n(c) Although most often not optimal for prediction, there is an advantage of PCA as dimension reduction method for regression compared with dimension reduction approaches that use the response (assuming that you want or need to do dimension reduction, which is not necessarily a good idea, see above). Regression as a standard will model the response as random and the predictors as fixed (and one can pretend that even if they are not, standard regression theory is fine conditionally on the observed predictors). Data dependent manipulation and model selection will invalidate standard distribution theory of regression, which involves the p-values of t- and F-tests and cofidence intervals for parameters. But this only applies to using the random parts of the data, i.e., running PCA on predictors only will not affect standard inference, as opposed to, for example, stepwise regression or Lasso variable selection. This however will only hold if the response is not used for choosing the number of PCs.
\n", "answer_id": 676887, "answer_text": "(a) Principal components absolutely can be used for making predictions. Principal component analysis (PCA) is not a prediction method itself, but you can compute principal components on your predictors and then use these to predict the response. This can be done in linear regression (principal components regression), but also with other prediction models and algorithms.\n\n\n\n\n(b) It is true that PCA, when run on the predictors, does not use the response, and therefore there is no guarantee whatsoever that the first PCs are actually good at predicting the response. PCA reduces information in the first place, and because there is no guarantee that what is kept really has the most relevant information for prediction, in many situations reducing dimension by principal components will not improve the predictive model and may very well make it worse. That said, occasionally it can be good (there is no guarantee that the information kept by PCA is not the most useful either). You could use independent test data or cross-validation and the like to find that out. But be careful then to compute principal components only on the training data and make sure that there is no \"information leakage\" otherwise, for example by model selection like number of PCs, which may require double cross-validation or a three-fold split when running on top of comparing PC regression and the like with alternative prediction methods. If the number of observations is healthy compared to the number of variables, not doing any dimension reduction at all and just using the original variables is often better than PC regression and any other dimension reduction.\n\n\n\n\n(c) Although most often not optimal for prediction, there is an advantage of PCA as dimension reduction method for regression compared with dimension reduction approaches that use the response (assuming that you want or need to do dimension reduction, which is not necessarily a good idea, see above). Regression as a standard will model the response as random and the predictors as fixed (and one can pretend that even if they are not, standard regression theory is fine conditionally on the observed predictors). Data dependent manipulation and model selection will invalidate standard distribution theory of regression, which involves the p-values of t- and F-tests and cofidence intervals for parameters. But this only applies to using the random parts of the data, i.e., running PCA on predictors only will not affect standard inference, as opposed to, for example, stepwise regression or Lasso variable selection. This however will only hold if the response is not used for choosing the number of PCs.", "answer_url": "https://stats.stackexchange.com/a/676887", "author": "Christian Hennig", "author_url": "https://stats.stackexchange.com/users/247165/christian-hennig", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-08-16T11:19:56+00:00", "is_accepted": true, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:06.169765+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/9155f81b0f1dac4b0f83fad58469033af46ad34ee8d731e569d063b41b3df6b6_1790825226563497500_0.json", "raw_sha256": "cbac4b1b24e2159f1c17ea9902eaf89a0a5260344e6dba6f75790ba955f0d04b", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/677298;677295;677280;677279;677278;677275;677269;677266;677262;677256;677245;677243;677242;677226;677225;677217;677211;677201;677194;677193;677186;677183;677179;677177;677171;677169;677168;677151;677149;677147;677137;677135;677131;677129;677115;677110;677109;677101;677099;677098;677096;677095;677094;677085;677083;677079;677078;677075;677071;677066;677065;677062;677058;677045;677041;677035;677033;677023;677021;676999;676997;676991;676982;676981;676979;676977;676975;676971;676966;676961;676958;676956;676952;676947;676945;676937;676935;676933;676924;676922;676899;676898;676893;676889;676888;676879;676874;676873;676870;676867;676865;676858;676855;676850;676842;676832;676830;676824;676823;676821/answers?filter=withbody&order=asc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 676874, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Christian Hennig", "profile_url": "https://stats.stackexchange.com/users/247165/christian-hennig", "user_type": "registered"}, "created_at": "2026-08-16T11:19:56+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "FEE7BB07-5E87-461B-ABE2-DE62FF2A56AB", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/FEE7BB07-5E87-461B-ABE2-DE62FF2A56AB/view-source"}], "score": 5, "updated_at": "2026-08-16T11:19:56+00:00"}, {"answer_html": "PCA gives you a projection, and that can (and is sucessfully) be used to produce lower-dimensional input for various predictive models. Principal component regression (PCA-CLS) being possibly the most widely known, but in my field also PCA-LDA for classification is widely used (our data generation processes fit nicely with the maths of PCA), and PCA is at the core of SIMCA, an important one-class classifier/class model.
\nAs Christian Hennig's answer details, there is no general guarantee that a projection and dimension reduction by PCA as part of the modeling pipeline is going to help. But there are certain types of data and applications where there is good reason to expect that it does; and of course this can and should be verified.
\nE.g. I'm analytical chemist. We have essentially spent 100 years optimizing our measurements to yield data that nicely approximates linear combinations of concentration x pure component spectra. And PCA or PLS do indeed work nicely on such data. Plus, many industrial applications don't focus on minor components independent of the major sources of variance but rather need quick and non-destructive measurements of the major components which also have largest variance.
In a modeling pipeline unsupervised PCA projection -> predictive model in the narrower sense, the unsupervised nature of the PCA can be particularly helpful if lots of unlabelled data are available, but only a few labelled instances: the PCA projection (with dimension reduction) can then still be fit on the large unlabelled data base, and the (2nd) supervised part of the training can profit from fitting in the lower dimensional PC score space.\nThis scenario is quite common in chemometric modeling of spectroscopic data, where spectra are easy and cheap to acquire (and often non-destructive), while labels require reference (chemical) analyses which are expensive and often also restricted due to being destructive.
\nOtherwise, if labels are available for all training data, most people in my field would immediately go for the supervised analogue to PCA, PLS.
\n", "answer_id": 676896, "answer_text": "PCA gives you a projection, and that can (and is sucessfully) be used to produce lower-dimensional input for various predictive models. Principal component regression (PCA-CLS) being possibly the most widely known, but in my field also PCA-LDA for classification is widely used (our data generation processes fit nicely with the maths of PCA), and PCA is at the core of SIMCA (https://en.wikipedia.org/wiki/Soft_independent_modelling_of_class_analogies), an important one-class classifier/class model.\n\n\n\n\nAs Christian Hennig's answer (https://stats.stackexchange.com/a/676887/4598) details, there is no general guarantee that a projection and dimension reduction by PCA as part of the modeling pipeline is going to help. But there are certain types of data and applications where there is good reason to expect that it does; and of course this can and should be verified.\n\nE.g. I'm analytical chemist. We have essentially spent 100 years optimizing our measurements to yield data that nicely approximates linear combinations of concentration x pure component spectra. And PCA or PLS do indeed work nicely on such data. Plus, many industrial applications don't focus on minor components independent of the major sources of variance but rather need quick and non-destructive measurements of the major components which also have largest variance.\n\n\n\n\nIn a modeling pipeline unsupervised PCA projection -> predictive model in the narrower sense, the unsupervised nature of the PCA can be particularly helpful if lots of unlabelled data are available, but only a few labelled instances: the PCA projection (with dimension reduction) can then still be fit on the large unlabelled data base, and the (2nd) supervised part of the training can profit from fitting in the lower dimensional PC score space.\nThis scenario is quite common in chemometric modeling of spectroscopic data, where spectra are easy and cheap to acquire (and often non-destructive), while labels require reference (chemical) analyses which are expensive and often also restricted due to being destructive.\n\n\n\n\nOtherwise, if labels are available for all training data, most people in my field would immediately go for the supervised analogue to PCA, PLS.", "answer_url": "https://stats.stackexchange.com/a/676896", "author": "cbeleites", "author_url": "https://stats.stackexchange.com/users/4598/cbeleites", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-08-17T17:03:30+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:06.169765+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/9155f81b0f1dac4b0f83fad58469033af46ad34ee8d731e569d063b41b3df6b6_1790825226563497500_0.json", "raw_sha256": "cbac4b1b24e2159f1c17ea9902eaf89a0a5260344e6dba6f75790ba955f0d04b", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/677298;677295;677280;677279;677278;677275;677269;677266;677262;677256;677245;677243;677242;677226;677225;677217;677211;677201;677194;677193;677186;677183;677179;677177;677171;677169;677168;677151;677149;677147;677137;677135;677131;677129;677115;677110;677109;677101;677099;677098;677096;677095;677094;677085;677083;677079;677078;677075;677071;677066;677065;677062;677058;677045;677041;677035;677033;677023;677021;676999;676997;676991;676982;676981;676979;676977;676975;676971;676966;676961;676958;676956;676952;676947;676945;676937;676935;676933;676924;676922;676899;676898;676893;676889;676888;676879;676874;676873;676870;676867;676865;676858;676855;676850;676842;676832;676830;676824;676823;676821/answers?filter=withbody&order=asc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 676874, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "cbeleites", "profile_url": "https://stats.stackexchange.com/users/4598/cbeleites", "user_type": "registered"}, "created_at": "2026-08-17T17:03:30+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "3A1FC35A-72A0-4215-A06C-3D8E4B7FB085", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/3A1FC35A-72A0-4215-A06C-3D8E4B7FB085/view-source"}], "score": 3, "updated_at": "2026-08-17T17:03:30+00:00"}], "ground_truth": "community signals only; no scientific truth label", "product": "ranking", "question": "I've been reading up on pca. I've seen some people say that you cannot use pca for making predictions especially for linear regression models because it makes principal components that capture the most variability and not necessarily the actual relationships.\n\n\n\n\nHowever, I've seen principal components be reverted to their original variables and then used to make predictions in example cases. I am confused about which one is correct.\n\n\n\n\nI don't really understand the point even using pca if you can't make predictions off of the data. Is this just a linear regression-specific issue and not a classification problem/doesn't apply to other models?", "record_id": "Scientific-Answer-Ranking:stats:676874", "scores": [6, 2, 5, 3], "split": "holdout", "thread": {"accepted_answer_id": 676887, "answers": [{"answer_html": "The principal components (PCs) are not guaranteed to be good predictors. PCA is performed without any regard for an outcome ($y$) variable and, alone, is not a prediction technique. However, the PCs most definitely can be entered into a regression model. See below for an example in R.
\nset.seed(2026)\n\n# Set up a regression\n#\nN <- 100\np <- N - 3\nX <- matrix(rnorm(N * p), N, p)\nB <- rbinom(p, 1, 0.3)\nEy <- X %*% B\ne <- rnorm(N, 0, 8)\ny <- Ey + e\n\n# Fit to all X variables using OLS\n#\nL_ols <- lm(y ~ X)\n\n# Calculate the MSE, considering the parameter count\n#\nmse_ols <- sum((y - predict(L_ols))^2)/(N - p - 1)\n\n# Now apply PCA\n\npca <- prcomp(X)\n\n# Extract the first five PCs (adjust this and see what happens to the performance)\n#\nX_pca <- pca$x[, 1:(5)]\n\n# Fit a regression to the PCs\n#\nL_pca <- lm(y ~ X_pca)\n\n# Calculate the MSE, considering the parameter count\n#\nmse_pca <- sum((y - predict(L_pca))^2)/(N - dim(X_pca)[2] - 1)\n\n# Compare performance (smaller is better)\n#\nprint(mse_ols)\nprint(mse_pca)\n\n# I get 37.17123 and 78.09094, respectively, so the regression on five PCs\n# is much worse, but the regression on the PCs is possible, definitely!\n\nI did this with a linear regression, but if you have a categorical outcome (“classification” type of problem), you could use the PCs in a (multinomial) logistic regression or a sigmoid/softmax neural network and then measure performance by log loss, Brier score, or any of the other measures of performance used for classification-type problems.
\n", "answer_id": 676875, "answer_text": "The principal components (PCs) are not guaranteed to be good predictors. PCA is performed without any regard for an outcome ($y$) variable and, alone, is not a prediction technique. However, the PCs most definitely can be entered into a regression model. See below for an example in R.\n\n\n\n\nset.seed(2026)\n\n# Set up a regression\n#\nN <- 100\np <- N - 3\nX <- matrix(rnorm(N * p), N, p)\nB <- rbinom(p, 1, 0.3)\nEy <- X %*% B\ne <- rnorm(N, 0, 8)\ny <- Ey + e\n\n# Fit to all X variables using OLS\n#\nL_ols <- lm(y ~ X)\n\n# Calculate the MSE, considering the parameter count\n#\nmse_ols <- sum((y - predict(L_ols))^2)/(N - p - 1)\n\n# Now apply PCA\n\npca <- prcomp(X)\n\n# Extract the first five PCs (adjust this and see what happens to the performance)\n#\nX_pca <- pca$x[, 1:(5)]\n\n# Fit a regression to the PCs\n#\nL_pca <- lm(y ~ X_pca)\n\n# Calculate the MSE, considering the parameter count\n#\nmse_pca <- sum((y - predict(L_pca))^2)/(N - dim(X_pca)[2] - 1)\n\n# Compare performance (smaller is better)\n#\nprint(mse_ols)\nprint(mse_pca)\n\n# I get 37.17123 and 78.09094, respectively, so the regression on five PCs\n# is much worse, but the regression on the PCs is possible, definitely!\n\n\n\n\n\nI did this with a linear regression, but if you have a categorical outcome (“classification” type of problem), you could use the PCs in a (multinomial) logistic regression or a sigmoid/softmax neural network and then measure performance by log loss, Brier score, or any of the other measures of performance used for classification-type problems.", "answer_url": "https://stats.stackexchange.com/a/676875", "author": "Dave", "author_url": "https://stats.stackexchange.com/users/247274/dave", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-08-15T10:57:03+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:06.169765+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/9155f81b0f1dac4b0f83fad58469033af46ad34ee8d731e569d063b41b3df6b6_1790825226563497500_0.json", "raw_sha256": "cbac4b1b24e2159f1c17ea9902eaf89a0a5260344e6dba6f75790ba955f0d04b", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/677298;677295;677280;677279;677278;677275;677269;677266;677262;677256;677245;677243;677242;677226;677225;677217;677211;677201;677194;677193;677186;677183;677179;677177;677171;677169;677168;677151;677149;677147;677137;677135;677131;677129;677115;677110;677109;677101;677099;677098;677096;677095;677094;677085;677083;677079;677078;677075;677071;677066;677065;677062;677058;677045;677041;677035;677033;677023;677021;676999;676997;676991;676982;676981;676979;676977;676975;676971;676966;676961;676958;676956;676952;676947;676945;676937;676935;676933;676924;676922;676899;676898;676893;676889;676888;676879;676874;676873;676870;676867;676865;676858;676855;676850;676842;676832;676830;676824;676823;676821/answers?filter=withbody&order=asc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 676874, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Dave", "profile_url": "https://stats.stackexchange.com/users/247274/dave", "user_type": "registered"}, "created_at": "2026-08-15T10:57:03+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "7A2458ED-B2DA-472F-BF39-53D6AC4C1287", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/7A2458ED-B2DA-472F-BF39-53D6AC4C1287/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Dave", "profile_url": "https://stats.stackexchange.com/users/247274/dave", "user_type": "registered"}, "created_at": "2026-08-15T11:09:18+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "9698C0C6-9232-4A7F-8A30-A5C0AA5D85D2", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/9698C0C6-9232-4A7F-8A30-A5C0AA5D85D2/view-source"}], "score": 6, "updated_at": "2026-08-15T11:09:18+00:00"}, {"answer_html": "Prediction is not the only thing we do, so whether PCA can be used for prediction is not the only question to ask.
\nWikipedia lists the following
\nA long time ago I did some of the last, looking at patterns from quantitative electroencephalography, where we had data on a huge number of neurons. We tried to use the PCA results to categorize people into various injuries, determine if they had had a concussion, and so on, with less need for a neurologist. This could then be done e.g. on a battlefield, or a sporting event, or emergency room that lacked a neurologist.
\nI haven't kept up with that field, so I'm not sure what happened there, but our initial results were promising.
\n", "answer_id": 676876, "answer_text": "Prediction is not the only thing we do, so whether PCA can be used for prediction is not the only question to ask.\n\n\n\n\nWikipedia (https://en.wikipedia.org/wiki/Principal_component_analysis#Applications) lists the following\n\n\n\n\n\nIntelligence testing\n\n\n\n\nResidential differentiation\n\n\n\n\nDevelopment indexes\n\n\n\n\nPopulation genetics\n\n\n\n\nMarket research\n\n\n\n\nVarious uses in quantitative finance\n\n\n\n\nVarious uses in neuroscience\n\n\n\n\n\nA long time ago I did some of the last, looking at patterns from quantitative electroencephalography, where we had data on a huge number of neurons. We tried to use the PCA results to categorize people into various injuries, determine if they had had a concussion, and so on, with less need for a neurologist. This could then be done e.g. on a battlefield, or a sporting event, or emergency room that lacked a neurologist.\n\n\n\n\nI haven't kept up with that field, so I'm not sure what happened there, but our initial results were promising.", "answer_url": "https://stats.stackexchange.com/a/676876", "author": "Peter Flom", "author_url": "https://stats.stackexchange.com/users/686/peter-flom", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-08-15T11:16:14+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:06.169765+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/9155f81b0f1dac4b0f83fad58469033af46ad34ee8d731e569d063b41b3df6b6_1790825226563497500_0.json", "raw_sha256": "cbac4b1b24e2159f1c17ea9902eaf89a0a5260344e6dba6f75790ba955f0d04b", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/677298;677295;677280;677279;677278;677275;677269;677266;677262;677256;677245;677243;677242;677226;677225;677217;677211;677201;677194;677193;677186;677183;677179;677177;677171;677169;677168;677151;677149;677147;677137;677135;677131;677129;677115;677110;677109;677101;677099;677098;677096;677095;677094;677085;677083;677079;677078;677075;677071;677066;677065;677062;677058;677045;677041;677035;677033;677023;677021;676999;676997;676991;676982;676981;676979;676977;676975;676971;676966;676961;676958;676956;676952;676947;676945;676937;676935;676933;676924;676922;676899;676898;676893;676889;676888;676879;676874;676873;676870;676867;676865;676858;676855;676850;676842;676832;676830;676824;676823;676821/answers?filter=withbody&order=asc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 676874, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Peter Flom", "profile_url": "https://stats.stackexchange.com/users/686/peter-flom", "user_type": "registered"}, "created_at": "2026-08-15T11:16:14+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "5F1D4B92-63F4-42E2-B24E-133C561E4D0A", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/5F1D4B92-63F4-42E2-B24E-133C561E4D0A/view-source"}], "score": 2, "updated_at": "2026-08-15T11:16:14+00:00"}, {"answer_html": "(a) Principal components absolutely can be used for making predictions. Principal component analysis (PCA) is not a prediction method itself, but you can compute principal components on your predictors and then use these to predict the response. This can be done in linear regression (principal components regression), but also with other prediction models and algorithms.
\n(b) It is true that PCA, when run on the predictors, does not use the response, and therefore there is no guarantee whatsoever that the first PCs are actually good at predicting the response. PCA reduces information in the first place, and because there is no guarantee that what is kept really has the most relevant information for prediction, in many situations reducing dimension by principal components will not improve the predictive model and may very well make it worse. That said, occasionally it can be good (there is no guarantee that the information kept by PCA is not the most useful either). You could use independent test data or cross-validation and the like to find that out. But be careful then to compute principal components only on the training data and make sure that there is no "information leakage" otherwise, for example by model selection like number of PCs, which may require double cross-validation or a three-fold split when running on top of comparing PC regression and the like with alternative prediction methods. If the number of observations is healthy compared to the number of variables, not doing any dimension reduction at all and just using the original variables is often better than PC regression and any other dimension reduction.
\n(c) Although most often not optimal for prediction, there is an advantage of PCA as dimension reduction method for regression compared with dimension reduction approaches that use the response (assuming that you want or need to do dimension reduction, which is not necessarily a good idea, see above). Regression as a standard will model the response as random and the predictors as fixed (and one can pretend that even if they are not, standard regression theory is fine conditionally on the observed predictors). Data dependent manipulation and model selection will invalidate standard distribution theory of regression, which involves the p-values of t- and F-tests and cofidence intervals for parameters. But this only applies to using the random parts of the data, i.e., running PCA on predictors only will not affect standard inference, as opposed to, for example, stepwise regression or Lasso variable selection. This however will only hold if the response is not used for choosing the number of PCs.
\n", "answer_id": 676887, "answer_text": "(a) Principal components absolutely can be used for making predictions. Principal component analysis (PCA) is not a prediction method itself, but you can compute principal components on your predictors and then use these to predict the response. This can be done in linear regression (principal components regression), but also with other prediction models and algorithms.\n\n\n\n\n(b) It is true that PCA, when run on the predictors, does not use the response, and therefore there is no guarantee whatsoever that the first PCs are actually good at predicting the response. PCA reduces information in the first place, and because there is no guarantee that what is kept really has the most relevant information for prediction, in many situations reducing dimension by principal components will not improve the predictive model and may very well make it worse. That said, occasionally it can be good (there is no guarantee that the information kept by PCA is not the most useful either). You could use independent test data or cross-validation and the like to find that out. But be careful then to compute principal components only on the training data and make sure that there is no \"information leakage\" otherwise, for example by model selection like number of PCs, which may require double cross-validation or a three-fold split when running on top of comparing PC regression and the like with alternative prediction methods. If the number of observations is healthy compared to the number of variables, not doing any dimension reduction at all and just using the original variables is often better than PC regression and any other dimension reduction.\n\n\n\n\n(c) Although most often not optimal for prediction, there is an advantage of PCA as dimension reduction method for regression compared with dimension reduction approaches that use the response (assuming that you want or need to do dimension reduction, which is not necessarily a good idea, see above). Regression as a standard will model the response as random and the predictors as fixed (and one can pretend that even if they are not, standard regression theory is fine conditionally on the observed predictors). Data dependent manipulation and model selection will invalidate standard distribution theory of regression, which involves the p-values of t- and F-tests and cofidence intervals for parameters. But this only applies to using the random parts of the data, i.e., running PCA on predictors only will not affect standard inference, as opposed to, for example, stepwise regression or Lasso variable selection. This however will only hold if the response is not used for choosing the number of PCs.", "answer_url": "https://stats.stackexchange.com/a/676887", "author": "Christian Hennig", "author_url": "https://stats.stackexchange.com/users/247165/christian-hennig", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-08-16T11:19:56+00:00", "is_accepted": true, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:06.169765+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/9155f81b0f1dac4b0f83fad58469033af46ad34ee8d731e569d063b41b3df6b6_1790825226563497500_0.json", "raw_sha256": "cbac4b1b24e2159f1c17ea9902eaf89a0a5260344e6dba6f75790ba955f0d04b", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/677298;677295;677280;677279;677278;677275;677269;677266;677262;677256;677245;677243;677242;677226;677225;677217;677211;677201;677194;677193;677186;677183;677179;677177;677171;677169;677168;677151;677149;677147;677137;677135;677131;677129;677115;677110;677109;677101;677099;677098;677096;677095;677094;677085;677083;677079;677078;677075;677071;677066;677065;677062;677058;677045;677041;677035;677033;677023;677021;676999;676997;676991;676982;676981;676979;676977;676975;676971;676966;676961;676958;676956;676952;676947;676945;676937;676935;676933;676924;676922;676899;676898;676893;676889;676888;676879;676874;676873;676870;676867;676865;676858;676855;676850;676842;676832;676830;676824;676823;676821/answers?filter=withbody&order=asc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 676874, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Christian Hennig", "profile_url": "https://stats.stackexchange.com/users/247165/christian-hennig", "user_type": "registered"}, "created_at": "2026-08-16T11:19:56+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "FEE7BB07-5E87-461B-ABE2-DE62FF2A56AB", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/FEE7BB07-5E87-461B-ABE2-DE62FF2A56AB/view-source"}], "score": 5, "updated_at": "2026-08-16T11:19:56+00:00"}, {"answer_html": "PCA gives you a projection, and that can (and is sucessfully) be used to produce lower-dimensional input for various predictive models. Principal component regression (PCA-CLS) being possibly the most widely known, but in my field also PCA-LDA for classification is widely used (our data generation processes fit nicely with the maths of PCA), and PCA is at the core of SIMCA, an important one-class classifier/class model.
\nAs Christian Hennig's answer details, there is no general guarantee that a projection and dimension reduction by PCA as part of the modeling pipeline is going to help. But there are certain types of data and applications where there is good reason to expect that it does; and of course this can and should be verified.
\nE.g. I'm analytical chemist. We have essentially spent 100 years optimizing our measurements to yield data that nicely approximates linear combinations of concentration x pure component spectra. And PCA or PLS do indeed work nicely on such data. Plus, many industrial applications don't focus on minor components independent of the major sources of variance but rather need quick and non-destructive measurements of the major components which also have largest variance.
In a modeling pipeline unsupervised PCA projection -> predictive model in the narrower sense, the unsupervised nature of the PCA can be particularly helpful if lots of unlabelled data are available, but only a few labelled instances: the PCA projection (with dimension reduction) can then still be fit on the large unlabelled data base, and the (2nd) supervised part of the training can profit from fitting in the lower dimensional PC score space.\nThis scenario is quite common in chemometric modeling of spectroscopic data, where spectra are easy and cheap to acquire (and often non-destructive), while labels require reference (chemical) analyses which are expensive and often also restricted due to being destructive.
\nOtherwise, if labels are available for all training data, most people in my field would immediately go for the supervised analogue to PCA, PLS.
\n", "answer_id": 676896, "answer_text": "PCA gives you a projection, and that can (and is sucessfully) be used to produce lower-dimensional input for various predictive models. Principal component regression (PCA-CLS) being possibly the most widely known, but in my field also PCA-LDA for classification is widely used (our data generation processes fit nicely with the maths of PCA), and PCA is at the core of SIMCA (https://en.wikipedia.org/wiki/Soft_independent_modelling_of_class_analogies), an important one-class classifier/class model.\n\n\n\n\nAs Christian Hennig's answer (https://stats.stackexchange.com/a/676887/4598) details, there is no general guarantee that a projection and dimension reduction by PCA as part of the modeling pipeline is going to help. But there are certain types of data and applications where there is good reason to expect that it does; and of course this can and should be verified.\n\nE.g. I'm analytical chemist. We have essentially spent 100 years optimizing our measurements to yield data that nicely approximates linear combinations of concentration x pure component spectra. And PCA or PLS do indeed work nicely on such data. Plus, many industrial applications don't focus on minor components independent of the major sources of variance but rather need quick and non-destructive measurements of the major components which also have largest variance.\n\n\n\n\nIn a modeling pipeline unsupervised PCA projection -> predictive model in the narrower sense, the unsupervised nature of the PCA can be particularly helpful if lots of unlabelled data are available, but only a few labelled instances: the PCA projection (with dimension reduction) can then still be fit on the large unlabelled data base, and the (2nd) supervised part of the training can profit from fitting in the lower dimensional PC score space.\nThis scenario is quite common in chemometric modeling of spectroscopic data, where spectra are easy and cheap to acquire (and often non-destructive), while labels require reference (chemical) analyses which are expensive and often also restricted due to being destructive.\n\n\n\n\nOtherwise, if labels are available for all training data, most people in my field would immediately go for the supervised analogue to PCA, PLS.", "answer_url": "https://stats.stackexchange.com/a/676896", "author": "cbeleites", "author_url": "https://stats.stackexchange.com/users/4598/cbeleites", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-08-17T17:03:30+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:06.169765+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/9155f81b0f1dac4b0f83fad58469033af46ad34ee8d731e569d063b41b3df6b6_1790825226563497500_0.json", "raw_sha256": "cbac4b1b24e2159f1c17ea9902eaf89a0a5260344e6dba6f75790ba955f0d04b", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/677298;677295;677280;677279;677278;677275;677269;677266;677262;677256;677245;677243;677242;677226;677225;677217;677211;677201;677194;677193;677186;677183;677179;677177;677171;677169;677168;677151;677149;677147;677137;677135;677131;677129;677115;677110;677109;677101;677099;677098;677096;677095;677094;677085;677083;677079;677078;677075;677071;677066;677065;677062;677058;677045;677041;677035;677033;677023;677021;676999;676997;676991;676982;676981;676979;676977;676975;676971;676966;676961;676958;676956;676952;676947;676945;676937;676935;676933;676924;676922;676899;676898;676893;676889;676888;676879;676874;676873;676870;676867;676865;676858;676855;676850;676842;676832;676830;676824;676823;676821/answers?filter=withbody&order=asc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 676874, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "cbeleites", "profile_url": "https://stats.stackexchange.com/users/4598/cbeleites", "user_type": "registered"}, "created_at": "2026-08-17T17:03:30+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "3A1FC35A-72A0-4215-A06C-3D8E4B7FB085", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/3A1FC35A-72A0-4215-A06C-3D8E4B7FB085/view-source"}], "score": 3, "updated_at": "2026-08-17T17:03:30+00:00"}], "domain": "statistics", "external_links": ["https://en.wikipedia.org/wiki/Principal_component_analysis#Applications", "https://en.wikipedia.org/wiki/Soft_independent_modelling_of_class_analogies"], "medical_sensitive": false, "patient_specific": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:03.428408+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/774052c18cd9e8fa951e893347bfa3c1a85e743fc46ec4667572002cadb10cbf_1790825224163423600_0.json", "raw_sha256": "fe4dd06d3de6c0b1bb33ba88aee0ed4284118e01f76a58dcdce220a4946329b2", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/search/advanced?answers=1&filter=withbody&order=desc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_author": "Karl Suh", "question_author_url": "https://stats.stackexchange.com/users/513622/karl-suh", "question_author_user_type": "registered", "question_created_at": "2026-08-15T04:30:32+00:00", "question_html": "I've been reading up on pca. I've seen some people say that you cannot use pca for making predictions especially for linear regression models because it makes principal components that capture the most variability and not necessarily the actual relationships.
\nHowever, I've seen principal components be reverted to their original variables and then used to make predictions in example cases. I am confused about which one is correct.
\nI don't really understand the point even using pca if you can't make predictions off of the data. Is this just a linear regression-specific issue and not a classification problem/doesn't apply to other models?
\n", "question_id": 676874, "question_license": "CC BY-SA 4.0", "question_score": 5, "question_text": "I've been reading up on pca. I've seen some people say that you cannot use pca for making predictions especially for linear regression models because it makes principal components that capture the most variability and not necessarily the actual relationships.\n\n\n\n\nHowever, I've seen principal components be reverted to their original variables and then used to make predictions in example cases. I am confused about which one is correct.\n\n\n\n\nI don't really understand the point even using pca if you can't make predictions off of the data. Is this just a linear regression-specific issue and not a classification problem/doesn't apply to other models?", "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Karl Suh", "profile_url": "https://stats.stackexchange.com/users/513622/karl-suh", "user_type": "registered"}, "created_at": "2026-08-15T04:30:32+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "47012D84-2D0B-46BA-AE42-079A86DD6563", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/47012D84-2D0B-46BA-AE42-079A86DD6563/view-source"}, {"content_license": null, "contributor": {"display_name": "[deleted/unavailable user]", "profile_url": null, "user_type": "does_not_exist"}, "created_at": "2026-08-15T12:40:24+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "B197227E-EAF9-49DD-B742-0B419AF26E38", "revision_number": null, "revision_type": "vote_based", "revision_url": "https://stats.stackexchange.com/revisions/B197227E-EAF9-49DD-B742-0B419AF26E38/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Nick Cox", "profile_url": "https://stats.stackexchange.com/users/22047/nick-cox", "user_type": "registered"}, "created_at": "2026-08-17T12:50:40+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "3799EB1C-3EFE-4A46-9106-11DCDC93F431", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/3799EB1C-3EFE-4A46-9106-11DCDC93F431/view-source"}], "source_site": "stats", "source_url": "https://stats.stackexchange.com/questions/676874/can-you-use-pca-to-make-predictions-are-the-issues-with-predictions-specific-to", "split": "holdout", "split_group": "4be5949efaf8b799490f24666dac196270482a96c23b0b08367ced5183ffdf2c", "tags": ["regression", "pca"], "thread_id": "stats:676874", "title": "Can you use PCA to make predictions? are the issues with predictions specific to linear regression?"}} {"accepted_status": [false, false], "candidate_answers": [{"answer_html": "The limiting distribution is fairly straightforward. Let $X$ be the treatments and $Z$ be the instruments
\nStage 1 is to predict $X$ from $Z$, by OLS. The predicted values\n$\\hat X$ are the projections of $X$ on to the space spanned by $Z$: write $\\hat X=P_ZX$
\nStage 2 is OLS of the outcome $Y$ on $\\hat X$. The fitted coefficients are\n$$\\hat \\theta= (\\hat X^T\\hat X)^{-1}\\hat X^TY$$\nor\n$$ \\hat\\theta= (X^TP_Z^TP_ZX)^{-1} X^TP_Z^TY.$$
\nThis is a linear transformation of $Y$. If we're assuming $Y$ is Normal, then so is $\\hat\\theta$. If we're assuming $Y$ is constant variance then $\\hat\\theta$ is asymptotically Normal by the Lindeberg CLT under conditions on the tails of $\\hat X$.
\nThe limiting distribution is centered at the true causal $\\theta$ because that's the whole point: it's a ratio of unconfounded estimators. So $$\\sqrt{n}(\\hat\\theta-\\theta)\\stackrel{d}{\\to} N(0, \\Xi)$$\nfor some $\\Xi$
\nThe asymptotic variance comes from the linearity of $Y\\mapsto \\hat\\theta$ and the bilinearity of variance
\n$$\\mathrm{var}[\\hat\\theta]= (X^TP_Z^TP_ZX)^{-1} X^TP_Z^T\\mathrm{var}[Y|X]P_ZX(X^TP_Z^TP_ZX)^{-1}$$
\nModelling $Y$ as constant variance $\\sigma^2I$ we get the usual cancellation\n$$\\mathrm{var}[\\hat\\theta]= n^{-1} \\Xi= \\sigma^2(X^TP_Z^TP_ZX)^{-1}.$$
\nThe remaining detail is that $\\sigma^2$ still has to be estimated by $\\mathrm{var}[Y-X\\hat\\theta]$ (and not by $\\mathrm{var}[Y-\\hat X\\hat\\theta]$)
\n(I should probably also note that $P_Z^TP_Z=P_Z$ since the hat matrix is symmetric and since projections are idempotent)
\n", "answer_id": 676946, "answer_text": "The limiting distribution is fairly straightforward. Let $X$ be the treatments and $Z$ be the instruments\n\n\n\n\nStage 1 is to predict $X$ from $Z$, by OLS. The predicted values\n$\\hat X$ are the projections of $X$ on to the space spanned by $Z$: write $\\hat X=P_ZX$\n\n\n\n\nStage 2 is OLS of the outcome $Y$ on $\\hat X$. The fitted coefficients are\n$$\\hat \\theta= (\\hat X^T\\hat X)^{-1}\\hat X^TY$$\nor\n$$ \\hat\\theta= (X^TP_Z^TP_ZX)^{-1} X^TP_Z^TY.$$\n\n\n\n\nThis is a linear transformation of $Y$. If we're assuming $Y$ is Normal, then so is $\\hat\\theta$. If we're assuming $Y$ is constant variance then $\\hat\\theta$ is asymptotically Normal by the Lindeberg CLT under conditions on the tails of $\\hat X$.\n\n\n\n\nThe limiting distribution is centered at the true causal $\\theta$ because that's the whole point: it's a ratio of unconfounded estimators. So $$\\sqrt{n}(\\hat\\theta-\\theta)\\stackrel{d}{\\to} N(0, \\Xi)$$\nfor some $\\Xi$\n\n\n\n\nThe asymptotic variance comes from the linearity of $Y\\mapsto \\hat\\theta$ and the bilinearity of variance\n\n\n\n\n$$\\mathrm{var}[\\hat\\theta]= (X^TP_Z^TP_ZX)^{-1} X^TP_Z^T\\mathrm{var}[Y|X]P_ZX(X^TP_Z^TP_ZX)^{-1}$$\n\n\n\n\nModelling $Y$ as constant variance $\\sigma^2I$ we get the usual cancellation\n$$\\mathrm{var}[\\hat\\theta]= n^{-1} \\Xi= \\sigma^2(X^TP_Z^TP_ZX)^{-1}.$$\n\n\n\n\nThe remaining detail is that $\\sigma^2$ still has to be estimated by $\\mathrm{var}[Y-X\\hat\\theta]$ (and not by $\\mathrm{var}[Y-\\hat X\\hat\\theta]$)\n\n\n\n\n(I should probably also note that $P_Z^TP_Z=P_Z$ since the hat matrix is symmetric and since projections are idempotent)", "answer_url": "https://stats.stackexchange.com/a/676946", "author": "Thomas Lumley", "author_url": "https://stats.stackexchange.com/users/249135/thomas-lumley", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-08-23T22:41:01+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:06.169765+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/9155f81b0f1dac4b0f83fad58469033af46ad34ee8d731e569d063b41b3df6b6_1790825226563497500_0.json", "raw_sha256": "cbac4b1b24e2159f1c17ea9902eaf89a0a5260344e6dba6f75790ba955f0d04b", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/677298;677295;677280;677279;677278;677275;677269;677266;677262;677256;677245;677243;677242;677226;677225;677217;677211;677201;677194;677193;677186;677183;677179;677177;677171;677169;677168;677151;677149;677147;677137;677135;677131;677129;677115;677110;677109;677101;677099;677098;677096;677095;677094;677085;677083;677079;677078;677075;677071;677066;677065;677062;677058;677045;677041;677035;677033;677023;677021;676999;676997;676991;676982;676981;676979;676977;676975;676971;676966;676961;676958;676956;676952;676947;676945;676937;676935;676933;676924;676922;676899;676898;676893;676889;676888;676879;676874;676873;676870;676867;676865;676858;676855;676850;676842;676832;676830;676824;676823;676821/answers?filter=withbody&order=asc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 676945, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Thomas Lumley", "profile_url": "https://stats.stackexchange.com/users/249135/thomas-lumley", "user_type": "registered"}, "created_at": "2026-08-23T22:41:01+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "F0B46AAE-BEC0-4CA2-963B-56F7698AE7FF", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/F0B46AAE-BEC0-4CA2-963B-56F7698AE7FF/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Thomas Lumley", "profile_url": "https://stats.stackexchange.com/users/249135/thomas-lumley", "user_type": "registered"}, "created_at": "2026-08-24T00:54:53+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "EA39452C-A003-49F8-B5D5-ACFEFF423D52", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/EA39452C-A003-49F8-B5D5-ACFEFF423D52/view-source"}], "score": 3, "updated_at": "2026-08-24T00:54:53+00:00"}, {"answer_html": "Asymptotic distribution of 2SLS estimator (or equivalently the IV estimator)\nwas also derived (with proof) in Imbens, Guido W., and Joshua D. Angrist. Identification and Estimation of Local Average Treatment Effects. Econometrica 62, no. 2 (1994): 467–75. https://doi.org/10.2307/2951620.
\n", "answer_id": 676949, "answer_text": "Asymptotic distribution of 2SLS estimator (or equivalently the IV estimator)\nwas also derived (with proof) in Imbens, Guido W., and Joshua D. Angrist. Identification and Estimation of Local Average Treatment Effects. Econometrica 62, no. 2 (1994): 467–75. https://doi.org/10.2307/2951620 (https://doi.org/10.2307/2951620).", "answer_url": "https://stats.stackexchange.com/a/676949", "author": "Asigan", "author_url": "https://stats.stackexchange.com/users/499652/asigan", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-08-24T04:22:56+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:06.169765+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/9155f81b0f1dac4b0f83fad58469033af46ad34ee8d731e569d063b41b3df6b6_1790825226563497500_0.json", "raw_sha256": "cbac4b1b24e2159f1c17ea9902eaf89a0a5260344e6dba6f75790ba955f0d04b", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/677298;677295;677280;677279;677278;677275;677269;677266;677262;677256;677245;677243;677242;677226;677225;677217;677211;677201;677194;677193;677186;677183;677179;677177;677171;677169;677168;677151;677149;677147;677137;677135;677131;677129;677115;677110;677109;677101;677099;677098;677096;677095;677094;677085;677083;677079;677078;677075;677071;677066;677065;677062;677058;677045;677041;677035;677033;677023;677021;676999;676997;676991;676982;676981;676979;676977;676975;676971;676966;676961;676958;676956;676952;676947;676945;676937;676935;676933;676924;676922;676899;676898;676893;676889;676888;676879;676874;676873;676870;676867;676865;676858;676855;676850;676842;676832;676830;676824;676823;676821/answers?filter=withbody&order=asc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 676945, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Asigan", "profile_url": "https://stats.stackexchange.com/users/499652/asigan", "user_type": "registered"}, "created_at": "2026-08-24T04:22:56+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "D494D3FA-3459-40D4-8385-A6AEBB19B0D4", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/D494D3FA-3459-40D4-8385-A6AEBB19B0D4/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Asigan", "profile_url": "https://stats.stackexchange.com/users/499652/asigan", "user_type": "registered"}, "created_at": "2026-08-24T04:33:07+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "7C82213F-6D44-4B3E-8234-9B2AFE3B98E0", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/7C82213F-6D44-4B3E-8234-9B2AFE3B98E0/view-source"}], "score": 0, "updated_at": "2026-08-24T04:33:07+00:00"}], "ground_truth": "community signals only; no scientific truth label", "product": "ranking", "question": "I am reading a paper and it talked about the limiting distribution and over-identification test of a two stage least square (2SLS) estimator. The authors cited J. D. Angrist, J. S. Pischke, Mostly Harmless Econometrics: An Empiricist’s Companion (Princeton University Press, Princeton, NJ, 2009)\nas an introduction to this topic. The textbook omitted the proof and only stated the related results.\nI am looking for a reference for the limiting distribution and over-identification test\nof 2SLS with proof. Both textbooks or original papers are appreciated (I tried to google but did not find the paper which proposed these).", "record_id": "Scientific-Answer-Ranking:stats:676945", "scores": [3, 0], "split": "holdout", "thread": {"accepted_answer_id": null, "answers": [{"answer_html": "The limiting distribution is fairly straightforward. Let $X$ be the treatments and $Z$ be the instruments
\nStage 1 is to predict $X$ from $Z$, by OLS. The predicted values\n$\\hat X$ are the projections of $X$ on to the space spanned by $Z$: write $\\hat X=P_ZX$
\nStage 2 is OLS of the outcome $Y$ on $\\hat X$. The fitted coefficients are\n$$\\hat \\theta= (\\hat X^T\\hat X)^{-1}\\hat X^TY$$\nor\n$$ \\hat\\theta= (X^TP_Z^TP_ZX)^{-1} X^TP_Z^TY.$$
\nThis is a linear transformation of $Y$. If we're assuming $Y$ is Normal, then so is $\\hat\\theta$. If we're assuming $Y$ is constant variance then $\\hat\\theta$ is asymptotically Normal by the Lindeberg CLT under conditions on the tails of $\\hat X$.
\nThe limiting distribution is centered at the true causal $\\theta$ because that's the whole point: it's a ratio of unconfounded estimators. So $$\\sqrt{n}(\\hat\\theta-\\theta)\\stackrel{d}{\\to} N(0, \\Xi)$$\nfor some $\\Xi$
\nThe asymptotic variance comes from the linearity of $Y\\mapsto \\hat\\theta$ and the bilinearity of variance
\n$$\\mathrm{var}[\\hat\\theta]= (X^TP_Z^TP_ZX)^{-1} X^TP_Z^T\\mathrm{var}[Y|X]P_ZX(X^TP_Z^TP_ZX)^{-1}$$
\nModelling $Y$ as constant variance $\\sigma^2I$ we get the usual cancellation\n$$\\mathrm{var}[\\hat\\theta]= n^{-1} \\Xi= \\sigma^2(X^TP_Z^TP_ZX)^{-1}.$$
\nThe remaining detail is that $\\sigma^2$ still has to be estimated by $\\mathrm{var}[Y-X\\hat\\theta]$ (and not by $\\mathrm{var}[Y-\\hat X\\hat\\theta]$)
\n(I should probably also note that $P_Z^TP_Z=P_Z$ since the hat matrix is symmetric and since projections are idempotent)
\n", "answer_id": 676946, "answer_text": "The limiting distribution is fairly straightforward. Let $X$ be the treatments and $Z$ be the instruments\n\n\n\n\nStage 1 is to predict $X$ from $Z$, by OLS. The predicted values\n$\\hat X$ are the projections of $X$ on to the space spanned by $Z$: write $\\hat X=P_ZX$\n\n\n\n\nStage 2 is OLS of the outcome $Y$ on $\\hat X$. The fitted coefficients are\n$$\\hat \\theta= (\\hat X^T\\hat X)^{-1}\\hat X^TY$$\nor\n$$ \\hat\\theta= (X^TP_Z^TP_ZX)^{-1} X^TP_Z^TY.$$\n\n\n\n\nThis is a linear transformation of $Y$. If we're assuming $Y$ is Normal, then so is $\\hat\\theta$. If we're assuming $Y$ is constant variance then $\\hat\\theta$ is asymptotically Normal by the Lindeberg CLT under conditions on the tails of $\\hat X$.\n\n\n\n\nThe limiting distribution is centered at the true causal $\\theta$ because that's the whole point: it's a ratio of unconfounded estimators. So $$\\sqrt{n}(\\hat\\theta-\\theta)\\stackrel{d}{\\to} N(0, \\Xi)$$\nfor some $\\Xi$\n\n\n\n\nThe asymptotic variance comes from the linearity of $Y\\mapsto \\hat\\theta$ and the bilinearity of variance\n\n\n\n\n$$\\mathrm{var}[\\hat\\theta]= (X^TP_Z^TP_ZX)^{-1} X^TP_Z^T\\mathrm{var}[Y|X]P_ZX(X^TP_Z^TP_ZX)^{-1}$$\n\n\n\n\nModelling $Y$ as constant variance $\\sigma^2I$ we get the usual cancellation\n$$\\mathrm{var}[\\hat\\theta]= n^{-1} \\Xi= \\sigma^2(X^TP_Z^TP_ZX)^{-1}.$$\n\n\n\n\nThe remaining detail is that $\\sigma^2$ still has to be estimated by $\\mathrm{var}[Y-X\\hat\\theta]$ (and not by $\\mathrm{var}[Y-\\hat X\\hat\\theta]$)\n\n\n\n\n(I should probably also note that $P_Z^TP_Z=P_Z$ since the hat matrix is symmetric and since projections are idempotent)", "answer_url": "https://stats.stackexchange.com/a/676946", "author": "Thomas Lumley", "author_url": "https://stats.stackexchange.com/users/249135/thomas-lumley", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-08-23T22:41:01+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:06.169765+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/9155f81b0f1dac4b0f83fad58469033af46ad34ee8d731e569d063b41b3df6b6_1790825226563497500_0.json", "raw_sha256": "cbac4b1b24e2159f1c17ea9902eaf89a0a5260344e6dba6f75790ba955f0d04b", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/677298;677295;677280;677279;677278;677275;677269;677266;677262;677256;677245;677243;677242;677226;677225;677217;677211;677201;677194;677193;677186;677183;677179;677177;677171;677169;677168;677151;677149;677147;677137;677135;677131;677129;677115;677110;677109;677101;677099;677098;677096;677095;677094;677085;677083;677079;677078;677075;677071;677066;677065;677062;677058;677045;677041;677035;677033;677023;677021;676999;676997;676991;676982;676981;676979;676977;676975;676971;676966;676961;676958;676956;676952;676947;676945;676937;676935;676933;676924;676922;676899;676898;676893;676889;676888;676879;676874;676873;676870;676867;676865;676858;676855;676850;676842;676832;676830;676824;676823;676821/answers?filter=withbody&order=asc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 676945, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Thomas Lumley", "profile_url": "https://stats.stackexchange.com/users/249135/thomas-lumley", "user_type": "registered"}, "created_at": "2026-08-23T22:41:01+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "F0B46AAE-BEC0-4CA2-963B-56F7698AE7FF", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/F0B46AAE-BEC0-4CA2-963B-56F7698AE7FF/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Thomas Lumley", "profile_url": "https://stats.stackexchange.com/users/249135/thomas-lumley", "user_type": "registered"}, "created_at": "2026-08-24T00:54:53+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "EA39452C-A003-49F8-B5D5-ACFEFF423D52", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/EA39452C-A003-49F8-B5D5-ACFEFF423D52/view-source"}], "score": 3, "updated_at": "2026-08-24T00:54:53+00:00"}, {"answer_html": "Asymptotic distribution of 2SLS estimator (or equivalently the IV estimator)\nwas also derived (with proof) in Imbens, Guido W., and Joshua D. Angrist. Identification and Estimation of Local Average Treatment Effects. Econometrica 62, no. 2 (1994): 467–75. https://doi.org/10.2307/2951620.
\n", "answer_id": 676949, "answer_text": "Asymptotic distribution of 2SLS estimator (or equivalently the IV estimator)\nwas also derived (with proof) in Imbens, Guido W., and Joshua D. Angrist. Identification and Estimation of Local Average Treatment Effects. Econometrica 62, no. 2 (1994): 467–75. https://doi.org/10.2307/2951620 (https://doi.org/10.2307/2951620).", "answer_url": "https://stats.stackexchange.com/a/676949", "author": "Asigan", "author_url": "https://stats.stackexchange.com/users/499652/asigan", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-08-24T04:22:56+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:06.169765+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/9155f81b0f1dac4b0f83fad58469033af46ad34ee8d731e569d063b41b3df6b6_1790825226563497500_0.json", "raw_sha256": "cbac4b1b24e2159f1c17ea9902eaf89a0a5260344e6dba6f75790ba955f0d04b", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/677298;677295;677280;677279;677278;677275;677269;677266;677262;677256;677245;677243;677242;677226;677225;677217;677211;677201;677194;677193;677186;677183;677179;677177;677171;677169;677168;677151;677149;677147;677137;677135;677131;677129;677115;677110;677109;677101;677099;677098;677096;677095;677094;677085;677083;677079;677078;677075;677071;677066;677065;677062;677058;677045;677041;677035;677033;677023;677021;676999;676997;676991;676982;676981;676979;676977;676975;676971;676966;676961;676958;676956;676952;676947;676945;676937;676935;676933;676924;676922;676899;676898;676893;676889;676888;676879;676874;676873;676870;676867;676865;676858;676855;676850;676842;676832;676830;676824;676823;676821/answers?filter=withbody&order=asc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 676945, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Asigan", "profile_url": "https://stats.stackexchange.com/users/499652/asigan", "user_type": "registered"}, "created_at": "2026-08-24T04:22:56+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "D494D3FA-3459-40D4-8385-A6AEBB19B0D4", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/D494D3FA-3459-40D4-8385-A6AEBB19B0D4/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Asigan", "profile_url": "https://stats.stackexchange.com/users/499652/asigan", "user_type": "registered"}, "created_at": "2026-08-24T04:33:07+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "7C82213F-6D44-4B3E-8234-9B2AFE3B98E0", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/7C82213F-6D44-4B3E-8234-9B2AFE3B98E0/view-source"}], "score": 0, "updated_at": "2026-08-24T04:33:07+00:00"}], "domain": "statistics", "external_links": ["https://doi.org/10.2307/2951620"], "medical_sensitive": true, "patient_specific": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:03.428408+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/774052c18cd9e8fa951e893347bfa3c1a85e743fc46ec4667572002cadb10cbf_1790825224163423600_0.json", "raw_sha256": "fe4dd06d3de6c0b1bb33ba88aee0ed4284118e01f76a58dcdce220a4946329b2", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/search/advanced?answers=1&filter=withbody&order=desc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_author": "Asigan", "question_author_url": "https://stats.stackexchange.com/users/499652/asigan", "question_author_user_type": "registered", "question_created_at": "2026-08-23T21:52:47+00:00", "question_html": "I am reading a paper and it talked about the limiting distribution and over-identification test of a two stage least square (2SLS) estimator. The authors cited J. D. Angrist, J. S. Pischke, Mostly Harmless Econometrics: An Empiricist’s Companion (Princeton University Press, Princeton, NJ, 2009)\nas an introduction to this topic. The textbook omitted the proof and only stated the related results.\nI am looking for a reference for the limiting distribution and over-identification test\nof 2SLS with proof. Both textbooks or original papers are appreciated (I tried to google but did not find the paper which proposed these).
\n", "question_id": 676945, "question_license": "CC BY-SA 4.0", "question_score": 2, "question_text": "I am reading a paper and it talked about the limiting distribution and over-identification test of a two stage least square (2SLS) estimator. The authors cited J. D. Angrist, J. S. Pischke, Mostly Harmless Econometrics: An Empiricist’s Companion (Princeton University Press, Princeton, NJ, 2009)\nas an introduction to this topic. The textbook omitted the proof and only stated the related results.\nI am looking for a reference for the limiting distribution and over-identification test\nof 2SLS with proof. Both textbooks or original papers are appreciated (I tried to google but did not find the paper which proposed these).", "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Asigan", "profile_url": "https://stats.stackexchange.com/users/499652/asigan", "user_type": "registered"}, "created_at": "2026-08-23T21:52:47+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "F15160BC-7ACC-4CBA-826A-FC3B9F5AFF51", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/F15160BC-7ACC-4CBA-826A-FC3B9F5AFF51/view-source"}, {"content_license": null, "contributor": {"display_name": "[deleted/unavailable user]", "profile_url": null, "user_type": "does_not_exist"}, "created_at": "2026-08-24T06:02:44+00:00", "raw_file": "raw/codex_api_v1/01ff643b5e725b2402c38de261074c3bef3326820f24db4342e17e318353268e_1790825246205492400_0.json", "raw_sha256": "a0521ae83c8630be00a12499e9aaa253069e57a5e0ff902fea3e9b8e7acb810f", "revision_guid": "58BD4A31-DDA5-48C1-81F9-B456482206F2", "revision_number": null, "revision_type": "vote_based", "revision_url": "https://stats.stackexchange.com/revisions/58BD4A31-DDA5-48C1-81F9-B456482206F2/view-source"}], "source_site": "stats", "source_url": "https://stats.stackexchange.com/questions/676945/reference-request-deriving-the-limiting-distribution-and-over-identification-te", "split": "holdout", "split_group": "7ec0ee22929a717b621945fae84b97d9976944ecc69215600213d7ff57597f2c", "tags": ["references", "causality", "two-stage-least-squares"], "thread_id": "stats:676945", "title": "Reference request: deriving the limiting distribution and over-identification test of 2SLS with proof"}} {"accepted_status": [true, false, false], "candidate_answers": [{"answer_html": "Lasso is not capable of doing that as explained here. No other simple method can either. As explained in that link, data reduction (unsupervised learning) is generally a better approach than selection.
\nYour sample size is probably not large enough for the data to tell you how to choose $\\lambda$.
\nIf you use any method you like on your dataset, compute a variable importance measure for all candidate features, and bootstrap the importances to obtain 0.95 confidence intervals on each variable's importance, you'll be shocked at the CL widths. The data do not have sufficient information to tell you how important the features are, and if you can't assess importance you can't do reliable selection.
\nYour outcome variable may have a strange distribution. Consider semiparametric models.
\n", "answer_id": 677132, "answer_text": "Lasso is not capable of doing that as explained here (https://hbiostat.org/hdata). No other simple method can either. As explained in that link, data reduction (unsupervised learning) is generally a better approach than selection.\n\n\n\n\nYour sample size is probably not large enough for the data to tell you how to choose $\\lambda$.\n\n\n\n\nIf you use any method you like on your dataset, compute a variable importance measure for all candidate features, and bootstrap the importances to obtain 0.95 confidence intervals on each variable's importance, you'll be shocked at the CL widths. The data do not have sufficient information to tell you how important the features are, and if you can't assess importance you can't do reliable selection.\n\n\n\n\nYour outcome variable may have a strange distribution. Consider semiparametric models (https://hbiostat.org/ordinal).", "answer_url": "https://stats.stackexchange.com/a/677132", "author": "Frank Harrell", "author_url": "https://stats.stackexchange.com/users/4253/frank-harrell", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-09-10T22:55:08+00:00", "is_accepted": true, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:06.169765+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/9155f81b0f1dac4b0f83fad58469033af46ad34ee8d731e569d063b41b3df6b6_1790825226563497500_0.json", "raw_sha256": "cbac4b1b24e2159f1c17ea9902eaf89a0a5260344e6dba6f75790ba955f0d04b", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/677298;677295;677280;677279;677278;677275;677269;677266;677262;677256;677245;677243;677242;677226;677225;677217;677211;677201;677194;677193;677186;677183;677179;677177;677171;677169;677168;677151;677149;677147;677137;677135;677131;677129;677115;677110;677109;677101;677099;677098;677096;677095;677094;677085;677083;677079;677078;677075;677071;677066;677065;677062;677058;677045;677041;677035;677033;677023;677021;676999;676997;676991;676982;676981;676979;676977;676975;676971;676966;676961;676958;676956;676952;676947;676945;676937;676935;676933;676924;676922;676899;676898;676893;676889;676888;676879;676874;676873;676870;676867;676865;676858;676855;676850;676842;676832;676830;676824;676823;676821/answers?filter=withbody&order=asc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 677131, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Frank Harrell", "profile_url": "https://stats.stackexchange.com/users/4253/frank-harrell", "user_type": "registered"}, "created_at": "2026-09-10T22:55:08+00:00", "raw_file": "raw/codex_api_v1/3f959895a29b33d83894e5370d82e1c0cf87f20ac57fa423ebc923738357c657_1790825253957066500_0.json", "raw_sha256": "ddd8808039e410ca99f97e2a7f12c307f046c4e5c3e184683bc12f816e6f49fc", "revision_guid": "B76B8D57-E57B-4CD1-82D8-CCE116B92262", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/B76B8D57-E57B-4CD1-82D8-CCE116B92262/view-source"}], "score": 7, "updated_at": "2026-09-10T22:55:08+00:00"}, {"answer_html": "You write
\n\n\nFor a secondary, exploratory analysis I want to identify which of\nthese screening items and test scores are more strongly associated\nwith the biomarker concentration
\n
If this is an accurate statement of your goal, then you can simply do 50 bivariate regressions and see which is strongest. This doesn't lead to a model, but you question doesn't require one. It doesn't do variable selection but see Frank's post on the inherent difficulties there. You can include parameter estimates and CIs and SEs.
\nAn alternative is to reduce the number of variables a priori either by something like factor analysis or by substantive knowledge. The types of variables you mention often have high collinearity and you may be able to combine them without much loss of information.
\n", "answer_id": 677133, "answer_text": "You write\n\n\n\n\n\n\n\nFor a secondary, exploratory analysis I want to identify which of\nthese screening items and test scores are more strongly associated\nwith the biomarker concentration\n\n\n\n\n\n\n\nIf this is an accurate statement of your goal, then you can simply do 50 bivariate regressions and see which is strongest. This doesn't lead to a model, but you question doesn't require one. It doesn't do variable selection but see Frank's post on the inherent difficulties there. You can include parameter estimates and CIs and SEs.\n\n\n\n\nAn alternative is to reduce the number of variables a priori either by something like factor analysis or by substantive knowledge. The types of variables you mention often have high collinearity and you may be able to combine them without much loss of information.", "answer_url": "https://stats.stackexchange.com/a/677133", "author": "Peter Flom", "author_url": "https://stats.stackexchange.com/users/686/peter-flom", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-09-10T23:06:19+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:06.169765+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/9155f81b0f1dac4b0f83fad58469033af46ad34ee8d731e569d063b41b3df6b6_1790825226563497500_0.json", "raw_sha256": "cbac4b1b24e2159f1c17ea9902eaf89a0a5260344e6dba6f75790ba955f0d04b", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/677298;677295;677280;677279;677278;677275;677269;677266;677262;677256;677245;677243;677242;677226;677225;677217;677211;677201;677194;677193;677186;677183;677179;677177;677171;677169;677168;677151;677149;677147;677137;677135;677131;677129;677115;677110;677109;677101;677099;677098;677096;677095;677094;677085;677083;677079;677078;677075;677071;677066;677065;677062;677058;677045;677041;677035;677033;677023;677021;676999;676997;676991;676982;676981;676979;676977;676975;676971;676966;676961;676958;676956;676952;676947;676945;676937;676935;676933;676924;676922;676899;676898;676893;676889;676888;676879;676874;676873;676870;676867;676865;676858;676855;676850;676842;676832;676830;676824;676823;676821/answers?filter=withbody&order=asc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 677131, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Peter Flom", "profile_url": "https://stats.stackexchange.com/users/686/peter-flom", "user_type": "registered"}, "created_at": "2026-09-10T23:06:19+00:00", "raw_file": "raw/codex_api_v1/3f959895a29b33d83894e5370d82e1c0cf87f20ac57fa423ebc923738357c657_1790825253957066500_0.json", "raw_sha256": "ddd8808039e410ca99f97e2a7f12c307f046c4e5c3e184683bc12f816e6f49fc", "revision_guid": "FAB9DA36-EDCB-41AB-A901-F0B023A8C5FE", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/FAB9DA36-EDCB-41AB-A901-F0B023A8C5FE/view-source"}], "score": 2, "updated_at": "2026-09-10T23:06:19+00:00"}, {"answer_html": "I think this depends entirely on what you mean by "identify" and "associated".
\nBarring any unrealistic asks (e.g. hoping that LASSO can magically identify truly associated variables, causal or otherwise, in a manner which could generalize to new samples and new populations across time and space), there seems to be some evidence LASSO can identify predictors under some understandable assumptions.
\nSimulations from Genome-wide association analysis by lasso penalized logistic regression seem to suggest that LASSO can correctly identify main effects (and interactions) in large scale scenarios. The approach seems to do particularly well when:
\nYour $p/n = 1/2$, whereas they examine $p/n$ as large as 50 (although their $n$ is much larger than yours). Now, the approach described is not a 1:1 with your problem. In particular, this study requires the analyst to choose in advance the number of predictors to retain meaning you can't magically "identify which of these screening items and test scores are more strongly associated with the biomarker concentration". Additionally, the approach described in the paper seems to be deficient when predictors are highly correlated. This is to be expected.
\nIf you were to use this approach for your stated $n$ and $p$, I would suggest performing similar simulations as described in the linked paper to better understand the operating characteristics of the procedure. If this sounds like too high a bar to meet, I would suggest avoiding the approach completely (lest you erroneously lend too much credit to the method).
\n", "answer_id": 677134, "answer_text": "I think this depends entirely on what you mean by \"identify\" and \"associated\".\n\n\n\n\nBarring any unrealistic asks (e.g. hoping that LASSO can magically identify truly associated variables, causal or otherwise, in a manner which could generalize to new samples and new populations across time and space), there seems to be some evidence LASSO can identify predictors under some understandable assumptions.\n\n\n\n\nSimulations from Genome-wide association analysis by lasso penalized logistic regression (https://pmc.ncbi.nlm.nih.gov/articles/PMC2732298/) seem to suggest that LASSO can correctly identify main effects (and interactions) in large scale scenarios. The approach seems to do particularly well when:\n\n\n\n\n\nThe sample size was sufficiently large, and\n\n\n\n\nPredictors were not strongly correlated.\n\n\n\n\n\nYour $p/n = 1/2$, whereas they examine $p/n$ as large as 50 (although their $n$ is much larger than yours). Now, the approach described is not a 1:1 with your problem. In particular, this study requires the analyst to choose in advance the number of predictors to retain meaning you can't magically \"identify which of these screening items and test scores are more strongly associated with the biomarker concentration\". Additionally, the approach described in the paper seems to be deficient when predictors are highly correlated. This is to be expected.\n\n\n\n\nIf you were to use this approach for your stated $n$ and $p$, I would suggest performing similar simulations as described in the linked paper to better understand the operating characteristics of the procedure. If this sounds like too high a bar to meet, I would suggest avoiding the approach completely (lest you erroneously lend too much credit to the method).", "answer_url": "https://stats.stackexchange.com/a/677134", "author": "Demetri Pananos", "author_url": "https://stats.stackexchange.com/users/111259/demetri-pananos", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-09-11T00:40:00+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:06.169765+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/9155f81b0f1dac4b0f83fad58469033af46ad34ee8d731e569d063b41b3df6b6_1790825226563497500_0.json", "raw_sha256": "cbac4b1b24e2159f1c17ea9902eaf89a0a5260344e6dba6f75790ba955f0d04b", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/677298;677295;677280;677279;677278;677275;677269;677266;677262;677256;677245;677243;677242;677226;677225;677217;677211;677201;677194;677193;677186;677183;677179;677177;677171;677169;677168;677151;677149;677147;677137;677135;677131;677129;677115;677110;677109;677101;677099;677098;677096;677095;677094;677085;677083;677079;677078;677075;677071;677066;677065;677062;677058;677045;677041;677035;677033;677023;677021;676999;676997;676991;676982;676981;676979;676977;676975;676971;676966;676961;676958;676956;676952;676947;676945;676937;676935;676933;676924;676922;676899;676898;676893;676889;676888;676879;676874;676873;676870;676867;676865;676858;676855;676850;676842;676832;676830;676824;676823;676821/answers?filter=withbody&order=asc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 677131, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Demetri Pananos", "profile_url": "https://stats.stackexchange.com/users/111259/demetri-pananos", "user_type": "registered"}, "created_at": "2026-09-11T00:40:00+00:00", "raw_file": "raw/codex_api_v1/3f959895a29b33d83894e5370d82e1c0cf87f20ac57fa423ebc923738357c657_1790825253957066500_0.json", "raw_sha256": "ddd8808039e410ca99f97e2a7f12c307f046c4e5c3e184683bc12f816e6f49fc", "revision_guid": "6FAD8909-1407-4548-83D7-271A18336196", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/6FAD8909-1407-4548-83D7-271A18336196/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Demetri Pananos", "profile_url": "https://stats.stackexchange.com/users/111259/demetri-pananos", "user_type": "registered"}, "created_at": "2026-09-11T00:45:19+00:00", "raw_file": "raw/codex_api_v1/3f959895a29b33d83894e5370d82e1c0cf87f20ac57fa423ebc923738357c657_1790825253957066500_0.json", "raw_sha256": "ddd8808039e410ca99f97e2a7f12c307f046c4e5c3e184683bc12f816e6f49fc", "revision_guid": "BEF7E75E-8C2D-4C36-822B-7DE5DA64EEE6", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/BEF7E75E-8C2D-4C36-822B-7DE5DA64EEE6/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Demetri Pananos", "profile_url": "https://stats.stackexchange.com/users/111259/demetri-pananos", "user_type": "registered"}, "created_at": "2026-09-11T00:54:12+00:00", "raw_file": "raw/codex_api_v1/3f959895a29b33d83894e5370d82e1c0cf87f20ac57fa423ebc923738357c657_1790825253957066500_0.json", "raw_sha256": "ddd8808039e410ca99f97e2a7f12c307f046c4e5c3e184683bc12f816e6f49fc", "revision_guid": "061B28DB-0576-4492-97DB-660BD78AF69A", "revision_number": 3, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/061B28DB-0576-4492-97DB-660BD78AF69A/view-source"}], "score": 4, "updated_at": "2026-09-11T00:54:12+00:00"}], "ground_truth": "community signals only; no scientific truth label", "product": "ranking", "question": "I have baseline data on 100 participants from an ongoing longitudinal study. At the screening visit each participant answered sociodemographic, clinical and lifestyle questions and completed a cognitive screening battery — more than 50 candidate variables in total. A blood sample drawn at the same visit gives the serum concentration of a protein of interest, which is my (continuous) outcome.\n\n\n\n\nFor a secondary, exploratory analysis I want to identify which of these screening items and test scores are more strongly associated with the biomarker concentration. However, this is not a prediction problem: I am not building a model to apply to new individuals, but trying to establish which of the screening variables are associated with the biomarker.\n\n\n\n\nSince the number of candidate variables is large relative to the sample size (n/p ≈ 2), an unpenalised model with all variables is not viable and stepwise selection is widely discouraged, so my first thought was LASSO with λ chosen by cross-validation. I am unsure this is defensible: selection at this ratio seems likely to be unstable, and inference on LASSO-selected variables is not valid.\n\n\n\n\n\nIs LASSO appropriate when the goal is identifying associated variables rather than predicting new observations?\n\n\n\n\nWith n = 100 and ~50 candidate predictors, is the selected set stable enough to support any substantive association?\n\n\n\n\nIf it is not, what would you recommend instead?", "record_id": "Scientific-Answer-Ranking:stats:677131", "scores": [7, 2, 4], "split": "holdout", "thread": {"accepted_answer_id": 677132, "answers": [{"answer_html": "Lasso is not capable of doing that as explained here. No other simple method can either. As explained in that link, data reduction (unsupervised learning) is generally a better approach than selection.
\nYour sample size is probably not large enough for the data to tell you how to choose $\\lambda$.
\nIf you use any method you like on your dataset, compute a variable importance measure for all candidate features, and bootstrap the importances to obtain 0.95 confidence intervals on each variable's importance, you'll be shocked at the CL widths. The data do not have sufficient information to tell you how important the features are, and if you can't assess importance you can't do reliable selection.
\nYour outcome variable may have a strange distribution. Consider semiparametric models.
\n", "answer_id": 677132, "answer_text": "Lasso is not capable of doing that as explained here (https://hbiostat.org/hdata). No other simple method can either. As explained in that link, data reduction (unsupervised learning) is generally a better approach than selection.\n\n\n\n\nYour sample size is probably not large enough for the data to tell you how to choose $\\lambda$.\n\n\n\n\nIf you use any method you like on your dataset, compute a variable importance measure for all candidate features, and bootstrap the importances to obtain 0.95 confidence intervals on each variable's importance, you'll be shocked at the CL widths. The data do not have sufficient information to tell you how important the features are, and if you can't assess importance you can't do reliable selection.\n\n\n\n\nYour outcome variable may have a strange distribution. Consider semiparametric models (https://hbiostat.org/ordinal).", "answer_url": "https://stats.stackexchange.com/a/677132", "author": "Frank Harrell", "author_url": "https://stats.stackexchange.com/users/4253/frank-harrell", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-09-10T22:55:08+00:00", "is_accepted": true, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:06.169765+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/9155f81b0f1dac4b0f83fad58469033af46ad34ee8d731e569d063b41b3df6b6_1790825226563497500_0.json", "raw_sha256": "cbac4b1b24e2159f1c17ea9902eaf89a0a5260344e6dba6f75790ba955f0d04b", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/677298;677295;677280;677279;677278;677275;677269;677266;677262;677256;677245;677243;677242;677226;677225;677217;677211;677201;677194;677193;677186;677183;677179;677177;677171;677169;677168;677151;677149;677147;677137;677135;677131;677129;677115;677110;677109;677101;677099;677098;677096;677095;677094;677085;677083;677079;677078;677075;677071;677066;677065;677062;677058;677045;677041;677035;677033;677023;677021;676999;676997;676991;676982;676981;676979;676977;676975;676971;676966;676961;676958;676956;676952;676947;676945;676937;676935;676933;676924;676922;676899;676898;676893;676889;676888;676879;676874;676873;676870;676867;676865;676858;676855;676850;676842;676832;676830;676824;676823;676821/answers?filter=withbody&order=asc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 677131, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Frank Harrell", "profile_url": "https://stats.stackexchange.com/users/4253/frank-harrell", "user_type": "registered"}, "created_at": "2026-09-10T22:55:08+00:00", "raw_file": "raw/codex_api_v1/3f959895a29b33d83894e5370d82e1c0cf87f20ac57fa423ebc923738357c657_1790825253957066500_0.json", "raw_sha256": "ddd8808039e410ca99f97e2a7f12c307f046c4e5c3e184683bc12f816e6f49fc", "revision_guid": "B76B8D57-E57B-4CD1-82D8-CCE116B92262", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/B76B8D57-E57B-4CD1-82D8-CCE116B92262/view-source"}], "score": 7, "updated_at": "2026-09-10T22:55:08+00:00"}, {"answer_html": "You write
\n\n\nFor a secondary, exploratory analysis I want to identify which of\nthese screening items and test scores are more strongly associated\nwith the biomarker concentration
\n
If this is an accurate statement of your goal, then you can simply do 50 bivariate regressions and see which is strongest. This doesn't lead to a model, but you question doesn't require one. It doesn't do variable selection but see Frank's post on the inherent difficulties there. You can include parameter estimates and CIs and SEs.
\nAn alternative is to reduce the number of variables a priori either by something like factor analysis or by substantive knowledge. The types of variables you mention often have high collinearity and you may be able to combine them without much loss of information.
\n", "answer_id": 677133, "answer_text": "You write\n\n\n\n\n\n\n\nFor a secondary, exploratory analysis I want to identify which of\nthese screening items and test scores are more strongly associated\nwith the biomarker concentration\n\n\n\n\n\n\n\nIf this is an accurate statement of your goal, then you can simply do 50 bivariate regressions and see which is strongest. This doesn't lead to a model, but you question doesn't require one. It doesn't do variable selection but see Frank's post on the inherent difficulties there. You can include parameter estimates and CIs and SEs.\n\n\n\n\nAn alternative is to reduce the number of variables a priori either by something like factor analysis or by substantive knowledge. The types of variables you mention often have high collinearity and you may be able to combine them without much loss of information.", "answer_url": "https://stats.stackexchange.com/a/677133", "author": "Peter Flom", "author_url": "https://stats.stackexchange.com/users/686/peter-flom", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-09-10T23:06:19+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:06.169765+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/9155f81b0f1dac4b0f83fad58469033af46ad34ee8d731e569d063b41b3df6b6_1790825226563497500_0.json", "raw_sha256": "cbac4b1b24e2159f1c17ea9902eaf89a0a5260344e6dba6f75790ba955f0d04b", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/677298;677295;677280;677279;677278;677275;677269;677266;677262;677256;677245;677243;677242;677226;677225;677217;677211;677201;677194;677193;677186;677183;677179;677177;677171;677169;677168;677151;677149;677147;677137;677135;677131;677129;677115;677110;677109;677101;677099;677098;677096;677095;677094;677085;677083;677079;677078;677075;677071;677066;677065;677062;677058;677045;677041;677035;677033;677023;677021;676999;676997;676991;676982;676981;676979;676977;676975;676971;676966;676961;676958;676956;676952;676947;676945;676937;676935;676933;676924;676922;676899;676898;676893;676889;676888;676879;676874;676873;676870;676867;676865;676858;676855;676850;676842;676832;676830;676824;676823;676821/answers?filter=withbody&order=asc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 677131, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Peter Flom", "profile_url": "https://stats.stackexchange.com/users/686/peter-flom", "user_type": "registered"}, "created_at": "2026-09-10T23:06:19+00:00", "raw_file": "raw/codex_api_v1/3f959895a29b33d83894e5370d82e1c0cf87f20ac57fa423ebc923738357c657_1790825253957066500_0.json", "raw_sha256": "ddd8808039e410ca99f97e2a7f12c307f046c4e5c3e184683bc12f816e6f49fc", "revision_guid": "FAB9DA36-EDCB-41AB-A901-F0B023A8C5FE", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/FAB9DA36-EDCB-41AB-A901-F0B023A8C5FE/view-source"}], "score": 2, "updated_at": "2026-09-10T23:06:19+00:00"}, {"answer_html": "I think this depends entirely on what you mean by "identify" and "associated".
\nBarring any unrealistic asks (e.g. hoping that LASSO can magically identify truly associated variables, causal or otherwise, in a manner which could generalize to new samples and new populations across time and space), there seems to be some evidence LASSO can identify predictors under some understandable assumptions.
\nSimulations from Genome-wide association analysis by lasso penalized logistic regression seem to suggest that LASSO can correctly identify main effects (and interactions) in large scale scenarios. The approach seems to do particularly well when:
\nYour $p/n = 1/2$, whereas they examine $p/n$ as large as 50 (although their $n$ is much larger than yours). Now, the approach described is not a 1:1 with your problem. In particular, this study requires the analyst to choose in advance the number of predictors to retain meaning you can't magically "identify which of these screening items and test scores are more strongly associated with the biomarker concentration". Additionally, the approach described in the paper seems to be deficient when predictors are highly correlated. This is to be expected.
\nIf you were to use this approach for your stated $n$ and $p$, I would suggest performing similar simulations as described in the linked paper to better understand the operating characteristics of the procedure. If this sounds like too high a bar to meet, I would suggest avoiding the approach completely (lest you erroneously lend too much credit to the method).
\n", "answer_id": 677134, "answer_text": "I think this depends entirely on what you mean by \"identify\" and \"associated\".\n\n\n\n\nBarring any unrealistic asks (e.g. hoping that LASSO can magically identify truly associated variables, causal or otherwise, in a manner which could generalize to new samples and new populations across time and space), there seems to be some evidence LASSO can identify predictors under some understandable assumptions.\n\n\n\n\nSimulations from Genome-wide association analysis by lasso penalized logistic regression (https://pmc.ncbi.nlm.nih.gov/articles/PMC2732298/) seem to suggest that LASSO can correctly identify main effects (and interactions) in large scale scenarios. The approach seems to do particularly well when:\n\n\n\n\n\nThe sample size was sufficiently large, and\n\n\n\n\nPredictors were not strongly correlated.\n\n\n\n\n\nYour $p/n = 1/2$, whereas they examine $p/n$ as large as 50 (although their $n$ is much larger than yours). Now, the approach described is not a 1:1 with your problem. In particular, this study requires the analyst to choose in advance the number of predictors to retain meaning you can't magically \"identify which of these screening items and test scores are more strongly associated with the biomarker concentration\". Additionally, the approach described in the paper seems to be deficient when predictors are highly correlated. This is to be expected.\n\n\n\n\nIf you were to use this approach for your stated $n$ and $p$, I would suggest performing similar simulations as described in the linked paper to better understand the operating characteristics of the procedure. If this sounds like too high a bar to meet, I would suggest avoiding the approach completely (lest you erroneously lend too much credit to the method).", "answer_url": "https://stats.stackexchange.com/a/677134", "author": "Demetri Pananos", "author_url": "https://stats.stackexchange.com/users/111259/demetri-pananos", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-09-11T00:40:00+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:06.169765+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/9155f81b0f1dac4b0f83fad58469033af46ad34ee8d731e569d063b41b3df6b6_1790825226563497500_0.json", "raw_sha256": "cbac4b1b24e2159f1c17ea9902eaf89a0a5260344e6dba6f75790ba955f0d04b", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/677298;677295;677280;677279;677278;677275;677269;677266;677262;677256;677245;677243;677242;677226;677225;677217;677211;677201;677194;677193;677186;677183;677179;677177;677171;677169;677168;677151;677149;677147;677137;677135;677131;677129;677115;677110;677109;677101;677099;677098;677096;677095;677094;677085;677083;677079;677078;677075;677071;677066;677065;677062;677058;677045;677041;677035;677033;677023;677021;676999;676997;676991;676982;676981;676979;676977;676975;676971;676966;676961;676958;676956;676952;676947;676945;676937;676935;676933;676924;676922;676899;676898;676893;676889;676888;676879;676874;676873;676870;676867;676865;676858;676855;676850;676842;676832;676830;676824;676823;676821/answers?filter=withbody&order=asc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 677131, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Demetri Pananos", "profile_url": "https://stats.stackexchange.com/users/111259/demetri-pananos", "user_type": "registered"}, "created_at": "2026-09-11T00:40:00+00:00", "raw_file": "raw/codex_api_v1/3f959895a29b33d83894e5370d82e1c0cf87f20ac57fa423ebc923738357c657_1790825253957066500_0.json", "raw_sha256": "ddd8808039e410ca99f97e2a7f12c307f046c4e5c3e184683bc12f816e6f49fc", "revision_guid": "6FAD8909-1407-4548-83D7-271A18336196", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/6FAD8909-1407-4548-83D7-271A18336196/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Demetri Pananos", "profile_url": "https://stats.stackexchange.com/users/111259/demetri-pananos", "user_type": "registered"}, "created_at": "2026-09-11T00:45:19+00:00", "raw_file": "raw/codex_api_v1/3f959895a29b33d83894e5370d82e1c0cf87f20ac57fa423ebc923738357c657_1790825253957066500_0.json", "raw_sha256": "ddd8808039e410ca99f97e2a7f12c307f046c4e5c3e184683bc12f816e6f49fc", "revision_guid": "BEF7E75E-8C2D-4C36-822B-7DE5DA64EEE6", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/BEF7E75E-8C2D-4C36-822B-7DE5DA64EEE6/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Demetri Pananos", "profile_url": "https://stats.stackexchange.com/users/111259/demetri-pananos", "user_type": "registered"}, "created_at": "2026-09-11T00:54:12+00:00", "raw_file": "raw/codex_api_v1/3f959895a29b33d83894e5370d82e1c0cf87f20ac57fa423ebc923738357c657_1790825253957066500_0.json", "raw_sha256": "ddd8808039e410ca99f97e2a7f12c307f046c4e5c3e184683bc12f816e6f49fc", "revision_guid": "061B28DB-0576-4492-97DB-660BD78AF69A", "revision_number": 3, "revision_type": "single_user", "revision_url": "https://stats.stackexchange.com/revisions/061B28DB-0576-4492-97DB-660BD78AF69A/view-source"}], "score": 4, "updated_at": "2026-09-11T00:54:12+00:00"}], "domain": "statistics", "external_links": ["https://hbiostat.org/hdata", "https://hbiostat.org/ordinal", "https://pmc.ncbi.nlm.nih.gov/articles/PMC2732298/"], "medical_sensitive": false, "patient_specific": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:27:03.428408+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/774052c18cd9e8fa951e893347bfa3c1a85e743fc46ec4667572002cadb10cbf_1790825224163423600_0.json", "raw_sha256": "fe4dd06d3de6c0b1bb33ba88aee0ed4284118e01f76a58dcdce220a4946329b2", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/search/advanced?answers=1&filter=withbody&order=desc&page=1&pagesize=100&site=stats&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_author": "always.learning", "question_author_url": "https://stats.stackexchange.com/users/425636/always-learning", "question_author_user_type": "registered", "question_created_at": "2026-09-10T19:13:22+00:00", "question_html": "I have baseline data on 100 participants from an ongoing longitudinal study. At the screening visit each participant answered sociodemographic, clinical and lifestyle questions and completed a cognitive screening battery — more than 50 candidate variables in total. A blood sample drawn at the same visit gives the serum concentration of a protein of interest, which is my (continuous) outcome.
\nFor a secondary, exploratory analysis I want to identify which of these screening items and test scores are more strongly associated with the biomarker concentration. However, this is not a prediction problem: I am not building a model to apply to new individuals, but trying to establish which of the screening variables are associated with the biomarker.
\nSince the number of candidate variables is large relative to the sample size (n/p ≈ 2), an unpenalised model with all variables is not viable and stepwise selection is widely discouraged, so my first thought was LASSO with λ chosen by cross-validation. I am unsure this is defensible: selection at this ratio seems likely to be unstable, and inference on LASSO-selected variables is not valid.
\nYou are looking at solving a system of Diophantine equations, for which there is no known general algorithm. For the linear case there are algorithms using linear programming. The least-squares constraint can be taken into account by seeing it is an optimization problem. Ignoring the constraints on the operations for now, you could solve it using cvxpy with pyscipopt as the solver:
\nimport cvxpy as cp\nimport numpy as np\nnp.random.seed(1)\nm = 3\nn = 3\nA = np.random.randint(0, 100, m*n).reshape(m, n)\nb = np.random.randint(0, 100, m)\nx = cp.Variable(n, integer=True)\nobjective = cp.Minimize(cp.sum_squares(A @ x - b))\nprob = cp.Problem(objective)\nresult = prob.solve()\nx.value \n\nI do not know if the packages satisfy your constraints on what operations are permissible. But given that the solution and coefficients live in $\\mathbb{Z}$, I would guess that at most they use rationals internally, which can be represented by two integers each anyway and so reduce to integer arithmetic. The algorithms they use should help with finding something which satisfies your operation constraints.
\n", "answer_id": 45109, "answer_text": "You are looking at solving a system of Diophantine equations, for which there is no known general algorithm. For the linear case there are algorithms using linear programming. The least-squares constraint can be taken into account by seeing it is an optimization problem. Ignoring the constraints on the operations for now, you could solve it using cvxpy with pyscipopt as the solver:\n\n\n\n\nimport cvxpy as cp\nimport numpy as np\nnp.random.seed(1)\nm = 3\nn = 3\nA = np.random.randint(0, 100, m*n).reshape(m, n)\nb = np.random.randint(0, 100, m)\nx = cp.Variable(n, integer=True)\nobjective = cp.Minimize(cp.sum_squares(A @ x - b))\nprob = cp.Problem(objective)\nresult = prob.solve()\nx.value \n\n\n\n\n\nI do not know if the packages satisfy your constraints on what operations are permissible. But given that the solution and coefficients live in $\\mathbb{Z}$, I would guess that at most they use rationals internally, which can be represented by two integers each anyway and so reduce to integer arithmetic. The algorithms they use should help with finding something which satisfies your operation constraints.", "answer_url": "https://scicomp.stackexchange.com/a/45109", "author": "niemc", "author_url": "https://scicomp.stackexchange.com/users/50632/niemc", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2025-06-11T03:49:42+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:28:47.033952+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/cb6e5f564c84a92c4e121c0637c99292018f8935652e423630f2001099a2410f_1790825327386675300_0.json", "raw_sha256": "1a957289f56621bebd21cb45dd99baaedb2c3bc11cb28d700558e4bbcaa19695", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/45545;45541;45538;45533;45532;45530;45523;45513;45510;45507;45499;45493;45488;45487;45479;45474;45472;45463;45461;45447;45444;45436;45428;45425;45424;45423;45422;45416;45414;45410;45404;45401;45396;45391;45389;45387;45380;45377;45376;45375;45369;45366;45365;45363;45362;45359;45350;45347;45344;45336;45334;45331;45326;45322;45316;45313;45311;45309;45305;45302;45300;45291;45289;45285;45276;45269;45263;45262;45261;45253;45247;45246;45238;45236;45230;45229;45208;45201;45200;45185;45183;45171;45167;45165;45158;45154;45146;45141;45139;45134;45129;45127;45122;45114;45112;45108;45105;45100;45098;45096/answers?filter=withbody&order=asc&page=1&pagesize=100&site=scicomp&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 45108, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "niemc", "profile_url": "https://scicomp.stackexchange.com/users/50632/niemc", "user_type": "registered"}, "created_at": "2025-06-11T03:49:42+00:00", "raw_file": "raw/codex_api_v1/8b02bbba3a1a1a633af4866e7fea0bd6789190b52c4b8380b0538b5c670e7131_1790825346551636200_0.json", "raw_sha256": "33050439b68e1f78cef06bf4c2ce07c0ec45a5fdf656fa1a9efd04691108f5e0", "revision_guid": "84D10C8F-D10A-4820-8862-228256BCD621", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/84D10C8F-D10A-4820-8862-228256BCD621/view-source"}], "score": 1, "updated_at": "2025-06-11T03:49:42+00:00"}, {"answer_html": "If the matrix is nonsingular and you're only looking for an approximate solution, I'd suggest using Gaussian Elimination. This is basically fixed-point arithmetic, which is how early computers did arithmetic for continuous-valued problems.
\nI don't know the error analysis for fixed-point off the top of my head. But, you can check the size of $r=y-Ax$ to judge the quality of the solution. If $r$ is too large, you can try using iterative refinement: solve $Au=r$ for $u$, then the improved solution is $x+u$. It might not always converge to $r$ equalling zero, but it'll give an approximate solution.
\n", "answer_id": 45111, "answer_text": "If the matrix is nonsingular and you're only looking for an approximate solution, I'd suggest using Gaussian Elimination. This is basically fixed-point arithmetic, which is how early computers did arithmetic for continuous-valued problems.\n\n\n\n\nI don't know the error analysis for fixed-point off the top of my head. But, you can check the size of $r=y-Ax$ to judge the quality of the solution. If $r$ is too large, you can try using iterative refinement: solve $Au=r$ for $u$, then the improved solution is $x+u$. It might not always converge to $r$ equalling zero, but it'll give an approximate solution.", "answer_url": "https://scicomp.stackexchange.com/a/45111", "author": "Neil Lindquist", "author_url": "https://scicomp.stackexchange.com/users/32895/neil-lindquist", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2025-06-11T13:23:20+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:28:47.033952+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/cb6e5f564c84a92c4e121c0637c99292018f8935652e423630f2001099a2410f_1790825327386675300_0.json", "raw_sha256": "1a957289f56621bebd21cb45dd99baaedb2c3bc11cb28d700558e4bbcaa19695", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/45545;45541;45538;45533;45532;45530;45523;45513;45510;45507;45499;45493;45488;45487;45479;45474;45472;45463;45461;45447;45444;45436;45428;45425;45424;45423;45422;45416;45414;45410;45404;45401;45396;45391;45389;45387;45380;45377;45376;45375;45369;45366;45365;45363;45362;45359;45350;45347;45344;45336;45334;45331;45326;45322;45316;45313;45311;45309;45305;45302;45300;45291;45289;45285;45276;45269;45263;45262;45261;45253;45247;45246;45238;45236;45230;45229;45208;45201;45200;45185;45183;45171;45167;45165;45158;45154;45146;45141;45139;45134;45129;45127;45122;45114;45112;45108;45105;45100;45098;45096/answers?filter=withbody&order=asc&page=1&pagesize=100&site=scicomp&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 45108, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Neil Lindquist", "profile_url": "https://scicomp.stackexchange.com/users/32895/neil-lindquist", "user_type": "registered"}, "created_at": "2025-06-11T13:23:20+00:00", "raw_file": "raw/codex_api_v1/8b02bbba3a1a1a633af4866e7fea0bd6789190b52c4b8380b0538b5c670e7131_1790825346551636200_0.json", "raw_sha256": "33050439b68e1f78cef06bf4c2ce07c0ec45a5fdf656fa1a9efd04691108f5e0", "revision_guid": "AFFA82D8-351C-4EEF-A083-7DEBDAB5B252", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/AFFA82D8-351C-4EEF-A083-7DEBDAB5B252/view-source"}], "score": 2, "updated_at": "2025-06-11T13:23:20+00:00"}], "ground_truth": "community signals only; no scientific truth label", "product": "ranking", "question": "I need to find an approximate solution (in the least-squares sense) to the system of linear equations $Ax = y$, where $A$ is a $3\\times3$ matrix, and elements of $A$, $x$ and $y$ are all 32-bit integers.\n\n\n\n\nThe constraint is that only 32-bit integer arithmetic is allowed in the process of solving the system. Ideally, we should restrict ourselves to using only addition, subtraction, and multiplication of 32-bit integers. However, for simplicity, let’s assume that 32-bit integer division is also permissible. Given this, how can we find an approximate solution?", "record_id": "Scientific-Answer-Ranking:scicomp:45108", "scores": [1, 2], "split": "holdout", "thread": {"accepted_answer_id": null, "answers": [{"answer_html": "You are looking at solving a system of Diophantine equations, for which there is no known general algorithm. For the linear case there are algorithms using linear programming. The least-squares constraint can be taken into account by seeing it is an optimization problem. Ignoring the constraints on the operations for now, you could solve it using cvxpy with pyscipopt as the solver:
\nimport cvxpy as cp\nimport numpy as np\nnp.random.seed(1)\nm = 3\nn = 3\nA = np.random.randint(0, 100, m*n).reshape(m, n)\nb = np.random.randint(0, 100, m)\nx = cp.Variable(n, integer=True)\nobjective = cp.Minimize(cp.sum_squares(A @ x - b))\nprob = cp.Problem(objective)\nresult = prob.solve()\nx.value \n\nI do not know if the packages satisfy your constraints on what operations are permissible. But given that the solution and coefficients live in $\\mathbb{Z}$, I would guess that at most they use rationals internally, which can be represented by two integers each anyway and so reduce to integer arithmetic. The algorithms they use should help with finding something which satisfies your operation constraints.
\n", "answer_id": 45109, "answer_text": "You are looking at solving a system of Diophantine equations, for which there is no known general algorithm. For the linear case there are algorithms using linear programming. The least-squares constraint can be taken into account by seeing it is an optimization problem. Ignoring the constraints on the operations for now, you could solve it using cvxpy with pyscipopt as the solver:\n\n\n\n\nimport cvxpy as cp\nimport numpy as np\nnp.random.seed(1)\nm = 3\nn = 3\nA = np.random.randint(0, 100, m*n).reshape(m, n)\nb = np.random.randint(0, 100, m)\nx = cp.Variable(n, integer=True)\nobjective = cp.Minimize(cp.sum_squares(A @ x - b))\nprob = cp.Problem(objective)\nresult = prob.solve()\nx.value \n\n\n\n\n\nI do not know if the packages satisfy your constraints on what operations are permissible. But given that the solution and coefficients live in $\\mathbb{Z}$, I would guess that at most they use rationals internally, which can be represented by two integers each anyway and so reduce to integer arithmetic. The algorithms they use should help with finding something which satisfies your operation constraints.", "answer_url": "https://scicomp.stackexchange.com/a/45109", "author": "niemc", "author_url": "https://scicomp.stackexchange.com/users/50632/niemc", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2025-06-11T03:49:42+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:28:47.033952+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/cb6e5f564c84a92c4e121c0637c99292018f8935652e423630f2001099a2410f_1790825327386675300_0.json", "raw_sha256": "1a957289f56621bebd21cb45dd99baaedb2c3bc11cb28d700558e4bbcaa19695", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/45545;45541;45538;45533;45532;45530;45523;45513;45510;45507;45499;45493;45488;45487;45479;45474;45472;45463;45461;45447;45444;45436;45428;45425;45424;45423;45422;45416;45414;45410;45404;45401;45396;45391;45389;45387;45380;45377;45376;45375;45369;45366;45365;45363;45362;45359;45350;45347;45344;45336;45334;45331;45326;45322;45316;45313;45311;45309;45305;45302;45300;45291;45289;45285;45276;45269;45263;45262;45261;45253;45247;45246;45238;45236;45230;45229;45208;45201;45200;45185;45183;45171;45167;45165;45158;45154;45146;45141;45139;45134;45129;45127;45122;45114;45112;45108;45105;45100;45098;45096/answers?filter=withbody&order=asc&page=1&pagesize=100&site=scicomp&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 45108, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "niemc", "profile_url": "https://scicomp.stackexchange.com/users/50632/niemc", "user_type": "registered"}, "created_at": "2025-06-11T03:49:42+00:00", "raw_file": "raw/codex_api_v1/8b02bbba3a1a1a633af4866e7fea0bd6789190b52c4b8380b0538b5c670e7131_1790825346551636200_0.json", "raw_sha256": "33050439b68e1f78cef06bf4c2ce07c0ec45a5fdf656fa1a9efd04691108f5e0", "revision_guid": "84D10C8F-D10A-4820-8862-228256BCD621", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/84D10C8F-D10A-4820-8862-228256BCD621/view-source"}], "score": 1, "updated_at": "2025-06-11T03:49:42+00:00"}, {"answer_html": "If the matrix is nonsingular and you're only looking for an approximate solution, I'd suggest using Gaussian Elimination. This is basically fixed-point arithmetic, which is how early computers did arithmetic for continuous-valued problems.
\nI don't know the error analysis for fixed-point off the top of my head. But, you can check the size of $r=y-Ax$ to judge the quality of the solution. If $r$ is too large, you can try using iterative refinement: solve $Au=r$ for $u$, then the improved solution is $x+u$. It might not always converge to $r$ equalling zero, but it'll give an approximate solution.
\n", "answer_id": 45111, "answer_text": "If the matrix is nonsingular and you're only looking for an approximate solution, I'd suggest using Gaussian Elimination. This is basically fixed-point arithmetic, which is how early computers did arithmetic for continuous-valued problems.\n\n\n\n\nI don't know the error analysis for fixed-point off the top of my head. But, you can check the size of $r=y-Ax$ to judge the quality of the solution. If $r$ is too large, you can try using iterative refinement: solve $Au=r$ for $u$, then the improved solution is $x+u$. It might not always converge to $r$ equalling zero, but it'll give an approximate solution.", "answer_url": "https://scicomp.stackexchange.com/a/45111", "author": "Neil Lindquist", "author_url": "https://scicomp.stackexchange.com/users/32895/neil-lindquist", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2025-06-11T13:23:20+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:28:47.033952+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/cb6e5f564c84a92c4e121c0637c99292018f8935652e423630f2001099a2410f_1790825327386675300_0.json", "raw_sha256": "1a957289f56621bebd21cb45dd99baaedb2c3bc11cb28d700558e4bbcaa19695", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/45545;45541;45538;45533;45532;45530;45523;45513;45510;45507;45499;45493;45488;45487;45479;45474;45472;45463;45461;45447;45444;45436;45428;45425;45424;45423;45422;45416;45414;45410;45404;45401;45396;45391;45389;45387;45380;45377;45376;45375;45369;45366;45365;45363;45362;45359;45350;45347;45344;45336;45334;45331;45326;45322;45316;45313;45311;45309;45305;45302;45300;45291;45289;45285;45276;45269;45263;45262;45261;45253;45247;45246;45238;45236;45230;45229;45208;45201;45200;45185;45183;45171;45167;45165;45158;45154;45146;45141;45139;45134;45129;45127;45122;45114;45112;45108;45105;45100;45098;45096/answers?filter=withbody&order=asc&page=1&pagesize=100&site=scicomp&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 45108, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Neil Lindquist", "profile_url": "https://scicomp.stackexchange.com/users/32895/neil-lindquist", "user_type": "registered"}, "created_at": "2025-06-11T13:23:20+00:00", "raw_file": "raw/codex_api_v1/8b02bbba3a1a1a633af4866e7fea0bd6789190b52c4b8380b0538b5c670e7131_1790825346551636200_0.json", "raw_sha256": "33050439b68e1f78cef06bf4c2ce07c0ec45a5fdf656fa1a9efd04691108f5e0", "revision_guid": "AFFA82D8-351C-4EEF-A083-7DEBDAB5B252", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/AFFA82D8-351C-4EEF-A083-7DEBDAB5B252/view-source"}], "score": 2, "updated_at": "2025-06-11T13:23:20+00:00"}], "domain": "computational_science", "external_links": [], "medical_sensitive": false, "patient_specific": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:28:44.584971+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/272744bcc95b58699f7df6e6979b288bb8b00a80ab9c7982dbe170a6d0b63584_1790825325025901700_0.json", "raw_sha256": "27a81850a40920682c29ada76a2b55e80340a5c82764a3e9dde8a9c2ba23db4e", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/search/advanced?answers=1&filter=withbody&order=desc&page=1&pagesize=100&site=scicomp&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_author": "chaohuang", "question_author_url": "https://scicomp.stackexchange.com/users/1614/chaohuang", "question_author_user_type": "registered", "question_created_at": "2025-06-11T02:14:41+00:00", "question_html": "I need to find an approximate solution (in the least-squares sense) to the system of linear equations $Ax = y$, where $A$ is a $3\\times3$ matrix, and elements of $A$, $x$ and $y$ are all 32-bit integers.
\nThe constraint is that only 32-bit integer arithmetic is allowed in the process of solving the system. Ideally, we should restrict ourselves to using only addition, subtraction, and multiplication of 32-bit integers. However, for simplicity, let’s assume that 32-bit integer division is also permissible. Given this, how can we find an approximate solution?
\n", "question_id": 45108, "question_license": "CC BY-SA 4.0", "question_score": 1, "question_text": "I need to find an approximate solution (in the least-squares sense) to the system of linear equations $Ax = y$, where $A$ is a $3\\times3$ matrix, and elements of $A$, $x$ and $y$ are all 32-bit integers.\n\n\n\n\nThe constraint is that only 32-bit integer arithmetic is allowed in the process of solving the system. Ideally, we should restrict ourselves to using only addition, subtraction, and multiplication of 32-bit integers. However, for simplicity, let’s assume that 32-bit integer division is also permissible. Given this, how can we find an approximate solution?", "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "chaohuang", "profile_url": "https://scicomp.stackexchange.com/users/1614/chaohuang", "user_type": "registered"}, "created_at": "2025-06-11T02:14:41+00:00", "raw_file": "raw/codex_api_v1/8b02bbba3a1a1a633af4866e7fea0bd6789190b52c4b8380b0538b5c670e7131_1790825346551636200_0.json", "raw_sha256": "33050439b68e1f78cef06bf4c2ce07c0ec45a5fdf656fa1a9efd04691108f5e0", "revision_guid": "2A2B73FA-2753-4555-9144-F7C996DD4E57", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/2A2B73FA-2753-4555-9144-F7C996DD4E57/view-source"}], "source_site": "scicomp", "source_url": "https://scicomp.stackexchange.com/questions/45108/solving-integer-equation", "split": "holdout", "split_group": "41c5cd54e4ec6c41b3a032f81fd634673733aeddcd700214fc94675e7bd774a8", "tags": ["linear-solver", "linear-programming", "least-squares", "mixed-integer-programming", "computer-arithmetic"], "thread_id": "scicomp:45108", "title": "Solving integer equation"}} {"accepted_status": [false, false], "candidate_answers": [{"answer_html": "this is just Monte Carlo integration with cosine-weighted sampling. that’s why it works and the others don’t.
\ncosine weighting enforces the correct solid-angle measure, so the flux gradient obeys Gauss’s law. uniform hemisphere or tangent-plane sampling breaks that, which is why the field comes out wrong. the 2/π factor is the usual cosine-hemisphere normalization.
\nin physics terms, you’re doing a Monte Carlo solution of Poisson’s equation via flux sampling, and the Schwarzschild behavior drops out naturally when the sampling measure matches the geometry. not a single “owner” it’s standard Monte Carlo done with the right weighting.
\n", "answer_id": 45329, "answer_text": "this is just Monte Carlo integration with cosine-weighted sampling. that’s why it works and the others don’t.\n\n\n\n\ncosine weighting enforces the correct solid-angle measure, so the flux gradient obeys Gauss’s law. uniform hemisphere or tangent-plane sampling breaks that, which is why the field comes out wrong. the 2/π factor is the usual cosine-hemisphere normalization.\n\n\n\n\nin physics terms, you’re doing a Monte Carlo solution of Poisson’s equation via flux sampling, and the Schwarzschild behavior drops out naturally when the sampling measure matches the geometry. not a single “owner” it’s standard Monte Carlo done with the right weighting.", "answer_url": "https://scicomp.stackexchange.com/a/45329", "author": "Linda Anderson", "author_url": "https://scicomp.stackexchange.com/users/56218/linda-anderson", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-01-05T09:26:54+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:28:47.033952+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/cb6e5f564c84a92c4e121c0637c99292018f8935652e423630f2001099a2410f_1790825327386675300_0.json", "raw_sha256": "1a957289f56621bebd21cb45dd99baaedb2c3bc11cb28d700558e4bbcaa19695", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/45545;45541;45538;45533;45532;45530;45523;45513;45510;45507;45499;45493;45488;45487;45479;45474;45472;45463;45461;45447;45444;45436;45428;45425;45424;45423;45422;45416;45414;45410;45404;45401;45396;45391;45389;45387;45380;45377;45376;45375;45369;45366;45365;45363;45362;45359;45350;45347;45344;45336;45334;45331;45326;45322;45316;45313;45311;45309;45305;45302;45300;45291;45289;45285;45276;45269;45263;45262;45261;45253;45247;45246;45238;45236;45230;45229;45208;45201;45200;45185;45183;45171;45167;45165;45158;45154;45146;45141;45139;45134;45129;45127;45122;45114;45112;45108;45105;45100;45098;45096/answers?filter=withbody&order=asc&page=1&pagesize=100&site=scicomp&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 45322, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Linda Anderson", "profile_url": "https://scicomp.stackexchange.com/users/56218/linda-anderson", "user_type": "registered"}, "created_at": "2026-01-05T09:26:54+00:00", "raw_file": "raw/codex_api_v1/d49b4ef7856602e9d6b1a79d56b143976504b0637af4b266f03f2b60112c6c15_1790825353984908500_0.json", "raw_sha256": "4ebc32b188652be208cbfb32007d2c8fcbe5419e5ab336ca46a3e9eb5ef04d0e", "revision_guid": "8F296337-1611-4B90-B028-6FDD3F098E8A", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/8F296337-1611-4B90-B028-6FDD3F098E8A/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Linda Anderson", "profile_url": "https://scicomp.stackexchange.com/users/56218/linda-anderson", "user_type": "registered"}, "created_at": "2026-01-05T09:27:15+00:00", "raw_file": "raw/codex_api_v1/d49b4ef7856602e9d6b1a79d56b143976504b0637af4b266f03f2b60112c6c15_1790825353984908500_0.json", "raw_sha256": "4ebc32b188652be208cbfb32007d2c8fcbe5419e5ab336ca46a3e9eb5ef04d0e", "revision_guid": "317C93D3-B055-47E3-8255-35BB56F95C1B", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/317C93D3-B055-47E3-8255-35BB56F95C1B/view-source"}], "score": 5, "updated_at": "2026-01-05T09:27:15+00:00"}, {"answer_html": "The first answer fails to mention that there is a purely quantum method (labeled C)) -- the cosine weighting is only a classical approximation (labeled B)). The following is the important part of the C++ code (which uses standard multi-threading):
\nvoid worker_thread(\n long long unsigned int start_idx,\n long long unsigned int end_idx,\n unsigned int thread_seed,\n const real_type emitter_radius,\n const real_type receiver_distance,\n const real_type receiver_distance_plus,\n const real_type receiver_radius,\n real_type& result_count,\n real_type& result_count_plus)\n{\n // Thread-local random number generator\n std::mt19937 local_gen(thread_seed);\n std::uniform_real_distribution<real_type> local_dis(0.0, 1.0);\n\n real_type local_count = 0;\n real_type local_count_plus = 0;\n\n // Update progress every N iterations to reduce atomic overhead\n const long long unsigned int progress_update_interval = 10000;\n long long unsigned int local_progress = 0;\n\n for (long long unsigned int i = start_idx; i < end_idx; i++)\n {\n vector_3 location = random_unit_vector(local_gen, local_dis);\n location.x *= emitter_radius;\n location.y *= emitter_radius;\n location.z *= emitter_radius;\n\n vector_3 surface_normal = location;\n surface_normal.normalize();\n\n\n // A) Newtonian gravitation\n //vector_3 normal =\n // surface_normal;\n\n // B) Schwarzschild gravitation\n //vector_3 normal = \n // random_cosine_weighted_hemisphere(\n // surface_normal, local_gen, local_dis);\n\n // C) Quantum gravitation\n vector_3 r = random_unit_vector(local_gen, local_dis);\n r.x *= emitter_radius;\n r.y *= emitter_radius;\n r.z *= emitter_radius;\n vector_3 normal = (location - r).normalize();\n\n\n local_count += intersect(\n location, normal,\n receiver_distance, receiver_radius);\n\n local_count_plus += intersect(\n location, normal,\n receiver_distance_plus, receiver_radius);\n\n // Update global progress periodically\n local_progress++;\n if (local_progress >= progress_update_interval)\n {\n global_progress.fetch_add(\n local_progress, std::memory_order_relaxed);\n \n local_progress = 0;\n }\n }\n\n // Add any remaining progress\n if (local_progress > 0)\n {\n global_progress.fetch_add(\n local_progress, std::memory_order_relaxed);\n }\n\n result_count = local_count;\n result_count_plus = local_count_plus;\n}\n\n", "answer_id": 45343, "answer_text": "The first answer fails to mention that there is a purely quantum method (labeled C)) -- the cosine weighting is only a classical approximation (labeled B)). The following is the important part of the C++ code (which uses standard multi-threading):\n\n\n\n\nvoid worker_thread(\n long long unsigned int start_idx,\n long long unsigned int end_idx,\n unsigned int thread_seed,\n const real_type emitter_radius,\n const real_type receiver_distance,\n const real_type receiver_distance_plus,\n const real_type receiver_radius,\n real_type& result_count,\n real_type& result_count_plus)\n{\n // Thread-local random number generator\n std::mt19937 local_gen(thread_seed);\n std::uniform_real_distributionthis is just Monte Carlo integration with cosine-weighted sampling. that’s why it works and the others don’t.
\ncosine weighting enforces the correct solid-angle measure, so the flux gradient obeys Gauss’s law. uniform hemisphere or tangent-plane sampling breaks that, which is why the field comes out wrong. the 2/π factor is the usual cosine-hemisphere normalization.
\nin physics terms, you’re doing a Monte Carlo solution of Poisson’s equation via flux sampling, and the Schwarzschild behavior drops out naturally when the sampling measure matches the geometry. not a single “owner” it’s standard Monte Carlo done with the right weighting.
\n", "answer_id": 45329, "answer_text": "this is just Monte Carlo integration with cosine-weighted sampling. that’s why it works and the others don’t.\n\n\n\n\ncosine weighting enforces the correct solid-angle measure, so the flux gradient obeys Gauss’s law. uniform hemisphere or tangent-plane sampling breaks that, which is why the field comes out wrong. the 2/π factor is the usual cosine-hemisphere normalization.\n\n\n\n\nin physics terms, you’re doing a Monte Carlo solution of Poisson’s equation via flux sampling, and the Schwarzschild behavior drops out naturally when the sampling measure matches the geometry. not a single “owner” it’s standard Monte Carlo done with the right weighting.", "answer_url": "https://scicomp.stackexchange.com/a/45329", "author": "Linda Anderson", "author_url": "https://scicomp.stackexchange.com/users/56218/linda-anderson", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-01-05T09:26:54+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:28:47.033952+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/cb6e5f564c84a92c4e121c0637c99292018f8935652e423630f2001099a2410f_1790825327386675300_0.json", "raw_sha256": "1a957289f56621bebd21cb45dd99baaedb2c3bc11cb28d700558e4bbcaa19695", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/45545;45541;45538;45533;45532;45530;45523;45513;45510;45507;45499;45493;45488;45487;45479;45474;45472;45463;45461;45447;45444;45436;45428;45425;45424;45423;45422;45416;45414;45410;45404;45401;45396;45391;45389;45387;45380;45377;45376;45375;45369;45366;45365;45363;45362;45359;45350;45347;45344;45336;45334;45331;45326;45322;45316;45313;45311;45309;45305;45302;45300;45291;45289;45285;45276;45269;45263;45262;45261;45253;45247;45246;45238;45236;45230;45229;45208;45201;45200;45185;45183;45171;45167;45165;45158;45154;45146;45141;45139;45134;45129;45127;45122;45114;45112;45108;45105;45100;45098;45096/answers?filter=withbody&order=asc&page=1&pagesize=100&site=scicomp&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 45322, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Linda Anderson", "profile_url": "https://scicomp.stackexchange.com/users/56218/linda-anderson", "user_type": "registered"}, "created_at": "2026-01-05T09:26:54+00:00", "raw_file": "raw/codex_api_v1/d49b4ef7856602e9d6b1a79d56b143976504b0637af4b266f03f2b60112c6c15_1790825353984908500_0.json", "raw_sha256": "4ebc32b188652be208cbfb32007d2c8fcbe5419e5ab336ca46a3e9eb5ef04d0e", "revision_guid": "8F296337-1611-4B90-B028-6FDD3F098E8A", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/8F296337-1611-4B90-B028-6FDD3F098E8A/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Linda Anderson", "profile_url": "https://scicomp.stackexchange.com/users/56218/linda-anderson", "user_type": "registered"}, "created_at": "2026-01-05T09:27:15+00:00", "raw_file": "raw/codex_api_v1/d49b4ef7856602e9d6b1a79d56b143976504b0637af4b266f03f2b60112c6c15_1790825353984908500_0.json", "raw_sha256": "4ebc32b188652be208cbfb32007d2c8fcbe5419e5ab336ca46a3e9eb5ef04d0e", "revision_guid": "317C93D3-B055-47E3-8255-35BB56F95C1B", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/317C93D3-B055-47E3-8255-35BB56F95C1B/view-source"}], "score": 5, "updated_at": "2026-01-05T09:27:15+00:00"}, {"answer_html": "The first answer fails to mention that there is a purely quantum method (labeled C)) -- the cosine weighting is only a classical approximation (labeled B)). The following is the important part of the C++ code (which uses standard multi-threading):
\nvoid worker_thread(\n long long unsigned int start_idx,\n long long unsigned int end_idx,\n unsigned int thread_seed,\n const real_type emitter_radius,\n const real_type receiver_distance,\n const real_type receiver_distance_plus,\n const real_type receiver_radius,\n real_type& result_count,\n real_type& result_count_plus)\n{\n // Thread-local random number generator\n std::mt19937 local_gen(thread_seed);\n std::uniform_real_distribution<real_type> local_dis(0.0, 1.0);\n\n real_type local_count = 0;\n real_type local_count_plus = 0;\n\n // Update progress every N iterations to reduce atomic overhead\n const long long unsigned int progress_update_interval = 10000;\n long long unsigned int local_progress = 0;\n\n for (long long unsigned int i = start_idx; i < end_idx; i++)\n {\n vector_3 location = random_unit_vector(local_gen, local_dis);\n location.x *= emitter_radius;\n location.y *= emitter_radius;\n location.z *= emitter_radius;\n\n vector_3 surface_normal = location;\n surface_normal.normalize();\n\n\n // A) Newtonian gravitation\n //vector_3 normal =\n // surface_normal;\n\n // B) Schwarzschild gravitation\n //vector_3 normal = \n // random_cosine_weighted_hemisphere(\n // surface_normal, local_gen, local_dis);\n\n // C) Quantum gravitation\n vector_3 r = random_unit_vector(local_gen, local_dis);\n r.x *= emitter_radius;\n r.y *= emitter_radius;\n r.z *= emitter_radius;\n vector_3 normal = (location - r).normalize();\n\n\n local_count += intersect(\n location, normal,\n receiver_distance, receiver_radius);\n\n local_count_plus += intersect(\n location, normal,\n receiver_distance_plus, receiver_radius);\n\n // Update global progress periodically\n local_progress++;\n if (local_progress >= progress_update_interval)\n {\n global_progress.fetch_add(\n local_progress, std::memory_order_relaxed);\n \n local_progress = 0;\n }\n }\n\n // Add any remaining progress\n if (local_progress > 0)\n {\n global_progress.fetch_add(\n local_progress, std::memory_order_relaxed);\n }\n\n result_count = local_count;\n result_count_plus = local_count_plus;\n}\n\n", "answer_id": 45343, "answer_text": "The first answer fails to mention that there is a purely quantum method (labeled C)) -- the cosine weighting is only a classical approximation (labeled B)). The following is the important part of the C++ code (which uses standard multi-threading):\n\n\n\n\nvoid worker_thread(\n long long unsigned int start_idx,\n long long unsigned int end_idx,\n unsigned int thread_seed,\n const real_type emitter_radius,\n const real_type receiver_distance,\n const real_type receiver_distance_plus,\n const real_type receiver_radius,\n real_type& result_count,\n real_type& result_count_plus)\n{\n // Thread-local random number generator\n std::mt19937 local_gen(thread_seed);\n std::uniform_real_distributionWhat is the name of the numerical technique used to generate the appropriate gravitational acceleration by using a set of gravitational field lines that are not necessarily normal to the surface of the emitter?
\nI have found that using cosine weighted pseudorandom field lines produces the result predicted by Schwarzschild's general relativity. It's a very simple calculation. Please help me identify its owner.
\nIn the past, I have written a short tutorial for C++ programmers on isotropic Newtonian gravitation.\nIn that old tutorial, I build an isotropic gravitational field through the use of pseudorandomly generated field lines.\nIn that old tutorial I use a sphere as the receiver.\nThe paper for that old tutorial is at Newtonian gravitation from scratch, for C++ programmers.
\nIn this question, I point out a match between the numerical gravitation and the gravitational time dilation from Schwarzschild's general relativity (see the book Gravitation, by Misner et al).\nHere, I use an axis-aligned bounding box (AABB) as the receiver.
\nIn this question I use Planck units, where $c = G = \\hbar = k = 1$.
\nWhere $r_{e}$ is the emitter's Schwarzschild radius, $r_{r}$ is the receiver AABB radius (e.g. half of the AABB side length), and $1\\mathrm{e}11$ and $0.01$ are arbitrary constants:\n\\begin{equation}\nr_{e} = \\sqrt{\\frac{1\\mathrm{e}11 \\log(2)}{\\pi}},\n\\end{equation}\n\\begin{equation}\nr_{r} = r_{e} \\times 0.01.\n\\end{equation}\nThe event horizon area is:\n\\begin{equation}\nA_{e} = 4 \\pi r_{e}^2.\n\\end{equation}\nThe binary entropy (e.g. field line count, see the papers about the holographic principle) is:\n\\begin{equation}\nn_{e} = \\frac{A_{e}}{4 \\log(2)} = 1\\mathrm{e}11.\n\\end{equation}\nWhere $R$ is the distance from the emitter's centre, the derivative is:\n\\begin{equation}\n\\alpha = \\frac{\\beta(R + \\epsilon) - \\beta(R)}{\\epsilon}.\n\\end{equation}\nHere $\\beta$ is the get intersecting line density function.\nThe gradient strength is:\n\\begin{equation}\ng = \\frac{-\\alpha}{r_{r}^2}.% \\approx \\frac{n_e}{2 R^3}.\n\\end{equation}\nFrom this I get the Newtonian acceleration $a_N$, where $r_e \\ll R$:\n\\begin{equation}\na_N =\\frac{g R \\log 2}{8 M_{e}} = \\sqrt{\\frac{n_e \\log 2}{4 \\pi R^4}} = \\frac{M_{e}}{R^2}.\n\\end{equation}\nI can also get a general relativistic acceleration $a_S$, where $r_e < R$:\n\\begin{equation}\na_S = \\frac{g R \\log 2}{8 M_{e}},\n\\end{equation}\nAt close proximity, where $r_e \\approx R$, the metric produced is related to the Schwarzschild metric -- curved space, curved time:\n\\begin{equation}\nt = \\sqrt{1 - \\frac{r_e}{R}},\n\\end{equation}\n\\begin{equation}\n\\frac{dt}{dR} = \\frac{r_e}{2 t R^2}.\n\\end{equation}\n\\begin{equation}\na_S \\approx \\frac{dt}{dR} \\frac{2}{\\pi} = \\frac{r_e}{\\pi t R^2}.\n\\end{equation}\nAt far proximity, where $r_e \\ll R$, $t \\approx 1$, and $dt/dR \\approx 0$, the metric produced is Newtonian -- curved space, practically flat time.
\nUsing numerical relativity, I tried pseudorandom hemisphere and pseudorandom tangent plane field lines, but they did not work.\nThe only technique that works is cosine weighted pseudorandom field lines.\nThat is to say, as per the code for this tutorial (https://github.com/sjhalayka/schwarzschild_falloff_field_lines), the cosine weighted pseudorandom field lines produce the correct result, off by a factor of $2 / \\pi$.
\nThis figure shows an axis-aligned bounding box and an isotropic emitter, looking from slightly above.\nAn example field line (red) and intersecting line segment (green) are given.\nThe bounding box is filled with these green intersecting line segments.\nIt is the gradient of the density of these line segments that forms the gravitational acceleration.\nNote that the field line is normal to the surface of the emitter (producing Newtonian gravitation).
\ndouble get_intersecting_line_density(\n const long long unsigned int n,\n const double emitter_radius,\n const double receiver_distance,\n const double receiver_distance_plus,\n const double receiver_radius)\n{\n double count = 0;\n double count_plus = 0;\n\n generator.seed(static_cast<unsigned>(0));\n\n for (long long unsigned int i = 0; i < n; i++)\n {\n vector_3 location = random_unit_vector();\n\n location.x *= emitter_radius;\n location.y *= emitter_radius;\n location.z *= emitter_radius;\n\n vector_3 surface_normal = location;\n surface_normal.normalize();\n\n vector_3 normal = \n random_cosine_weighted_hemisphere(\n surface_normal);\n\n std::optional<double> i_hit = intersect(\n location, normal, \n receiver_distance, receiver_radius);\n\n if (i_hit)\n count += *i_hit / (2.0 * receiver_radius);\n \n i_hit = intersect(\n location, normal,\n receiver_distance_plus, receiver_radius);\n\n if (i_hit)\n count_plus += *i_hit / (2.0 * receiver_radius);\n }\n\n return count_plus - count;\n}\n\nThank you for your time!
\n", "question_id": 45322, "question_license": "CC BY-SA 4.0", "question_score": 5, "question_text": "Question\n\n\n\n\nWhat is the name of the numerical technique used to generate the appropriate gravitational acceleration by using a set of gravitational field lines that are not necessarily normal to the surface of the emitter?\n\n\n\n\nI have found that using cosine weighted pseudorandom field lines produces the result predicted by Schwarzschild's general relativity. It's a very simple calculation. Please help me identify its owner.\n\n\n\n\nIntroduction\n\n\n\n\nIn the past, I have written a short tutorial for C++ programmers on isotropic Newtonian gravitation.\nIn that old tutorial, I build an isotropic gravitational field through the use of pseudorandomly generated field lines.\nIn that old tutorial I use a sphere as the receiver.\nThe paper for that old tutorial is at Newtonian gravitation from scratch, for C++ programmers (https://www.techrxiv.org/users/685306/articles/1250456-newtonian-gravitation-from-scratch-for-c-programmers).\n\n\n\n\nIn this question, I point out a match between the numerical gravitation and the gravitational time dilation from Schwarzschild's general relativity (see the book Gravitation, by Misner et al (https://search.worldcat.org/title/585119)).\nHere, I use an axis-aligned bounding box (AABB) as the receiver.\n\n\n\n\nIn this question I use Planck units, where $c = G = \\hbar = k = 1$.\n\n\n\n\nMethod\n\n\n\n\nWhere $r_{e}$ is the emitter's Schwarzschild radius, $r_{r}$ is the receiver AABB radius (e.g. half of the AABB side length), and $1\\mathrm{e}11$ and $0.01$ are arbitrary constants:\n\\begin{equation}\nr_{e} = \\sqrt{\\frac{1\\mathrm{e}11 \\log(2)}{\\pi}},\n\\end{equation}\n\\begin{equation}\nr_{r} = r_{e} \\times 0.01.\n\\end{equation}\nThe event horizon area is:\n\\begin{equation}\nA_{e} = 4 \\pi r_{e}^2.\n\\end{equation}\nThe binary entropy (e.g. field line count, see the papers about the holographic principle) is:\n\\begin{equation}\nn_{e} = \\frac{A_{e}}{4 \\log(2)} = 1\\mathrm{e}11.\n\\end{equation}\nWhere $R$ is the distance from the emitter's centre, the derivative is:\n\\begin{equation}\n\\alpha = \\frac{\\beta(R + \\epsilon) - \\beta(R)}{\\epsilon}.\n\\end{equation}\nHere $\\beta$ is the get intersecting line density function.\nThe gradient strength is:\n\\begin{equation}\ng = \\frac{-\\alpha}{r_{r}^2}.% \\approx \\frac{n_e}{2 R^3}.\n\\end{equation}\nFrom this I get the Newtonian acceleration $a_N$, where $r_e \\ll R$:\n\\begin{equation}\na_N =\\frac{g R \\log 2}{8 M_{e}} = \\sqrt{\\frac{n_e \\log 2}{4 \\pi R^4}} = \\frac{M_{e}}{R^2}.\n\\end{equation}\nI can also get a general relativistic acceleration $a_S$, where $r_e < R$:\n\\begin{equation}\na_S = \\frac{g R \\log 2}{8 M_{e}},\n\\end{equation}\nAt close proximity, where $r_e \\approx R$, the metric produced is related to the Schwarzschild metric -- curved space, curved time:\n\\begin{equation}\nt = \\sqrt{1 - \\frac{r_e}{R}},\n\\end{equation}\n\\begin{equation}\n\\frac{dt}{dR} = \\frac{r_e}{2 t R^2}.\n\\end{equation}\n\\begin{equation}\na_S \\approx \\frac{dt}{dR} \\frac{2}{\\pi} = \\frac{r_e}{\\pi t R^2}.\n\\end{equation}\nAt far proximity, where $r_e \\ll R$, $t \\approx 1$, and $dt/dR \\approx 0$, the metric produced is Newtonian -- curved space, practically flat time.\n\n\n\n\nUsing numerical relativity, I tried pseudorandom hemisphere and pseudorandom tangent plane field lines, but they did not work.\nThe only technique that works is cosine weighted pseudorandom field lines.\nThat is to say, as per the code for this tutorial (https://github.com/sjhalayka/schwarzschild_falloff_field_lines (https://github.com/sjhalayka/schwarzschild_falloff_field_lines)), the cosine weighted pseudorandom field lines produce the correct result, off by a factor of $2 / \\pi$.\n\n\n\n\nFigure\n\n\n\n\n[image: axis-aligned bounding box; source: https://i.sstatic.net/XWbsh2qc.png] (https://i.sstatic.net/XWbsh2qc.png)\n\n\n\n\nThis figure shows an axis-aligned bounding box and an isotropic emitter, looking from slightly above.\nAn example field line (red) and intersecting line segment (green) are given.\nThe bounding box is filled with these green intersecting line segments.\nIt is the gradient of the density of these line segments that forms the gravitational acceleration.\nNote that the field line is normal to the surface of the emitter (producing Newtonian gravitation).\n\n\n\n\nC++ code\n\n\n\n\ndouble get_intersecting_line_density(\n const long long unsigned int n,\n const double emitter_radius,\n const double receiver_distance,\n const double receiver_distance_plus,\n const double receiver_radius)\n{\n double count = 0;\n double count_plus = 0;\n\n generator.seed(static_castYour loop structure to accumulate the acceleration is wrong:
\n# Acceleration components\nax = [0] * 3\nay = [0] * 3\n\n[...]\n\nfor i in range(10**5):\n for j in range(len(x)):\n for k in range(len(x)):\n if j != k: # so that a body doesn't interact with its self\n # Gravitational acceleration exerted by body k on body j\n ax[j] = -G * (mass[j] + mass[k]) * (x[j] - x[k]) / (((x[j]-x[k])**2 + (y[j]-y[k])**2)**0.5)**3\n ay[j] = -G * (mass[j] + mass[k]) * (y[j] - y[k]) / (((x[j]-x[k])**2 + (y[j]-y[k])**2)**0.5)**3\n [...]\n\nax and ay always increase, since they are never reset to zero. In this way, you accumulate the contributions for all bodies over all time steps. Instead, you should compute the acceleration starting back from zero in each time step i.
I really don't think you should be adding your masses (if you do, you tend to eject planets from the solar system).
\nAlso, I feel the need to remind you that
\nStopping short of rewriting this as an IVP for you, the vectorised version can look like:
\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n\nn = 201 # Step count\nyears = 0.95 # Duration (years)\ndt = years/(n-1) # Time step (years/step)\n\n# Masses expressed in solar masses, derived from kg\n# https://ssd.jpl.nasa.gov/planets/phys_par.html\nmass = np.array(( # (5,)\n 1.988475e30, # Sol\n 0.330103e24, # Mercury\n 4.867310e24, # Venus\n 5.972170e24, # Earth\n 0.641691e24, # Mars\n))/1.988475e30\n\n# Distances in astronomical units (AU)\n# 1 AU = 1.495978707e11 m\n# Positions, having an initial value set to body's semi-major axis\n# https://en.wikipedia.org/wiki/Category:Planets_of_the_Solar_System\nall_p = np.empty((n, mass.size, 2))\nall_p[0] = (\n (0., 0.), # Sol\n (0.387098, 0.), # Mercury\n (0.723332, 0.), # Venus\n (1., 0.), # Earth\n (1.52368055, 0.), # Mars\n)\n\n# Velocity (AU/year), derived from km/s\n# https://en.wikipedia.org/wiki/Category:Planets_of_the_Solar_System\nv = np.array(( # (5,2)\n (0., 0. ), # Sol\n (0., 47.36 ), # Mercury\n (0., 35.02 ), # Venus\n (0., 29.7827), # Earth\n (0., 24.07 ), # Mars\n)) * (1e3/1.495978707e11 *60*60*24*365.2425)\n\n# Universal gravitational constant in AU^3/(solar mass * year^2)\nG = 4 * np.pi**2\n\n"""\nExclusive body interaction indices; effectively:\nfor j in; for k in; if j != k\n [[0, 0, 0, 1, 1, 2],\n [1, 2, 3, 2, 3, 3]]\n"""\nindices = np.stack(np.triu_indices(n=mass.size, m=mass.size, k=1)) # (2,10)\nj, k = indices # each (10,)\n\n"""\nInteraction matrix such that A (5,10) . ||r||^-3 (10) . r(10,2) = dv(5,2)\nExample for a smaller system with four bodies:\n jk jk jk jk jk jk\n 01 02 03 12 13 23\nj0 1 1 1 \nj1 -1 1 1\nj2 -1 -1 1\nj3 -1 -1 -1 signs are to effectively swap xy[j] - xy[k]\n\n[[-9.7e-10, -1.2e-09, -1.3e-10, -0.0e+00, -0.0e+00, -0.0e+00],\n [ 3.9e-04, -0.0e+00, -0.0e+00, -1.2e-09, -1.3e-10, -0.0e+00],\n [-0.0e+00, 3.9e-04, -0.0e+00, 9.7e-10, -0.0e+00, -1.3e-10],\n [-0.0e+00, -0.0e+00, 3.9e-04, -0.0e+00, 9.7e-10, 1.2e-09]]\n"""\nA = np.zeros((mass.size, j.size)) # (5,10)\ni = np.arange(j.size) # (10,)\ndt_G_mass = dt*G*mass # (5,)\nA[j, i] = (-dt_G_mass)[k]\nA[k, i] = (dt_G_mass)[j]\n\n# Symplectic Euler integration for the N-body gravitational problem\nfor i in range(n-1):\n pj, pk = all_p[i, indices] # Interaction previous positions, each (10,2)\n r = pj - pk # (10,2) # Interaction displacement, effectively xy[j] - xy[k]\n\n # Interaction norms, effectively: 1/(((x[j]-x[k])**2 + (y[j]-y[k])**2)**0.5)**3\n norms = np.linalg.norm(r, axis=1, keepdims=1)**-3 # (10,1)\n\n # Gravitational acceleration exerted by body k on body j\n v += A @ (norms * r) # Effectively: vxy[l] += axy[l] * dt\n all_p[i+1] = all_p[i] + v*dt # Effectively: xy[l] += vxy[l] * dt\n\nfig, ax = plt.subplots()\nfor name, data in zip(\n ('Sol', 'Mercury', 'Venus', 'Earth', 'Mars'),\n all_p.transpose((1, 2, 0)),\n):\n ax.plot(*data, label=name)\nax.legend()\nplt.show()\n\n\n\n", "answer_id": 45501, "answer_text": "I really don't think you should be adding your masses (if you do, you tend to eject planets from the solar system).\n\n\n\n\nAlso, I feel the need to remind you that\n\n\n\n\n\nyou need to vectorise - Python is inherently brutally slow, so it doesn't surprise me that you're worrying about printing simulation time;\n\n\n\n\nyou should be treating this as an IVP and leveraging a good library, which will (for our purposes) always do better than a naive implementation.\n\n\n\n\n\nStopping short of rewriting this as an IVP for you, the vectorised version can look like:\n\n\n\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n\nn = 201 # Step count\nyears = 0.95 # Duration (years)\ndt = years/(n-1) # Time step (years/step)\n\n# Masses expressed in solar masses, derived from kg\n# https://ssd.jpl.nasa.gov/planets/phys_par.html\nmass = np.array(( # (5,)\n 1.988475e30, # Sol\n 0.330103e24, # Mercury\n 4.867310e24, # Venus\n 5.972170e24, # Earth\n 0.641691e24, # Mars\n))/1.988475e30\n\n# Distances in astronomical units (AU)\n# 1 AU = 1.495978707e11 m\n# Positions, having an initial value set to body's semi-major axis\n# https://en.wikipedia.org/wiki/Category:Planets_of_the_Solar_System\nall_p = np.empty((n, mass.size, 2))\nall_p[0] = (\n (0., 0.), # Sol\n (0.387098, 0.), # Mercury\n (0.723332, 0.), # Venus\n (1., 0.), # Earth\n (1.52368055, 0.), # Mars\n)\n\n# Velocity (AU/year), derived from km/s\n# https://en.wikipedia.org/wiki/Category:Planets_of_the_Solar_System\nv = np.array(( # (5,2)\n (0., 0. ), # Sol\n (0., 47.36 ), # Mercury\n (0., 35.02 ), # Venus\n (0., 29.7827), # Earth\n (0., 24.07 ), # Mars\n)) * (1e3/1.495978707e11 *60*60*24*365.2425)\n\n# Universal gravitational constant in AU^3/(solar mass * year^2)\nG = 4 * np.pi**2\n\n\"\"\"\nExclusive body interaction indices; effectively:\nfor j in; for k in; if j != k\n [[0, 0, 0, 1, 1, 2],\n [1, 2, 3, 2, 3, 3]]\n\"\"\"\nindices = np.stack(np.triu_indices(n=mass.size, m=mass.size, k=1)) # (2,10)\nj, k = indices # each (10,)\n\n\"\"\"\nInteraction matrix such that A (5,10) . ||r||^-3 (10) . r(10,2) = dv(5,2)\nExample for a smaller system with four bodies:\n jk jk jk jk jk jk\n 01 02 03 12 13 23\nj0 1 1 1 \nj1 -1 1 1\nj2 -1 -1 1\nj3 -1 -1 -1 signs are to effectively swap xy[j] - xy[k]\n\n[[-9.7e-10, -1.2e-09, -1.3e-10, -0.0e+00, -0.0e+00, -0.0e+00],\n [ 3.9e-04, -0.0e+00, -0.0e+00, -1.2e-09, -1.3e-10, -0.0e+00],\n [-0.0e+00, 3.9e-04, -0.0e+00, 9.7e-10, -0.0e+00, -1.3e-10],\n [-0.0e+00, -0.0e+00, 3.9e-04, -0.0e+00, 9.7e-10, 1.2e-09]]\n\"\"\"\nA = np.zeros((mass.size, j.size)) # (5,10)\ni = np.arange(j.size) # (10,)\ndt_G_mass = dt*G*mass # (5,)\nA[j, i] = (-dt_G_mass)[k]\nA[k, i] = (dt_G_mass)[j]\n\n# Symplectic Euler integration for the N-body gravitational problem\nfor i in range(n-1):\n pj, pk = all_p[i, indices] # Interaction previous positions, each (10,2)\n r = pj - pk # (10,2) # Interaction displacement, effectively xy[j] - xy[k]\n\n # Interaction norms, effectively: 1/(((x[j]-x[k])**2 + (y[j]-y[k])**2)**0.5)**3\n norms = np.linalg.norm(r, axis=1, keepdims=1)**-3 # (10,1)\n\n # Gravitational acceleration exerted by body k on body j\n v += A @ (norms * r) # Effectively: vxy[l] += axy[l] * dt\n all_p[i+1] = all_p[i] + v*dt # Effectively: xy[l] += vxy[l] * dt\n\nfig, ax = plt.subplots()\nfor name, data in zip(\n ('Sol', 'Mercury', 'Venus', 'Earth', 'Mars'),\n all_p.transpose((1, 2, 0)),\n):\n ax.plot(*data, label=name)\nax.legend()\nplt.show()\n\n\n\n\n\n[image: orbit; source: https://i.sstatic.net/LhxHLqTd.png] (https://i.sstatic.net/LhxHLqTd.png)\n\n\n\n\n[image: detail; source: https://i.sstatic.net/4hfjqDYL.png] (https://i.sstatic.net/4hfjqDYL.png)", "answer_url": "https://scicomp.stackexchange.com/a/45501", "author": "Reinderien", "author_url": "https://scicomp.stackexchange.com/users/41212/reinderien", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-07-26T21:58:33+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:28:49.393498+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/bdd73bdc9d483cfaf7d50f2075e853261f39886330cd6d24a17f7b3b2fb731e5_1790825329894890800_0.json", "raw_sha256": "dfbb76df9ebacfee7e902db64890f154a777bd3049356aee472798c591424d79", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/45545;45541;45538;45533;45532;45530;45523;45513;45510;45507;45499;45493;45488;45487;45479;45474;45472;45463;45461;45447;45444;45436;45428;45425;45424;45423;45422;45416;45414;45410;45404;45401;45396;45391;45389;45387;45380;45377;45376;45375;45369;45366;45365;45363;45362;45359;45350;45347;45344;45336;45334;45331;45326;45322;45316;45313;45311;45309;45305;45302;45300;45291;45289;45285;45276;45269;45263;45262;45261;45253;45247;45246;45238;45236;45230;45229;45208;45201;45200;45185;45183;45171;45167;45165;45158;45154;45146;45141;45139;45134;45129;45127;45122;45114;45112;45108;45105;45100;45098;45096/answers?filter=withbody&order=asc&page=2&pagesize=100&site=scicomp&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 45499, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Reinderien", "profile_url": "https://scicomp.stackexchange.com/users/41212/reinderien", "user_type": "registered"}, "created_at": "2026-07-26T21:58:33+00:00", "raw_file": "raw/codex_api_v1/388d30597d4ce2c68c96b784f7bf92098fad8c44850c54687d3a3028cce83504_1790825358707940600_0.json", "raw_sha256": "798328140b22ca830f996dc29957e2ed66bad007670d3eb6cfce6a5d1c2b82b7", "revision_guid": "EF321E57-4E53-4FF8-8A71-168FCE2ABCEA", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/EF321E57-4E53-4FF8-8A71-168FCE2ABCEA/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Reinderien", "profile_url": "https://scicomp.stackexchange.com/users/41212/reinderien", "user_type": "registered"}, "created_at": "2026-07-26T22:17:48+00:00", "raw_file": "raw/codex_api_v1/388d30597d4ce2c68c96b784f7bf92098fad8c44850c54687d3a3028cce83504_1790825358707940600_0.json", "raw_sha256": "798328140b22ca830f996dc29957e2ed66bad007670d3eb6cfce6a5d1c2b82b7", "revision_guid": "3395FCAD-0F42-401F-82C1-7A4A3F6DD667", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/3395FCAD-0F42-401F-82C1-7A4A3F6DD667/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Reinderien", "profile_url": "https://scicomp.stackexchange.com/users/41212/reinderien", "user_type": "registered"}, "created_at": "2026-07-26T23:16:40+00:00", "raw_file": "raw/codex_api_v1/388d30597d4ce2c68c96b784f7bf92098fad8c44850c54687d3a3028cce83504_1790825358707940600_0.json", "raw_sha256": "798328140b22ca830f996dc29957e2ed66bad007670d3eb6cfce6a5d1c2b82b7", "revision_guid": "B57EC924-2004-47BD-8F48-18BF4689A68A", "revision_number": 3, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/B57EC924-2004-47BD-8F48-18BF4689A68A/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Reinderien", "profile_url": "https://scicomp.stackexchange.com/users/41212/reinderien", "user_type": "registered"}, "created_at": "2026-07-26T23:59:54+00:00", "raw_file": "raw/codex_api_v1/388d30597d4ce2c68c96b784f7bf92098fad8c44850c54687d3a3028cce83504_1790825358707940600_0.json", "raw_sha256": "798328140b22ca830f996dc29957e2ed66bad007670d3eb6cfce6a5d1c2b82b7", "revision_guid": "24BECCC5-5481-4A1E-9914-5605FB3E7FBA", "revision_number": 4, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/24BECCC5-5481-4A1E-9914-5605FB3E7FBA/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Reinderien", "profile_url": "https://scicomp.stackexchange.com/users/41212/reinderien", "user_type": "registered"}, "created_at": "2026-07-27T00:13:00+00:00", "raw_file": "raw/codex_api_v1/388d30597d4ce2c68c96b784f7bf92098fad8c44850c54687d3a3028cce83504_1790825358707940600_0.json", "raw_sha256": "798328140b22ca830f996dc29957e2ed66bad007670d3eb6cfce6a5d1c2b82b7", "revision_guid": "100FC7CD-8D17-4210-AF56-663AB1987016", "revision_number": 5, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/100FC7CD-8D17-4210-AF56-663AB1987016/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Reinderien", "profile_url": "https://scicomp.stackexchange.com/users/41212/reinderien", "user_type": "registered"}, "created_at": "2026-07-27T22:23:55+00:00", "raw_file": "raw/codex_api_v1/388d30597d4ce2c68c96b784f7bf92098fad8c44850c54687d3a3028cce83504_1790825358707940600_0.json", "raw_sha256": "798328140b22ca830f996dc29957e2ed66bad007670d3eb6cfce6a5d1c2b82b7", "revision_guid": "0A4D6874-4E2E-4411-82AD-5833BB738B39", "revision_number": 6, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/0A4D6874-4E2E-4411-82AD-5833BB738B39/view-source"}], "score": 4, "updated_at": "2026-07-27T22:23:55+00:00"}], "ground_truth": "community signals only; no scientific truth label", "product": "ranking", "question": "I implemented the following code to simulate an $N$-body gravitational system (here: the Sun, Earth, and Mars).\n\n\n\n\nThe code is:\n\n\n\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport time\nimport winsound as ws\nfrom matplotlib.animation import FuncAnimation\n\n# Universal gravitational constant in AU^3/(solar mass * year^2)\nG = 4 * (np.pi)**2\n\n# Distance from the Sun in astronomical units (AU)\n# 1 AU ≈ 149.6 million km\n\n# Initial x coordinates\nx = [\n 1, # Earth\n 1.5237, # Mars\n 0 # Sun\n]\n\n# Initial y coordinates\ny = [\n 0, # Earth\n 0, # Mars\n 0 # Sun\n]\n\n# Lists storing the x coordinates during the simulation\nxpos = [[], [], []]\n\n# Lists storing the y coordinates during the simulation\nypos = [[], [], []]\n\n# Initial velocity components (AU/year)\nvx = [0, 0, 0]\n\n# Initial tangential velocities (AU/year)\nvy = [\n 6.281991687112502, # Earth\n 5.0867271316753815, # Mars \n 0 # Sun\n]\n\n# Acceleration components\nax = [0] * 3\nay = [0] * 3\n\n# Masses expressed in solar masses\nmass = [\n 3.002513826043238e-06, # Earth\n 3.2267471091000503e-07, # Mars \n 1 # Sun\n]\n\n# Time step (years)\ndt = 0.00001\n\nstart_time = time.time()\n\n# Symplectic Euler integration for the N-body gravitational problem\nfor i in range(10**5):\n for j in range(len(x)):\n for k in range(len(x)):\n if j != k: # so that a body doesn't interact with its self\n # Gravitational acceleration exerted by body k on body j\n ax[j] = -G * (mass[j] + mass[k]) * (x[j] - x[k]) / (((x[j]-x[k])**2 + (y[j]-y[k])**2)**0.5)**3\n ay[j] = -G * (mass[j] + mass[k]) * (y[j] - y[k]) / (((x[j]-x[k])**2 + (y[j]-y[k])**2)**0.5)**3\n\n for l in range(len(x)):\n\n # Velocity update\n vx[l] += ax[l] * dt\n vy[l] += ay[l] * dt\n\n # Store trajectory\n xpos[l].append(x[l])\n ypos[l].append(y[l])\n\n # Position update\n x[l] += vx[l] * dt\n y[l] += vy[l] * dt\n\nend_time = time.time()\n\nprint(f\"Simulation time: {end_time-start_time:.2f} s\")\n\n# Audible notification when the simulation is finished\nws.Beep(400, 1000)\n\nplt.plot(xpos[0], ypos[0], label=\"Earth\", color=\"green\")\nplt.plot(xpos[1], ypos[1], label=\"mars\", color=\"violet\")\nplt.plot(xpos[2], ypos[2], label=\"sun\", color=\"red\")\n\nplt.legend()\nplt.show()\n\n\n\n\n\nThis produces the following result:\n\n\n\n\n[image: The resulte of the code above; source: https://i.sstatic.net/f5j0wZO6.png] (https://i.sstatic.net/f5j0wZO6.png)\n\n\n\n\nAt first glance, one might think the problem comes from the fact that I overwrite the acceleration instead of accumulating the contributions from all the other bodies.\n\n\n\n\nSo I changed\n\n\n\n\nax[j] = -G * (mass[j] + mass[k]) * (x[j] - x[k]) / (((x[j]-x[k])**2 + (y[j]- y[k])**2)**0.5)**3\nay[j] = -G * (mass[j] + mass[k]) * (y[j] - y[k]) / (((x[j]-x[k])**2 + (y[j]-y[k])\n\n\n\n\n\nto\n\n\n\n\nax[j] += -G * (mass[j] + mass[k]) * (x[j] - x[k]) / (((x[j]-x[k])**2 + (y[j]- y[k])**2)**0.5)**3\nay[j] += -G * (mass[j] + mass[k]) * (y[j] - y[k]) / (((x[j]-x[k])**2 + (y[j]-y[k])**2)**0.5)**3\n\n\n\n\n\nsince the total acceleration acting on body j should be the sum of the accelerations produced by every other body.\n\n\n\n\nHowever, this actually makes the simulation even worse. The result becomes:\n\n\n\n\n[image: the result of the modified code; source: https://i.sstatic.net/cWWHipMg.png] (https://i.sstatic.net/cWWHipMg.png)\n\n\n\n\nSo I feel that I am missing something more fundamental.\n\n\n\n\nAnother thing I do not understand is the behavior of the Sun in the first version. Since the acceleration is overwritten, the Sun ends up accelerating only because of the last body processed in the loop (Mars). However, the Sun is much more massive than either Earth or Mars (1 >> 3.0025e-6 and 1 >> 3.2267e-7), so I would not expect such a large acceleration. Why does this happen?\n\n\n\n\nLikewise, why does the += version diverge so quickly instead of improving the simulation?\n\n\n\n\nMy ultimate goal is to simulate the Solar System (the Sun and the eight planets) using this double loop, but if the simulation is already unstable with only three bodies, I am clearly doing something wrong.\n\n\n\n\nFinally, I intentionally initialized the Sun with zero position, zero velocity, and zero acceleration because I wanted it to remain fixed at the origin, assuming that the Solar System barycenter is approximately at the center of the Sun.", "record_id": "Scientific-Answer-Ranking:scicomp:45499", "scores": [3, 4], "split": "holdout", "thread": {"accepted_answer_id": 45500, "answers": [{"answer_html": "Your loop structure to accumulate the acceleration is wrong:
\n# Acceleration components\nax = [0] * 3\nay = [0] * 3\n\n[...]\n\nfor i in range(10**5):\n for j in range(len(x)):\n for k in range(len(x)):\n if j != k: # so that a body doesn't interact with its self\n # Gravitational acceleration exerted by body k on body j\n ax[j] = -G * (mass[j] + mass[k]) * (x[j] - x[k]) / (((x[j]-x[k])**2 + (y[j]-y[k])**2)**0.5)**3\n ay[j] = -G * (mass[j] + mass[k]) * (y[j] - y[k]) / (((x[j]-x[k])**2 + (y[j]-y[k])**2)**0.5)**3\n [...]\n\nax and ay always increase, since they are never reset to zero. In this way, you accumulate the contributions for all bodies over all time steps. Instead, you should compute the acceleration starting back from zero in each time step i.
I really don't think you should be adding your masses (if you do, you tend to eject planets from the solar system).
\nAlso, I feel the need to remind you that
\nStopping short of rewriting this as an IVP for you, the vectorised version can look like:
\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n\nn = 201 # Step count\nyears = 0.95 # Duration (years)\ndt = years/(n-1) # Time step (years/step)\n\n# Masses expressed in solar masses, derived from kg\n# https://ssd.jpl.nasa.gov/planets/phys_par.html\nmass = np.array(( # (5,)\n 1.988475e30, # Sol\n 0.330103e24, # Mercury\n 4.867310e24, # Venus\n 5.972170e24, # Earth\n 0.641691e24, # Mars\n))/1.988475e30\n\n# Distances in astronomical units (AU)\n# 1 AU = 1.495978707e11 m\n# Positions, having an initial value set to body's semi-major axis\n# https://en.wikipedia.org/wiki/Category:Planets_of_the_Solar_System\nall_p = np.empty((n, mass.size, 2))\nall_p[0] = (\n (0., 0.), # Sol\n (0.387098, 0.), # Mercury\n (0.723332, 0.), # Venus\n (1., 0.), # Earth\n (1.52368055, 0.), # Mars\n)\n\n# Velocity (AU/year), derived from km/s\n# https://en.wikipedia.org/wiki/Category:Planets_of_the_Solar_System\nv = np.array(( # (5,2)\n (0., 0. ), # Sol\n (0., 47.36 ), # Mercury\n (0., 35.02 ), # Venus\n (0., 29.7827), # Earth\n (0., 24.07 ), # Mars\n)) * (1e3/1.495978707e11 *60*60*24*365.2425)\n\n# Universal gravitational constant in AU^3/(solar mass * year^2)\nG = 4 * np.pi**2\n\n"""\nExclusive body interaction indices; effectively:\nfor j in; for k in; if j != k\n [[0, 0, 0, 1, 1, 2],\n [1, 2, 3, 2, 3, 3]]\n"""\nindices = np.stack(np.triu_indices(n=mass.size, m=mass.size, k=1)) # (2,10)\nj, k = indices # each (10,)\n\n"""\nInteraction matrix such that A (5,10) . ||r||^-3 (10) . r(10,2) = dv(5,2)\nExample for a smaller system with four bodies:\n jk jk jk jk jk jk\n 01 02 03 12 13 23\nj0 1 1 1 \nj1 -1 1 1\nj2 -1 -1 1\nj3 -1 -1 -1 signs are to effectively swap xy[j] - xy[k]\n\n[[-9.7e-10, -1.2e-09, -1.3e-10, -0.0e+00, -0.0e+00, -0.0e+00],\n [ 3.9e-04, -0.0e+00, -0.0e+00, -1.2e-09, -1.3e-10, -0.0e+00],\n [-0.0e+00, 3.9e-04, -0.0e+00, 9.7e-10, -0.0e+00, -1.3e-10],\n [-0.0e+00, -0.0e+00, 3.9e-04, -0.0e+00, 9.7e-10, 1.2e-09]]\n"""\nA = np.zeros((mass.size, j.size)) # (5,10)\ni = np.arange(j.size) # (10,)\ndt_G_mass = dt*G*mass # (5,)\nA[j, i] = (-dt_G_mass)[k]\nA[k, i] = (dt_G_mass)[j]\n\n# Symplectic Euler integration for the N-body gravitational problem\nfor i in range(n-1):\n pj, pk = all_p[i, indices] # Interaction previous positions, each (10,2)\n r = pj - pk # (10,2) # Interaction displacement, effectively xy[j] - xy[k]\n\n # Interaction norms, effectively: 1/(((x[j]-x[k])**2 + (y[j]-y[k])**2)**0.5)**3\n norms = np.linalg.norm(r, axis=1, keepdims=1)**-3 # (10,1)\n\n # Gravitational acceleration exerted by body k on body j\n v += A @ (norms * r) # Effectively: vxy[l] += axy[l] * dt\n all_p[i+1] = all_p[i] + v*dt # Effectively: xy[l] += vxy[l] * dt\n\nfig, ax = plt.subplots()\nfor name, data in zip(\n ('Sol', 'Mercury', 'Venus', 'Earth', 'Mars'),\n all_p.transpose((1, 2, 0)),\n):\n ax.plot(*data, label=name)\nax.legend()\nplt.show()\n\n\n\n", "answer_id": 45501, "answer_text": "I really don't think you should be adding your masses (if you do, you tend to eject planets from the solar system).\n\n\n\n\nAlso, I feel the need to remind you that\n\n\n\n\n\nyou need to vectorise - Python is inherently brutally slow, so it doesn't surprise me that you're worrying about printing simulation time;\n\n\n\n\nyou should be treating this as an IVP and leveraging a good library, which will (for our purposes) always do better than a naive implementation.\n\n\n\n\n\nStopping short of rewriting this as an IVP for you, the vectorised version can look like:\n\n\n\n\nimport numpy as np\nimport matplotlib.pyplot as plt\n\n\nn = 201 # Step count\nyears = 0.95 # Duration (years)\ndt = years/(n-1) # Time step (years/step)\n\n# Masses expressed in solar masses, derived from kg\n# https://ssd.jpl.nasa.gov/planets/phys_par.html\nmass = np.array(( # (5,)\n 1.988475e30, # Sol\n 0.330103e24, # Mercury\n 4.867310e24, # Venus\n 5.972170e24, # Earth\n 0.641691e24, # Mars\n))/1.988475e30\n\n# Distances in astronomical units (AU)\n# 1 AU = 1.495978707e11 m\n# Positions, having an initial value set to body's semi-major axis\n# https://en.wikipedia.org/wiki/Category:Planets_of_the_Solar_System\nall_p = np.empty((n, mass.size, 2))\nall_p[0] = (\n (0., 0.), # Sol\n (0.387098, 0.), # Mercury\n (0.723332, 0.), # Venus\n (1., 0.), # Earth\n (1.52368055, 0.), # Mars\n)\n\n# Velocity (AU/year), derived from km/s\n# https://en.wikipedia.org/wiki/Category:Planets_of_the_Solar_System\nv = np.array(( # (5,2)\n (0., 0. ), # Sol\n (0., 47.36 ), # Mercury\n (0., 35.02 ), # Venus\n (0., 29.7827), # Earth\n (0., 24.07 ), # Mars\n)) * (1e3/1.495978707e11 *60*60*24*365.2425)\n\n# Universal gravitational constant in AU^3/(solar mass * year^2)\nG = 4 * np.pi**2\n\n\"\"\"\nExclusive body interaction indices; effectively:\nfor j in; for k in; if j != k\n [[0, 0, 0, 1, 1, 2],\n [1, 2, 3, 2, 3, 3]]\n\"\"\"\nindices = np.stack(np.triu_indices(n=mass.size, m=mass.size, k=1)) # (2,10)\nj, k = indices # each (10,)\n\n\"\"\"\nInteraction matrix such that A (5,10) . ||r||^-3 (10) . r(10,2) = dv(5,2)\nExample for a smaller system with four bodies:\n jk jk jk jk jk jk\n 01 02 03 12 13 23\nj0 1 1 1 \nj1 -1 1 1\nj2 -1 -1 1\nj3 -1 -1 -1 signs are to effectively swap xy[j] - xy[k]\n\n[[-9.7e-10, -1.2e-09, -1.3e-10, -0.0e+00, -0.0e+00, -0.0e+00],\n [ 3.9e-04, -0.0e+00, -0.0e+00, -1.2e-09, -1.3e-10, -0.0e+00],\n [-0.0e+00, 3.9e-04, -0.0e+00, 9.7e-10, -0.0e+00, -1.3e-10],\n [-0.0e+00, -0.0e+00, 3.9e-04, -0.0e+00, 9.7e-10, 1.2e-09]]\n\"\"\"\nA = np.zeros((mass.size, j.size)) # (5,10)\ni = np.arange(j.size) # (10,)\ndt_G_mass = dt*G*mass # (5,)\nA[j, i] = (-dt_G_mass)[k]\nA[k, i] = (dt_G_mass)[j]\n\n# Symplectic Euler integration for the N-body gravitational problem\nfor i in range(n-1):\n pj, pk = all_p[i, indices] # Interaction previous positions, each (10,2)\n r = pj - pk # (10,2) # Interaction displacement, effectively xy[j] - xy[k]\n\n # Interaction norms, effectively: 1/(((x[j]-x[k])**2 + (y[j]-y[k])**2)**0.5)**3\n norms = np.linalg.norm(r, axis=1, keepdims=1)**-3 # (10,1)\n\n # Gravitational acceleration exerted by body k on body j\n v += A @ (norms * r) # Effectively: vxy[l] += axy[l] * dt\n all_p[i+1] = all_p[i] + v*dt # Effectively: xy[l] += vxy[l] * dt\n\nfig, ax = plt.subplots()\nfor name, data in zip(\n ('Sol', 'Mercury', 'Venus', 'Earth', 'Mars'),\n all_p.transpose((1, 2, 0)),\n):\n ax.plot(*data, label=name)\nax.legend()\nplt.show()\n\n\n\n\n\n[image: orbit; source: https://i.sstatic.net/LhxHLqTd.png] (https://i.sstatic.net/LhxHLqTd.png)\n\n\n\n\n[image: detail; source: https://i.sstatic.net/4hfjqDYL.png] (https://i.sstatic.net/4hfjqDYL.png)", "answer_url": "https://scicomp.stackexchange.com/a/45501", "author": "Reinderien", "author_url": "https://scicomp.stackexchange.com/users/41212/reinderien", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2026-07-26T21:58:33+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:28:49.393498+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/bdd73bdc9d483cfaf7d50f2075e853261f39886330cd6d24a17f7b3b2fb731e5_1790825329894890800_0.json", "raw_sha256": "dfbb76df9ebacfee7e902db64890f154a777bd3049356aee472798c591424d79", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/45545;45541;45538;45533;45532;45530;45523;45513;45510;45507;45499;45493;45488;45487;45479;45474;45472;45463;45461;45447;45444;45436;45428;45425;45424;45423;45422;45416;45414;45410;45404;45401;45396;45391;45389;45387;45380;45377;45376;45375;45369;45366;45365;45363;45362;45359;45350;45347;45344;45336;45334;45331;45326;45322;45316;45313;45311;45309;45305;45302;45300;45291;45289;45285;45276;45269;45263;45262;45261;45253;45247;45246;45238;45236;45230;45229;45208;45201;45200;45185;45183;45171;45167;45165;45158;45154;45146;45141;45139;45134;45129;45127;45122;45114;45112;45108;45105;45100;45098;45096/answers?filter=withbody&order=asc&page=2&pagesize=100&site=scicomp&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 45499, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Reinderien", "profile_url": "https://scicomp.stackexchange.com/users/41212/reinderien", "user_type": "registered"}, "created_at": "2026-07-26T21:58:33+00:00", "raw_file": "raw/codex_api_v1/388d30597d4ce2c68c96b784f7bf92098fad8c44850c54687d3a3028cce83504_1790825358707940600_0.json", "raw_sha256": "798328140b22ca830f996dc29957e2ed66bad007670d3eb6cfce6a5d1c2b82b7", "revision_guid": "EF321E57-4E53-4FF8-8A71-168FCE2ABCEA", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/EF321E57-4E53-4FF8-8A71-168FCE2ABCEA/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Reinderien", "profile_url": "https://scicomp.stackexchange.com/users/41212/reinderien", "user_type": "registered"}, "created_at": "2026-07-26T22:17:48+00:00", "raw_file": "raw/codex_api_v1/388d30597d4ce2c68c96b784f7bf92098fad8c44850c54687d3a3028cce83504_1790825358707940600_0.json", "raw_sha256": "798328140b22ca830f996dc29957e2ed66bad007670d3eb6cfce6a5d1c2b82b7", "revision_guid": "3395FCAD-0F42-401F-82C1-7A4A3F6DD667", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/3395FCAD-0F42-401F-82C1-7A4A3F6DD667/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Reinderien", "profile_url": "https://scicomp.stackexchange.com/users/41212/reinderien", "user_type": "registered"}, "created_at": "2026-07-26T23:16:40+00:00", "raw_file": "raw/codex_api_v1/388d30597d4ce2c68c96b784f7bf92098fad8c44850c54687d3a3028cce83504_1790825358707940600_0.json", "raw_sha256": "798328140b22ca830f996dc29957e2ed66bad007670d3eb6cfce6a5d1c2b82b7", "revision_guid": "B57EC924-2004-47BD-8F48-18BF4689A68A", "revision_number": 3, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/B57EC924-2004-47BD-8F48-18BF4689A68A/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Reinderien", "profile_url": "https://scicomp.stackexchange.com/users/41212/reinderien", "user_type": "registered"}, "created_at": "2026-07-26T23:59:54+00:00", "raw_file": "raw/codex_api_v1/388d30597d4ce2c68c96b784f7bf92098fad8c44850c54687d3a3028cce83504_1790825358707940600_0.json", "raw_sha256": "798328140b22ca830f996dc29957e2ed66bad007670d3eb6cfce6a5d1c2b82b7", "revision_guid": "24BECCC5-5481-4A1E-9914-5605FB3E7FBA", "revision_number": 4, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/24BECCC5-5481-4A1E-9914-5605FB3E7FBA/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Reinderien", "profile_url": "https://scicomp.stackexchange.com/users/41212/reinderien", "user_type": "registered"}, "created_at": "2026-07-27T00:13:00+00:00", "raw_file": "raw/codex_api_v1/388d30597d4ce2c68c96b784f7bf92098fad8c44850c54687d3a3028cce83504_1790825358707940600_0.json", "raw_sha256": "798328140b22ca830f996dc29957e2ed66bad007670d3eb6cfce6a5d1c2b82b7", "revision_guid": "100FC7CD-8D17-4210-AF56-663AB1987016", "revision_number": 5, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/100FC7CD-8D17-4210-AF56-663AB1987016/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Reinderien", "profile_url": "https://scicomp.stackexchange.com/users/41212/reinderien", "user_type": "registered"}, "created_at": "2026-07-27T22:23:55+00:00", "raw_file": "raw/codex_api_v1/388d30597d4ce2c68c96b784f7bf92098fad8c44850c54687d3a3028cce83504_1790825358707940600_0.json", "raw_sha256": "798328140b22ca830f996dc29957e2ed66bad007670d3eb6cfce6a5d1c2b82b7", "revision_guid": "0A4D6874-4E2E-4411-82AD-5833BB738B39", "revision_number": 6, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/0A4D6874-4E2E-4411-82AD-5833BB738B39/view-source"}], "score": 4, "updated_at": "2026-07-27T22:23:55+00:00"}], "domain": "computational_science", "external_links": ["https://en.wikipedia.org/wiki/Category:Planets_of_the_Solar_System", "https://i.sstatic.net/4hfjqDYL.png", "https://i.sstatic.net/LhxHLqTd.png", "https://i.sstatic.net/cWWHipMg.png", "https://i.sstatic.net/f5j0wZO6.png", "https://ssd.jpl.nasa.gov/planets/phys_par.html"], "medical_sensitive": false, "patient_specific": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:28:44.584971+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/272744bcc95b58699f7df6e6979b288bb8b00a80ab9c7982dbe170a6d0b63584_1790825325025901700_0.json", "raw_sha256": "27a81850a40920682c29ada76a2b55e80340a5c82764a3e9dde8a9c2ba23db4e", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/search/advanced?answers=1&filter=withbody&order=desc&page=1&pagesize=100&site=scicomp&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_author": "Omar Osman Mahamoud", "question_author_url": "https://scicomp.stackexchange.com/users/57039/omar-osman-mahamoud", "question_author_user_type": "registered", "question_created_at": "2026-07-26T12:32:03+00:00", "question_html": "I implemented the following code to simulate an $N$-body gravitational system (here: the Sun, Earth, and Mars).
\nThe code is:
\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport time\nimport winsound as ws\nfrom matplotlib.animation import FuncAnimation\n\n# Universal gravitational constant in AU^3/(solar mass * year^2)\nG = 4 * (np.pi)**2\n\n# Distance from the Sun in astronomical units (AU)\n# 1 AU ≈ 149.6 million km\n\n# Initial x coordinates\nx = [\n 1, # Earth\n 1.5237, # Mars\n 0 # Sun\n]\n\n# Initial y coordinates\ny = [\n 0, # Earth\n 0, # Mars\n 0 # Sun\n]\n\n# Lists storing the x coordinates during the simulation\nxpos = [[], [], []]\n\n# Lists storing the y coordinates during the simulation\nypos = [[], [], []]\n\n# Initial velocity components (AU/year)\nvx = [0, 0, 0]\n\n# Initial tangential velocities (AU/year)\nvy = [\n 6.281991687112502, # Earth\n 5.0867271316753815, # Mars \n 0 # Sun\n]\n\n# Acceleration components\nax = [0] * 3\nay = [0] * 3\n\n# Masses expressed in solar masses\nmass = [\n 3.002513826043238e-06, # Earth\n 3.2267471091000503e-07, # Mars \n 1 # Sun\n]\n\n# Time step (years)\ndt = 0.00001\n\nstart_time = time.time()\n\n# Symplectic Euler integration for the N-body gravitational problem\nfor i in range(10**5):\n for j in range(len(x)):\n for k in range(len(x)):\n if j != k: # so that a body doesn't interact with its self\n # Gravitational acceleration exerted by body k on body j\n ax[j] = -G * (mass[j] + mass[k]) * (x[j] - x[k]) / (((x[j]-x[k])**2 + (y[j]-y[k])**2)**0.5)**3\n ay[j] = -G * (mass[j] + mass[k]) * (y[j] - y[k]) / (((x[j]-x[k])**2 + (y[j]-y[k])**2)**0.5)**3\n\n for l in range(len(x)):\n\n # Velocity update\n vx[l] += ax[l] * dt\n vy[l] += ay[l] * dt\n\n # Store trajectory\n xpos[l].append(x[l])\n ypos[l].append(y[l])\n\n # Position update\n x[l] += vx[l] * dt\n y[l] += vy[l] * dt\n\nend_time = time.time()\n\nprint(f"Simulation time: {end_time-start_time:.2f} s")\n\n# Audible notification when the simulation is finished\nws.Beep(400, 1000)\n\nplt.plot(xpos[0], ypos[0], label="Earth", color="green")\nplt.plot(xpos[1], ypos[1], label="mars", color="violet")\nplt.plot(xpos[2], ypos[2], label="sun", color="red")\n\nplt.legend()\nplt.show()\n\nThis produces the following result:
\n\nAt first glance, one might think the problem comes from the fact that I overwrite the acceleration instead of accumulating the contributions from all the other bodies.
\nSo I changed
\nax[j] = -G * (mass[j] + mass[k]) * (x[j] - x[k]) / (((x[j]-x[k])**2 + (y[j]- y[k])**2)**0.5)**3\nay[j] = -G * (mass[j] + mass[k]) * (y[j] - y[k]) / (((x[j]-x[k])**2 + (y[j]-y[k])\n\nto
\nax[j] += -G * (mass[j] + mass[k]) * (x[j] - x[k]) / (((x[j]-x[k])**2 + (y[j]- y[k])**2)**0.5)**3\nay[j] += -G * (mass[j] + mass[k]) * (y[j] - y[k]) / (((x[j]-x[k])**2 + (y[j]-y[k])**2)**0.5)**3\n\nsince the total acceleration acting on body j should be the sum of the accelerations produced by every other body.
\nHowever, this actually makes the simulation even worse. The result becomes:
\n\nSo I feel that I am missing something more fundamental.
\nAnother thing I do not understand is the behavior of the Sun in the first version. Since the acceleration is overwritten, the Sun ends up accelerating only because of the last body processed in the loop (Mars). However, the Sun is much more massive than either Earth or Mars (1 >> 3.0025e-6 and 1 >> 3.2267e-7), so I would not expect such a large acceleration. Why does this happen?
\nLikewise, why does the += version diverge so quickly instead of improving the simulation?
\nMy ultimate goal is to simulate the Solar System (the Sun and the eight planets) using this double loop, but if the simulation is already unstable with only three bodies, I am clearly doing something wrong.
\nFinally, I intentionally initialized the Sun with zero position, zero velocity, and zero acceleration because I wanted it to remain fixed at the origin, assuming that the Solar System barycenter is approximately at the center of the Sun.
\n", "question_id": 45499, "question_license": "CC BY-SA 4.0", "question_score": 2, "question_text": "I implemented the following code to simulate an $N$-body gravitational system (here: the Sun, Earth, and Mars).\n\n\n\n\nThe code is:\n\n\n\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport time\nimport winsound as ws\nfrom matplotlib.animation import FuncAnimation\n\n# Universal gravitational constant in AU^3/(solar mass * year^2)\nG = 4 * (np.pi)**2\n\n# Distance from the Sun in astronomical units (AU)\n# 1 AU ≈ 149.6 million km\n\n# Initial x coordinates\nx = [\n 1, # Earth\n 1.5237, # Mars\n 0 # Sun\n]\n\n# Initial y coordinates\ny = [\n 0, # Earth\n 0, # Mars\n 0 # Sun\n]\n\n# Lists storing the x coordinates during the simulation\nxpos = [[], [], []]\n\n# Lists storing the y coordinates during the simulation\nypos = [[], [], []]\n\n# Initial velocity components (AU/year)\nvx = [0, 0, 0]\n\n# Initial tangential velocities (AU/year)\nvy = [\n 6.281991687112502, # Earth\n 5.0867271316753815, # Mars \n 0 # Sun\n]\n\n# Acceleration components\nax = [0] * 3\nay = [0] * 3\n\n# Masses expressed in solar masses\nmass = [\n 3.002513826043238e-06, # Earth\n 3.2267471091000503e-07, # Mars \n 1 # Sun\n]\n\n# Time step (years)\ndt = 0.00001\n\nstart_time = time.time()\n\n# Symplectic Euler integration for the N-body gravitational problem\nfor i in range(10**5):\n for j in range(len(x)):\n for k in range(len(x)):\n if j != k: # so that a body doesn't interact with its self\n # Gravitational acceleration exerted by body k on body j\n ax[j] = -G * (mass[j] + mass[k]) * (x[j] - x[k]) / (((x[j]-x[k])**2 + (y[j]-y[k])**2)**0.5)**3\n ay[j] = -G * (mass[j] + mass[k]) * (y[j] - y[k]) / (((x[j]-x[k])**2 + (y[j]-y[k])**2)**0.5)**3\n\n for l in range(len(x)):\n\n # Velocity update\n vx[l] += ax[l] * dt\n vy[l] += ay[l] * dt\n\n # Store trajectory\n xpos[l].append(x[l])\n ypos[l].append(y[l])\n\n # Position update\n x[l] += vx[l] * dt\n y[l] += vy[l] * dt\n\nend_time = time.time()\n\nprint(f\"Simulation time: {end_time-start_time:.2f} s\")\n\n# Audible notification when the simulation is finished\nws.Beep(400, 1000)\n\nplt.plot(xpos[0], ypos[0], label=\"Earth\", color=\"green\")\nplt.plot(xpos[1], ypos[1], label=\"mars\", color=\"violet\")\nplt.plot(xpos[2], ypos[2], label=\"sun\", color=\"red\")\n\nplt.legend()\nplt.show()\n\n\n\n\n\nThis produces the following result:\n\n\n\n\n[image: The resulte of the code above; source: https://i.sstatic.net/f5j0wZO6.png] (https://i.sstatic.net/f5j0wZO6.png)\n\n\n\n\nAt first glance, one might think the problem comes from the fact that I overwrite the acceleration instead of accumulating the contributions from all the other bodies.\n\n\n\n\nSo I changed\n\n\n\n\nax[j] = -G * (mass[j] + mass[k]) * (x[j] - x[k]) / (((x[j]-x[k])**2 + (y[j]- y[k])**2)**0.5)**3\nay[j] = -G * (mass[j] + mass[k]) * (y[j] - y[k]) / (((x[j]-x[k])**2 + (y[j]-y[k])\n\n\n\n\n\nto\n\n\n\n\nax[j] += -G * (mass[j] + mass[k]) * (x[j] - x[k]) / (((x[j]-x[k])**2 + (y[j]- y[k])**2)**0.5)**3\nay[j] += -G * (mass[j] + mass[k]) * (y[j] - y[k]) / (((x[j]-x[k])**2 + (y[j]-y[k])**2)**0.5)**3\n\n\n\n\n\nsince the total acceleration acting on body j should be the sum of the accelerations produced by every other body.\n\n\n\n\nHowever, this actually makes the simulation even worse. The result becomes:\n\n\n\n\n[image: the result of the modified code; source: https://i.sstatic.net/cWWHipMg.png] (https://i.sstatic.net/cWWHipMg.png)\n\n\n\n\nSo I feel that I am missing something more fundamental.\n\n\n\n\nAnother thing I do not understand is the behavior of the Sun in the first version. Since the acceleration is overwritten, the Sun ends up accelerating only because of the last body processed in the loop (Mars). However, the Sun is much more massive than either Earth or Mars (1 >> 3.0025e-6 and 1 >> 3.2267e-7), so I would not expect such a large acceleration. Why does this happen?\n\n\n\n\nLikewise, why does the += version diverge so quickly instead of improving the simulation?\n\n\n\n\nMy ultimate goal is to simulate the Solar System (the Sun and the eight planets) using this double loop, but if the simulation is already unstable with only three bodies, I am clearly doing something wrong.\n\n\n\n\nFinally, I intentionally initialized the Sun with zero position, zero velocity, and zero acceleration because I wanted it to remain fixed at the origin, assuming that the Solar System barycenter is approximately at the center of the Sun.", "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Omar Osman Mahamoud", "profile_url": "https://scicomp.stackexchange.com/users/57039/omar-osman-mahamoud", "user_type": "registered"}, "created_at": "2026-07-26T12:32:03+00:00", "raw_file": "raw/codex_api_v1/388d30597d4ce2c68c96b784f7bf92098fad8c44850c54687d3a3028cce83504_1790825358707940600_0.json", "raw_sha256": "798328140b22ca830f996dc29957e2ed66bad007670d3eb6cfce6a5d1c2b82b7", "revision_guid": "61294F33-1CB8-459E-AB4B-4941AD8D2670", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://scicomp.stackexchange.com/revisions/61294F33-1CB8-459E-AB4B-4941AD8D2670/view-source"}, {"content_license": null, "contributor": {"display_name": "[deleted/unavailable user]", "profile_url": null, "user_type": "does_not_exist"}, "created_at": "2026-07-27T11:52:44+00:00", "raw_file": "raw/codex_api_v1/388d30597d4ce2c68c96b784f7bf92098fad8c44850c54687d3a3028cce83504_1790825358707940600_0.json", "raw_sha256": "798328140b22ca830f996dc29957e2ed66bad007670d3eb6cfce6a5d1c2b82b7", "revision_guid": "3F7393D0-FAE5-408C-BCD8-32B84FC1BD39", "revision_number": null, "revision_type": "vote_based", "revision_url": "https://scicomp.stackexchange.com/revisions/3F7393D0-FAE5-408C-BCD8-32B84FC1BD39/view-source"}], "source_site": "scicomp", "source_url": "https://scicomp.stackexchange.com/questions/45499/n-body-gravitation", "split": "holdout", "split_group": "45d6b72512daab67fd2b92518c117829c50d23b2add0374b0be035746ba7ae04", "tags": ["python", "computational-physics", "simulation", "numerical-integration", "physics"], "thread_id": "scicomp:45499", "title": "N-body gravitation"}} {"accepted_status": [false, false], "candidate_answers": [{"answer_html": "Check your assumptions.
\nIt looks like you're using a formula that assumes linear, additive variance. Your data suggest a system that does not follow these assumptions, so the equations are not valid for the situation you describe.
\nSee also https://en.m.wikipedia.org/wiki/All_models_are_wrong - much of the difficulty in applying simple mathematical formulae to real world data is in deciding/recognizing when your model is sufficiently wrong that it's no longer useful.
\n", "answer_id": 114208, "answer_text": "Check your assumptions.\n\n\n\n\nIt looks like you're using a formula that assumes linear, additive variance. Your data suggest a system that does not follow these assumptions, so the equations are not valid for the situation you describe.\n\n\n\n\nSee also https://en.m.wikipedia.org/wiki/All_models_are_wrong (https://en.m.wikipedia.org/wiki/All_models_are_wrong) - much of the difficulty in applying simple mathematical formulae to real world data is in deciding/recognizing when your model is sufficiently wrong that it's no longer useful.", "answer_url": "https://biology.stackexchange.com/a/114208", "author": "Bryan Krause", "author_url": "https://biology.stackexchange.com/users/27148/bryan-krause", "author_user_type": "moderator", "content_license": "CC BY-SA 4.0", "created_at": "2024-02-29T04:29:34+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:30.839943+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/2139ae0ecb1bf62b149af3f8e91d7ce461ad269d38020aaf05922333eabb51a1_0.json", "raw_sha256": "2610bc07f1691b2794681a23d0459bba24822de1f31c7b48d79495b29b0b1285", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/114428;114427;114412;114410;114399;114395;114391;114386;114385;114381;114378;114377;114376;114374;114372;114371;114370;114361;114354;114353;114348;114342;114331;114329;114324;114321;114319;114307;114305;114304;114299;114298;114295;114290;114281;114277;114273;114266;114256;114239;114238;114222;114216;114213;114211;114207;114197;114192;114185;114180;114178;114175;114174;114173;114172;114169;114161;114156;114155;114148;114145;114144;114139;114136;114135;114127;114119;114117;114114;114111;114110;114103;114098;114096;114094;114089;114085;114078;114076;114069;114067;114065;114058;114055;114048;114045;114038;114031;114028;114027;114025;114021;114020;114012;114006;113998;113997;113988;113986;113983/answers?filter=withbody&order=asc&page=1&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 114207, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Bryan Krause", "profile_url": "https://biology.stackexchange.com/users/27148/bryan-krause", "user_type": "moderator"}, "created_at": "2024-02-29T04:29:34+00:00", "raw_file": "raw/codex_api_v1/20c6382e006dfc70ceae89b5b384391a51cd420854d2e23edb6c44d00de6688e_1790824066738015300_0.json", "raw_sha256": "4baa513e3d4757eb58cf2dd23c824e0e27e58aa0c4e8ec570c22801fd30dcaa7", "revision_guid": "F56112DE-B89E-4603-A0F8-388A12ED9A46", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/F56112DE-B89E-4603-A0F8-388A12ED9A46/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "user438383", "profile_url": "https://biology.stackexchange.com/users/27357/user438383", "user_type": "registered"}, "created_at": "2024-04-01T09:41:44+00:00", "raw_file": "raw/codex_api_v1/c09c25974111e465f43435e13249e671865a3c492931b0256ef7f890bfa5e2e0_1790824064569681800_0.json", "raw_sha256": "0b302246b77e7a9d8782e0c9b89ad24379ff8e65cc316aa696d777ef4a6f718d", "revision_guid": "87407451-524F-4F50-91E7-9C2FDC0C1E39", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/87407451-524F-4F50-91E7-9C2FDC0C1E39/view-source"}], "score": 1, "updated_at": "2024-04-01T09:41:44+00:00"}, {"answer_html": "From this paper discussing the pitfalls of using the breeder's equation:
\n\n\nThe breeder's equation provides a useful framework for conceptualizing the process of adaptive evolution by natural selection: selection causes phenotypic changes in a population, and genetic variation transmits these changes to future generations. This is not wrong, but given the assumptions we have discussed, it may generally be very inappropriate to apply this framework as a predictive tool in nature. There is consequently a problem with the enthusiastic way in which evolutionary biologists, ourselves included, have transferred this model from being a tool to conceptualise trait evolution and analyse artificial selection experiments (a context in which the inherent assumptions can be more readily approximated) to a predictive model in the field. Estimates of selection based on selection gradients are undoubtedly a conceptual step forward, but they do not escape reliance on the assumption that all traits and environmental factors that jointly influence studied traits and fitness have been identified, meaningfully measured and adequately modelled.
\n
So if this is indeed an artificial selection experiment and you have actually designed the experiment to control for all possible sources of e.g. environmental variation, then it may be appropriate to use the breeder's equation model. However, we don't know anything about the source of your data, so it's difficult to evaluate whether your data are from an adequately controlled e.g. common garden style experiment.
\nMoreover:
\n\n\nNo model can be expected to provide accurate predictions if its assumptions are seriously violated. The simple approaches we discuss here for predicting evolutionary change actually make many simplifying assumptions (e.g. constant population demography, discrete generations, constant environmental conditions; Merilä et al., 2001a), and we are certainly not the first to highlight the potential for predictions to fail when when these models are applied to natural systems (Hadfield, 2008; Price et al., 1988; van Tienderen & de Jong, 1994) or to call for caution in this regard.
\n
They are clearly focusing on natural populations, which I don't think you are. But on the off chance that your "selected" parental population is not selected explicitly on your height measurement, then that is probably the reason why your estimates are wonky.
\nIf you are in fact doing an artificial selection experiment, your estimates are probably wonky because some of those bolded factors were not controlled for.
\nFor example, if these are bean plants, the parental and offspring generations may have been grown in different years with different climatic conditions. Even in a laboratory environment with well controlled conditions, unless the parents and offspring are grown at literally the exact same time side by side (which presents obvious logistical challenges) with positional rotation and constant care, it can be hard to fully reject the hypothesis of some unknown environmental factor impacting your data.
\n", "answer_id": 114420, "answer_text": "From this paper (https://onlinelibrary.wiley.com/doi/10.1111/j.1420-9101.2010.02084.x) discussing the pitfalls of using the breeder's equation:\n\n\n\n\n\n\n\nThe breeder's equation provides a useful framework for conceptualizing the process of adaptive evolution by natural selection: selection causes phenotypic changes in a population, and genetic variation transmits these changes to future generations. This is not wrong, but given the assumptions we have discussed, it may generally be very inappropriate to apply this framework as a predictive tool in nature. There is consequently a problem with the enthusiastic way in which evolutionary biologists, ourselves included, have transferred this model from being a tool to conceptualise trait evolution and analyse artificial selection experiments (a context in which the inherent assumptions can be more readily approximated) to a predictive model in the field. Estimates of selection based on selection gradients are undoubtedly a conceptual step forward, but they do not escape reliance on the assumption that all traits and environmental factors that jointly influence studied traits and fitness have been identified, meaningfully measured and adequately modelled.\n\n\n\n\n\n\n\nSo if this is indeed an artificial selection experiment and you have actually designed the experiment to control for all possible sources of e.g. environmental variation, then it may be appropriate to use the breeder's equation model. However, we don't know anything about the source of your data, so it's difficult to evaluate whether your data are from an adequately controlled e.g. common garden style experiment.\n\n\n\n\nMoreover:\n\n\n\n\n\n\n\nNo model can be expected to provide accurate predictions if its assumptions are seriously violated. The simple approaches we discuss here for predicting evolutionary change actually make many simplifying assumptions (e.g. constant population demography, discrete generations, constant environmental conditions; Merilä et al., 2001a), and we are certainly not the first to highlight the potential for predictions to fail when when these models are applied to natural systems (Hadfield, 2008; Price et al., 1988; van Tienderen & de Jong, 1994) or to call for caution in this regard.\n\n\n\n\n\n\n\nThey are clearly focusing on natural populations, which I don't think you are. But on the off chance that your \"selected\" parental population is not selected explicitly on your height measurement, then that is probably the reason why your estimates are wonky.\n\n\n\n\nIf you are in fact doing an artificial selection experiment, your estimates are probably wonky because some of those bolded factors were not controlled for.\n\n\n\n\nFor example, if these are bean plants, the parental and offspring generations may have been grown in different years with different climatic conditions. Even in a laboratory environment with well controlled conditions, unless the parents and offspring are grown at literally the exact same time side by side (which presents obvious logistical challenges) with positional rotation and constant care, it can be hard to fully reject the hypothesis of some unknown environmental factor impacting your data.", "answer_url": "https://biology.stackexchange.com/a/114420", "author": "Maximilian Press", "author_url": "https://biology.stackexchange.com/users/22392/maximilian-press", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2024-04-01T18:40:03+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:32.233008+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/29e10377e709be0879cc174e9be11ba5513feaafd20aa842a20668af70c6d683_0.json", "raw_sha256": "535e870bb8fe62b3db0c0b66043a398cf2f6d26fcd7ad4a13a2a7e2a09999ee9", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/114428;114427;114412;114410;114399;114395;114391;114386;114385;114381;114378;114377;114376;114374;114372;114371;114370;114361;114354;114353;114348;114342;114331;114329;114324;114321;114319;114307;114305;114304;114299;114298;114295;114290;114281;114277;114273;114266;114256;114239;114238;114222;114216;114213;114211;114207;114197;114192;114185;114180;114178;114175;114174;114173;114172;114169;114161;114156;114155;114148;114145;114144;114139;114136;114135;114127;114119;114117;114114;114111;114110;114103;114098;114096;114094;114089;114085;114078;114076;114069;114067;114065;114058;114055;114048;114045;114038;114031;114028;114027;114025;114021;114020;114012;114006;113998;113997;113988;113986;113983/answers?filter=withbody&order=asc&page=2&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 114207, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Maximilian Press", "profile_url": "https://biology.stackexchange.com/users/22392/maximilian-press", "user_type": "registered"}, "created_at": "2024-04-01T18:40:03+00:00", "raw_file": "raw/codex_api_v1/22e8417b315063b6d3b906d11f4422eb4ac33f788b9058bddc9dd7bfc046cafc_1790824071906161300_0.json", "raw_sha256": "84dcb0018b97f3e9f1f4320ffea98714a55b6054974fc678a4c6cac9e312e078", "revision_guid": "6FCA9402-4994-4682-A01B-EF960A0D14BF", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/6FCA9402-4994-4682-A01B-EF960A0D14BF/view-source"}], "score": 1, "updated_at": "2024-04-01T18:40:03+00:00"}], "ground_truth": "community signals only; no scientific truth label", "product": "ranking", "question": "Here is my data:\n\n\n\n\nMean height score of the total parental population: 5.2\n\n\n\n\nMean height score of selected parents (those chosen for breeding due to their higher height): 6.4\n\n\n\n\nMean height score of the offspring (resulting from the selected parents): 7.8\n\n\n\n\nSelection differential (S) for height:\nS = Mean height score of selected parents - Mean height score of the total parental population\nS = 6.4 - 5.2 = 1.2\n\n\n\n\nResponse to selection (R):\nR = 7.8 - 5.2 = 2.6\n\n\n\n\nh^2 = R / S\n\n\n\n\nh^2 = 2.6 / 1.2 = 2.167\n\n\n\n\nI confirmed that the data are not wrong. What is the interpretation of this h^2 value?\n\n\n\n\nI am looking for explanations for why h^2 would be above one.", "record_id": "Scientific-Answer-Ranking:biology:114207", "scores": [1, 1], "split": "holdout", "thread": {"accepted_answer_id": null, "answers": [{"answer_html": "Check your assumptions.
\nIt looks like you're using a formula that assumes linear, additive variance. Your data suggest a system that does not follow these assumptions, so the equations are not valid for the situation you describe.
\nSee also https://en.m.wikipedia.org/wiki/All_models_are_wrong - much of the difficulty in applying simple mathematical formulae to real world data is in deciding/recognizing when your model is sufficiently wrong that it's no longer useful.
\n", "answer_id": 114208, "answer_text": "Check your assumptions.\n\n\n\n\nIt looks like you're using a formula that assumes linear, additive variance. Your data suggest a system that does not follow these assumptions, so the equations are not valid for the situation you describe.\n\n\n\n\nSee also https://en.m.wikipedia.org/wiki/All_models_are_wrong (https://en.m.wikipedia.org/wiki/All_models_are_wrong) - much of the difficulty in applying simple mathematical formulae to real world data is in deciding/recognizing when your model is sufficiently wrong that it's no longer useful.", "answer_url": "https://biology.stackexchange.com/a/114208", "author": "Bryan Krause", "author_url": "https://biology.stackexchange.com/users/27148/bryan-krause", "author_user_type": "moderator", "content_license": "CC BY-SA 4.0", "created_at": "2024-02-29T04:29:34+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:30.839943+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/2139ae0ecb1bf62b149af3f8e91d7ce461ad269d38020aaf05922333eabb51a1_0.json", "raw_sha256": "2610bc07f1691b2794681a23d0459bba24822de1f31c7b48d79495b29b0b1285", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/114428;114427;114412;114410;114399;114395;114391;114386;114385;114381;114378;114377;114376;114374;114372;114371;114370;114361;114354;114353;114348;114342;114331;114329;114324;114321;114319;114307;114305;114304;114299;114298;114295;114290;114281;114277;114273;114266;114256;114239;114238;114222;114216;114213;114211;114207;114197;114192;114185;114180;114178;114175;114174;114173;114172;114169;114161;114156;114155;114148;114145;114144;114139;114136;114135;114127;114119;114117;114114;114111;114110;114103;114098;114096;114094;114089;114085;114078;114076;114069;114067;114065;114058;114055;114048;114045;114038;114031;114028;114027;114025;114021;114020;114012;114006;113998;113997;113988;113986;113983/answers?filter=withbody&order=asc&page=1&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 114207, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Bryan Krause", "profile_url": "https://biology.stackexchange.com/users/27148/bryan-krause", "user_type": "moderator"}, "created_at": "2024-02-29T04:29:34+00:00", "raw_file": "raw/codex_api_v1/20c6382e006dfc70ceae89b5b384391a51cd420854d2e23edb6c44d00de6688e_1790824066738015300_0.json", "raw_sha256": "4baa513e3d4757eb58cf2dd23c824e0e27e58aa0c4e8ec570c22801fd30dcaa7", "revision_guid": "F56112DE-B89E-4603-A0F8-388A12ED9A46", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/F56112DE-B89E-4603-A0F8-388A12ED9A46/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "user438383", "profile_url": "https://biology.stackexchange.com/users/27357/user438383", "user_type": "registered"}, "created_at": "2024-04-01T09:41:44+00:00", "raw_file": "raw/codex_api_v1/c09c25974111e465f43435e13249e671865a3c492931b0256ef7f890bfa5e2e0_1790824064569681800_0.json", "raw_sha256": "0b302246b77e7a9d8782e0c9b89ad24379ff8e65cc316aa696d777ef4a6f718d", "revision_guid": "87407451-524F-4F50-91E7-9C2FDC0C1E39", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/87407451-524F-4F50-91E7-9C2FDC0C1E39/view-source"}], "score": 1, "updated_at": "2024-04-01T09:41:44+00:00"}, {"answer_html": "From this paper discussing the pitfalls of using the breeder's equation:
\n\n\nThe breeder's equation provides a useful framework for conceptualizing the process of adaptive evolution by natural selection: selection causes phenotypic changes in a population, and genetic variation transmits these changes to future generations. This is not wrong, but given the assumptions we have discussed, it may generally be very inappropriate to apply this framework as a predictive tool in nature. There is consequently a problem with the enthusiastic way in which evolutionary biologists, ourselves included, have transferred this model from being a tool to conceptualise trait evolution and analyse artificial selection experiments (a context in which the inherent assumptions can be more readily approximated) to a predictive model in the field. Estimates of selection based on selection gradients are undoubtedly a conceptual step forward, but they do not escape reliance on the assumption that all traits and environmental factors that jointly influence studied traits and fitness have been identified, meaningfully measured and adequately modelled.
\n
So if this is indeed an artificial selection experiment and you have actually designed the experiment to control for all possible sources of e.g. environmental variation, then it may be appropriate to use the breeder's equation model. However, we don't know anything about the source of your data, so it's difficult to evaluate whether your data are from an adequately controlled e.g. common garden style experiment.
\nMoreover:
\n\n\nNo model can be expected to provide accurate predictions if its assumptions are seriously violated. The simple approaches we discuss here for predicting evolutionary change actually make many simplifying assumptions (e.g. constant population demography, discrete generations, constant environmental conditions; Merilä et al., 2001a), and we are certainly not the first to highlight the potential for predictions to fail when when these models are applied to natural systems (Hadfield, 2008; Price et al., 1988; van Tienderen & de Jong, 1994) or to call for caution in this regard.
\n
They are clearly focusing on natural populations, which I don't think you are. But on the off chance that your "selected" parental population is not selected explicitly on your height measurement, then that is probably the reason why your estimates are wonky.
\nIf you are in fact doing an artificial selection experiment, your estimates are probably wonky because some of those bolded factors were not controlled for.
\nFor example, if these are bean plants, the parental and offspring generations may have been grown in different years with different climatic conditions. Even in a laboratory environment with well controlled conditions, unless the parents and offspring are grown at literally the exact same time side by side (which presents obvious logistical challenges) with positional rotation and constant care, it can be hard to fully reject the hypothesis of some unknown environmental factor impacting your data.
\n", "answer_id": 114420, "answer_text": "From this paper (https://onlinelibrary.wiley.com/doi/10.1111/j.1420-9101.2010.02084.x) discussing the pitfalls of using the breeder's equation:\n\n\n\n\n\n\n\nThe breeder's equation provides a useful framework for conceptualizing the process of adaptive evolution by natural selection: selection causes phenotypic changes in a population, and genetic variation transmits these changes to future generations. This is not wrong, but given the assumptions we have discussed, it may generally be very inappropriate to apply this framework as a predictive tool in nature. There is consequently a problem with the enthusiastic way in which evolutionary biologists, ourselves included, have transferred this model from being a tool to conceptualise trait evolution and analyse artificial selection experiments (a context in which the inherent assumptions can be more readily approximated) to a predictive model in the field. Estimates of selection based on selection gradients are undoubtedly a conceptual step forward, but they do not escape reliance on the assumption that all traits and environmental factors that jointly influence studied traits and fitness have been identified, meaningfully measured and adequately modelled.\n\n\n\n\n\n\n\nSo if this is indeed an artificial selection experiment and you have actually designed the experiment to control for all possible sources of e.g. environmental variation, then it may be appropriate to use the breeder's equation model. However, we don't know anything about the source of your data, so it's difficult to evaluate whether your data are from an adequately controlled e.g. common garden style experiment.\n\n\n\n\nMoreover:\n\n\n\n\n\n\n\nNo model can be expected to provide accurate predictions if its assumptions are seriously violated. The simple approaches we discuss here for predicting evolutionary change actually make many simplifying assumptions (e.g. constant population demography, discrete generations, constant environmental conditions; Merilä et al., 2001a), and we are certainly not the first to highlight the potential for predictions to fail when when these models are applied to natural systems (Hadfield, 2008; Price et al., 1988; van Tienderen & de Jong, 1994) or to call for caution in this regard.\n\n\n\n\n\n\n\nThey are clearly focusing on natural populations, which I don't think you are. But on the off chance that your \"selected\" parental population is not selected explicitly on your height measurement, then that is probably the reason why your estimates are wonky.\n\n\n\n\nIf you are in fact doing an artificial selection experiment, your estimates are probably wonky because some of those bolded factors were not controlled for.\n\n\n\n\nFor example, if these are bean plants, the parental and offspring generations may have been grown in different years with different climatic conditions. Even in a laboratory environment with well controlled conditions, unless the parents and offspring are grown at literally the exact same time side by side (which presents obvious logistical challenges) with positional rotation and constant care, it can be hard to fully reject the hypothesis of some unknown environmental factor impacting your data.", "answer_url": "https://biology.stackexchange.com/a/114420", "author": "Maximilian Press", "author_url": "https://biology.stackexchange.com/users/22392/maximilian-press", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2024-04-01T18:40:03+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:32.233008+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/29e10377e709be0879cc174e9be11ba5513feaafd20aa842a20668af70c6d683_0.json", "raw_sha256": "535e870bb8fe62b3db0c0b66043a398cf2f6d26fcd7ad4a13a2a7e2a09999ee9", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/114428;114427;114412;114410;114399;114395;114391;114386;114385;114381;114378;114377;114376;114374;114372;114371;114370;114361;114354;114353;114348;114342;114331;114329;114324;114321;114319;114307;114305;114304;114299;114298;114295;114290;114281;114277;114273;114266;114256;114239;114238;114222;114216;114213;114211;114207;114197;114192;114185;114180;114178;114175;114174;114173;114172;114169;114161;114156;114155;114148;114145;114144;114139;114136;114135;114127;114119;114117;114114;114111;114110;114103;114098;114096;114094;114089;114085;114078;114076;114069;114067;114065;114058;114055;114048;114045;114038;114031;114028;114027;114025;114021;114020;114012;114006;113998;113997;113988;113986;113983/answers?filter=withbody&order=asc&page=2&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 114207, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Maximilian Press", "profile_url": "https://biology.stackexchange.com/users/22392/maximilian-press", "user_type": "registered"}, "created_at": "2024-04-01T18:40:03+00:00", "raw_file": "raw/codex_api_v1/22e8417b315063b6d3b906d11f4422eb4ac33f788b9058bddc9dd7bfc046cafc_1790824071906161300_0.json", "raw_sha256": "84dcb0018b97f3e9f1f4320ffea98714a55b6054974fc678a4c6cac9e312e078", "revision_guid": "6FCA9402-4994-4682-A01B-EF960A0D14BF", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/6FCA9402-4994-4682-A01B-EF960A0D14BF/view-source"}], "score": 1, "updated_at": "2024-04-01T18:40:03+00:00"}], "domain": "biology", "external_links": ["https://en.m.wikipedia.org/wiki/All_models_are_wrong", "https://onlinelibrary.wiley.com/doi/10.1111/j.1420-9101.2010.02084.x"], "medical_sensitive": false, "patient_specific": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:08.576606+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/1051d4f3e38449f1419d1973ac812b2286659e454a76f89a23fdaa941dfadddb_0.json", "raw_sha256": "583dcd577e20d33b29e9f8818a7ab6a1fab039c19ab79927e16096cff23fa61d", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/search/advanced?answers=1&filter=withbody&order=desc&page=7&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_author": "BigMistake", "question_author_url": "https://biology.stackexchange.com/users/75355/bigmistake", "question_author_user_type": "registered", "question_created_at": "2024-02-29T03:22:02+00:00", "question_html": "Here is my data:
\nMean height score of the total parental population: 5.2
\nMean height score of selected parents (those chosen for breeding due to their higher height): 6.4
\nMean height score of the offspring (resulting from the selected parents): 7.8
\nSelection differential (S) for height:\nS = Mean height score of selected parents - Mean height score of the total parental population\nS = 6.4 - 5.2 = 1.2
\nResponse to selection (R):\nR = 7.8 - 5.2 = 2.6
\nh^2 = R / S
\nh^2 = 2.6 / 1.2 = 2.167
\nI confirmed that the data are not wrong. What is the interpretation of this h^2 value?
\nI am looking for explanations for why h^2 would be above one.
\n", "question_id": 114207, "question_license": "CC BY-SA 4.0", "question_score": 1, "question_text": "Here is my data:\n\n\n\n\nMean height score of the total parental population: 5.2\n\n\n\n\nMean height score of selected parents (those chosen for breeding due to their higher height): 6.4\n\n\n\n\nMean height score of the offspring (resulting from the selected parents): 7.8\n\n\n\n\nSelection differential (S) for height:\nS = Mean height score of selected parents - Mean height score of the total parental population\nS = 6.4 - 5.2 = 1.2\n\n\n\n\nResponse to selection (R):\nR = 7.8 - 5.2 = 2.6\n\n\n\n\nh^2 = R / S\n\n\n\n\nh^2 = 2.6 / 1.2 = 2.167\n\n\n\n\nI confirmed that the data are not wrong. What is the interpretation of this h^2 value?\n\n\n\n\nI am looking for explanations for why h^2 would be above one.", "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "BigMistake", "profile_url": "https://biology.stackexchange.com/users/75355/bigmistake", "user_type": "registered"}, "created_at": "2024-02-29T03:22:02+00:00", "raw_file": "raw/codex_api_v1/20c6382e006dfc70ceae89b5b384391a51cd420854d2e23edb6c44d00de6688e_1790824066738015300_0.json", "raw_sha256": "4baa513e3d4757eb58cf2dd23c824e0e27e58aa0c4e8ec570c22801fd30dcaa7", "revision_guid": "74F74F3B-968B-409B-B758-97AB1EA345FD", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/74F74F3B-968B-409B-B758-97AB1EA345FD/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "BigMistake", "profile_url": "https://biology.stackexchange.com/users/75355/bigmistake", "user_type": "registered"}, "created_at": "2024-02-29T03:36:09+00:00", "raw_file": "raw/codex_api_v1/20c6382e006dfc70ceae89b5b384391a51cd420854d2e23edb6c44d00de6688e_1790824066738015300_0.json", "raw_sha256": "4baa513e3d4757eb58cf2dd23c824e0e27e58aa0c4e8ec570c22801fd30dcaa7", "revision_guid": "A4B13087-186F-45EC-A427-DB662578DFE4", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/A4B13087-186F-45EC-A427-DB662578DFE4/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "BigMistake", "profile_url": "https://biology.stackexchange.com/users/75355/bigmistake", "user_type": "registered"}, "created_at": "2024-02-29T05:58:53+00:00", "raw_file": "raw/codex_api_v1/20c6382e006dfc70ceae89b5b384391a51cd420854d2e23edb6c44d00de6688e_1790824066738015300_0.json", "raw_sha256": "4baa513e3d4757eb58cf2dd23c824e0e27e58aa0c4e8ec570c22801fd30dcaa7", "revision_guid": "D447808C-D7D4-4241-B7C2-A11211A08284", "revision_number": 3, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/D447808C-D7D4-4241-B7C2-A11211A08284/view-source"}, {"content_license": null, "contributor": {"display_name": "Community", "profile_url": "https://biology.stackexchange.com/users/-1/community", "user_type": "moderator"}, "created_at": "2024-03-30T06:01:20+00:00", "raw_file": "raw/codex_api_v1/c09c25974111e465f43435e13249e671865a3c492931b0256ef7f890bfa5e2e0_1790824064569681800_0.json", "raw_sha256": "0b302246b77e7a9d8782e0c9b89ad24379ff8e65cc316aa696d777ef4a6f718d", "revision_guid": "4D22225F-33D8-4050-B18C-2EF52C62B49C", "revision_number": null, "revision_type": "vote_based", "revision_url": "https://biology.stackexchange.com/revisions/4D22225F-33D8-4050-B18C-2EF52C62B49C/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Maximilian Press", "profile_url": "https://biology.stackexchange.com/users/22392/maximilian-press", "user_type": "registered"}, "created_at": "2024-04-01T18:13:32+00:00", "raw_file": "raw/codex_api_v1/c09c25974111e465f43435e13249e671865a3c492931b0256ef7f890bfa5e2e0_1790824064569681800_0.json", "raw_sha256": "0b302246b77e7a9d8782e0c9b89ad24379ff8e65cc316aa696d777ef4a6f718d", "revision_guid": "9642B35B-D8E9-4203-AA2F-11D0813C78C9", "revision_number": 4, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/9642B35B-D8E9-4203-AA2F-11D0813C78C9/view-source"}], "source_site": "biology", "source_url": "https://biology.stackexchange.com/questions/114207/interpretation-of-narrow-sense-heritability-over-one-using-r-s-h2", "split": "holdout", "split_group": "f302586999c52ffc28888d6813b076db250af71d0add79b0e4e6d96b37f26c08", "tags": ["genetics", "evolution", "population-genetics", "selection"], "thread_id": "biology:114207", "title": "Interpretation of narrow-sense heritability over one (using R/S = h^2)"}} {"accepted_status": [false, true], "candidate_answers": [{"answer_html": "Think about it this way: if you're compiling a budget or asset report then you want to know about cash flows - income vs. expenditures - regardless of what form that "cash" might take. Sometimes, you want to know how much "cash at hand" you have, and you'll count only the most liquid assets, but often you'll also need to know the total value of any assets that can be converted into cash at all - not just stocks and bonds, but real estate, let's say, and a lot of other possible in-betweens.
\nIn that they are used here (in the context of nutrition), calories are basically like energy currency with varying degrees of liquidity. You might have some assets, like carbs, which are like publicly traded stock shares that can be fairly easily converted to ATP with little commission. Proteins, then, might be more like specialized assets. But the crucial point is, proteins are still energy assets. When you are evaluating your wealth for the purposes of taxes or to take out a mortgage, the bank/IRS will still want to know your net worth considering any property contributing to that net worth. Because proteins can be converted to energy, they still add up to the overall energy budget.
\nImagine you have a financial portfolio where you're investing more into stocks (proteins) than what is optimal for your growth targets. The same way that if you have excess cash in your financial portfolio (after meeting your investment and savings goals), you might invest it into more stocks or bonds, the excess energy provided by proteins will need to be stored somewhere.
\nIn the body, consuming more protein than needed for muscle repair and other functions leads to excess calories. Since the body sees this as an "excess cash flow," it converts proteins into glucose (sort of- the details are complicated) and stores it as fat (which is, in our parable, like the savings account).
\n", "answer_id": 114091, "answer_text": "Think about it this way: if you're compiling a budget or asset report then you want to know about cash flows - income vs. expenditures - regardless of what form that \"cash\" might take. Sometimes, you want to know how much \"cash at hand\" you have, and you'll count only the most liquid assets, but often you'll also need to know the total value of any assets that can be converted into cash at all - not just stocks and bonds, but real estate, let's say, and a lot of other possible in-betweens.\n\n\n\n\nIn that they are used here (in the context of nutrition), calories are basically like energy currency with varying degrees of liquidity. You might have some assets, like carbs, which are like publicly traded stock shares that can be fairly easily converted to ATP with little commission. Proteins, then, might be more like specialized assets. But the crucial point is, proteins are still energy assets. When you are evaluating your wealth for the purposes of taxes or to take out a mortgage, the bank/IRS will still want to know your net worth considering any property contributing to that net worth. Because proteins can be converted to energy, they still add up to the overall energy budget.\n\n\n\n\nImagine you have a financial portfolio where you're investing more into stocks (proteins) than what is optimal for your growth targets. The same way that if you have excess cash in your financial portfolio (after meeting your investment and savings goals), you might invest it into more stocks or bonds, the excess energy provided by proteins will need to be stored somewhere.\n\n\n\n\nIn the body, consuming more protein than needed for muscle repair and other functions leads to excess calories. Since the body sees this as an \"excess cash flow,\" it converts proteins into glucose (sort of- the details are complicated) and stores it as fat (which is, in our parable, like the savings account).", "answer_url": "https://biology.stackexchange.com/a/114091", "author": "That Guy", "author_url": "https://biology.stackexchange.com/users/6027/that-guy", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2024-02-14T01:23:19+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:30.839943+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/2139ae0ecb1bf62b149af3f8e91d7ce461ad269d38020aaf05922333eabb51a1_0.json", "raw_sha256": "2610bc07f1691b2794681a23d0459bba24822de1f31c7b48d79495b29b0b1285", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/114428;114427;114412;114410;114399;114395;114391;114386;114385;114381;114378;114377;114376;114374;114372;114371;114370;114361;114354;114353;114348;114342;114331;114329;114324;114321;114319;114307;114305;114304;114299;114298;114295;114290;114281;114277;114273;114266;114256;114239;114238;114222;114216;114213;114211;114207;114197;114192;114185;114180;114178;114175;114174;114173;114172;114169;114161;114156;114155;114148;114145;114144;114139;114136;114135;114127;114119;114117;114114;114111;114110;114103;114098;114096;114094;114089;114085;114078;114076;114069;114067;114065;114058;114055;114048;114045;114038;114031;114028;114027;114025;114021;114020;114012;114006;113998;113997;113988;113986;113983/answers?filter=withbody&order=asc&page=1&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 114085, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "That Guy", "profile_url": "https://biology.stackexchange.com/users/6027/that-guy", "user_type": "registered"}, "created_at": "2024-02-14T01:23:19+00:00", "raw_file": "raw/codex_api_v1/4aa156cabb1f3edbc4e0a74ff84deb30f9cd06be13c7d021adab58e209db850d_1790824057164545000_0.json", "raw_sha256": "42ee08c1af6f231bf4bd10a51fd8384910e076e5d887f51c6dd79384012b46ec", "revision_guid": "DB58FD36-B3B1-48DE-9176-BDFD87B3E878", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/DB58FD36-B3B1-48DE-9176-BDFD87B3E878/view-source"}], "score": 0, "updated_at": "2024-02-14T01:23:19+00:00"}, {"answer_html": "Preamble
\nI had not intended to answer this question as I felt it lacked the clarity required for this site. However I now think that it is necessary to correct the assertion that “protein has to be converted into glucose to generate energy”, especially as this is echoed by the answer from @ThatGuy. I shall clarify the question by interpreting the word “relevant” primarily to mean general “purpose” or “utility”, and shall consider this in relation to the Food and Agriculture Organization of the United Nations (FAO), one scientific body that has published values for energy values of nutrients.
Summary
The dietary nutrients carbohydrate, fat and protein can have\ndifferent metabolic fates in the body depending on individual\ncircumstances. The assumption that “protein is mostly used by the\nbody for purposes other than extraction of energy” does not apply\nin many circumstances.
\nEnergy values for food are concerned only with the situation in which the nutrient is used to produce its maximum biological energy yield as ATP, using the appropriate metabolic pathways.
\nThese values are not simple bomb calorimeter values. They are calculated separately for protein, carbohydrate, and fat, taking into account their different metabolism. For proteins this takes into account the different metabolism of the 20 amino acids, although it should be emphasized none of these need to be converted to glucose to generate energy.
\nThere are several different purposes to which these values can and are used, but the FAO is primarily concerned with their use to assess basic nutritional needs and their fulfilment in the countries of the world in which malnutrition may occur.
\nThe FAO and standard energy values for nutrients
\nAs mentioned above, I will consider this question in relation to the FAO, the Food and Agriculture Organization of the United Nations, a body that has produced energy values of different nutrients — values that appear to be used by government organizations and commercial food groups in many countries. The source of my information is this report on the subject, produced in 2003, to which the reader is referred for fuller details.
What did the FAO envisage that the results of their work would be used for?
\nTo quote from Section 1.1 of the report:
This should answer the original poster’s concern with the “relevance” of energy values. The purpose envisaged was clearly with energy requirements in countries in which energy malnutrition was a problem, not affluent Western countries suffering from easily preventable diseases caused by overconsumption of food (although they are not irrelevant in the latter).
\nDid the FAO take into account the different metabolic fates of different energy supplying nutrients?
\nYes. It was constituted of personnel who, unlike the poster, were biological scientists with a sound understanding of the physiology and biochemistry of metabolism. To quote from section 1.3 of the report:
\n\n“Energy requirement recommendations remain “theoretical” and of little practical value until they can be related to foods… Two pieces of information are needed in order to translate individual foods, and ultimately diets, into energy intakes that can be compared with the requirement recommendations…\n…amounts of components must be converted into energy content using an agreed set of physiology-related factors that correspond to the energy-producing potential of the components in the human body. Thus, in order to make accurate estimates of energy intake, it is essential to have energy conversion factors for each component that denote the energy per gram for that component. However, it has long been recognized that the energy contents of protein, fat and carbohydrate differ, both inherently in the compounds themselves and owing to their different digestion, absorption and metabolism.”
\n
So the scientists on this body were well aware of the problems in producing energy values for different nutrients, and the paper considers proteins, fats and carbohydrates separately and in detail in sections 2 and 3 of this report. For each of these (and for different sources of the same constituent) they produced separate values of various measures, with final values in Section 4.
\nHowever the value of 17 kJoules per gram protein (=4kcal/g)) quoted by the original poster is the FAO value of Net Metabolizable Energy (NME) — i.e. the energy produced in circumstances when all the protein amino acids are oxidized to produce ATP. This is relevant to individuals in protein equilibrium but in net energy deficit.
\n(The overall energy values they suggest for fat is 37 kJoules/g, and for carbohydrate 17 kJoules/g).
\nSummary of metabolite interconversions in obtaining metabolic energy from proteins, fats and carbohydrates
\n
The diagram above is my own attempt at a biochemical summary for the situation when carbohydrate, fat or protein are being solely used to generate energy. Although some ATP is generated directly in one pathway, most of the carbon skeletons are oxidized in the TCA cycle, shown. Not shown is the NADH produced in the TCA cycle and its oxidation in the electron transport chain to produce a proton-motive force which drives the conversion of ADP to ATP — a molecule that can be considered as a source of metabolic energy.
\nIn the energy-deficit scenario carbohydrates are converted to glucose, then to pyruvate in glycolysis (with some direct generation of ATP) and then to Acetyl CoA which for oxidation in the TCA cycle.
\nIn this scenario fat (triglyceride) is converted to fatty acids and glycerol, the latter feeding into glycolysis, and the former being oxidized to Acetyl CoA, and hence to the TCA cycle.
\nIn this scenario, in which they are not required for protein biosynthesis, each of the 20 amino acids from protein undergoes different metabolic conversions, as shown. All these can lead to the TCA cycle, and, as is evident, none involve conversion to glucose†. (The removal of nitrogen from the amino acids, actually consumes energy, but this is allowed for in the FAO calculations.)
\nAnalogy (for those that find them useful)
\nIf I buy a gold trinket in an antique shop it will (in Britain at least) bear a hallmark indicating the purity of the gold. If I am interested in keeping the piece until the price of gold increases and then selling it for its gold content (perhaps after melting it down) then the hallmark information is of primary relevance to me. If, however, I am interested in the trinket because of its beauty or because it may be a rare piece from a famous designer, the hallmark, although reassuring, would have little “relevance” to my purpose.
Even shorter analogy (to demonstrate my sense of humour)
\nOne man’s meat is another man’s poison.
Think about it this way: if you're compiling a budget or asset report then you want to know about cash flows - income vs. expenditures - regardless of what form that "cash" might take. Sometimes, you want to know how much "cash at hand" you have, and you'll count only the most liquid assets, but often you'll also need to know the total value of any assets that can be converted into cash at all - not just stocks and bonds, but real estate, let's say, and a lot of other possible in-betweens.
\nIn that they are used here (in the context of nutrition), calories are basically like energy currency with varying degrees of liquidity. You might have some assets, like carbs, which are like publicly traded stock shares that can be fairly easily converted to ATP with little commission. Proteins, then, might be more like specialized assets. But the crucial point is, proteins are still energy assets. When you are evaluating your wealth for the purposes of taxes or to take out a mortgage, the bank/IRS will still want to know your net worth considering any property contributing to that net worth. Because proteins can be converted to energy, they still add up to the overall energy budget.
\nImagine you have a financial portfolio where you're investing more into stocks (proteins) than what is optimal for your growth targets. The same way that if you have excess cash in your financial portfolio (after meeting your investment and savings goals), you might invest it into more stocks or bonds, the excess energy provided by proteins will need to be stored somewhere.
\nIn the body, consuming more protein than needed for muscle repair and other functions leads to excess calories. Since the body sees this as an "excess cash flow," it converts proteins into glucose (sort of- the details are complicated) and stores it as fat (which is, in our parable, like the savings account).
\n", "answer_id": 114091, "answer_text": "Think about it this way: if you're compiling a budget or asset report then you want to know about cash flows - income vs. expenditures - regardless of what form that \"cash\" might take. Sometimes, you want to know how much \"cash at hand\" you have, and you'll count only the most liquid assets, but often you'll also need to know the total value of any assets that can be converted into cash at all - not just stocks and bonds, but real estate, let's say, and a lot of other possible in-betweens.\n\n\n\n\nIn that they are used here (in the context of nutrition), calories are basically like energy currency with varying degrees of liquidity. You might have some assets, like carbs, which are like publicly traded stock shares that can be fairly easily converted to ATP with little commission. Proteins, then, might be more like specialized assets. But the crucial point is, proteins are still energy assets. When you are evaluating your wealth for the purposes of taxes or to take out a mortgage, the bank/IRS will still want to know your net worth considering any property contributing to that net worth. Because proteins can be converted to energy, they still add up to the overall energy budget.\n\n\n\n\nImagine you have a financial portfolio where you're investing more into stocks (proteins) than what is optimal for your growth targets. The same way that if you have excess cash in your financial portfolio (after meeting your investment and savings goals), you might invest it into more stocks or bonds, the excess energy provided by proteins will need to be stored somewhere.\n\n\n\n\nIn the body, consuming more protein than needed for muscle repair and other functions leads to excess calories. Since the body sees this as an \"excess cash flow,\" it converts proteins into glucose (sort of- the details are complicated) and stores it as fat (which is, in our parable, like the savings account).", "answer_url": "https://biology.stackexchange.com/a/114091", "author": "That Guy", "author_url": "https://biology.stackexchange.com/users/6027/that-guy", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2024-02-14T01:23:19+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:30.839943+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/2139ae0ecb1bf62b149af3f8e91d7ce461ad269d38020aaf05922333eabb51a1_0.json", "raw_sha256": "2610bc07f1691b2794681a23d0459bba24822de1f31c7b48d79495b29b0b1285", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/114428;114427;114412;114410;114399;114395;114391;114386;114385;114381;114378;114377;114376;114374;114372;114371;114370;114361;114354;114353;114348;114342;114331;114329;114324;114321;114319;114307;114305;114304;114299;114298;114295;114290;114281;114277;114273;114266;114256;114239;114238;114222;114216;114213;114211;114207;114197;114192;114185;114180;114178;114175;114174;114173;114172;114169;114161;114156;114155;114148;114145;114144;114139;114136;114135;114127;114119;114117;114114;114111;114110;114103;114098;114096;114094;114089;114085;114078;114076;114069;114067;114065;114058;114055;114048;114045;114038;114031;114028;114027;114025;114021;114020;114012;114006;113998;113997;113988;113986;113983/answers?filter=withbody&order=asc&page=1&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 114085, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "That Guy", "profile_url": "https://biology.stackexchange.com/users/6027/that-guy", "user_type": "registered"}, "created_at": "2024-02-14T01:23:19+00:00", "raw_file": "raw/codex_api_v1/4aa156cabb1f3edbc4e0a74ff84deb30f9cd06be13c7d021adab58e209db850d_1790824057164545000_0.json", "raw_sha256": "42ee08c1af6f231bf4bd10a51fd8384910e076e5d887f51c6dd79384012b46ec", "revision_guid": "DB58FD36-B3B1-48DE-9176-BDFD87B3E878", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/DB58FD36-B3B1-48DE-9176-BDFD87B3E878/view-source"}], "score": 0, "updated_at": "2024-02-14T01:23:19+00:00"}, {"answer_html": "Preamble
\nI had not intended to answer this question as I felt it lacked the clarity required for this site. However I now think that it is necessary to correct the assertion that “protein has to be converted into glucose to generate energy”, especially as this is echoed by the answer from @ThatGuy. I shall clarify the question by interpreting the word “relevant” primarily to mean general “purpose” or “utility”, and shall consider this in relation to the Food and Agriculture Organization of the United Nations (FAO), one scientific body that has published values for energy values of nutrients.
Summary
The dietary nutrients carbohydrate, fat and protein can have\ndifferent metabolic fates in the body depending on individual\ncircumstances. The assumption that “protein is mostly used by the\nbody for purposes other than extraction of energy” does not apply\nin many circumstances.
\nEnergy values for food are concerned only with the situation in which the nutrient is used to produce its maximum biological energy yield as ATP, using the appropriate metabolic pathways.
\nThese values are not simple bomb calorimeter values. They are calculated separately for protein, carbohydrate, and fat, taking into account their different metabolism. For proteins this takes into account the different metabolism of the 20 amino acids, although it should be emphasized none of these need to be converted to glucose to generate energy.
\nThere are several different purposes to which these values can and are used, but the FAO is primarily concerned with their use to assess basic nutritional needs and their fulfilment in the countries of the world in which malnutrition may occur.
\nThe FAO and standard energy values for nutrients
\nAs mentioned above, I will consider this question in relation to the FAO, the Food and Agriculture Organization of the United Nations, a body that has produced energy values of different nutrients — values that appear to be used by government organizations and commercial food groups in many countries. The source of my information is this report on the subject, produced in 2003, to which the reader is referred for fuller details.
What did the FAO envisage that the results of their work would be used for?
\nTo quote from Section 1.1 of the report:
This should answer the original poster’s concern with the “relevance” of energy values. The purpose envisaged was clearly with energy requirements in countries in which energy malnutrition was a problem, not affluent Western countries suffering from easily preventable diseases caused by overconsumption of food (although they are not irrelevant in the latter).
\nDid the FAO take into account the different metabolic fates of different energy supplying nutrients?
\nYes. It was constituted of personnel who, unlike the poster, were biological scientists with a sound understanding of the physiology and biochemistry of metabolism. To quote from section 1.3 of the report:
\n\n“Energy requirement recommendations remain “theoretical” and of little practical value until they can be related to foods… Two pieces of information are needed in order to translate individual foods, and ultimately diets, into energy intakes that can be compared with the requirement recommendations…\n…amounts of components must be converted into energy content using an agreed set of physiology-related factors that correspond to the energy-producing potential of the components in the human body. Thus, in order to make accurate estimates of energy intake, it is essential to have energy conversion factors for each component that denote the energy per gram for that component. However, it has long been recognized that the energy contents of protein, fat and carbohydrate differ, both inherently in the compounds themselves and owing to their different digestion, absorption and metabolism.”
\n
So the scientists on this body were well aware of the problems in producing energy values for different nutrients, and the paper considers proteins, fats and carbohydrates separately and in detail in sections 2 and 3 of this report. For each of these (and for different sources of the same constituent) they produced separate values of various measures, with final values in Section 4.
\nHowever the value of 17 kJoules per gram protein (=4kcal/g)) quoted by the original poster is the FAO value of Net Metabolizable Energy (NME) — i.e. the energy produced in circumstances when all the protein amino acids are oxidized to produce ATP. This is relevant to individuals in protein equilibrium but in net energy deficit.
\n(The overall energy values they suggest for fat is 37 kJoules/g, and for carbohydrate 17 kJoules/g).
\nSummary of metabolite interconversions in obtaining metabolic energy from proteins, fats and carbohydrates
\n
The diagram above is my own attempt at a biochemical summary for the situation when carbohydrate, fat or protein are being solely used to generate energy. Although some ATP is generated directly in one pathway, most of the carbon skeletons are oxidized in the TCA cycle, shown. Not shown is the NADH produced in the TCA cycle and its oxidation in the electron transport chain to produce a proton-motive force which drives the conversion of ADP to ATP — a molecule that can be considered as a source of metabolic energy.
\nIn the energy-deficit scenario carbohydrates are converted to glucose, then to pyruvate in glycolysis (with some direct generation of ATP) and then to Acetyl CoA which for oxidation in the TCA cycle.
\nIn this scenario fat (triglyceride) is converted to fatty acids and glycerol, the latter feeding into glycolysis, and the former being oxidized to Acetyl CoA, and hence to the TCA cycle.
\nIn this scenario, in which they are not required for protein biosynthesis, each of the 20 amino acids from protein undergoes different metabolic conversions, as shown. All these can lead to the TCA cycle, and, as is evident, none involve conversion to glucose†. (The removal of nitrogen from the amino acids, actually consumes energy, but this is allowed for in the FAO calculations.)
\nAnalogy (for those that find them useful)
\nIf I buy a gold trinket in an antique shop it will (in Britain at least) bear a hallmark indicating the purity of the gold. If I am interested in keeping the piece until the price of gold increases and then selling it for its gold content (perhaps after melting it down) then the hallmark information is of primary relevance to me. If, however, I am interested in the trinket because of its beauty or because it may be a rare piece from a famous designer, the hallmark, although reassuring, would have little “relevance” to my purpose.
Even shorter analogy (to demonstrate my sense of humour)
\nOne man’s meat is another man’s poison.
Non-biologist speaking here. As you can probably see from the title, I'm having trouble wrapping my head around concepts related to the body's energy balance amd the role of macronutrients. Let me explain in more detail.
\nIf a person consumes excessive amounts of calories for a certain period of time (i.e. more than they need) they will start to gain weight in the form of fat. Conversely, an extended caloric deficit will lead to weight loss. So far, so good.
\nNow, each macronutrient has a certain amount of calories per gram of nutrient - if I'm not mistaken 1 g of protein has 4 kcal.
\nOn the other hand, according to different sources that I've been reading lately, the body does not really use protein for energy gain unless in extreme circumstances. In other words, carbohydrates and fat can readily be "converted" to ATP for energy gain while the conversion of protein into glucose and then ATP is very inefficient. At least that's my understanding, if there's already a misconception here feel free to correct it.
\nProteins are mostly used to build and repair different structures in the body. I will use the reparation and buildup of muscle tissue as an example. And here comes my main question: if proteins aren't being "burned" by the body to extract energy in the form of ATP, why are the calories consumed in the form of protein really relevant? In other words, if the protein that I eat is being used by the body to build stuff such as muscle, haemoglobin etc. and not being burned, why do I care about the calories that protein has? Why will excess protein calories make me fat?
\nI obviously "know" that calories from protein matter, but I don't understand why this is the case. I feel like I'm really not grasping something essential here. I hope that the question is clear and that an interesting discussion could follow. If anyone could give a more detailed explanation of what's going on in the body in this scenario, that would be much appreciated.
\n", "question_id": 114085, "question_license": "CC BY-SA 4.0", "question_score": 3, "question_text": "Non-biologist speaking here. As you can probably see from the title, I'm having trouble wrapping my head around concepts related to the body's energy balance amd the role of macronutrients. Let me explain in more detail.\n\n\n\n\nIf a person consumes excessive amounts of calories for a certain period of time (i.e. more than they need) they will start to gain weight in the form of fat. Conversely, an extended caloric deficit will lead to weight loss. So far, so good.\n\n\n\n\nNow, each macronutrient has a certain amount of calories per gram of nutrient - if I'm not mistaken 1 g of protein has 4 kcal.\n\n\n\n\nOn the other hand, according to different sources that I've been reading lately, the body does not really use protein for energy gain unless in extreme circumstances. In other words, carbohydrates and fat can readily be \"converted\" to ATP for energy gain while the conversion of protein into glucose and then ATP is very inefficient. At least that's my understanding, if there's already a misconception here feel free to correct it.\n\n\n\n\nProteins are mostly used to build and repair different structures in the body. I will use the reparation and buildup of muscle tissue as an example. And here comes my main question: if proteins aren't being \"burned\" by the body to extract energy in the form of ATP, why are the calories consumed in the form of protein really relevant? In other words, if the protein that I eat is being used by the body to build stuff such as muscle, haemoglobin etc. and not being burned, why do I care about the calories that protein has? Why will excess protein calories make me fat?\n\n\n\n\nI obviously \"know\" that calories from protein matter, but I don't understand why this is the case. I feel like I'm really not grasping something essential here. I hope that the question is clear and that an interesting discussion could follow. If anyone could give a more detailed explanation of what's going on in the body in this scenario, that would be much appreciated.", "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "ilovemaths", "profile_url": "https://biology.stackexchange.com/users/78872/ilovemaths", "user_type": "registered"}, "created_at": "2024-02-13T09:48:53+00:00", "raw_file": "raw/codex_api_v1/4aa156cabb1f3edbc4e0a74ff84deb30f9cd06be13c7d021adab58e209db850d_1790824057164545000_0.json", "raw_sha256": "42ee08c1af6f231bf4bd10a51fd8384910e076e5d887f51c6dd79384012b46ec", "revision_guid": "6199EFE5-5C64-44B4-838B-67BBF66882CD", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/6199EFE5-5C64-44B4-838B-67BBF66882CD/view-source"}], "source_site": "biology", "source_url": "https://biology.stackexchange.com/questions/114085/if-protein-is-mostly-used-by-the-body-for-purposes-other-than-extraction-of-ener", "split": "holdout", "split_group": "d206ed925a36ab39b40471389f70303ba0611ec45ea595b364b730826b3f19ed", "tags": ["proteins", "nutrition", "energy-metabolism", "energy", "carbohydrates"], "thread_id": "biology:114085", "title": "If protein is mostly used by the body for purposes other than extraction of energy, why are calories from protein relevant?"}} {"accepted_status": [false, false], "candidate_answers": [{"answer_html": "Yes, these are known as nested genes, and there are actually several, even in the human genome. A paper I found while answering this question (Kumar, 2009) claims the human genome has 158 nested protein coding genes.
\nThe most common type of nested gene, at least in the human genome, is where one gene is found on the plus strand and another on the minus strand, with the smaller gene being in an intron of the larger one. For example, the human gene LPAR6 is contained entirely within the human gene RB1, but RB1 is on the forward strand and LPAR6 on the reverse. See the UCSC genome browser:
\n\nThe same article I linked to earlier also describes another kind of nested gene where the smaller gene falls in an exon of the larger one. This is rarer in metazoans, but does exist.
\nFinally, microbial genomes seem to have many overlapping genes that share coding sequence. See Johnson and Chisholm, 2004
\nShort Answer
\nAlthough the definition of the term gene is open to debate, in answer to what I feel is the most likely meaning of the original poster’s question:
“Yes. Cases do exist in which a region of DNA can be transcribed and translated to produce two different proteins in which a part of the amino acid sequence of each is encoded by the same stretch of the DNA.”
\nOne description of this situation is Overlapping Genes, and a review of such genes is provided in a 2022 Nature review by Wright et al., entitled “Overlapping genes in natural and engineered genomes”.
\nComplexity of the question
\nThere are a number of complicating factors in considering overlapping genes in general, only some of which apply to this situation:
The review by Wright et al. includes a figure illustrating some of these possibilities, a modified section of which I reproduce below. (It also makes a distinction between overlapping and nested genes.) The poster’s question is clearly framed in terms of (a) in the figure, so I shall focus on that initially.
\n\nWhy are examples of gene overlap uncommon?
\nThe information that such overlaps can occur is of much less value than knowing what problems lead them to being uncommon and how these problems are overcome. The key point is that there are specific signals for initiating and translating part of the mRNA into protein — in effect, ‘rules’ for where the protein starts and stops. Overlapping protein products translated from the same mRNA would require the rules to be broken.
The problem with overlapping proteins translated in different directions ((c) and (d)) is the unlikelihood that both translations could encode functional proteins, and, even if they did, evolutionary changes in one could have deleterious effects on the other. The same problem is encountered if different reading frames are used to translate a single mRNA in the same direction.
\nOvercoming the problems
\nFor situation (a) let us simplify by assuming there is a common mRNA for two protein products (always true for prokaryotes, as far as I am aware).
In most prokaryotes there is a site just 5′ to the initiating AUG codon (RBS or Shine–Dalgarno sequence) to which the small ribosomal subunit binds. In order to have alternative AUG starting codons, as in (a) (or (b)), there would have to be alternative ribosome binding sites, the second within the coding sequence specifying the first protein product. Such dual function is not impossible, but I am unaware of any examples of it.
\nIn eukaryotes an initiation complex of the small ribosomal subunit and the initiator tRNA normally binds to the 5’ methylated cap of the mRNA and then scans along the mRNA, initiating translation at the first AUG or the first AUG in a ‘suitable context’. The difference between a ‘suitable’ and ‘unsuitable’ context for an initiating AUG is not always clear-cut, and this leads to situations where, for the same mRNA, some ribosomes initiate at the first AUG and others at the second (or subsequent) AUG, leading to different proteins.
\n\nExamples in the genome of Drosophila melanogaster have been well documented.\nThe two forms of the Drosophila Apoptotic signal-regulating kinase 1 are illustrated below:
\n\nIt can seen that form B of the protein starts at amino acid 169 of form C, although both terminate at the same position. The nomenclature indicates that the proteins are, in fact, considered as variant products of the same gene, Ask1.
\nIn this and all the other examples of which I am aware in Drosophila the alternative AUG is in the same reading frame as the first one. Although I have already mentioned the problem if the same stretch of DNA encoded entirely different proteins, there is at least one reported exampl. This involves the human ribosomal protein gene RPL36, and an alternative protein, alt-RPL36, translated from the same transcript.
\n\nIn this case the abnormal initiation codon, GUG, used to start the alternative protein. The viability of such a situation obviously depends on the biological function of the proteins involved, for which the reader is directed to the original publication.
\nThe situation regarding termination of translation is the same for prokaryotes and eukaryotes, and examples of an elongated forms of a protein was first shown in the 70s for small RNA bacteriophages. Examples are also common in eukaryotic single-stranded RNA viruses, although less so in cellular mRNAs. There are two main mechanisms for a ribosome to continue past a termination codon. The first is termed ‘read-through’ in which the termination codon (a ‘leaky’ stop codon) is erroneously recognized by an aminoacyl-tRNA. The second involves ‘frameshift’ — an erroneous (but specific) change of reading frame just before the termination codon. Readthrough and frameshift have been extensively reviewed, e.g. by Palemer and LeJeune. An example of readthrough in Drosophila is shown below for a component of a ubiquitin ligase:
\n\n[‘X’ indicates an unknown amino acid inserted at the stop codon.]
\nA Final Example
\nI managed to find a gene or genes to illustrate three of the four cases in the initial figure. This is Syn, the Drosophila gene for synapsin:
Protein Syn-PE is the product using the first AUG and stop codon, whereas Syn-PF (from the same transcript) is produced by skipping both of these, and is thus an example of (a). Syn-PD is the longest protein, produced by reading through the first stop codon, so it nests within it Syn-PA, produced by skipping the first AUG. This is an example of (b). Syn-PA is actually produced from a different (terminally truncated) transcript, but this would not appear to contribute to the type of protein produced.
\nThe gene, Syn, contains another gene, Timp, in the opposite direction. The coding region of the latter (composed of several exons) is contained entirely within an intron of Syn — an example of (d)
\n\nThe protein-coding regions of the RNA transcripts in the diagram are indicated in orange.
\n", "answer_id": 118041, "answer_text": "Short Answer\n\nAlthough the definition of the term gene is open to debate, in answer to what I feel is the most likely meaning of the original poster’s question:\n\n\n\n\n“Yes. Cases do exist in which a region of DNA can be transcribed and translated to produce two different proteins in which a part of the amino acid sequence of each is encoded by the same stretch of the DNA.”\n\n\n\n\nOne description of this situation is Overlapping Genes, and a review of such genes is provided in a 2022 Nature review by Wright et al., entitled “Overlapping genes in natural and engineered genomes” (https://doi.org/10.1038/s41576-021-00417-w).\n\n\n\n\nComplexity of the question\n\nThere are a number of complicating factors in considering overlapping genes in general, only some of which apply to this situation:\n\n\n\n\n\nProkaryotes or Eukaryotes? — these differ in their RNA transcripts and their translation\n\n\n\n\nSame or different mRNAs producing the two proteins?\n\n\n\n\nSame or different direction for the gene (i.e. DNA strand transcribed)\n\n\n\n\nIf same mRNA, is same reading frame used?\n\n\n\n\nOverlap of protein-encoding regions of mRNA or overlap with untranslated region of mRNA?\n\n\n\n\n\nThe review by Wright et al. includes a figure illustrating some of these possibilities, a modified section of which I reproduce below. (It also makes a distinction between overlapping and nested genes.) The poster’s question is clearly framed in terms of (a) in the figure, so I shall focus on that initially.\n\n\n\n\n[image: Types of gene overlap and nesting; source: https://i.sstatic.net/IIFGGJWk.png] (https://i.sstatic.net/IIFGGJWk.png)\n\n\n\n\nWhy are examples of gene overlap uncommon?\n\nThe information that such overlaps can occur is of much less value than knowing what problems lead them to being uncommon and how these problems are overcome. The key point is that there are specific signals for initiating and translating part of the mRNA into protein — in effect, ‘rules’ for where the protein starts and stops. Overlapping protein products translated from the same mRNA would require the rules to be broken.\n\n\n\n\nThe problem with overlapping proteins translated in different directions ((c) and (d)) is the unlikelihood that both translations could encode functional proteins, and, even if they did, evolutionary changes in one could have deleterious effects on the other. The same problem is encountered if different reading frames are used to translate a single mRNA in the same direction.\n\n\n\n\nOvercoming the problems\n\nFor situation (a) let us simplify by assuming there is a common mRNA for two protein products (always true for prokaryotes, as far as I am aware).\n\n\n\n\nIn most prokaryotes there is a site just 5′ to the initiating AUG codon (RBS or Shine–Dalgarno sequence) to which the small ribosomal subunit binds. In order to have alternative AUG starting codons, as in (a) (or (b)), there would have to be alternative ribosome binding sites, the second within the coding sequence specifying the first protein product. Such dual function is not impossible, but I am unaware of any examples of it.\n\n\n\n\nIn eukaryotes an initiation complex of the small ribosomal subunit and the initiator tRNA normally binds to the 5’ methylated cap of the mRNA and then scans along the mRNA, initiating translation at the first AUG or the first AUG in a ‘suitable context’. The difference between a ‘suitable’ and ‘unsuitable’ context for an initiating AUG is not always clear-cut, and this leads to situations where, for the same mRNA, some ribosomes initiate at the first AUG and others at the second (or subsequent) AUG, leading to different proteins.\n\n\n\n\n[image: Alternative AUGs in eukaryotic initiation; source: https://i.sstatic.net/kEXMhKOb.jpg] (https://i.sstatic.net/kEXMhKOb.jpg)\n\n\n\n\nExamples in the genome of Drosophila melanogaster (https://doi.org/10.1534/g3.115.018937) have been well documented.\nThe two forms of the Drosophila Apoptotic signal-regulating kinase 1 are illustrated below:\n\n\n\n\n[image: Example of alternative inititiation Ask1; source: https://i.sstatic.net/9kQCvBKN.png] (https://i.sstatic.net/9kQCvBKN.png)\n\n\n\n\nIt can seen that form B of the protein starts at amino acid 169 of form C, although both terminate at the same position. The nomenclature indicates that the proteins are, in fact, considered as variant products of the same gene, Ask1.\n\n\n\n\nIn this and all the other examples of which I am aware in Drosophila the alternative AUG is in the same reading frame as the first one. Although I have already mentioned the problem if the same stretch of DNA encoded entirely different proteins, there is at least one reported exampl. This involves the human ribosomal protein gene RPL36, and an alternative protein, alt-RPL36, translated from the same transcript.\n\n\n\n\n[image: RPL36 and alt-RPL36; source: https://i.sstatic.net/UD6dhazE.png] (https://i.sstatic.net/UD6dhazE.png)\n\n\n\n\nIn this case the abnormal initiation codon, GUG, used to start the alternative protein. The viability of such a situation obviously depends on the biological function of the proteins involved, for which the reader is directed to the original publication (https://doi.org/10.1038/s41467-020-20841-6).\n\n\n\n\nThe situation regarding termination of translation is the same for prokaryotes and eukaryotes, and examples of an elongated forms of a protein was first shown in the 70s for small RNA bacteriophages. Examples are also common in eukaryotic single-stranded RNA viruses, although less so in cellular mRNAs. There are two main mechanisms for a ribosome to continue past a termination codon. The first is termed ‘read-through’ in which the termination codon (a ‘leaky’ stop codon) is erroneously recognized by an aminoacyl-tRNA. The second involves ‘frameshift’ — an erroneous (but specific) change of reading frame just before the termination codon. Readthrough and frameshift have been extensively reviewed, e.g. by Palemer and LeJeune (https://doi.org/10.1111/brv.12657). An example of readthrough in Drosophila is shown below for a component of a ubiquitin ligase:\n\n\n\n\n[image: Readthrough example in Drosophila; source: https://i.sstatic.net/V0lLbcrt.png] (https://i.sstatic.net/V0lLbcrt.png)\n\n\n\n\n[‘X’ indicates an unknown amino acid inserted at the stop codon.]\n\n\n\n\nA Final Example\n\nI managed to find a gene or genes to illustrate three of the four cases in the initial figure. This is Syn, the Drosophila gene for synapsin:\n\n\n\n\n[image: Drosophila Synapsins; source: https://i.sstatic.net/iVAI5JAj.png] (https://i.sstatic.net/iVAI5JAj.png)\n\n\n\n\nProtein Syn-PE is the product using the first AUG and stop codon, whereas Syn-PF (from the same transcript) is produced by skipping both of these, and is thus an example of (a). Syn-PD is the longest protein, produced by reading through the first stop codon, so it nests within it Syn-PA, produced by skipping the first AUG. This is an example of (b). Syn-PA is actually produced from a different (terminally truncated) transcript, but this would not appear to contribute to the type of protein produced.\n\n\n\n\nThe gene, Syn, contains another gene, Timp, in the opposite direction. The coding region of the latter (composed of several exons) is contained entirely within an intron of Syn — an example of (d)\n\n\n\n\n[image: Syn / Timp gene overlap; source: https://i.sstatic.net/E4BaU9uZ.png] (https://i.sstatic.net/E4BaU9uZ.png)\n\n\n\n\nThe protein-coding regions of the RNA transcripts in the diagram are indicated in orange.", "answer_url": "https://biology.stackexchange.com/a/118041", "author": "David", "author_url": "https://biology.stackexchange.com/users/22057/david", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2025-10-22T14:58:28+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:16.948131+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/46a41fae37d5c2c243f9abcbf6829a0045f46a51c624fbba2b897c320cdcba71_0.json", "raw_sha256": "e039e310d0106dc61f992ee05bbb0b0b57ded1c5092f97df2c52989edd5eaf68", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/118153;118142;118137;118126;118122;118117;118113;118102;118099;118097;118094;118081;118076;118072;118069;118065;118059;118056;118043;118039;118036;118030;118029;118025;118022;118018;117994;117992;117990;117987;117983;117981;117975;117971;117956;117953;117951;117945;117943;117941;117934;117926;117924;117920;117916;117914;117907;117892;117889;117887;117883;117876;117872;117867;117861;117860;117856;117855;117850;117849;117844;117840;117833;117821;117819;117817;117815;117814;117805;117794;117782;117774;117771;117767;117766;117761;117759;117756;117747;117732;117726;117724;117709;117701;117694;117693;117681;117680;117677;117671;117668;117664;117662;117659;117651;117641;117632;117624;117623;117607/answers?filter=withbody&order=asc&page=1&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 118030, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "David", "profile_url": "https://biology.stackexchange.com/users/22057/david", "user_type": "registered"}, "created_at": "2025-10-22T14:58:28+00:00", "raw_file": "raw/codex_api_v1/c1f1c77b4be84acc978369dace8896d84167a5ca52eb6711a00d4b338d7f0104_1790824159864978900_0.json", "raw_sha256": "5798821fb87997611f2dd8389abcef2303f9edc567f4cd87a06a697319e695cd", "revision_guid": "F5F9C4F0-1A35-413E-A982-604A4077F37D", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/F5F9C4F0-1A35-413E-A982-604A4077F37D/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "David", "profile_url": "https://biology.stackexchange.com/users/22057/david", "user_type": "registered"}, "created_at": "2025-10-23T09:43:23+00:00", "raw_file": "raw/codex_api_v1/c1f1c77b4be84acc978369dace8896d84167a5ca52eb6711a00d4b338d7f0104_1790824159864978900_0.json", "raw_sha256": "5798821fb87997611f2dd8389abcef2303f9edc567f4cd87a06a697319e695cd", "revision_guid": "FA837F22-1CFB-4ECB-9EE4-CDB286C3E793", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/FA837F22-1CFB-4ECB-9EE4-CDB286C3E793/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "David", "profile_url": "https://biology.stackexchange.com/users/22057/david", "user_type": "registered"}, "created_at": "2025-10-23T15:07:39+00:00", "raw_file": "raw/codex_api_v1/c1f1c77b4be84acc978369dace8896d84167a5ca52eb6711a00d4b338d7f0104_1790824159864978900_0.json", "raw_sha256": "5798821fb87997611f2dd8389abcef2303f9edc567f4cd87a06a697319e695cd", "revision_guid": "3E779E18-2165-438C-807B-4E06CB91EB06", "revision_number": 3, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/3E779E18-2165-438C-807B-4E06CB91EB06/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "David", "profile_url": "https://biology.stackexchange.com/users/22057/david", "user_type": "registered"}, "created_at": "2025-10-23T15:29:26+00:00", "raw_file": "raw/codex_api_v1/c1f1c77b4be84acc978369dace8896d84167a5ca52eb6711a00d4b338d7f0104_1790824159864978900_0.json", "raw_sha256": "5798821fb87997611f2dd8389abcef2303f9edc567f4cd87a06a697319e695cd", "revision_guid": "B9365A76-737D-473D-83B1-6D78786F917C", "revision_number": 4, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/B9365A76-737D-473D-83B1-6D78786F917C/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "David", "profile_url": "https://biology.stackexchange.com/users/22057/david", "user_type": "registered"}, "created_at": "2025-10-23T15:42:36+00:00", "raw_file": "raw/codex_api_v1/c1f1c77b4be84acc978369dace8896d84167a5ca52eb6711a00d4b338d7f0104_1790824159864978900_0.json", "raw_sha256": "5798821fb87997611f2dd8389abcef2303f9edc567f4cd87a06a697319e695cd", "revision_guid": "C6A13355-DAEA-4BED-9EF6-178996F3A82A", "revision_number": 5, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/C6A13355-DAEA-4BED-9EF6-178996F3A82A/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "David", "profile_url": "https://biology.stackexchange.com/users/22057/david", "user_type": "registered"}, "created_at": "2025-10-27T15:40:29+00:00", "raw_file": "raw/codex_api_v1/c1f1c77b4be84acc978369dace8896d84167a5ca52eb6711a00d4b338d7f0104_1790824159864978900_0.json", "raw_sha256": "5798821fb87997611f2dd8389abcef2303f9edc567f4cd87a06a697319e695cd", "revision_guid": "9DAF8614-ADFA-496A-AD92-9F5AB2064C8C", "revision_number": 6, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/9DAF8614-ADFA-496A-AD92-9F5AB2064C8C/view-source"}], "score": 4, "updated_at": "2025-10-27T15:40:29+00:00"}], "ground_truth": "community signals only; no scientific truth label", "product": "ranking", "question": "Suppose you have a sequence of 130 nucleotides (nt) in a genome. Can there be two different genes in which, for example, the first starts at nt 10 and ends at nt 40 and the second starts at nt 30 and ends at nt 60? (Thus they will include the same section of the genome from nt 30 to nt 40) Or do all genes occupy exclusive sections of a genome?", "record_id": "Scientific-Answer-Ranking:biology:118030", "scores": [13, 4], "split": "holdout", "thread": {"accepted_answer_id": null, "answers": [{"answer_html": "Yes, these are known as nested genes, and there are actually several, even in the human genome. A paper I found while answering this question (Kumar, 2009) claims the human genome has 158 nested protein coding genes.
\nThe most common type of nested gene, at least in the human genome, is where one gene is found on the plus strand and another on the minus strand, with the smaller gene being in an intron of the larger one. For example, the human gene LPAR6 is contained entirely within the human gene RB1, but RB1 is on the forward strand and LPAR6 on the reverse. See the UCSC genome browser:
\n\nThe same article I linked to earlier also describes another kind of nested gene where the smaller gene falls in an exon of the larger one. This is rarer in metazoans, but does exist.
\nFinally, microbial genomes seem to have many overlapping genes that share coding sequence. See Johnson and Chisholm, 2004
\nShort Answer
\nAlthough the definition of the term gene is open to debate, in answer to what I feel is the most likely meaning of the original poster’s question:
“Yes. Cases do exist in which a region of DNA can be transcribed and translated to produce two different proteins in which a part of the amino acid sequence of each is encoded by the same stretch of the DNA.”
\nOne description of this situation is Overlapping Genes, and a review of such genes is provided in a 2022 Nature review by Wright et al., entitled “Overlapping genes in natural and engineered genomes”.
\nComplexity of the question
\nThere are a number of complicating factors in considering overlapping genes in general, only some of which apply to this situation:
The review by Wright et al. includes a figure illustrating some of these possibilities, a modified section of which I reproduce below. (It also makes a distinction between overlapping and nested genes.) The poster’s question is clearly framed in terms of (a) in the figure, so I shall focus on that initially.
\n\nWhy are examples of gene overlap uncommon?
\nThe information that such overlaps can occur is of much less value than knowing what problems lead them to being uncommon and how these problems are overcome. The key point is that there are specific signals for initiating and translating part of the mRNA into protein — in effect, ‘rules’ for where the protein starts and stops. Overlapping protein products translated from the same mRNA would require the rules to be broken.
The problem with overlapping proteins translated in different directions ((c) and (d)) is the unlikelihood that both translations could encode functional proteins, and, even if they did, evolutionary changes in one could have deleterious effects on the other. The same problem is encountered if different reading frames are used to translate a single mRNA in the same direction.
\nOvercoming the problems
\nFor situation (a) let us simplify by assuming there is a common mRNA for two protein products (always true for prokaryotes, as far as I am aware).
In most prokaryotes there is a site just 5′ to the initiating AUG codon (RBS or Shine–Dalgarno sequence) to which the small ribosomal subunit binds. In order to have alternative AUG starting codons, as in (a) (or (b)), there would have to be alternative ribosome binding sites, the second within the coding sequence specifying the first protein product. Such dual function is not impossible, but I am unaware of any examples of it.
\nIn eukaryotes an initiation complex of the small ribosomal subunit and the initiator tRNA normally binds to the 5’ methylated cap of the mRNA and then scans along the mRNA, initiating translation at the first AUG or the first AUG in a ‘suitable context’. The difference between a ‘suitable’ and ‘unsuitable’ context for an initiating AUG is not always clear-cut, and this leads to situations where, for the same mRNA, some ribosomes initiate at the first AUG and others at the second (or subsequent) AUG, leading to different proteins.
\n\nExamples in the genome of Drosophila melanogaster have been well documented.\nThe two forms of the Drosophila Apoptotic signal-regulating kinase 1 are illustrated below:
\n\nIt can seen that form B of the protein starts at amino acid 169 of form C, although both terminate at the same position. The nomenclature indicates that the proteins are, in fact, considered as variant products of the same gene, Ask1.
\nIn this and all the other examples of which I am aware in Drosophila the alternative AUG is in the same reading frame as the first one. Although I have already mentioned the problem if the same stretch of DNA encoded entirely different proteins, there is at least one reported exampl. This involves the human ribosomal protein gene RPL36, and an alternative protein, alt-RPL36, translated from the same transcript.
\n\nIn this case the abnormal initiation codon, GUG, used to start the alternative protein. The viability of such a situation obviously depends on the biological function of the proteins involved, for which the reader is directed to the original publication.
\nThe situation regarding termination of translation is the same for prokaryotes and eukaryotes, and examples of an elongated forms of a protein was first shown in the 70s for small RNA bacteriophages. Examples are also common in eukaryotic single-stranded RNA viruses, although less so in cellular mRNAs. There are two main mechanisms for a ribosome to continue past a termination codon. The first is termed ‘read-through’ in which the termination codon (a ‘leaky’ stop codon) is erroneously recognized by an aminoacyl-tRNA. The second involves ‘frameshift’ — an erroneous (but specific) change of reading frame just before the termination codon. Readthrough and frameshift have been extensively reviewed, e.g. by Palemer and LeJeune. An example of readthrough in Drosophila is shown below for a component of a ubiquitin ligase:
\n\n[‘X’ indicates an unknown amino acid inserted at the stop codon.]
\nA Final Example
\nI managed to find a gene or genes to illustrate three of the four cases in the initial figure. This is Syn, the Drosophila gene for synapsin:
Protein Syn-PE is the product using the first AUG and stop codon, whereas Syn-PF (from the same transcript) is produced by skipping both of these, and is thus an example of (a). Syn-PD is the longest protein, produced by reading through the first stop codon, so it nests within it Syn-PA, produced by skipping the first AUG. This is an example of (b). Syn-PA is actually produced from a different (terminally truncated) transcript, but this would not appear to contribute to the type of protein produced.
\nThe gene, Syn, contains another gene, Timp, in the opposite direction. The coding region of the latter (composed of several exons) is contained entirely within an intron of Syn — an example of (d)
\n\nThe protein-coding regions of the RNA transcripts in the diagram are indicated in orange.
\n", "answer_id": 118041, "answer_text": "Short Answer\n\nAlthough the definition of the term gene is open to debate, in answer to what I feel is the most likely meaning of the original poster’s question:\n\n\n\n\n“Yes. Cases do exist in which a region of DNA can be transcribed and translated to produce two different proteins in which a part of the amino acid sequence of each is encoded by the same stretch of the DNA.”\n\n\n\n\nOne description of this situation is Overlapping Genes, and a review of such genes is provided in a 2022 Nature review by Wright et al., entitled “Overlapping genes in natural and engineered genomes” (https://doi.org/10.1038/s41576-021-00417-w).\n\n\n\n\nComplexity of the question\n\nThere are a number of complicating factors in considering overlapping genes in general, only some of which apply to this situation:\n\n\n\n\n\nProkaryotes or Eukaryotes? — these differ in their RNA transcripts and their translation\n\n\n\n\nSame or different mRNAs producing the two proteins?\n\n\n\n\nSame or different direction for the gene (i.e. DNA strand transcribed)\n\n\n\n\nIf same mRNA, is same reading frame used?\n\n\n\n\nOverlap of protein-encoding regions of mRNA or overlap with untranslated region of mRNA?\n\n\n\n\n\nThe review by Wright et al. includes a figure illustrating some of these possibilities, a modified section of which I reproduce below. (It also makes a distinction between overlapping and nested genes.) The poster’s question is clearly framed in terms of (a) in the figure, so I shall focus on that initially.\n\n\n\n\n[image: Types of gene overlap and nesting; source: https://i.sstatic.net/IIFGGJWk.png] (https://i.sstatic.net/IIFGGJWk.png)\n\n\n\n\nWhy are examples of gene overlap uncommon?\n\nThe information that such overlaps can occur is of much less value than knowing what problems lead them to being uncommon and how these problems are overcome. The key point is that there are specific signals for initiating and translating part of the mRNA into protein — in effect, ‘rules’ for where the protein starts and stops. Overlapping protein products translated from the same mRNA would require the rules to be broken.\n\n\n\n\nThe problem with overlapping proteins translated in different directions ((c) and (d)) is the unlikelihood that both translations could encode functional proteins, and, even if they did, evolutionary changes in one could have deleterious effects on the other. The same problem is encountered if different reading frames are used to translate a single mRNA in the same direction.\n\n\n\n\nOvercoming the problems\n\nFor situation (a) let us simplify by assuming there is a common mRNA for two protein products (always true for prokaryotes, as far as I am aware).\n\n\n\n\nIn most prokaryotes there is a site just 5′ to the initiating AUG codon (RBS or Shine–Dalgarno sequence) to which the small ribosomal subunit binds. In order to have alternative AUG starting codons, as in (a) (or (b)), there would have to be alternative ribosome binding sites, the second within the coding sequence specifying the first protein product. Such dual function is not impossible, but I am unaware of any examples of it.\n\n\n\n\nIn eukaryotes an initiation complex of the small ribosomal subunit and the initiator tRNA normally binds to the 5’ methylated cap of the mRNA and then scans along the mRNA, initiating translation at the first AUG or the first AUG in a ‘suitable context’. The difference between a ‘suitable’ and ‘unsuitable’ context for an initiating AUG is not always clear-cut, and this leads to situations where, for the same mRNA, some ribosomes initiate at the first AUG and others at the second (or subsequent) AUG, leading to different proteins.\n\n\n\n\n[image: Alternative AUGs in eukaryotic initiation; source: https://i.sstatic.net/kEXMhKOb.jpg] (https://i.sstatic.net/kEXMhKOb.jpg)\n\n\n\n\nExamples in the genome of Drosophila melanogaster (https://doi.org/10.1534/g3.115.018937) have been well documented.\nThe two forms of the Drosophila Apoptotic signal-regulating kinase 1 are illustrated below:\n\n\n\n\n[image: Example of alternative inititiation Ask1; source: https://i.sstatic.net/9kQCvBKN.png] (https://i.sstatic.net/9kQCvBKN.png)\n\n\n\n\nIt can seen that form B of the protein starts at amino acid 169 of form C, although both terminate at the same position. The nomenclature indicates that the proteins are, in fact, considered as variant products of the same gene, Ask1.\n\n\n\n\nIn this and all the other examples of which I am aware in Drosophila the alternative AUG is in the same reading frame as the first one. Although I have already mentioned the problem if the same stretch of DNA encoded entirely different proteins, there is at least one reported exampl. This involves the human ribosomal protein gene RPL36, and an alternative protein, alt-RPL36, translated from the same transcript.\n\n\n\n\n[image: RPL36 and alt-RPL36; source: https://i.sstatic.net/UD6dhazE.png] (https://i.sstatic.net/UD6dhazE.png)\n\n\n\n\nIn this case the abnormal initiation codon, GUG, used to start the alternative protein. The viability of such a situation obviously depends on the biological function of the proteins involved, for which the reader is directed to the original publication (https://doi.org/10.1038/s41467-020-20841-6).\n\n\n\n\nThe situation regarding termination of translation is the same for prokaryotes and eukaryotes, and examples of an elongated forms of a protein was first shown in the 70s for small RNA bacteriophages. Examples are also common in eukaryotic single-stranded RNA viruses, although less so in cellular mRNAs. There are two main mechanisms for a ribosome to continue past a termination codon. The first is termed ‘read-through’ in which the termination codon (a ‘leaky’ stop codon) is erroneously recognized by an aminoacyl-tRNA. The second involves ‘frameshift’ — an erroneous (but specific) change of reading frame just before the termination codon. Readthrough and frameshift have been extensively reviewed, e.g. by Palemer and LeJeune (https://doi.org/10.1111/brv.12657). An example of readthrough in Drosophila is shown below for a component of a ubiquitin ligase:\n\n\n\n\n[image: Readthrough example in Drosophila; source: https://i.sstatic.net/V0lLbcrt.png] (https://i.sstatic.net/V0lLbcrt.png)\n\n\n\n\n[‘X’ indicates an unknown amino acid inserted at the stop codon.]\n\n\n\n\nA Final Example\n\nI managed to find a gene or genes to illustrate three of the four cases in the initial figure. This is Syn, the Drosophila gene for synapsin:\n\n\n\n\n[image: Drosophila Synapsins; source: https://i.sstatic.net/iVAI5JAj.png] (https://i.sstatic.net/iVAI5JAj.png)\n\n\n\n\nProtein Syn-PE is the product using the first AUG and stop codon, whereas Syn-PF (from the same transcript) is produced by skipping both of these, and is thus an example of (a). Syn-PD is the longest protein, produced by reading through the first stop codon, so it nests within it Syn-PA, produced by skipping the first AUG. This is an example of (b). Syn-PA is actually produced from a different (terminally truncated) transcript, but this would not appear to contribute to the type of protein produced.\n\n\n\n\nThe gene, Syn, contains another gene, Timp, in the opposite direction. The coding region of the latter (composed of several exons) is contained entirely within an intron of Syn — an example of (d)\n\n\n\n\n[image: Syn / Timp gene overlap; source: https://i.sstatic.net/E4BaU9uZ.png] (https://i.sstatic.net/E4BaU9uZ.png)\n\n\n\n\nThe protein-coding regions of the RNA transcripts in the diagram are indicated in orange.", "answer_url": "https://biology.stackexchange.com/a/118041", "author": "David", "author_url": "https://biology.stackexchange.com/users/22057/david", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2025-10-22T14:58:28+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:16.948131+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/46a41fae37d5c2c243f9abcbf6829a0045f46a51c624fbba2b897c320cdcba71_0.json", "raw_sha256": "e039e310d0106dc61f992ee05bbb0b0b57ded1c5092f97df2c52989edd5eaf68", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/118153;118142;118137;118126;118122;118117;118113;118102;118099;118097;118094;118081;118076;118072;118069;118065;118059;118056;118043;118039;118036;118030;118029;118025;118022;118018;117994;117992;117990;117987;117983;117981;117975;117971;117956;117953;117951;117945;117943;117941;117934;117926;117924;117920;117916;117914;117907;117892;117889;117887;117883;117876;117872;117867;117861;117860;117856;117855;117850;117849;117844;117840;117833;117821;117819;117817;117815;117814;117805;117794;117782;117774;117771;117767;117766;117761;117759;117756;117747;117732;117726;117724;117709;117701;117694;117693;117681;117680;117677;117671;117668;117664;117662;117659;117651;117641;117632;117624;117623;117607/answers?filter=withbody&order=asc&page=1&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 118030, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "David", "profile_url": "https://biology.stackexchange.com/users/22057/david", "user_type": "registered"}, "created_at": "2025-10-22T14:58:28+00:00", "raw_file": "raw/codex_api_v1/c1f1c77b4be84acc978369dace8896d84167a5ca52eb6711a00d4b338d7f0104_1790824159864978900_0.json", "raw_sha256": "5798821fb87997611f2dd8389abcef2303f9edc567f4cd87a06a697319e695cd", "revision_guid": "F5F9C4F0-1A35-413E-A982-604A4077F37D", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/F5F9C4F0-1A35-413E-A982-604A4077F37D/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "David", "profile_url": "https://biology.stackexchange.com/users/22057/david", "user_type": "registered"}, "created_at": "2025-10-23T09:43:23+00:00", "raw_file": "raw/codex_api_v1/c1f1c77b4be84acc978369dace8896d84167a5ca52eb6711a00d4b338d7f0104_1790824159864978900_0.json", "raw_sha256": "5798821fb87997611f2dd8389abcef2303f9edc567f4cd87a06a697319e695cd", "revision_guid": "FA837F22-1CFB-4ECB-9EE4-CDB286C3E793", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/FA837F22-1CFB-4ECB-9EE4-CDB286C3E793/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "David", "profile_url": "https://biology.stackexchange.com/users/22057/david", "user_type": "registered"}, "created_at": "2025-10-23T15:07:39+00:00", "raw_file": "raw/codex_api_v1/c1f1c77b4be84acc978369dace8896d84167a5ca52eb6711a00d4b338d7f0104_1790824159864978900_0.json", "raw_sha256": "5798821fb87997611f2dd8389abcef2303f9edc567f4cd87a06a697319e695cd", "revision_guid": "3E779E18-2165-438C-807B-4E06CB91EB06", "revision_number": 3, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/3E779E18-2165-438C-807B-4E06CB91EB06/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "David", "profile_url": "https://biology.stackexchange.com/users/22057/david", "user_type": "registered"}, "created_at": "2025-10-23T15:29:26+00:00", "raw_file": "raw/codex_api_v1/c1f1c77b4be84acc978369dace8896d84167a5ca52eb6711a00d4b338d7f0104_1790824159864978900_0.json", "raw_sha256": "5798821fb87997611f2dd8389abcef2303f9edc567f4cd87a06a697319e695cd", "revision_guid": "B9365A76-737D-473D-83B1-6D78786F917C", "revision_number": 4, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/B9365A76-737D-473D-83B1-6D78786F917C/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "David", "profile_url": "https://biology.stackexchange.com/users/22057/david", "user_type": "registered"}, "created_at": "2025-10-23T15:42:36+00:00", "raw_file": "raw/codex_api_v1/c1f1c77b4be84acc978369dace8896d84167a5ca52eb6711a00d4b338d7f0104_1790824159864978900_0.json", "raw_sha256": "5798821fb87997611f2dd8389abcef2303f9edc567f4cd87a06a697319e695cd", "revision_guid": "C6A13355-DAEA-4BED-9EF6-178996F3A82A", "revision_number": 5, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/C6A13355-DAEA-4BED-9EF6-178996F3A82A/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "David", "profile_url": "https://biology.stackexchange.com/users/22057/david", "user_type": "registered"}, "created_at": "2025-10-27T15:40:29+00:00", "raw_file": "raw/codex_api_v1/c1f1c77b4be84acc978369dace8896d84167a5ca52eb6711a00d4b338d7f0104_1790824159864978900_0.json", "raw_sha256": "5798821fb87997611f2dd8389abcef2303f9edc567f4cd87a06a697319e695cd", "revision_guid": "9DAF8614-ADFA-496A-AD92-9F5AB2064C8C", "revision_number": 6, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/9DAF8614-ADFA-496A-AD92-9F5AB2064C8C/view-source"}], "score": 4, "updated_at": "2025-10-27T15:40:29+00:00"}], "domain": "biology", "external_links": ["https://doi.org/10.1038/s41467-020-20841-6", "https://doi.org/10.1038/s41576-021-00417-w", "https://doi.org/10.1101/gr.2433104", "https://doi.org/10.1111/brv.12657", "https://doi.org/10.1128/ec.00143-09", "https://doi.org/10.1186/1471-2164-9-169", "https://doi.org/10.1534/g3.115.018937", "https://en.wikipedia.org/wiki/Nested_gene", "https://genome.ucsc.edu/cgi-bin/hgTracks?db=hg38&lastVirtModeType=default&lastVirtModeExtraState=&virtModeType=default&virtMode=0&nonVirtPosition=&position=chr13%3A48303751%2D48481890&hgsid=3253448463_8qD6NWIOxcvqyxqB99itbgaASxGP", "https://i.sstatic.net/7Y0zIHeK.png", "https://i.sstatic.net/9kQCvBKN.png", "https://i.sstatic.net/E4BaU9uZ.png", "https://i.sstatic.net/IIFGGJWk.png", "https://i.sstatic.net/UD6dhazE.png", "https://i.sstatic.net/V0lLbcrt.png", "https://i.sstatic.net/iVAI5JAj.png", "https://i.sstatic.net/kEXMhKOb.jpg"], "medical_sensitive": false, "patient_specific": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:01.208074+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/f1b387b48f36041f506f18fa9796531023c7eae1e796ec622ad56833c02bea98_0.json", "raw_sha256": "3f8214c87c0fe16dd016324597332ca392e0ba98600877cc746483ef492ce03d", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/search/advanced?answers=1&filter=withbody&order=desc&page=2&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_author": "Root Groves", "question_author_url": "https://biology.stackexchange.com/users/78184/root-groves", "question_author_user_type": "registered", "question_created_at": "2025-10-17T13:36:28+00:00", "question_html": "Suppose you have a sequence of 130 nucleotides (nt) in a genome. Can there be two different genes in which, for example, the first starts at nt 10 and ends at nt 40 and the second starts at nt 30 and ends at nt 60? (Thus they will include the same section of the genome from nt 30 to nt 40) Or do all genes occupy exclusive sections of a genome?
\n", "question_id": 118030, "question_license": "CC BY-SA 4.0", "question_score": 12, "question_text": "Suppose you have a sequence of 130 nucleotides (nt) in a genome. Can there be two different genes in which, for example, the first starts at nt 10 and ends at nt 40 and the second starts at nt 30 and ends at nt 60? (Thus they will include the same section of the genome from nt 30 to nt 40) Or do all genes occupy exclusive sections of a genome?", "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Root Groves", "profile_url": "https://biology.stackexchange.com/users/78184/root-groves", "user_type": "registered"}, "created_at": "2025-10-17T13:36:28+00:00", "raw_file": "raw/codex_api_v1/c1f1c77b4be84acc978369dace8896d84167a5ca52eb6711a00d4b338d7f0104_1790824159864978900_0.json", "raw_sha256": "5798821fb87997611f2dd8389abcef2303f9edc567f4cd87a06a697319e695cd", "revision_guid": "2423E323-9CBE-4587-B6E3-DACB2CCAB2D1", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/2423E323-9CBE-4587-B6E3-DACB2CCAB2D1/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Shayan", "profile_url": "https://biology.stackexchange.com/users/114723/shayan", "user_type": "registered"}, "created_at": "2025-10-17T13:46:29+00:00", "raw_file": "raw/codex_api_v1/c1f1c77b4be84acc978369dace8896d84167a5ca52eb6711a00d4b338d7f0104_1790824159864978900_0.json", "raw_sha256": "5798821fb87997611f2dd8389abcef2303f9edc567f4cd87a06a697319e695cd", "revision_guid": "CE9187C3-9651-49B6-8BD3-ABEF518DE2AD", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/CE9187C3-9651-49B6-8BD3-ABEF518DE2AD/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Root Groves", "profile_url": "https://biology.stackexchange.com/users/78184/root-groves", "user_type": "registered"}, "created_at": "2025-10-17T13:47:02+00:00", "raw_file": "raw/codex_api_v1/c1f1c77b4be84acc978369dace8896d84167a5ca52eb6711a00d4b338d7f0104_1790824159864978900_0.json", "raw_sha256": "5798821fb87997611f2dd8389abcef2303f9edc567f4cd87a06a697319e695cd", "revision_guid": "3800C50E-6A9A-46B0-9F31-ACF3AAFFC50D", "revision_number": 3, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/3800C50E-6A9A-46B0-9F31-ACF3AAFFC50D/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Shayan", "profile_url": "https://biology.stackexchange.com/users/114723/shayan", "user_type": "registered"}, "created_at": "2025-10-17T13:54:23+00:00", "raw_file": "raw/codex_api_v1/c1f1c77b4be84acc978369dace8896d84167a5ca52eb6711a00d4b338d7f0104_1790824159864978900_0.json", "raw_sha256": "5798821fb87997611f2dd8389abcef2303f9edc567f4cd87a06a697319e695cd", "revision_guid": "7ABBD05C-D2B2-4E97-B5A8-52627FCD0027", "revision_number": 4, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/7ABBD05C-D2B2-4E97-B5A8-52627FCD0027/view-source"}, {"content_license": null, "contributor": {"display_name": "[deleted/unavailable user]", "profile_url": null, "user_type": "does_not_exist"}, "created_at": "2025-10-17T21:45:44+00:00", "raw_file": "raw/codex_api_v1/c1f1c77b4be84acc978369dace8896d84167a5ca52eb6711a00d4b338d7f0104_1790824159864978900_0.json", "raw_sha256": "5798821fb87997611f2dd8389abcef2303f9edc567f4cd87a06a697319e695cd", "revision_guid": "E4A90C5D-E6B8-4587-9603-8846C699C392", "revision_number": null, "revision_type": "vote_based", "revision_url": "https://biology.stackexchange.com/revisions/E4A90C5D-E6B8-4587-9603-8846C699C392/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "David", "profile_url": "https://biology.stackexchange.com/users/22057/david", "user_type": "registered"}, "created_at": "2025-10-18T18:36:42+00:00", "raw_file": "raw/codex_api_v1/c1f1c77b4be84acc978369dace8896d84167a5ca52eb6711a00d4b338d7f0104_1790824159864978900_0.json", "raw_sha256": "5798821fb87997611f2dd8389abcef2303f9edc567f4cd87a06a697319e695cd", "revision_guid": "1534053C-3D62-4C59-A6FB-D404C1E4A596", "revision_number": 5, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/1534053C-3D62-4C59-A6FB-D404C1E4A596/view-source"}], "source_site": "biology", "source_url": "https://biology.stackexchange.com/questions/118030/can-genes-overlap", "split": "holdout", "split_group": "0b793049e1e57b5fc8e6cdbce5973537243bec75d85808c1d6a0d3c0893d2336", "tags": ["genomics", "gene"], "thread_id": "biology:118030", "title": "Can genes overlap?"}} {"accepted_status": [false, true], "candidate_answers": [{"answer_html": "Each lobe typically contains two theca, meaning a typical anther has four theca in total, each theca then contains two microsporangia. The lobe is composed of two theca, two pairs of microsporangia, separated by the stomium, which is an area of dehiscence.
\n", "answer_id": 116274, "answer_text": "Each lobe typically contains two theca, meaning a typical anther has four theca in total, each theca then contains two microsporangia. The lobe is composed of two theca, two pairs of microsporangia, separated by the stomium, which is an area of dehiscence.", "answer_url": "https://biology.stackexchange.com/a/116274", "author": "Moracen", "author_url": "https://biology.stackexchange.com/users/103307/moracen", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2025-03-24T07:52:39+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:19.947691+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/df693642d727b738d2a533740632235c18a06cefec7a1e337c9589214a4ec91e_0.json", "raw_sha256": "9df534f437f3b2f12d33db8536999ec4e6ffa10f2f59394799d9fe01c3c1ad16", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/117606;117602;117598;117594;117585;117579;117570;117568;117565;117559;117558;117555;117552;117548;117538;117524;117523;117522;117520;117515;117510;116509;116508;116504;116499;116491;116485;116483;116461;116454;116453;116445;116441;116435;116430;116426;116425;116414;116412;116406;116401;116399;116396;116395;116394;116392;116389;116384;116370;116367;116363;116361;116352;116351;116347;116345;116343;116338;116337;116332;116331;116324;116320;116316;116314;116312;116306;116292;116290;116284;116280;116277;116271;116270;116268;116267;116257;116256;116253;116250;116249;116240;116237;116233;116219;116214;116212;116205;116204;116200;116198;116187;116184;116173;116172;116167;116162;116149;116142;116129/answers?filter=withbody&order=asc&page=1&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 116268, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Moracen", "profile_url": "https://biology.stackexchange.com/users/103307/moracen", "user_type": "registered"}, "created_at": "2025-03-24T07:52:39+00:00", "raw_file": "raw/codex_api_v1/6a8d1217a71337b035f168c28f3cef00c95606938297595ce7816a6ee2aabc47_1790824139846857200_0.json", "raw_sha256": "915362f28bff22e7e44f536acc7b10e33f23a77bbb5e547906a8fdc7cf7e3e89", "revision_guid": "2C7B74B8-E717-475B-A40F-D1E072A4D55F", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/2C7B74B8-E717-475B-A40F-D1E072A4D55F/view-source"}], "score": 0, "updated_at": "2025-03-24T07:52:39+00:00"}, {"answer_html": "Wow, I'm not surprised there's confusion. For fairly basic botanical anatomy, there is a lot of variability out there about the answer.
\nTypical anthers have four microsporangia. This is probably the most consistent fact to keep in mind. These are labeled as #4 in the picture below. (Note that in this image the wall separating the two microsporangia of each lobe [the septum] has begun to split.)
\n
Most definitions I've seen say that the paired microsporangia make up the theca (#2 in the figure). So, the figure above has two thecae separated by the connective (#3).
\nWikipedia says that a theca consists of the surrounding tissue layers, such as the epidermis and tapetum (an inner layer of cells). New York Botanical Garden, NYBG, says that a theca is a chamber where the pollen is produced, "same as a pollen sac." (But note that the Wikipedia definition and the caption to the figure state that the pollen sac is the same as the microsporangium.)
\nThe Missouri Botanical Garden, MoBot, provides the Latin definition of theca: "that in which anything is enclosed, an envelope, hull, cover, case, sheath, etc." They agree with the NYBG in that thecae are "the pollen-producing sectors (microsporangia) of an anther, the pollen-sac."
\nThe NYBG discussion is a little more comprehensive. They point out that the number of thecae changes during development, stating:
\n\n\nIn neotropical [plant family] Lecythidaceae, up until near the time of anther dehiscence there are two anther thecae on each side of the anther connective but the walls between these thecae break down so there are only two thecae by the time the anthers dehisce (one on each side of the anther).
\n
As far as I can tell, there's nothing particularly unusual about the anthers of Lecythidaceae, so we can say that generally, while the microsporangia are still completely separated, an anther has four thecae. Then, when the septum has broken and the two microsporangia are fused, the anther has two thecae. (Think of the two microsporangia now forming "one chamber".)
\nAs for "lobes", I think it's still safe to say that each pair of microsporangia form a lobe (e.g., the left and right halves of the anther in the figure). This term is used a bit more casually. The more technical term is "bilocular". This implies two locules, but has the same difficulty as theca: the locules are the spaces within the chambers, and can go from four locules to two locules as the anther develops.
\nIt may also help to review pictures of developing anthers. Early in development the microsporangia are in the process of producing the pollen and there's not really any empty space within them. Only later do these areas actually become hollow as the pollen grains mature, and this hollow space is the locule.
\nImage by Ben Stefanowitsch - Created for Wikimedia Commons by Ben Stefanowitsch, CC BY-SA 2.5, https://commons.wikimedia.org/w/index.php?curid=703358
\n", "answer_id": 116276, "answer_text": "Wow, I'm not surprised there's confusion. For fairly basic botanical anatomy, there is a lot of variability out there about the answer.\n\n\n\n\nTypical anthers have four microsporangia. This is probably the most consistent fact to keep in mind. These are labeled as #4 in the picture below. (Note that in this image the wall separating the two microsporangia of each lobe [the septum] has begun to split.)\n\n\n\n\n[image: Schematic cross section of an anther. 1: Filament 2: Theca 3: Connective 4: Pollen sac (also known as sporangium); source: https://i.sstatic.net/8pvuHCTK.png]\n\n\n\n\nMost definitions I've seen say that the paired microsporangia make up the theca (#2 in the figure). So, the figure above has two thecae separated by the connective (#3).\n\n\n\n\nWikipedia (https://en.wikipedia.org/wiki/Theca) says that a theca consists of the surrounding tissue layers, such as the epidermis and tapetum (an inner layer of cells). New York Botanical Garden (https://sweetgum.nybg.org/science/glossary/glossary-details/?irn=3365), NYBG, says that a theca is a chamber where the pollen is produced, \"same as a pollen sac.\" (But note that the Wikipedia definition and the caption to the figure state that the pollen sac is the same as the microsporangium.)\n\n\n\n\nThe Missouri Botanical Garden (https://www.mobot.org/mobot/latindict/keyDetail.aspx?keyWord=tTeca), MoBot, provides the Latin definition of theca: \"that in which anything is enclosed, an envelope, hull, cover, case, sheath, etc.\" They agree with the NYBG in that thecae are \"the pollen-producing sectors (microsporangia) of an anther, the pollen-sac.\"\n\n\n\n\nThe NYBG discussion is a little more comprehensive. They point out that the number of thecae changes during development, stating:\n\n\n\n\n\n\n\nIn neotropical [plant family] Lecythidaceae, up until near the time of anther dehiscence there are two anther thecae on each side of the anther connective but the walls between these thecae break down so there are only two thecae by the time the anthers dehisce (one on each side of the anther).\n\n\n\n\n\n\n\nAs far as I can tell, there's nothing particularly unusual about the anthers of Lecythidaceae, so we can say that generally, while the microsporangia are still completely separated, an anther has four thecae. Then, when the septum has broken and the two microsporangia are fused, the anther has two thecae. (Think of the two microsporangia now forming \"one chamber\".)\n\n\n\n\nAs for \"lobes\", I think it's still safe to say that each pair of microsporangia form a lobe (e.g., the left and right halves of the anther in the figure). This term is used a bit more casually. The more technical term is \"bilocular\". This implies two locules, but has the same difficulty as theca: the locules are the spaces within the chambers, and can go from four locules to two locules as the anther develops.\n\n\n\n\nIt may also help to review pictures of developing anthers. Early in development the microsporangia are in the process of producing the pollen and there's not really any empty space within them. Only later do these areas actually become hollow as the pollen grains mature, and this hollow space is the locule.\n\n\n\n\n\n\n\nImage by Ben Stefanowitsch - Created for Wikimedia Commons by Ben Stefanowitsch, CC BY-SA 2.5 (https://creativecommons.org/licenses/by-sa/2.5), https://commons.wikimedia.org/w/index.php?curid=703358 (https://commons.wikimedia.org/w/index.php?curid=703358)", "answer_url": "https://biology.stackexchange.com/a/116276", "author": "Darlingtonia", "author_url": "https://biology.stackexchange.com/users/1197/darlingtonia", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2025-03-24T21:55:39+00:00", "is_accepted": true, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:19.947691+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/df693642d727b738d2a533740632235c18a06cefec7a1e337c9589214a4ec91e_0.json", "raw_sha256": "9df534f437f3b2f12d33db8536999ec4e6ffa10f2f59394799d9fe01c3c1ad16", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/117606;117602;117598;117594;117585;117579;117570;117568;117565;117559;117558;117555;117552;117548;117538;117524;117523;117522;117520;117515;117510;116509;116508;116504;116499;116491;116485;116483;116461;116454;116453;116445;116441;116435;116430;116426;116425;116414;116412;116406;116401;116399;116396;116395;116394;116392;116389;116384;116370;116367;116363;116361;116352;116351;116347;116345;116343;116338;116337;116332;116331;116324;116320;116316;116314;116312;116306;116292;116290;116284;116280;116277;116271;116270;116268;116267;116257;116256;116253;116250;116249;116240;116237;116233;116219;116214;116212;116205;116204;116200;116198;116187;116184;116173;116172;116167;116162;116149;116142;116129/answers?filter=withbody&order=asc&page=1&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 116268, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Darlingtonia", "profile_url": "https://biology.stackexchange.com/users/1197/darlingtonia", "user_type": "registered"}, "created_at": "2025-03-24T21:55:39+00:00", "raw_file": "raw/codex_api_v1/6a8d1217a71337b035f168c28f3cef00c95606938297595ce7816a6ee2aabc47_1790824139846857200_0.json", "raw_sha256": "915362f28bff22e7e44f536acc7b10e33f23a77bbb5e547906a8fdc7cf7e3e89", "revision_guid": "3928595F-2D7C-4424-9440-D3A124B297D5", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/3928595F-2D7C-4424-9440-D3A124B297D5/view-source"}], "score": 2, "updated_at": "2025-03-24T21:55:39+00:00"}], "ground_truth": "community signals only; no scientific truth label", "product": "ranking", "question": "My textbook states that\na typical anther is bilobed with each lobe having two theca.\n\n\n\n\nIf I go by the definition of theca as given on Wikipedia it states that the theca consists of the 2 microsporangia which are sharing a common stomium\n\n\n\n\nI am confused between the definition of lobe and theca.\ndoes my textbook imply that the lobe is the composite structure of 2 microsporangia on each side which share the same line of dehiscence?", "record_id": "Scientific-Answer-Ranking:biology:116268", "scores": [0, 2], "split": "holdout", "thread": {"accepted_answer_id": 116276, "answers": [{"answer_html": "Each lobe typically contains two theca, meaning a typical anther has four theca in total, each theca then contains two microsporangia. The lobe is composed of two theca, two pairs of microsporangia, separated by the stomium, which is an area of dehiscence.
\n", "answer_id": 116274, "answer_text": "Each lobe typically contains two theca, meaning a typical anther has four theca in total, each theca then contains two microsporangia. The lobe is composed of two theca, two pairs of microsporangia, separated by the stomium, which is an area of dehiscence.", "answer_url": "https://biology.stackexchange.com/a/116274", "author": "Moracen", "author_url": "https://biology.stackexchange.com/users/103307/moracen", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2025-03-24T07:52:39+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:19.947691+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/df693642d727b738d2a533740632235c18a06cefec7a1e337c9589214a4ec91e_0.json", "raw_sha256": "9df534f437f3b2f12d33db8536999ec4e6ffa10f2f59394799d9fe01c3c1ad16", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/117606;117602;117598;117594;117585;117579;117570;117568;117565;117559;117558;117555;117552;117548;117538;117524;117523;117522;117520;117515;117510;116509;116508;116504;116499;116491;116485;116483;116461;116454;116453;116445;116441;116435;116430;116426;116425;116414;116412;116406;116401;116399;116396;116395;116394;116392;116389;116384;116370;116367;116363;116361;116352;116351;116347;116345;116343;116338;116337;116332;116331;116324;116320;116316;116314;116312;116306;116292;116290;116284;116280;116277;116271;116270;116268;116267;116257;116256;116253;116250;116249;116240;116237;116233;116219;116214;116212;116205;116204;116200;116198;116187;116184;116173;116172;116167;116162;116149;116142;116129/answers?filter=withbody&order=asc&page=1&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 116268, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Moracen", "profile_url": "https://biology.stackexchange.com/users/103307/moracen", "user_type": "registered"}, "created_at": "2025-03-24T07:52:39+00:00", "raw_file": "raw/codex_api_v1/6a8d1217a71337b035f168c28f3cef00c95606938297595ce7816a6ee2aabc47_1790824139846857200_0.json", "raw_sha256": "915362f28bff22e7e44f536acc7b10e33f23a77bbb5e547906a8fdc7cf7e3e89", "revision_guid": "2C7B74B8-E717-475B-A40F-D1E072A4D55F", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/2C7B74B8-E717-475B-A40F-D1E072A4D55F/view-source"}], "score": 0, "updated_at": "2025-03-24T07:52:39+00:00"}, {"answer_html": "Wow, I'm not surprised there's confusion. For fairly basic botanical anatomy, there is a lot of variability out there about the answer.
\nTypical anthers have four microsporangia. This is probably the most consistent fact to keep in mind. These are labeled as #4 in the picture below. (Note that in this image the wall separating the two microsporangia of each lobe [the septum] has begun to split.)
\n
Most definitions I've seen say that the paired microsporangia make up the theca (#2 in the figure). So, the figure above has two thecae separated by the connective (#3).
\nWikipedia says that a theca consists of the surrounding tissue layers, such as the epidermis and tapetum (an inner layer of cells). New York Botanical Garden, NYBG, says that a theca is a chamber where the pollen is produced, "same as a pollen sac." (But note that the Wikipedia definition and the caption to the figure state that the pollen sac is the same as the microsporangium.)
\nThe Missouri Botanical Garden, MoBot, provides the Latin definition of theca: "that in which anything is enclosed, an envelope, hull, cover, case, sheath, etc." They agree with the NYBG in that thecae are "the pollen-producing sectors (microsporangia) of an anther, the pollen-sac."
\nThe NYBG discussion is a little more comprehensive. They point out that the number of thecae changes during development, stating:
\n\n\nIn neotropical [plant family] Lecythidaceae, up until near the time of anther dehiscence there are two anther thecae on each side of the anther connective but the walls between these thecae break down so there are only two thecae by the time the anthers dehisce (one on each side of the anther).
\n
As far as I can tell, there's nothing particularly unusual about the anthers of Lecythidaceae, so we can say that generally, while the microsporangia are still completely separated, an anther has four thecae. Then, when the septum has broken and the two microsporangia are fused, the anther has two thecae. (Think of the two microsporangia now forming "one chamber".)
\nAs for "lobes", I think it's still safe to say that each pair of microsporangia form a lobe (e.g., the left and right halves of the anther in the figure). This term is used a bit more casually. The more technical term is "bilocular". This implies two locules, but has the same difficulty as theca: the locules are the spaces within the chambers, and can go from four locules to two locules as the anther develops.
\nIt may also help to review pictures of developing anthers. Early in development the microsporangia are in the process of producing the pollen and there's not really any empty space within them. Only later do these areas actually become hollow as the pollen grains mature, and this hollow space is the locule.
\nImage by Ben Stefanowitsch - Created for Wikimedia Commons by Ben Stefanowitsch, CC BY-SA 2.5, https://commons.wikimedia.org/w/index.php?curid=703358
\n", "answer_id": 116276, "answer_text": "Wow, I'm not surprised there's confusion. For fairly basic botanical anatomy, there is a lot of variability out there about the answer.\n\n\n\n\nTypical anthers have four microsporangia. This is probably the most consistent fact to keep in mind. These are labeled as #4 in the picture below. (Note that in this image the wall separating the two microsporangia of each lobe [the septum] has begun to split.)\n\n\n\n\n[image: Schematic cross section of an anther. 1: Filament 2: Theca 3: Connective 4: Pollen sac (also known as sporangium); source: https://i.sstatic.net/8pvuHCTK.png]\n\n\n\n\nMost definitions I've seen say that the paired microsporangia make up the theca (#2 in the figure). So, the figure above has two thecae separated by the connective (#3).\n\n\n\n\nWikipedia (https://en.wikipedia.org/wiki/Theca) says that a theca consists of the surrounding tissue layers, such as the epidermis and tapetum (an inner layer of cells). New York Botanical Garden (https://sweetgum.nybg.org/science/glossary/glossary-details/?irn=3365), NYBG, says that a theca is a chamber where the pollen is produced, \"same as a pollen sac.\" (But note that the Wikipedia definition and the caption to the figure state that the pollen sac is the same as the microsporangium.)\n\n\n\n\nThe Missouri Botanical Garden (https://www.mobot.org/mobot/latindict/keyDetail.aspx?keyWord=tTeca), MoBot, provides the Latin definition of theca: \"that in which anything is enclosed, an envelope, hull, cover, case, sheath, etc.\" They agree with the NYBG in that thecae are \"the pollen-producing sectors (microsporangia) of an anther, the pollen-sac.\"\n\n\n\n\nThe NYBG discussion is a little more comprehensive. They point out that the number of thecae changes during development, stating:\n\n\n\n\n\n\n\nIn neotropical [plant family] Lecythidaceae, up until near the time of anther dehiscence there are two anther thecae on each side of the anther connective but the walls between these thecae break down so there are only two thecae by the time the anthers dehisce (one on each side of the anther).\n\n\n\n\n\n\n\nAs far as I can tell, there's nothing particularly unusual about the anthers of Lecythidaceae, so we can say that generally, while the microsporangia are still completely separated, an anther has four thecae. Then, when the septum has broken and the two microsporangia are fused, the anther has two thecae. (Think of the two microsporangia now forming \"one chamber\".)\n\n\n\n\nAs for \"lobes\", I think it's still safe to say that each pair of microsporangia form a lobe (e.g., the left and right halves of the anther in the figure). This term is used a bit more casually. The more technical term is \"bilocular\". This implies two locules, but has the same difficulty as theca: the locules are the spaces within the chambers, and can go from four locules to two locules as the anther develops.\n\n\n\n\nIt may also help to review pictures of developing anthers. Early in development the microsporangia are in the process of producing the pollen and there's not really any empty space within them. Only later do these areas actually become hollow as the pollen grains mature, and this hollow space is the locule.\n\n\n\n\n\n\n\nImage by Ben Stefanowitsch - Created for Wikimedia Commons by Ben Stefanowitsch, CC BY-SA 2.5 (https://creativecommons.org/licenses/by-sa/2.5), https://commons.wikimedia.org/w/index.php?curid=703358 (https://commons.wikimedia.org/w/index.php?curid=703358)", "answer_url": "https://biology.stackexchange.com/a/116276", "author": "Darlingtonia", "author_url": "https://biology.stackexchange.com/users/1197/darlingtonia", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2025-03-24T21:55:39+00:00", "is_accepted": true, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:19.947691+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/df693642d727b738d2a533740632235c18a06cefec7a1e337c9589214a4ec91e_0.json", "raw_sha256": "9df534f437f3b2f12d33db8536999ec4e6ffa10f2f59394799d9fe01c3c1ad16", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/117606;117602;117598;117594;117585;117579;117570;117568;117565;117559;117558;117555;117552;117548;117538;117524;117523;117522;117520;117515;117510;116509;116508;116504;116499;116491;116485;116483;116461;116454;116453;116445;116441;116435;116430;116426;116425;116414;116412;116406;116401;116399;116396;116395;116394;116392;116389;116384;116370;116367;116363;116361;116352;116351;116347;116345;116343;116338;116337;116332;116331;116324;116320;116316;116314;116312;116306;116292;116290;116284;116280;116277;116271;116270;116268;116267;116257;116256;116253;116250;116249;116240;116237;116233;116219;116214;116212;116205;116204;116200;116198;116187;116184;116173;116172;116167;116162;116149;116142;116129/answers?filter=withbody&order=asc&page=1&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 116268, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Darlingtonia", "profile_url": "https://biology.stackexchange.com/users/1197/darlingtonia", "user_type": "registered"}, "created_at": "2025-03-24T21:55:39+00:00", "raw_file": "raw/codex_api_v1/6a8d1217a71337b035f168c28f3cef00c95606938297595ce7816a6ee2aabc47_1790824139846857200_0.json", "raw_sha256": "915362f28bff22e7e44f536acc7b10e33f23a77bbb5e547906a8fdc7cf7e3e89", "revision_guid": "3928595F-2D7C-4424-9440-D3A124B297D5", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/3928595F-2D7C-4424-9440-D3A124B297D5/view-source"}], "score": 2, "updated_at": "2025-03-24T21:55:39+00:00"}], "domain": "biology", "external_links": ["https://commons.wikimedia.org/w/index.php?curid=703358", "https://creativecommons.org/licenses/by-sa/2.5", "https://en.wikipedia.org/wiki/Theca", "https://i.sstatic.net/8pvuHCTK.png", "https://sweetgum.nybg.org/science/glossary/glossary-details/?irn=3365", "https://www.mobot.org/mobot/latindict/keyDetail.aspx?keyWord=tTeca"], "medical_sensitive": false, "patient_specific": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:02.598621+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/5d480e4bd1bd45ab525a4baf3227fba404f89b6af9dad33215fd9fa7c302a211_0.json", "raw_sha256": "d723c7a62c8386d143891d26ae30b2234242ed3dac9599b11f141712ea994a96", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/search/advanced?answers=1&filter=withbody&order=desc&page=3&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_author": "Maanav Mehta", "question_author_url": "https://biology.stackexchange.com/users/102911/maanav-mehta", "question_author_user_type": "registered", "question_created_at": "2025-03-21T19:24:36+00:00", "question_html": "My textbook states that\na typical anther is bilobed with each lobe having two theca.
\nIf I go by the definition of theca as given on Wikipedia it states that the theca consists of the 2 microsporangia which are sharing a common stomium
\nI am confused between the definition of lobe and theca.\ndoes my textbook imply that the lobe is the composite structure of 2 microsporangia on each side which share the same line of dehiscence?
\n", "question_id": 116268, "question_license": "CC BY-SA 4.0", "question_score": 2, "question_text": "My textbook states that\na typical anther is bilobed with each lobe having two theca.\n\n\n\n\nIf I go by the definition of theca as given on Wikipedia it states that the theca consists of the 2 microsporangia which are sharing a common stomium\n\n\n\n\nI am confused between the definition of lobe and theca.\ndoes my textbook imply that the lobe is the composite structure of 2 microsporangia on each side which share the same line of dehiscence?", "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Maanav Mehta", "profile_url": "https://biology.stackexchange.com/users/102911/maanav-mehta", "user_type": "registered"}, "created_at": "2025-03-21T19:24:36+00:00", "raw_file": "raw/codex_api_v1/d15f4865285273ae6317f3f3c349227e1b259d6015b55aa14ef5accac806b399_1790824130296338000_0.json", "raw_sha256": "611d5d0f66539d270d10e88493add03469f6e7c1f54b654a8efbaea5fbbc2960", "revision_guid": "66255F40-F7CC-4811-BC78-514A67AB153E", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/66255F40-F7CC-4811-BC78-514A67AB153E/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Maanav Mehta", "profile_url": "https://biology.stackexchange.com/users/102911/maanav-mehta", "user_type": "registered"}, "created_at": "2025-03-23T18:39:11+00:00", "raw_file": "raw/codex_api_v1/d15f4865285273ae6317f3f3c349227e1b259d6015b55aa14ef5accac806b399_1790824130296338000_0.json", "raw_sha256": "611d5d0f66539d270d10e88493add03469f6e7c1f54b654a8efbaea5fbbc2960", "revision_guid": "47FD8A29-82CF-4509-870C-5B27A9892296", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/47FD8A29-82CF-4509-870C-5B27A9892296/view-source"}], "source_site": "biology", "source_url": "https://biology.stackexchange.com/questions/116268/what-is-a-lobe-in-an-anther", "split": "holdout", "split_group": "4dbce1befd920a548c1ed6d7fd0b529543b05a599624e7d5c0fe383eeed993a7", "tags": ["botany", "plant-anatomy"], "thread_id": "biology:116268", "title": "What is a lobe in an anther?"}} {"accepted_status": [false, false, false], "candidate_answers": [{"answer_html": "There isn't really a good answer, since we don't have a singular quantifiable measure of intelligence for humans, let alone other species.
\nAny human measures of intelligence might not apply properly to an animal, because it's based on either human behaviours, or specific human cultures/context. An animal that does not confirm to either might not complete the test as expected, or not recognise it as one at all.
\n", "answer_id": 112750, "answer_text": "There isn't really a good answer, since we don't have a singular quantifiable measure of intelligence for humans, let alone other species.\n\n\n\n\nAny human measures of intelligence might not apply properly to an animal, because it's based on either human behaviours, or specific human cultures/context. An animal that does not confirm to either might not complete the test as expected, or not recognise it as one at all.", "answer_url": "https://biology.stackexchange.com/a/112750", "author": "techno156", "author_url": "https://biology.stackexchange.com/users/27285/techno156", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2023-08-07T18:48:54+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:38.885561+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/a145de97eabc007745b45919875489a41261075cbdf33d916d9640ba4ad0bd35_0.json", "raw_sha256": "e7d8d4315eef8e039a452d2811869cbe305575c6ff8a6bef8f80d6dfb58c5bfd", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/112982;112980;112979;112977;112972;112967;112962;112956;112952;112948;112941;112938;112937;112936;112927;112925;112923;112919;112909;112905;112904;112898;112895;112893;112884;112881;112880;112879;112873;112872;112870;112869;112867;112850;112849;112848;112841;112835;112831;112824;112818;112811;112808;112807;112790;112789;112785;112777;112773;112770;112762;112759;112757;112756;112746;112739;112738;112737;112731;112705;112703;112700;112699;112698;112693;112691;112687;112685;112677;112671;112667;112663;112659;112653;112647;112646;112645;112636;112625;112621;112615;112614;112613;112610;112598;112593;112592;112586;112580;112575;112574;112564;112558;112552;112550;112549;112544;112539;112535;112531/answers?filter=withbody&order=asc&page=1&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 112739, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "techno156", "profile_url": "https://biology.stackexchange.com/users/27285/techno156", "user_type": "registered"}, "created_at": "2023-08-07T18:48:54+00:00", "raw_file": "raw/codex_api_v1/a04a0f8b9b816f605414240c86ef0796529040fa885a4b1183bd818d12b64e65_0.json", "raw_sha256": "630e8bf25473aeb8900409dec408d29d2bdc2011bc3b72f26995c17452a2c689", "revision_guid": "00EE888A-33A5-4F00-84AB-76170FACECAA", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/00EE888A-33A5-4F00-84AB-76170FACECAA/view-source"}], "score": 1, "updated_at": "2023-08-07T18:48:54+00:00"}, {"answer_html": "EQ or EZ can be helpful with several qualifiers.
\nyou should account for differences among groups, birds for instance have smaller brains than mammals for what most would consider similar intelligence, bird brains have higher synaptic density than mammals likely due to weight constraints during evolution. the brain has evolved along sperate paths with different mass efficiencies. EQ gets less and less useful the further you get from mammals and primates. invertebrates in particular become very problematic since the brain is not extremally centralized like it is in vertebrates, so even estimating what is and is not the brain runs into issues.
\nImprovements have been done to EQ by using the only the parts of the brain responsible things we associate with intelligence, this helps account for drastic difference in sensory parts of the brain which affect overall brain size, but again this breaks down when you get away from mammals because the brains works differently in those groups. You also run into the issue that folding of the brain increases neuron density faster than mass so it can deflate EQ scores while making the animal more intelligent.
\nIf you really want to estimate intelligence, then just like in humans, behavior is your best metric, but this is not going to be a easy to research number. I have a similar issue to your conundrum and I won't eat anything that appears to understand the concept of death : elephants, great apes and some other primates, dolphins including orca and, grey parrots. I generally iffy on eating anything that has complex problem solving and tool use. I won't eat any primate at all for other reasons (disease). But this requires knowledge of animal behavior. You will never get a nice easy number to look at, intelligence is just too complex a thing.
\n", "answer_id": 112766, "answer_text": "EQ or EZ can be helpful with several qualifiers.\n\n\n\n\n\n\n\nyou should account for differences among groups, birds for instance have smaller brains than mammals for what most would consider similar intelligence, bird brains have higher synaptic density than mammals likely due to weight constraints during evolution. the brain has evolved along sperate paths with different mass efficiencies. EQ gets less and less useful the further you get from mammals and primates. invertebrates in particular become very problematic since the brain is not extremally centralized like it is in vertebrates, so even estimating what is and is not the brain runs into issues.\n\n\n\n\n\n\n\n\n\nImprovements have been done to EQ by using the only the parts of the brain responsible things we associate with intelligence, this helps account for drastic difference in sensory parts of the brain which affect overall brain size, but again this breaks down when you get away from mammals because the brains works differently in those groups. You also run into the issue that folding of the brain increases neuron density faster than mass so it can deflate EQ scores while making the animal more intelligent.\n\n\n\n\n\n\n\n\nIf you really want to estimate intelligence, then just like in humans, behavior is your best metric, but this is not going to be a easy to research number. I have a similar issue to your conundrum and I won't eat anything that appears to understand the concept of death : elephants, great apes and some other primates, dolphins including orca and, grey parrots. I generally iffy on eating anything that has complex problem solving and tool use. I won't eat any primate at all for other reasons (disease). But this requires knowledge of animal behavior. You will never get a nice easy number to look at, intelligence is just too complex a thing.", "answer_url": "https://biology.stackexchange.com/a/112766", "author": "John", "author_url": "https://biology.stackexchange.com/users/28022/john", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2023-08-09T15:21:38+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:38.885561+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/a145de97eabc007745b45919875489a41261075cbdf33d916d9640ba4ad0bd35_0.json", "raw_sha256": "e7d8d4315eef8e039a452d2811869cbe305575c6ff8a6bef8f80d6dfb58c5bfd", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/112982;112980;112979;112977;112972;112967;112962;112956;112952;112948;112941;112938;112937;112936;112927;112925;112923;112919;112909;112905;112904;112898;112895;112893;112884;112881;112880;112879;112873;112872;112870;112869;112867;112850;112849;112848;112841;112835;112831;112824;112818;112811;112808;112807;112790;112789;112785;112777;112773;112770;112762;112759;112757;112756;112746;112739;112738;112737;112731;112705;112703;112700;112699;112698;112693;112691;112687;112685;112677;112671;112667;112663;112659;112653;112647;112646;112645;112636;112625;112621;112615;112614;112613;112610;112598;112593;112592;112586;112580;112575;112574;112564;112558;112552;112550;112549;112544;112539;112535;112531/answers?filter=withbody&order=asc&page=1&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 112739, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "John", "profile_url": "https://biology.stackexchange.com/users/28022/john", "user_type": "registered"}, "created_at": "2023-08-09T15:21:38+00:00", "raw_file": "raw/codex_api_v1/fe6e1ab1e4f14040deb1423c04616e4dd0e7de39b583b42e88a31f79f9375e98_1790824028764975800_0.json", "raw_sha256": "08e023ccc811ec000989abb19f483814e44277588eeabf130aa5dbaf177079bf", "revision_guid": "EC59CE9D-E136-48CD-B5EB-8EF24A4218AC", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/EC59CE9D-E136-48CD-B5EB-8EF24A4218AC/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "John", "profile_url": "https://biology.stackexchange.com/users/28022/john", "user_type": "registered"}, "created_at": "2023-08-10T01:01:59+00:00", "raw_file": "raw/codex_api_v1/fe6e1ab1e4f14040deb1423c04616e4dd0e7de39b583b42e88a31f79f9375e98_1790824028764975800_0.json", "raw_sha256": "08e023ccc811ec000989abb19f483814e44277588eeabf130aa5dbaf177079bf", "revision_guid": "7A188AFD-F482-45DF-8528-951E2EBEDA54", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/7A188AFD-F482-45DF-8528-951E2EBEDA54/view-source"}], "score": 1, "updated_at": "2023-08-10T01:01:59+00:00"}, {"answer_html": "There is no easy way to quantify intelligence because it's poorly defined. I would suggest narrowing your focus on measurable behaviour as a proxy for intelligence, and looking at the many behavioral research studies on commonly consumed animals.
\nThere is good evidence that chickens, pigs, cows, sheep, fish, all form social bonds, can learn new skills, and solve novel problems. All of those things are a key part in survival and reproduction in many animal species.
\nYou might find the mirror self-recognition test worth looking into, particularly as something that highlights the absurdity of trying to design a test across species.
\nHere's a list of animals by number of neurons which may help you on your quest - if you can find evidence that number of neurons is an adequate proxy to intelligence for your purposes. There is another on that page about number in the cerebrum. Not a lot of fish on there though.
\n", "answer_id": 112772, "answer_text": "There is no easy way to quantify intelligence because it's poorly defined. I would suggest narrowing your focus on measurable behaviour as a proxy for intelligence, and looking at the many behavioral research studies on commonly consumed animals.\n\n\n\n\n\nWould you eat an animal that has social bonds?\n\n\n\n\nWould you eat an animal that is able to be taught new skills?\n\n\n\n\nWould you eat an animal that demonstrates problem solving?\n\n\n\n\n\nThere is good evidence that chickens, pigs, cows, sheep, fish, all form social bonds, can learn new skills, and solve novel problems. All of those things are a key part in survival and reproduction in many animal species.\n\n\n\n\nYou might find the mirror self-recognition test (https://en.wikipedia.org/wiki/Mirror_test) worth looking into, particularly as something that highlights the absurdity of trying to design a test across species.\n\n\n\n\nHere's a list of animals by number of neurons (https://en.wikipedia.org/wiki/List_of_animals_by_number_of_neurons) which may help you on your quest - if you can find evidence that number of neurons is an adequate proxy to intelligence for your purposes. There is another on that page about number in the cerebrum. Not a lot of fish on there though.", "answer_url": "https://biology.stackexchange.com/a/112772", "author": "Spare", "author_url": "https://biology.stackexchange.com/users/76533/spare", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2023-08-10T03:06:01+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:38.885561+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/a145de97eabc007745b45919875489a41261075cbdf33d916d9640ba4ad0bd35_0.json", "raw_sha256": "e7d8d4315eef8e039a452d2811869cbe305575c6ff8a6bef8f80d6dfb58c5bfd", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/112982;112980;112979;112977;112972;112967;112962;112956;112952;112948;112941;112938;112937;112936;112927;112925;112923;112919;112909;112905;112904;112898;112895;112893;112884;112881;112880;112879;112873;112872;112870;112869;112867;112850;112849;112848;112841;112835;112831;112824;112818;112811;112808;112807;112790;112789;112785;112777;112773;112770;112762;112759;112757;112756;112746;112739;112738;112737;112731;112705;112703;112700;112699;112698;112693;112691;112687;112685;112677;112671;112667;112663;112659;112653;112647;112646;112645;112636;112625;112621;112615;112614;112613;112610;112598;112593;112592;112586;112580;112575;112574;112564;112558;112552;112550;112549;112544;112539;112535;112531/answers?filter=withbody&order=asc&page=1&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 112739, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Spare", "profile_url": "https://biology.stackexchange.com/users/76533/spare", "user_type": "registered"}, "created_at": "2023-08-10T03:06:01+00:00", "raw_file": "raw/codex_api_v1/fe6e1ab1e4f14040deb1423c04616e4dd0e7de39b583b42e88a31f79f9375e98_1790824028764975800_0.json", "raw_sha256": "08e023ccc811ec000989abb19f483814e44277588eeabf130aa5dbaf177079bf", "revision_guid": "F7CAC700-9475-4670-B8DD-A58BC023F3CE", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/F7CAC700-9475-4670-B8DD-A58BC023F3CE/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Spare", "profile_url": "https://biology.stackexchange.com/users/76533/spare", "user_type": "registered"}, "created_at": "2023-08-10T03:10:16+00:00", "raw_file": "raw/codex_api_v1/fe6e1ab1e4f14040deb1423c04616e4dd0e7de39b583b42e88a31f79f9375e98_1790824028764975800_0.json", "raw_sha256": "08e023ccc811ec000989abb19f483814e44277588eeabf130aa5dbaf177079bf", "revision_guid": "CCFC03A7-9A9C-4509-B329-C10AC00620B6", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/CCFC03A7-9A9C-4509-B329-C10AC00620B6/view-source"}], "score": 1, "updated_at": "2023-08-10T03:10:16+00:00"}], "ground_truth": "community signals only; no scientific truth label", "product": "ranking", "question": "What is a good cross-species measure of intelligence?\n\n\n\n\nI want to use this information to decide which animals to eat, so preferably it would have been measured for most commonly eaten animals.\n\n\n\n\nI read about the Encephalization Quotient. Would EQ be a good choice? Is there somewhere I can find a list of animals and their EQ?", "record_id": "Scientific-Answer-Ranking:biology:112739", "scores": [1, 1, 1], "split": "holdout", "thread": {"accepted_answer_id": null, "answers": [{"answer_html": "There isn't really a good answer, since we don't have a singular quantifiable measure of intelligence for humans, let alone other species.
\nAny human measures of intelligence might not apply properly to an animal, because it's based on either human behaviours, or specific human cultures/context. An animal that does not confirm to either might not complete the test as expected, or not recognise it as one at all.
\n", "answer_id": 112750, "answer_text": "There isn't really a good answer, since we don't have a singular quantifiable measure of intelligence for humans, let alone other species.\n\n\n\n\nAny human measures of intelligence might not apply properly to an animal, because it's based on either human behaviours, or specific human cultures/context. An animal that does not confirm to either might not complete the test as expected, or not recognise it as one at all.", "answer_url": "https://biology.stackexchange.com/a/112750", "author": "techno156", "author_url": "https://biology.stackexchange.com/users/27285/techno156", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2023-08-07T18:48:54+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:38.885561+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/a145de97eabc007745b45919875489a41261075cbdf33d916d9640ba4ad0bd35_0.json", "raw_sha256": "e7d8d4315eef8e039a452d2811869cbe305575c6ff8a6bef8f80d6dfb58c5bfd", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/112982;112980;112979;112977;112972;112967;112962;112956;112952;112948;112941;112938;112937;112936;112927;112925;112923;112919;112909;112905;112904;112898;112895;112893;112884;112881;112880;112879;112873;112872;112870;112869;112867;112850;112849;112848;112841;112835;112831;112824;112818;112811;112808;112807;112790;112789;112785;112777;112773;112770;112762;112759;112757;112756;112746;112739;112738;112737;112731;112705;112703;112700;112699;112698;112693;112691;112687;112685;112677;112671;112667;112663;112659;112653;112647;112646;112645;112636;112625;112621;112615;112614;112613;112610;112598;112593;112592;112586;112580;112575;112574;112564;112558;112552;112550;112549;112544;112539;112535;112531/answers?filter=withbody&order=asc&page=1&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 112739, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "techno156", "profile_url": "https://biology.stackexchange.com/users/27285/techno156", "user_type": "registered"}, "created_at": "2023-08-07T18:48:54+00:00", "raw_file": "raw/codex_api_v1/a04a0f8b9b816f605414240c86ef0796529040fa885a4b1183bd818d12b64e65_0.json", "raw_sha256": "630e8bf25473aeb8900409dec408d29d2bdc2011bc3b72f26995c17452a2c689", "revision_guid": "00EE888A-33A5-4F00-84AB-76170FACECAA", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/00EE888A-33A5-4F00-84AB-76170FACECAA/view-source"}], "score": 1, "updated_at": "2023-08-07T18:48:54+00:00"}, {"answer_html": "EQ or EZ can be helpful with several qualifiers.
\nyou should account for differences among groups, birds for instance have smaller brains than mammals for what most would consider similar intelligence, bird brains have higher synaptic density than mammals likely due to weight constraints during evolution. the brain has evolved along sperate paths with different mass efficiencies. EQ gets less and less useful the further you get from mammals and primates. invertebrates in particular become very problematic since the brain is not extremally centralized like it is in vertebrates, so even estimating what is and is not the brain runs into issues.
\nImprovements have been done to EQ by using the only the parts of the brain responsible things we associate with intelligence, this helps account for drastic difference in sensory parts of the brain which affect overall brain size, but again this breaks down when you get away from mammals because the brains works differently in those groups. You also run into the issue that folding of the brain increases neuron density faster than mass so it can deflate EQ scores while making the animal more intelligent.
\nIf you really want to estimate intelligence, then just like in humans, behavior is your best metric, but this is not going to be a easy to research number. I have a similar issue to your conundrum and I won't eat anything that appears to understand the concept of death : elephants, great apes and some other primates, dolphins including orca and, grey parrots. I generally iffy on eating anything that has complex problem solving and tool use. I won't eat any primate at all for other reasons (disease). But this requires knowledge of animal behavior. You will never get a nice easy number to look at, intelligence is just too complex a thing.
\n", "answer_id": 112766, "answer_text": "EQ or EZ can be helpful with several qualifiers.\n\n\n\n\n\n\n\nyou should account for differences among groups, birds for instance have smaller brains than mammals for what most would consider similar intelligence, bird brains have higher synaptic density than mammals likely due to weight constraints during evolution. the brain has evolved along sperate paths with different mass efficiencies. EQ gets less and less useful the further you get from mammals and primates. invertebrates in particular become very problematic since the brain is not extremally centralized like it is in vertebrates, so even estimating what is and is not the brain runs into issues.\n\n\n\n\n\n\n\n\n\nImprovements have been done to EQ by using the only the parts of the brain responsible things we associate with intelligence, this helps account for drastic difference in sensory parts of the brain which affect overall brain size, but again this breaks down when you get away from mammals because the brains works differently in those groups. You also run into the issue that folding of the brain increases neuron density faster than mass so it can deflate EQ scores while making the animal more intelligent.\n\n\n\n\n\n\n\n\nIf you really want to estimate intelligence, then just like in humans, behavior is your best metric, but this is not going to be a easy to research number. I have a similar issue to your conundrum and I won't eat anything that appears to understand the concept of death : elephants, great apes and some other primates, dolphins including orca and, grey parrots. I generally iffy on eating anything that has complex problem solving and tool use. I won't eat any primate at all for other reasons (disease). But this requires knowledge of animal behavior. You will never get a nice easy number to look at, intelligence is just too complex a thing.", "answer_url": "https://biology.stackexchange.com/a/112766", "author": "John", "author_url": "https://biology.stackexchange.com/users/28022/john", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2023-08-09T15:21:38+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:38.885561+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/a145de97eabc007745b45919875489a41261075cbdf33d916d9640ba4ad0bd35_0.json", "raw_sha256": "e7d8d4315eef8e039a452d2811869cbe305575c6ff8a6bef8f80d6dfb58c5bfd", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/112982;112980;112979;112977;112972;112967;112962;112956;112952;112948;112941;112938;112937;112936;112927;112925;112923;112919;112909;112905;112904;112898;112895;112893;112884;112881;112880;112879;112873;112872;112870;112869;112867;112850;112849;112848;112841;112835;112831;112824;112818;112811;112808;112807;112790;112789;112785;112777;112773;112770;112762;112759;112757;112756;112746;112739;112738;112737;112731;112705;112703;112700;112699;112698;112693;112691;112687;112685;112677;112671;112667;112663;112659;112653;112647;112646;112645;112636;112625;112621;112615;112614;112613;112610;112598;112593;112592;112586;112580;112575;112574;112564;112558;112552;112550;112549;112544;112539;112535;112531/answers?filter=withbody&order=asc&page=1&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 112739, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "John", "profile_url": "https://biology.stackexchange.com/users/28022/john", "user_type": "registered"}, "created_at": "2023-08-09T15:21:38+00:00", "raw_file": "raw/codex_api_v1/fe6e1ab1e4f14040deb1423c04616e4dd0e7de39b583b42e88a31f79f9375e98_1790824028764975800_0.json", "raw_sha256": "08e023ccc811ec000989abb19f483814e44277588eeabf130aa5dbaf177079bf", "revision_guid": "EC59CE9D-E136-48CD-B5EB-8EF24A4218AC", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/EC59CE9D-E136-48CD-B5EB-8EF24A4218AC/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "John", "profile_url": "https://biology.stackexchange.com/users/28022/john", "user_type": "registered"}, "created_at": "2023-08-10T01:01:59+00:00", "raw_file": "raw/codex_api_v1/fe6e1ab1e4f14040deb1423c04616e4dd0e7de39b583b42e88a31f79f9375e98_1790824028764975800_0.json", "raw_sha256": "08e023ccc811ec000989abb19f483814e44277588eeabf130aa5dbaf177079bf", "revision_guid": "7A188AFD-F482-45DF-8528-951E2EBEDA54", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/7A188AFD-F482-45DF-8528-951E2EBEDA54/view-source"}], "score": 1, "updated_at": "2023-08-10T01:01:59+00:00"}, {"answer_html": "There is no easy way to quantify intelligence because it's poorly defined. I would suggest narrowing your focus on measurable behaviour as a proxy for intelligence, and looking at the many behavioral research studies on commonly consumed animals.
\nThere is good evidence that chickens, pigs, cows, sheep, fish, all form social bonds, can learn new skills, and solve novel problems. All of those things are a key part in survival and reproduction in many animal species.
\nYou might find the mirror self-recognition test worth looking into, particularly as something that highlights the absurdity of trying to design a test across species.
\nHere's a list of animals by number of neurons which may help you on your quest - if you can find evidence that number of neurons is an adequate proxy to intelligence for your purposes. There is another on that page about number in the cerebrum. Not a lot of fish on there though.
\n", "answer_id": 112772, "answer_text": "There is no easy way to quantify intelligence because it's poorly defined. I would suggest narrowing your focus on measurable behaviour as a proxy for intelligence, and looking at the many behavioral research studies on commonly consumed animals.\n\n\n\n\n\nWould you eat an animal that has social bonds?\n\n\n\n\nWould you eat an animal that is able to be taught new skills?\n\n\n\n\nWould you eat an animal that demonstrates problem solving?\n\n\n\n\n\nThere is good evidence that chickens, pigs, cows, sheep, fish, all form social bonds, can learn new skills, and solve novel problems. All of those things are a key part in survival and reproduction in many animal species.\n\n\n\n\nYou might find the mirror self-recognition test (https://en.wikipedia.org/wiki/Mirror_test) worth looking into, particularly as something that highlights the absurdity of trying to design a test across species.\n\n\n\n\nHere's a list of animals by number of neurons (https://en.wikipedia.org/wiki/List_of_animals_by_number_of_neurons) which may help you on your quest - if you can find evidence that number of neurons is an adequate proxy to intelligence for your purposes. There is another on that page about number in the cerebrum. Not a lot of fish on there though.", "answer_url": "https://biology.stackexchange.com/a/112772", "author": "Spare", "author_url": "https://biology.stackexchange.com/users/76533/spare", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2023-08-10T03:06:01+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:38.885561+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/a145de97eabc007745b45919875489a41261075cbdf33d916d9640ba4ad0bd35_0.json", "raw_sha256": "e7d8d4315eef8e039a452d2811869cbe305575c6ff8a6bef8f80d6dfb58c5bfd", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/112982;112980;112979;112977;112972;112967;112962;112956;112952;112948;112941;112938;112937;112936;112927;112925;112923;112919;112909;112905;112904;112898;112895;112893;112884;112881;112880;112879;112873;112872;112870;112869;112867;112850;112849;112848;112841;112835;112831;112824;112818;112811;112808;112807;112790;112789;112785;112777;112773;112770;112762;112759;112757;112756;112746;112739;112738;112737;112731;112705;112703;112700;112699;112698;112693;112691;112687;112685;112677;112671;112667;112663;112659;112653;112647;112646;112645;112636;112625;112621;112615;112614;112613;112610;112598;112593;112592;112586;112580;112575;112574;112564;112558;112552;112550;112549;112544;112539;112535;112531/answers?filter=withbody&order=asc&page=1&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 112739, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Spare", "profile_url": "https://biology.stackexchange.com/users/76533/spare", "user_type": "registered"}, "created_at": "2023-08-10T03:06:01+00:00", "raw_file": "raw/codex_api_v1/fe6e1ab1e4f14040deb1423c04616e4dd0e7de39b583b42e88a31f79f9375e98_1790824028764975800_0.json", "raw_sha256": "08e023ccc811ec000989abb19f483814e44277588eeabf130aa5dbaf177079bf", "revision_guid": "F7CAC700-9475-4670-B8DD-A58BC023F3CE", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/F7CAC700-9475-4670-B8DD-A58BC023F3CE/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Spare", "profile_url": "https://biology.stackexchange.com/users/76533/spare", "user_type": "registered"}, "created_at": "2023-08-10T03:10:16+00:00", "raw_file": "raw/codex_api_v1/fe6e1ab1e4f14040deb1423c04616e4dd0e7de39b583b42e88a31f79f9375e98_1790824028764975800_0.json", "raw_sha256": "08e023ccc811ec000989abb19f483814e44277588eeabf130aa5dbaf177079bf", "revision_guid": "CCFC03A7-9A9C-4509-B329-C10AC00620B6", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/CCFC03A7-9A9C-4509-B329-C10AC00620B6/view-source"}], "score": 1, "updated_at": "2023-08-10T03:10:16+00:00"}], "domain": "biology", "external_links": ["https://en.wikipedia.org/wiki/List_of_animals_by_number_of_neurons", "https://en.wikipedia.org/wiki/Mirror_test"], "medical_sensitive": true, "patient_specific": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:12.794960+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/01e5186067e30dc1b8d7a145670ab7edd6b017797b271a481af8b7b7f55f13c2_0.json", "raw_sha256": "6c3960de7e1d3d7920bb88d02e2184614c219b391f39d9bddc2a582fdc9a71e7", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/search/advanced?answers=1&filter=withbody&order=desc&page=10&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_author": "the universe is awesome", "question_author_url": "https://biology.stackexchange.com/users/76487/the-universe-is-awesome", "question_author_user_type": "registered", "question_created_at": "2023-08-06T01:55:59+00:00", "question_html": "What is a good cross-species measure of intelligence?
\nI want to use this information to decide which animals to eat, so preferably it would have been measured for most commonly eaten animals.
\nI read about the Encephalization Quotient. Would EQ be a good choice? Is there somewhere I can find a list of animals and their EQ?
\n", "question_id": 112739, "question_license": "CC BY-SA 4.0", "question_score": 0, "question_text": "What is a good cross-species measure of intelligence?\n\n\n\n\nI want to use this information to decide which animals to eat, so preferably it would have been measured for most commonly eaten animals.\n\n\n\n\nI read about the Encephalization Quotient. Would EQ be a good choice? Is there somewhere I can find a list of animals and their EQ?", "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "the universe is awesome", "profile_url": "https://biology.stackexchange.com/users/76487/the-universe-is-awesome", "user_type": "registered"}, "created_at": "2023-08-06T01:55:59+00:00", "raw_file": "raw/codex_api_v1/a04a0f8b9b816f605414240c86ef0796529040fa885a4b1183bd818d12b64e65_0.json", "raw_sha256": "630e8bf25473aeb8900409dec408d29d2bdc2011bc3b72f26995c17452a2c689", "revision_guid": "B2E984E6-BE8A-4DEB-A5E7-7E7EAB1341C7", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/B2E984E6-BE8A-4DEB-A5E7-7E7EAB1341C7/view-source"}], "source_site": "biology", "source_url": "https://biology.stackexchange.com/questions/112739/measures-of-animal-intelligence", "split": "holdout", "split_group": "567866b9122ef0c0b7d891c0884a1119a3c469b359d82ef1a8fcd2bf93db273d", "tags": ["intelligence", "measurement", "animal-psychology"], "thread_id": "biology:112739", "title": "Measures of animal intelligence"}} {"accepted_status": [false, false], "candidate_answers": [{"answer_html": "Update: As noted by commenter, the example stated in the question is not actually Michaelis-Menten but is rather an example of binding kinetics. See also the other answer, which is likely more relevant.
\nI would suggest, if you would like to find the steady-state concentration of $[AB]$, that you can solve this yourself mathematically. Try differentiating and setting the $\\Delta [AB]$ side of the equation to zero, and solving. You will find:
\n$ \\Delta [AB] = (k_{on}[A][B] - k_{off}[AB])\\Delta t$
\n$ 0 = (k_{on}[A][B] - k_{off}[AB])\\Delta t$
\nRearranging:
\n$k_{on}[A][B] = k_{off}[AB] $
\nAnd finally:
\n$\\frac{[AB]}{[A][B]} = \\frac{k_{on}}{k_{off}}$
\nNote that if the $k$ are constant, this amounts to the law of mass action.
\nYou can also do a forward simulation (see R code):
\n# association/dissociation kinetics\nkinetic_sim = function(k_on, k_off, a, b) {\n ab = 0\n ab_ts = c()\n a_ts = c()\n b_ts = c()\n for (i in 1:1000) {\n ab_old = ab\n ab = ab * (1 - k_off) + k_on * (a * b)\n a = a - a*b*k_on + ab_old * k_off\n b = b - a*b*k_on + ab_old * k_off\n #cat(i, a, b, ab, k_on*a*b, k_off*ab, "\\n", sep=" ")\n ab_ts = append(ab_ts, ab)\n a_ts = append(a_ts, a)\n b_ts = append(b_ts, b)\n \n }\n return(list(ab_ts, a_ts, b_ts))\n}\nout = kinetic_sim(.1, .2, 1, 1)\nplot(out[[1]] / (out[[2]] * out[[3]]), ylab="[AB] / ([A] * [B])", xlab="time step")\nplot(out[[1]], ylab="[AB]", xlab="time step")\n\n\nYou can see that both the ratio and the final concentration equilibrate.
\n", "answer_id": 114769, "answer_text": "Update: As noted by commenter, the example stated in the question is not actually Michaelis-Menten but is rather an example of binding kinetics. See also the other answer, which is likely more relevant.\n\n\n\n\nI would suggest, if you would like to find the steady-state concentration of $[AB]$, that you can solve this yourself mathematically. Try differentiating and setting the $\\Delta [AB]$ side of the equation to zero, and solving. You will find:\n\n\n\n\n$ \\Delta [AB] = (k_{on}[A][B] - k_{off}[AB])\\Delta t$\n\n\n\n\n$ 0 = (k_{on}[A][B] - k_{off}[AB])\\Delta t$\n\n\n\n\nRearranging:\n\n\n\n\n$k_{on}[A][B] = k_{off}[AB] $\n\n\n\n\nAnd finally:\n\n\n\n\n$\\frac{[AB]}{[A][B]} = \\frac{k_{on}}{k_{off}}$\n\n\n\n\nNote that if the $k$ are constant, this amounts to the law of mass action.\n\n\n\n\nYou can also do a forward simulation (see R code):\n\n\n\n\n# association/dissociation kinetics\nkinetic_sim = function(k_on, k_off, a, b) {\n ab = 0\n ab_ts = c()\n a_ts = c()\n b_ts = c()\n for (i in 1:1000) {\n ab_old = ab\n ab = ab * (1 - k_off) + k_on * (a * b)\n a = a - a*b*k_on + ab_old * k_off\n b = b - a*b*k_on + ab_old * k_off\n #cat(i, a, b, ab, k_on*a*b, k_off*ab, \"\\n\", sep=\" \")\n ab_ts = append(ab_ts, ab)\n a_ts = append(a_ts, a)\n b_ts = append(b_ts, b)\n \n }\n return(list(ab_ts, a_ts, b_ts))\n}\nout = kinetic_sim(.1, .2, 1, 1)\nplot(out[[1]] / (out[[2]] * out[[3]]), ylab=\"[AB] / ([A] * [B])\", xlab=\"time step\")\nplot(out[[1]], ylab=\"[AB]\", xlab=\"time step\")\n\n\n\n\n\n[image: concentration of ratio [AB]:[A]*[B] over time; source: https://i.sstatic.net/Lw4hnYdr.png] (https://i.sstatic.net/Lw4hnYdr.png)\n[image: concentration of ratio [AB] over time; source: https://i.sstatic.net/pzN8ZZif.png] (https://i.sstatic.net/pzN8ZZif.png)\n\n\n\n\nYou can see that both the ratio and the final concentration equilibrate.", "answer_url": "https://biology.stackexchange.com/a/114769", "author": "Maximilian Press", "author_url": "https://biology.stackexchange.com/users/22392/maximilian-press", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2024-05-27T18:34:26+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:27.977583+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/1cbf95322a17dce0fd00a109179063ffe60bcd4bddc6e720f0ca398ee7aa9da8_0.json", "raw_sha256": "a096c86028a279b01346143890b4827bd8ed05afc0a76bd7c8bcb840211dc20e", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/114983;114969;114966;114963;114939;114936;114918;114909;114904;114899;114888;114885;114881;114875;114874;114873;114872;114864;114857;114850;114846;114841;114834;114827;114821;114819;114813;114804;114791;114784;114768;114765;114762;114760;114758;114755;114745;114741;114739;114738;114732;114730;114726;114714;114706;114695;114691;114690;114686;114683;114677;114675;114666;114660;114656;114653;114642;114641;114632;114628;114620;114618;114613;114601;114599;114597;114581;114577;114573;114567;114558;114555;114553;114552;114547;114545;114543;114542;114541;114539;114529;114524;114516;114502;114501;114498;114495;114492;114481;114476;114474;114470;114453;114451;114449;114448;114446;114440;114438;114435/answers?filter=withbody&order=asc&page=1&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 114768, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Maximilian Press", "profile_url": "https://biology.stackexchange.com/users/22392/maximilian-press", "user_type": "registered"}, "created_at": "2024-05-27T18:34:26+00:00", "raw_file": "raw/codex_api_v1/41500cf35bca9ae31b7ea454bad8679af7e3276d71713db5d1815d84a971bb0e_1790824088925435600_0.json", "raw_sha256": "a764902131a161e2a7978a1f607c4912689efa157d70c2752a5b31e3a042aacb", "revision_guid": "2F432EEF-5BF3-4FFE-B7E3-7AB1C8116BB1", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/2F432EEF-5BF3-4FFE-B7E3-7AB1C8116BB1/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Maximilian Press", "profile_url": "https://biology.stackexchange.com/users/22392/maximilian-press", "user_type": "registered"}, "created_at": "2024-05-27T19:01:38+00:00", "raw_file": "raw/codex_api_v1/41500cf35bca9ae31b7ea454bad8679af7e3276d71713db5d1815d84a971bb0e_1790824088925435600_0.json", "raw_sha256": "a764902131a161e2a7978a1f607c4912689efa157d70c2752a5b31e3a042aacb", "revision_guid": "F76C5C34-436D-4C68-9446-B7AA8D46C53D", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/F76C5C34-436D-4C68-9446-B7AA8D46C53D/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Maximilian Press", "profile_url": "https://biology.stackexchange.com/users/22392/maximilian-press", "user_type": "registered"}, "created_at": "2024-05-27T23:07:19+00:00", "raw_file": "raw/codex_api_v1/41500cf35bca9ae31b7ea454bad8679af7e3276d71713db5d1815d84a971bb0e_1790824088925435600_0.json", "raw_sha256": "a764902131a161e2a7978a1f607c4912689efa157d70c2752a5b31e3a042aacb", "revision_guid": "66A6E2A9-6D6D-44A5-9689-4CA42FD819D5", "revision_number": 3, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/66A6E2A9-6D6D-44A5-9689-4CA42FD819D5/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "TAR86", "profile_url": "https://biology.stackexchange.com/users/32467/tar86", "user_type": "registered"}, "created_at": "2024-05-28T18:28:08+00:00", "raw_file": "raw/codex_api_v1/41500cf35bca9ae31b7ea454bad8679af7e3276d71713db5d1815d84a971bb0e_1790824088925435600_0.json", "raw_sha256": "a764902131a161e2a7978a1f607c4912689efa157d70c2752a5b31e3a042aacb", "revision_guid": "F6B6E1D3-9103-4319-8C45-5BA53EDE0E07", "revision_number": 4, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/F6B6E1D3-9103-4319-8C45-5BA53EDE0E07/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Maximilian Press", "profile_url": "https://biology.stackexchange.com/users/22392/maximilian-press", "user_type": "registered"}, "created_at": "2024-05-29T15:54:51+00:00", "raw_file": "raw/codex_api_v1/41500cf35bca9ae31b7ea454bad8679af7e3276d71713db5d1815d84a971bb0e_1790824088925435600_0.json", "raw_sha256": "a764902131a161e2a7978a1f607c4912689efa157d70c2752a5b31e3a042aacb", "revision_guid": "F7F491C7-A6AE-4CC7-A285-9BCB342B71FB", "revision_number": 5, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/F7F491C7-A6AE-4CC7-A285-9BCB342B71FB/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Maximilian Press", "profile_url": "https://biology.stackexchange.com/users/22392/maximilian-press", "user_type": "registered"}, "created_at": "2024-05-29T16:02:07+00:00", "raw_file": "raw/codex_api_v1/41500cf35bca9ae31b7ea454bad8679af7e3276d71713db5d1815d84a971bb0e_1790824088925435600_0.json", "raw_sha256": "a764902131a161e2a7978a1f607c4912689efa157d70c2752a5b31e3a042aacb", "revision_guid": "7B9A63C5-69E0-473A-8EB0-676C7D3E95EC", "revision_number": 6, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/7B9A63C5-69E0-473A-8EB0-676C7D3E95EC/view-source"}], "score": 4, "updated_at": "2024-05-29T16:02:07+00:00"}, {"answer_html": "There is a misunderstanding here that is very common when first learning about chemical kinetics. First you say:
\n\n\nif $k_{\\rm on}$ and $k_{\\rm off}$ are both constant
\n
but then:
\n\n\nif the velocity is constant
\n
This is not one and the same!
\n$k$ is the rate constant of reaction.* The actual reaction rate (i.e., the change in concentration over time) is given in your example by:
\n$v_{\\rm on} = k_{\\rm on}[A][B]$ for the forward (binding) reaction, and
\n$v_{\\rm off} = k_{\\rm off}[AB]$ for the reverse (unbinding) reaction.
\nSuppose that $k_{\\rm on} > k_{\\rm off}$. Then at first $v_{\\rm on} > v_{\\rm off}$ and the product AB is produced faster than it degrades. Therefore the concentration of AB increases. On the other hand, A and B are consumed in the reaction, so their concentrations decrease.
\nNow look at the equations for reaction rates above! The rate of the forward reaction, $v_{\\rm on}$, depends on concentrations of starting materials, $[A][B]$; and the rate of the reverse reaction, $v_{\\rm off}$, depends on the concentration of product, $[AB]$. Therefore, as the reaction proceeds, $v_{\\rm on}$ must decrease and $v_{\\rm off}$ must increase until they reach equilibrium where both rates are equal.
\n* Note: As a convention, reaction rate constants are usually denoted by lowercase $k$. Uppercase $K$ is reserved for equilibrium constants, or the Michaelis constant $K_M$, or a number of other constants.
\n", "answer_id": 114774, "answer_text": "There is a misunderstanding here that is very common when first learning about chemical kinetics. First you say:\n\n\n\n\n\n\n\nif $k_{\\rm on}$ and $k_{\\rm off}$ are both constant\n\n\n\n\n\n\n\nbut then:\n\n\n\n\n\n\n\nif the velocity is constant\n\n\n\n\n\n\n\nThis is not one and the same!\n\n\n\n\n$k$ is the rate constant of reaction.* The actual reaction rate (i.e., the change in concentration over time) is given in your example by:\n\n\n\n\n$v_{\\rm on} = k_{\\rm on}[A][B]$ for the forward (binding) reaction, and\n\n\n\n\n$v_{\\rm off} = k_{\\rm off}[AB]$ for the reverse (unbinding) reaction.\n\n\n\n\nSuppose that $k_{\\rm on} > k_{\\rm off}$. Then at first $v_{\\rm on} > v_{\\rm off}$ and the product AB is produced faster than it degrades. Therefore the concentration of AB increases. On the other hand, A and B are consumed in the reaction, so their concentrations decrease.\n\n\n\n\nNow look at the equations for reaction rates above! The rate of the forward reaction, $v_{\\rm on}$, depends on concentrations of starting materials, $[A][B]$; and the rate of the reverse reaction, $v_{\\rm off}$, depends on the concentration of product, $[AB]$. Therefore, as the reaction proceeds, $v_{\\rm on}$ must decrease and $v_{\\rm off}$ must increase until they reach equilibrium where both rates are equal.\n\n\n\n\n\n\n\n* Note: As a convention, reaction rate constants are usually denoted by lowercase $k$. Uppercase $K$ is reserved for equilibrium constants, or the Michaelis constant $K_M$, or a number of other constants.", "answer_url": "https://biology.stackexchange.com/a/114774", "author": "knomologs", "author_url": "https://biology.stackexchange.com/users/81058/knomologs", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2024-05-28T07:12:10+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:27.977583+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/1cbf95322a17dce0fd00a109179063ffe60bcd4bddc6e720f0ca398ee7aa9da8_0.json", "raw_sha256": "a096c86028a279b01346143890b4827bd8ed05afc0a76bd7c8bcb840211dc20e", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/114983;114969;114966;114963;114939;114936;114918;114909;114904;114899;114888;114885;114881;114875;114874;114873;114872;114864;114857;114850;114846;114841;114834;114827;114821;114819;114813;114804;114791;114784;114768;114765;114762;114760;114758;114755;114745;114741;114739;114738;114732;114730;114726;114714;114706;114695;114691;114690;114686;114683;114677;114675;114666;114660;114656;114653;114642;114641;114632;114628;114620;114618;114613;114601;114599;114597;114581;114577;114573;114567;114558;114555;114553;114552;114547;114545;114543;114542;114541;114539;114529;114524;114516;114502;114501;114498;114495;114492;114481;114476;114474;114470;114453;114451;114449;114448;114446;114440;114438;114435/answers?filter=withbody&order=asc&page=1&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 114768, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "knomologs", "profile_url": "https://biology.stackexchange.com/users/81058/knomologs", "user_type": "registered"}, "created_at": "2024-05-28T07:12:10+00:00", "raw_file": "raw/codex_api_v1/41500cf35bca9ae31b7ea454bad8679af7e3276d71713db5d1815d84a971bb0e_1790824088925435600_0.json", "raw_sha256": "a764902131a161e2a7978a1f607c4912689efa157d70c2752a5b31e3a042aacb", "revision_guid": "313FA75B-43C6-4396-8899-8F5A827A0F14", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/313FA75B-43C6-4396-8899-8F5A827A0F14/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Ilmari Karonen", "profile_url": "https://biology.stackexchange.com/users/239/ilmari-karonen", "user_type": "registered"}, "created_at": "2024-05-28T08:54:26+00:00", "raw_file": "raw/codex_api_v1/41500cf35bca9ae31b7ea454bad8679af7e3276d71713db5d1815d84a971bb0e_1790824088925435600_0.json", "raw_sha256": "a764902131a161e2a7978a1f607c4912689efa157d70c2752a5b31e3a042aacb", "revision_guid": "9D91925C-3E92-4DDA-BB75-8BF48F945F36", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/9D91925C-3E92-4DDA-BB75-8BF48F945F36/view-source"}], "score": 11, "updated_at": "2024-05-28T08:54:26+00:00"}], "ground_truth": "community signals only; no scientific truth label", "product": "ranking", "question": "I would like to understand the classic kinetic model of association / dissociation that tries to describe the concentration of a compound $[\\ce{AB}]$.\nLet's say we have a model:\n\n\n\n\n$\\ce{A + B} \\xrightleftharpoons[k_{\\text{off}}]{k_{\\text{on}}} \\ce{AB}$\n\n\n\n\nSo $k_{\\text{on}}$ is the rate of binding and $k_{\\text{off}}$ is the rate of unbinding and the rate equation is:\n\n\n\n\n$\\frac{d[\\ce{AB}]}{dt}=k_{\\text{on}}[\\ce{A}][\\ce{B}]-k_{\\text{off}}[\\ce{AB}]$\n\n\n\n\nI don't understand why texts say that if $k_{\\text{on}}$ and $k_{\\text{off}}$ are both constant then we reach a steady state, i.e., $k_{\\text{on}}\\ce{AB}=k_{\\text{off}}[\\ce{AB}]$ I mean: if, for example, the rate of binding, is greater then the rate of unbinding, shouldn't the concentration of the final compound increase up to infinity? What I have in mind is: we produce 4 proteins per second and degrade 2 proteins per second, then the net production is 2 proteins per second so, as time goes by, the concentration should increase and doesn't reach a plateau.\n\n\n\n\nWhy do we instead reach a plateau in the final concentration? I can understand the plateau in the plot of the reaction velocity but still, if the velocity is constant, still the concentration of the final compound should increase.", "record_id": "Scientific-Answer-Ranking:biology:114768", "scores": [4, 11], "split": "holdout", "thread": {"accepted_answer_id": null, "answers": [{"answer_html": "Update: As noted by commenter, the example stated in the question is not actually Michaelis-Menten but is rather an example of binding kinetics. See also the other answer, which is likely more relevant.
\nI would suggest, if you would like to find the steady-state concentration of $[AB]$, that you can solve this yourself mathematically. Try differentiating and setting the $\\Delta [AB]$ side of the equation to zero, and solving. You will find:
\n$ \\Delta [AB] = (k_{on}[A][B] - k_{off}[AB])\\Delta t$
\n$ 0 = (k_{on}[A][B] - k_{off}[AB])\\Delta t$
\nRearranging:
\n$k_{on}[A][B] = k_{off}[AB] $
\nAnd finally:
\n$\\frac{[AB]}{[A][B]} = \\frac{k_{on}}{k_{off}}$
\nNote that if the $k$ are constant, this amounts to the law of mass action.
\nYou can also do a forward simulation (see R code):
\n# association/dissociation kinetics\nkinetic_sim = function(k_on, k_off, a, b) {\n ab = 0\n ab_ts = c()\n a_ts = c()\n b_ts = c()\n for (i in 1:1000) {\n ab_old = ab\n ab = ab * (1 - k_off) + k_on * (a * b)\n a = a - a*b*k_on + ab_old * k_off\n b = b - a*b*k_on + ab_old * k_off\n #cat(i, a, b, ab, k_on*a*b, k_off*ab, "\\n", sep=" ")\n ab_ts = append(ab_ts, ab)\n a_ts = append(a_ts, a)\n b_ts = append(b_ts, b)\n \n }\n return(list(ab_ts, a_ts, b_ts))\n}\nout = kinetic_sim(.1, .2, 1, 1)\nplot(out[[1]] / (out[[2]] * out[[3]]), ylab="[AB] / ([A] * [B])", xlab="time step")\nplot(out[[1]], ylab="[AB]", xlab="time step")\n\n\nYou can see that both the ratio and the final concentration equilibrate.
\n", "answer_id": 114769, "answer_text": "Update: As noted by commenter, the example stated in the question is not actually Michaelis-Menten but is rather an example of binding kinetics. See also the other answer, which is likely more relevant.\n\n\n\n\nI would suggest, if you would like to find the steady-state concentration of $[AB]$, that you can solve this yourself mathematically. Try differentiating and setting the $\\Delta [AB]$ side of the equation to zero, and solving. You will find:\n\n\n\n\n$ \\Delta [AB] = (k_{on}[A][B] - k_{off}[AB])\\Delta t$\n\n\n\n\n$ 0 = (k_{on}[A][B] - k_{off}[AB])\\Delta t$\n\n\n\n\nRearranging:\n\n\n\n\n$k_{on}[A][B] = k_{off}[AB] $\n\n\n\n\nAnd finally:\n\n\n\n\n$\\frac{[AB]}{[A][B]} = \\frac{k_{on}}{k_{off}}$\n\n\n\n\nNote that if the $k$ are constant, this amounts to the law of mass action.\n\n\n\n\nYou can also do a forward simulation (see R code):\n\n\n\n\n# association/dissociation kinetics\nkinetic_sim = function(k_on, k_off, a, b) {\n ab = 0\n ab_ts = c()\n a_ts = c()\n b_ts = c()\n for (i in 1:1000) {\n ab_old = ab\n ab = ab * (1 - k_off) + k_on * (a * b)\n a = a - a*b*k_on + ab_old * k_off\n b = b - a*b*k_on + ab_old * k_off\n #cat(i, a, b, ab, k_on*a*b, k_off*ab, \"\\n\", sep=\" \")\n ab_ts = append(ab_ts, ab)\n a_ts = append(a_ts, a)\n b_ts = append(b_ts, b)\n \n }\n return(list(ab_ts, a_ts, b_ts))\n}\nout = kinetic_sim(.1, .2, 1, 1)\nplot(out[[1]] / (out[[2]] * out[[3]]), ylab=\"[AB] / ([A] * [B])\", xlab=\"time step\")\nplot(out[[1]], ylab=\"[AB]\", xlab=\"time step\")\n\n\n\n\n\n[image: concentration of ratio [AB]:[A]*[B] over time; source: https://i.sstatic.net/Lw4hnYdr.png] (https://i.sstatic.net/Lw4hnYdr.png)\n[image: concentration of ratio [AB] over time; source: https://i.sstatic.net/pzN8ZZif.png] (https://i.sstatic.net/pzN8ZZif.png)\n\n\n\n\nYou can see that both the ratio and the final concentration equilibrate.", "answer_url": "https://biology.stackexchange.com/a/114769", "author": "Maximilian Press", "author_url": "https://biology.stackexchange.com/users/22392/maximilian-press", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2024-05-27T18:34:26+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:27.977583+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/1cbf95322a17dce0fd00a109179063ffe60bcd4bddc6e720f0ca398ee7aa9da8_0.json", "raw_sha256": "a096c86028a279b01346143890b4827bd8ed05afc0a76bd7c8bcb840211dc20e", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/114983;114969;114966;114963;114939;114936;114918;114909;114904;114899;114888;114885;114881;114875;114874;114873;114872;114864;114857;114850;114846;114841;114834;114827;114821;114819;114813;114804;114791;114784;114768;114765;114762;114760;114758;114755;114745;114741;114739;114738;114732;114730;114726;114714;114706;114695;114691;114690;114686;114683;114677;114675;114666;114660;114656;114653;114642;114641;114632;114628;114620;114618;114613;114601;114599;114597;114581;114577;114573;114567;114558;114555;114553;114552;114547;114545;114543;114542;114541;114539;114529;114524;114516;114502;114501;114498;114495;114492;114481;114476;114474;114470;114453;114451;114449;114448;114446;114440;114438;114435/answers?filter=withbody&order=asc&page=1&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 114768, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Maximilian Press", "profile_url": "https://biology.stackexchange.com/users/22392/maximilian-press", "user_type": "registered"}, "created_at": "2024-05-27T18:34:26+00:00", "raw_file": "raw/codex_api_v1/41500cf35bca9ae31b7ea454bad8679af7e3276d71713db5d1815d84a971bb0e_1790824088925435600_0.json", "raw_sha256": "a764902131a161e2a7978a1f607c4912689efa157d70c2752a5b31e3a042aacb", "revision_guid": "2F432EEF-5BF3-4FFE-B7E3-7AB1C8116BB1", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/2F432EEF-5BF3-4FFE-B7E3-7AB1C8116BB1/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Maximilian Press", "profile_url": "https://biology.stackexchange.com/users/22392/maximilian-press", "user_type": "registered"}, "created_at": "2024-05-27T19:01:38+00:00", "raw_file": "raw/codex_api_v1/41500cf35bca9ae31b7ea454bad8679af7e3276d71713db5d1815d84a971bb0e_1790824088925435600_0.json", "raw_sha256": "a764902131a161e2a7978a1f607c4912689efa157d70c2752a5b31e3a042aacb", "revision_guid": "F76C5C34-436D-4C68-9446-B7AA8D46C53D", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/F76C5C34-436D-4C68-9446-B7AA8D46C53D/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Maximilian Press", "profile_url": "https://biology.stackexchange.com/users/22392/maximilian-press", "user_type": "registered"}, "created_at": "2024-05-27T23:07:19+00:00", "raw_file": "raw/codex_api_v1/41500cf35bca9ae31b7ea454bad8679af7e3276d71713db5d1815d84a971bb0e_1790824088925435600_0.json", "raw_sha256": "a764902131a161e2a7978a1f607c4912689efa157d70c2752a5b31e3a042aacb", "revision_guid": "66A6E2A9-6D6D-44A5-9689-4CA42FD819D5", "revision_number": 3, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/66A6E2A9-6D6D-44A5-9689-4CA42FD819D5/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "TAR86", "profile_url": "https://biology.stackexchange.com/users/32467/tar86", "user_type": "registered"}, "created_at": "2024-05-28T18:28:08+00:00", "raw_file": "raw/codex_api_v1/41500cf35bca9ae31b7ea454bad8679af7e3276d71713db5d1815d84a971bb0e_1790824088925435600_0.json", "raw_sha256": "a764902131a161e2a7978a1f607c4912689efa157d70c2752a5b31e3a042aacb", "revision_guid": "F6B6E1D3-9103-4319-8C45-5BA53EDE0E07", "revision_number": 4, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/F6B6E1D3-9103-4319-8C45-5BA53EDE0E07/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Maximilian Press", "profile_url": "https://biology.stackexchange.com/users/22392/maximilian-press", "user_type": "registered"}, "created_at": "2024-05-29T15:54:51+00:00", "raw_file": "raw/codex_api_v1/41500cf35bca9ae31b7ea454bad8679af7e3276d71713db5d1815d84a971bb0e_1790824088925435600_0.json", "raw_sha256": "a764902131a161e2a7978a1f607c4912689efa157d70c2752a5b31e3a042aacb", "revision_guid": "F7F491C7-A6AE-4CC7-A285-9BCB342B71FB", "revision_number": 5, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/F7F491C7-A6AE-4CC7-A285-9BCB342B71FB/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Maximilian Press", "profile_url": "https://biology.stackexchange.com/users/22392/maximilian-press", "user_type": "registered"}, "created_at": "2024-05-29T16:02:07+00:00", "raw_file": "raw/codex_api_v1/41500cf35bca9ae31b7ea454bad8679af7e3276d71713db5d1815d84a971bb0e_1790824088925435600_0.json", "raw_sha256": "a764902131a161e2a7978a1f607c4912689efa157d70c2752a5b31e3a042aacb", "revision_guid": "7B9A63C5-69E0-473A-8EB0-676C7D3E95EC", "revision_number": 6, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/7B9A63C5-69E0-473A-8EB0-676C7D3E95EC/view-source"}], "score": 4, "updated_at": "2024-05-29T16:02:07+00:00"}, {"answer_html": "There is a misunderstanding here that is very common when first learning about chemical kinetics. First you say:
\n\n\nif $k_{\\rm on}$ and $k_{\\rm off}$ are both constant
\n
but then:
\n\n\nif the velocity is constant
\n
This is not one and the same!
\n$k$ is the rate constant of reaction.* The actual reaction rate (i.e., the change in concentration over time) is given in your example by:
\n$v_{\\rm on} = k_{\\rm on}[A][B]$ for the forward (binding) reaction, and
\n$v_{\\rm off} = k_{\\rm off}[AB]$ for the reverse (unbinding) reaction.
\nSuppose that $k_{\\rm on} > k_{\\rm off}$. Then at first $v_{\\rm on} > v_{\\rm off}$ and the product AB is produced faster than it degrades. Therefore the concentration of AB increases. On the other hand, A and B are consumed in the reaction, so their concentrations decrease.
\nNow look at the equations for reaction rates above! The rate of the forward reaction, $v_{\\rm on}$, depends on concentrations of starting materials, $[A][B]$; and the rate of the reverse reaction, $v_{\\rm off}$, depends on the concentration of product, $[AB]$. Therefore, as the reaction proceeds, $v_{\\rm on}$ must decrease and $v_{\\rm off}$ must increase until they reach equilibrium where both rates are equal.
\n* Note: As a convention, reaction rate constants are usually denoted by lowercase $k$. Uppercase $K$ is reserved for equilibrium constants, or the Michaelis constant $K_M$, or a number of other constants.
\n", "answer_id": 114774, "answer_text": "There is a misunderstanding here that is very common when first learning about chemical kinetics. First you say:\n\n\n\n\n\n\n\nif $k_{\\rm on}$ and $k_{\\rm off}$ are both constant\n\n\n\n\n\n\n\nbut then:\n\n\n\n\n\n\n\nif the velocity is constant\n\n\n\n\n\n\n\nThis is not one and the same!\n\n\n\n\n$k$ is the rate constant of reaction.* The actual reaction rate (i.e., the change in concentration over time) is given in your example by:\n\n\n\n\n$v_{\\rm on} = k_{\\rm on}[A][B]$ for the forward (binding) reaction, and\n\n\n\n\n$v_{\\rm off} = k_{\\rm off}[AB]$ for the reverse (unbinding) reaction.\n\n\n\n\nSuppose that $k_{\\rm on} > k_{\\rm off}$. Then at first $v_{\\rm on} > v_{\\rm off}$ and the product AB is produced faster than it degrades. Therefore the concentration of AB increases. On the other hand, A and B are consumed in the reaction, so their concentrations decrease.\n\n\n\n\nNow look at the equations for reaction rates above! The rate of the forward reaction, $v_{\\rm on}$, depends on concentrations of starting materials, $[A][B]$; and the rate of the reverse reaction, $v_{\\rm off}$, depends on the concentration of product, $[AB]$. Therefore, as the reaction proceeds, $v_{\\rm on}$ must decrease and $v_{\\rm off}$ must increase until they reach equilibrium where both rates are equal.\n\n\n\n\n\n\n\n* Note: As a convention, reaction rate constants are usually denoted by lowercase $k$. Uppercase $K$ is reserved for equilibrium constants, or the Michaelis constant $K_M$, or a number of other constants.", "answer_url": "https://biology.stackexchange.com/a/114774", "author": "knomologs", "author_url": "https://biology.stackexchange.com/users/81058/knomologs", "author_user_type": "registered", "content_license": "CC BY-SA 4.0", "created_at": "2024-05-28T07:12:10+00:00", "is_accepted": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:27.977583+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/1cbf95322a17dce0fd00a109179063ffe60bcd4bddc6e720f0ca398ee7aa9da8_0.json", "raw_sha256": "a096c86028a279b01346143890b4827bd8ed05afc0a76bd7c8bcb840211dc20e", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/questions/114983;114969;114966;114963;114939;114936;114918;114909;114904;114899;114888;114885;114881;114875;114874;114873;114872;114864;114857;114850;114846;114841;114834;114827;114821;114819;114813;114804;114791;114784;114768;114765;114762;114760;114758;114755;114745;114741;114739;114738;114732;114730;114726;114714;114706;114695;114691;114690;114686;114683;114677;114675;114666;114660;114656;114653;114642;114641;114632;114628;114620;114618;114613;114601;114599;114597;114581;114577;114573;114567;114558;114555;114553;114552;114547;114545;114543;114542;114541;114539;114529;114524;114516;114502;114501;114498;114495;114492;114481;114476;114474;114470;114453;114451;114449;114448;114446;114440;114438;114435/answers?filter=withbody&order=asc&page=1&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_id": 114768, "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "knomologs", "profile_url": "https://biology.stackexchange.com/users/81058/knomologs", "user_type": "registered"}, "created_at": "2024-05-28T07:12:10+00:00", "raw_file": "raw/codex_api_v1/41500cf35bca9ae31b7ea454bad8679af7e3276d71713db5d1815d84a971bb0e_1790824088925435600_0.json", "raw_sha256": "a764902131a161e2a7978a1f607c4912689efa157d70c2752a5b31e3a042aacb", "revision_guid": "313FA75B-43C6-4396-8899-8F5A827A0F14", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/313FA75B-43C6-4396-8899-8F5A827A0F14/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Ilmari Karonen", "profile_url": "https://biology.stackexchange.com/users/239/ilmari-karonen", "user_type": "registered"}, "created_at": "2024-05-28T08:54:26+00:00", "raw_file": "raw/codex_api_v1/41500cf35bca9ae31b7ea454bad8679af7e3276d71713db5d1815d84a971bb0e_1790824088925435600_0.json", "raw_sha256": "a764902131a161e2a7978a1f607c4912689efa157d70c2752a5b31e3a042aacb", "revision_guid": "9D91925C-3E92-4DDA-BB75-8BF48F945F36", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/9D91925C-3E92-4DDA-BB75-8BF48F945F36/view-source"}], "score": 11, "updated_at": "2024-05-28T08:54:26+00:00"}], "domain": "biology", "external_links": ["https://i.sstatic.net/Lw4hnYdr.png", "https://i.sstatic.net/pzN8ZZif.png"], "medical_sensitive": false, "patient_specific": false, "provenance": {"attribution_required": true, "collected_at": "2026-10-01T03:03:07.165481+00:00", "license": "CC BY-SA 4.0", "license_url": "https://creativecommons.org/licenses/by-sa/4.0/", "raw_file": "raw/codex_api_v1/b97a755f39b54a1e8a057fa5e484426784aa17a1971c6ef0ca759105de983078_0.json", "raw_sha256": "4c9dcc077d306d60a8b8a237ad3f9b3144c0d5885fa62ef1bfdd55d2fbbdaf6a", "source_api": "Stack Exchange API 2.3", "source_url": "https://api.stackexchange.com/2.3/search/advanced?answers=1&filter=withbody&order=desc&page=6&pagesize=100&site=biology&sort=creation", "transformation": "API HTML retained; mechanical HTML-to-text; no LLM rewriting"}, "question_author": "Salmon", "question_author_url": "https://biology.stackexchange.com/users/81048/salmon", "question_author_user_type": "registered", "question_created_at": "2024-05-27T17:53:29+00:00", "question_html": "I would like to understand the classic kinetic model of association / dissociation that tries to describe the concentration of a compound $[\\ce{AB}]$.\nLet's say we have a model:
\n$\\ce{A + B} \\xrightleftharpoons[k_{\\text{off}}]{k_{\\text{on}}} \\ce{AB}$
\nSo $k_{\\text{on}}$ is the rate of binding and $k_{\\text{off}}$ is the rate of unbinding and the rate equation is:
\n$\\frac{d[\\ce{AB}]}{dt}=k_{\\text{on}}[\\ce{A}][\\ce{B}]-k_{\\text{off}}[\\ce{AB}]$
\nI don't understand why texts say that if $k_{\\text{on}}$ and $k_{\\text{off}}$ are both constant then we reach a steady state, i.e., $k_{\\text{on}}\\ce{AB}=k_{\\text{off}}[\\ce{AB}]$ I mean: if, for example, the rate of binding, is greater then the rate of unbinding, shouldn't the concentration of the final compound increase up to infinity? What I have in mind is: we produce 4 proteins per second and degrade 2 proteins per second, then the net production is 2 proteins per second so, as time goes by, the concentration should increase and doesn't reach a plateau.
\nWhy do we instead reach a plateau in the final concentration? I can understand the plateau in the plot of the reaction velocity but still, if the velocity is constant, still the concentration of the final compound should increase.
\n", "question_id": 114768, "question_license": "CC BY-SA 4.0", "question_score": 9, "question_text": "I would like to understand the classic kinetic model of association / dissociation that tries to describe the concentration of a compound $[\\ce{AB}]$.\nLet's say we have a model:\n\n\n\n\n$\\ce{A + B} \\xrightleftharpoons[k_{\\text{off}}]{k_{\\text{on}}} \\ce{AB}$\n\n\n\n\nSo $k_{\\text{on}}$ is the rate of binding and $k_{\\text{off}}$ is the rate of unbinding and the rate equation is:\n\n\n\n\n$\\frac{d[\\ce{AB}]}{dt}=k_{\\text{on}}[\\ce{A}][\\ce{B}]-k_{\\text{off}}[\\ce{AB}]$\n\n\n\n\nI don't understand why texts say that if $k_{\\text{on}}$ and $k_{\\text{off}}$ are both constant then we reach a steady state, i.e., $k_{\\text{on}}\\ce{AB}=k_{\\text{off}}[\\ce{AB}]$ I mean: if, for example, the rate of binding, is greater then the rate of unbinding, shouldn't the concentration of the final compound increase up to infinity? What I have in mind is: we produce 4 proteins per second and degrade 2 proteins per second, then the net production is 2 proteins per second so, as time goes by, the concentration should increase and doesn't reach a plateau.\n\n\n\n\nWhy do we instead reach a plateau in the final concentration? I can understand the plateau in the plot of the reaction velocity but still, if the velocity is constant, still the concentration of the final compound should increase.", "revision_attribution": [{"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Salmon", "profile_url": "https://biology.stackexchange.com/users/81048/salmon", "user_type": "registered"}, "created_at": "2024-05-27T17:53:29+00:00", "raw_file": "raw/codex_api_v1/41500cf35bca9ae31b7ea454bad8679af7e3276d71713db5d1815d84a971bb0e_1790824088925435600_0.json", "raw_sha256": "a764902131a161e2a7978a1f607c4912689efa157d70c2752a5b31e3a042aacb", "revision_guid": "8F6A9C82-AB24-4AAA-AEA4-4CCEC307A30D", "revision_number": 1, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/8F6A9C82-AB24-4AAA-AEA4-4CCEC307A30D/view-source"}, {"content_license": null, "contributor": {"display_name": "[deleted/unavailable user]", "profile_url": null, "user_type": "does_not_exist"}, "created_at": "2024-05-28T01:55:54+00:00", "raw_file": "raw/codex_api_v1/41500cf35bca9ae31b7ea454bad8679af7e3276d71713db5d1815d84a971bb0e_1790824088925435600_0.json", "raw_sha256": "a764902131a161e2a7978a1f607c4912689efa157d70c2752a5b31e3a042aacb", "revision_guid": "67E06F37-A278-489B-9151-42F43CC33901", "revision_number": null, "revision_type": "vote_based", "revision_url": "https://biology.stackexchange.com/revisions/67E06F37-A278-489B-9151-42F43CC33901/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Eonema", "profile_url": "https://biology.stackexchange.com/users/61325/eonema", "user_type": "registered"}, "created_at": "2024-05-28T18:27:34+00:00", "raw_file": "raw/codex_api_v1/41500cf35bca9ae31b7ea454bad8679af7e3276d71713db5d1815d84a971bb0e_1790824088925435600_0.json", "raw_sha256": "a764902131a161e2a7978a1f607c4912689efa157d70c2752a5b31e3a042aacb", "revision_guid": "1BE03709-7FDD-4B62-AC28-EA9679360587", "revision_number": 2, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/1BE03709-7FDD-4B62-AC28-EA9679360587/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "terdon", "profile_url": "https://biology.stackexchange.com/users/1306/terdon", "user_type": "moderator"}, "created_at": "2024-05-29T09:20:12+00:00", "raw_file": "raw/codex_api_v1/41500cf35bca9ae31b7ea454bad8679af7e3276d71713db5d1815d84a971bb0e_1790824088925435600_0.json", "raw_sha256": "a764902131a161e2a7978a1f607c4912689efa157d70c2752a5b31e3a042aacb", "revision_guid": "EA80ADAF-D374-4B5D-AD65-EB7FFB2E5272", "revision_number": 3, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/EA80ADAF-D374-4B5D-AD65-EB7FFB2E5272/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "Maximilian Press", "profile_url": "https://biology.stackexchange.com/users/22392/maximilian-press", "user_type": "registered"}, "created_at": "2024-05-29T15:57:09+00:00", "raw_file": "raw/codex_api_v1/41500cf35bca9ae31b7ea454bad8679af7e3276d71713db5d1815d84a971bb0e_1790824088925435600_0.json", "raw_sha256": "a764902131a161e2a7978a1f607c4912689efa157d70c2752a5b31e3a042aacb", "revision_guid": "65B6CB44-E4EC-42B0-A71E-63D9F3F3ADB1", "revision_number": 4, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/65B6CB44-E4EC-42B0-A71E-63D9F3F3ADB1/view-source"}, {"content_license": "CC BY-SA 4.0", "contributor": {"display_name": "David", "profile_url": "https://biology.stackexchange.com/users/22057/david", "user_type": "registered"}, "created_at": "2024-06-01T17:40:24+00:00", "raw_file": "raw/codex_api_v1/41500cf35bca9ae31b7ea454bad8679af7e3276d71713db5d1815d84a971bb0e_1790824088925435600_0.json", "raw_sha256": "a764902131a161e2a7978a1f607c4912689efa157d70c2752a5b31e3a042aacb", "revision_guid": "DF937FB9-3603-49F8-9865-D03B3F660F75", "revision_number": 5, "revision_type": "single_user", "revision_url": "https://biology.stackexchange.com/revisions/DF937FB9-3603-49F8-9865-D03B3F660F75/view-source"}], "source_site": "biology", "source_url": "https://biology.stackexchange.com/questions/114768/understanding-association-kinetics", "split": "holdout", "split_group": "8b0f36cc135364768cd90ac330640c6f0b50ae8f7a33283b023303c13e7f6e98", "tags": ["biochemistry", "enzymes", "kinetics"], "thread_id": "biology:114768", "title": "Understanding association kinetics"}}