[{"id":247336,"date":"2026-07-12T14:26:29","date_gmt":"2026-07-12T19:26:29","guid":{"rendered":"https:\/\/www.johndcook.com\/blog\/?p=247336"},"modified":"2026-07-12T14:26:29","modified_gmt":"2026-07-12T19:26:29","slug":"posterior-variance","status":"publish","type":"post","link":"https:\/\/www.johndcook.com\/blog\/2026\/07\/12\/posterior-variance\/","title":{"rendered":"Posterior variance"},"content":{"rendered":"<p>A few days ago I wrote a post entitled <a href=\"https:\/\/www.johndcook.com\/blog\/2026\/07\/03\/does-additional-data-always-reduce-posterior-variance\/\">Does additional data always reduce posterior variance?<\/a>. In a nutshell, the answer is no, not always.<\/p>\n<p>That led the <a href=\"https:\/\/www.johndcook.com\/blog\/2026\/07\/12\/posterior-mean\/\">previous post<\/a> which looked at posterior means for three Bayesian models, showing how the posterior mean is a weighted average of the prior mean and the mean of the new data. The weights are <em>precisions<\/em>, which means something different for each model.<\/p>\n<p>For the beta-binomial model, variance may increase when seeing unexpected data (details <a href=\"https:\/\/www.johndcook.com\/blog\/2026\/07\/03\/does-additional-data-always-reduce-posterior-variance\/\">here<\/a>), but precision always increases.<\/p>\n<p>For the normal-normal model precision is the reciprocal of variance. Every new data point makes precision go up and posterior variance go down.<\/p>\n<p>The Poisson-gamma model may be the most interesting. As stated in the previous post, if data has a Poisson distribution with parameter \u03bb, and \u03bb has a gamma(\u03b1<sub>0<\/sub>, \u03b2<sub>0<\/sub>) prior distribution, then the posterior distribution on \u03bb after observing <em>k<\/em> events over time <em>t<\/em> has a gamma(\u03b1<sub>0<\/sub> + <em>k<\/em>, \u03b2<sub>0<\/sub> + <em>t<\/em>) posterior distribution. Therefore the posterior variance is<\/p>\n<p style=\"padding-left: 40px;\">(\u03b1<sub>0<\/sub> + <em>k<\/em>) \/ (\u03b2<sub>0<\/sub> + <em>t<\/em>)\u00b2.<\/p>\n<p>Note the posterior variance is an increasing function of\u00a0<em>k<\/em> and a decreasing function of\u00a0<em>t<\/em>. This means that the posterior variance increases\u00a0<em>every time<\/em> an event is observed, and it decreases quadratically between observations.<\/p>\n<p>Here&#8217;s an illustration. I simulated data from a Poisson process with \u03bb and used a gamma(1, 1) prior on \u03bb. Here&#8217;s a plot of the posterior variance.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium\" src=\"https:\/\/www.johndcook.com\/posterior_variance.png\" width=\"480\" height=\"360\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A few days ago I wrote a post entitled Does additional data always reduce posterior variance?. In a nutshell, the answer is no, not always. That led the previous post which looked at posterior means for three Bayesian models, showing how the posterior mean is a weighted average of the prior mean and the mean [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[17],"tags":[25,106],"class_list":["post-247336","post","type-post","status-publish","format-standard","hentry","category-statistics","tag-bayesian","tag-probability-and-statistics"],"acf":[],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Posterior variance for three conjugate Bayesian models. The posterior variance in the Poisson-gamma model jumps every time there&#039;s an observation.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"John\"\/>\n\t<meta name=\"keywords\" content=\"bayesian,probability and statistics\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.johndcook.com\/blog\/2026\/07\/12\/posterior-variance\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"John D. Cook | Applied Mathematics Consulting\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Posterior variance in conjugate models | Poisson-gamma\" \/>\n\t\t<meta property=\"og:description\" content=\"Posterior variance for three conjugate Bayesian models. The posterior variance in the Poisson-gamma model jumps every time there&#039;s an observation.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.johndcook.com\/blog\/2026\/07\/12\/posterior-variance\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2026-07-12T19:26:29+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2026-07-12T19:26:29+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Posterior variance in conjugate models | Poisson-gamma\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Posterior variance for three conjugate Bayesian models. The posterior variance in the Poisson-gamma model jumps every time there&#039;s an observation.\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.johndcook.com\/blog\/wp-content\/uploads\/2022\/05\/twittercard.png\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Posterior variance in conjugate models | Poisson-gamma","description":"Posterior variance for three conjugate Bayesian models. The posterior variance in the Poisson-gamma model jumps every time there's an observation.","canonical_url":"https:\/\/www.johndcook.com\/blog\/2026\/07\/12\/posterior-variance\/","robots":"max-image-preview:large","keywords":"bayesian,probability and statistics","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"John D. Cook | Applied Mathematics Consulting","og:type":"article","og:title":"Posterior variance in conjugate models | Poisson-gamma","og:description":"Posterior variance for three conjugate Bayesian models. The posterior variance in the Poisson-gamma model jumps every time there's an observation.","og:url":"https:\/\/www.johndcook.com\/blog\/2026\/07\/12\/posterior-variance\/","article:published_time":"2026-07-12T19:26:29+00:00","article:modified_time":"2026-07-12T19:26:29+00:00","twitter:card":"summary","twitter:title":"Posterior variance in conjugate models | Poisson-gamma","twitter:description":"Posterior variance for three conjugate Bayesian models. The posterior variance in the Poisson-gamma model jumps every time there's an observation.","twitter:image":"https:\/\/www.johndcook.com\/blog\/wp-content\/uploads\/2022\/05\/twittercard.png"},"aioseo_meta_data":{"post_id":"247336","title":"Posterior variance in conjugate models | Poisson-gamma","description":"Posterior variance for three conjugate Bayesian models. The posterior variance in the Poisson-gamma model jumps every time there's an observation.","keywords":null,"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"created":"2026-07-12 18:51:35","updated":"2026-07-12 19:26:29","ai":{"faqs":[],"keyPoints":[],"schemas":[],"titles":[],"descriptions":[],"socialPosts":{"email":{"subject":"","preview":"","content":""},"linkedin":[],"twitter":[],"facebook":[],"instagram":[]}},"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.johndcook.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.johndcook.com\/blog\/category\/statistics\/\" title=\"Statistics\">Statistics<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tPosterior variance\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.johndcook.com\/blog"},{"label":"Statistics","link":"https:\/\/www.johndcook.com\/blog\/category\/statistics\/"},{"label":"Posterior variance","link":"https:\/\/www.johndcook.com\/blog\/2026\/07\/12\/posterior-variance\/"}],"_links":{"self":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts\/247336","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/comments?post=247336"}],"version-history":[{"count":1,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts\/247336\/revisions"}],"predecessor-version":[{"id":247338,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts\/247336\/revisions\/247338"}],"wp:attachment":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/media?parent=247336"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/categories?post=247336"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/tags?post=247336"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}},{"id":247322,"date":"2026-07-12T12:48:14","date_gmt":"2026-07-12T17:48:14","guid":{"rendered":"https:\/\/www.johndcook.com\/blog\/?p=247322"},"modified":"2026-07-12T13:21:06","modified_gmt":"2026-07-12T18:21:06","slug":"posterior-mean","status":"publish","type":"post","link":"https:\/\/www.johndcook.com\/blog\/2026\/07\/12\/posterior-mean\/","title":{"rendered":"Posterior mean"},"content":{"rendered":"<p>Common sense says that what you believe after seeing new data should be some sort of compromise between what you believed before and what the new data says. You don&#8217;t want to ignore previous information or new information.<\/p>\n<p>How much should new data change your prior beliefs? When prior judgment and new information are in conflict, which one should be given the benefit of the doubt?<\/p>\n<p>Bayesian data models provide a framework for making such decisions quantitative and objective. The choice of a data model is somewhat subjective\u2014whether it&#8217;s a Bayesian model or not\u2014but given a Bayesian model, the rules for updating the representation of your beliefs are objective. As some put it, you &#8220;turn the Bayesian crank.&#8221; A likelihood model and a prior on parameters together specify how new data changes the prior distribution into a posterior distribution.<\/p>\n<p>We will make this more concrete with three examples.<\/p>\n<h2>Normal-normal model<\/h2>\n<p>Suppose that data <em>X<\/em> has a normal distribution with unknown mean &mu; and known variance \u03c3\u00b2, and we assume that <em>a priori<\/em> &mu; has a normal distribution with mean \u03bc<sub>0<\/sub> and variance \u03c3<sub>0<\/sub>\u00b2.<\/p>\n<p>After observing <em>x<\/em>, the posterior distribution on &mu; also has a normal distribution, but with a different mean and variance. Its mean is somewhere between the prior mean and <em>x<\/em>. We will ignore the change in the variance for this post.<\/p>\n<p>The posterior mean of &mu; is<\/p>\n<p><img class='aligncenter' src='https:\/\/www.johndcook.com\/postmean1.svg' alt='\\mu_{\\text{post}} = \\frac{\\dfrac{\\mu_0}{\\sigma_0^2} + \\dfrac{x}{\\sigma^2}}{\\dfrac{1}{\\sigma_0^2} + \\dfrac{1}{\\sigma^2}}' style='background-color:white' height='103' width='128' \/><\/p>\n<p>This equation becomes more understandable when we introduce precisons \u03c4 = 1\/\u03c3\u00b2 and \u03c4<sub>0<\/sub> = 1\/\u03c3<sub>0<\/sub>\u00b2.<\/p>\n<p>Then we have<\/p>\n<p><img class='aligncenter' src='https:\/\/www.johndcook.com\/postmean2.svg' alt='\\mu_{\\text{post}} = \\frac{\\mu_0 \\cdot \\tau_0 + x \\cdot \\tau}{\\tau_0 + \\tau}' style='background-color:white' height='41' width='163' \/><\/p>\n<p>which you can read as saying the posterior mean is the weighted average of the prior mean and <em>x<\/em>, with the weights given by the precision. Intuitively, you take the weighted mean of your conclusions from previous data and new data, weighting the mean according to how much confidence you have in each.<\/p>\n<h2>Beta-binomial model<\/h2>\n<p>Now let&#8217;s switch over to a different data model. Now assume\u00a0<em>X<\/em> is a binary random variable, with probability of success\u00a0<em>p<\/em> and probability of failure 1 \u2212 <em>p<\/em>, and we assume <em>p<\/em> has a beta(<em>a<\/em>, <em>b<\/em>) distribution.<\/p>\n<p>After observing <em>s<\/em> successes and <em>f<\/em> failures, the posterior mean of the distribution on <em>p<\/em> becomes<\/p>\n<p><img class='aligncenter' src='https:\/\/www.johndcook.com\/postmean3.svg' alt='p_{\\text{post}} = \\frac{a + s}{a + b + s + f}' style='background-color:white' height='42' width='164' \/><\/p>\n<p>We can rewrite this as<\/p>\n<p><img class='aligncenter' src='https:\/\/www.johndcook.com\/postmean4.svg' alt='p_{\\text{post}} = \\frac{(a + b) \\dfrac{a}{a+b} + (s + f) \\dfrac{s}{s+f}}{(a + b) + (s +f)}' style='background-color:white' height='68' width='286' \/><\/p>\n<p>This says that the posterior mean is the weighted average of the prior mean <em>a<\/em>\/(<em>a<\/em> + <em>b<\/em>) and the mean of the data <em>s<\/em>\/<em>n<\/em>. The weights are the prior effective sample size <em>a<\/em> + <em>b<\/em> and the sample size of the new data <em>n<\/em>. In this example (effective) sample size is playing the role that precision played in the normal-normal model above.<\/p>\n<h2>Gamma-Poisson model<\/h2>\n<p>Suppose data have a Poisson distribution with parameter &lambda;, and &lambda; has a gamma(&alpha;<sub>0<\/sub>, &beta;<sub>0<\/sub>) prior distribution [1]. And suppose you observe <em>k<\/em> events over time <em>t<\/em>. Then the posterior distribution of &lambda; given the data has a gamma(&alpha;<sub>0<\/sub> + <em>k<\/em>, &beta;<sub>0<\/sub> + <em>t<\/em>) prior distribution and the mean of the posterior distribution is given by<\/p>\n<p><img class='aligncenter' src='https:\/\/www.johndcook.com\/postmean5.svg' alt='\\lambda_{\\text{post}} = \\frac{\\alpha_0 + k}{\\beta_0 + t} = \\frac{\\beta_0 (\\alpha_0 \/ \\beta_0) + t (k \/ t)}{\\beta_0 + t}' style='background-color:white' height='46' width='291' \/><\/p>\n<p>As before, the posterior mean is a weighted average of the prior mean and new data, and the weights are interpretable as some sort of measure of confidence, namely time. The variable <em>t<\/em> is directly time and the parameter &beta;<sub>0<\/sub> is sort of an effective time, just as <em>a<\/em> + <em>b<\/em> is an effective sample size for the beta distribution.<\/p>\n<h2>Common thread<\/h2>\n<p>In each example the posterior mean is the weighted average of the prior mean and the mean of the data, with the weights given by a precision. However, precision means something different in each example. In the normal-normal model, precision is the reciprocal of variance, but in the beta-binomial model precision is sample size and in the Poisson-gamma model precision is time.<\/p>\n<p>What all three examples have in common is that they are conjugate models using distributions from the &#8220;exponential family&#8221; of probability distributions. In technical terms, precision is the multiplicative factor on the sufficient statistic in the exponent of the posterior kernel.<\/p>\n<h2>Related posts<\/h2>\n<ul>\n<li class='link'><a href='https:\/\/www.johndcook.com\/blog\/2026\/07\/03\/does-additional-data-always-reduce-posterior-variance\/'>Does additional data always reduce posterior variance?<\/a><\/li>\n<li class='link'><a href='https:\/\/www.johndcook.com\/blog\/distribution_chart\/'>Diagram of probability distribution relationships<\/a><\/li>\n<li class='link'><a href='https:\/\/www.johndcook.com\/blog\/bayesian-consulting\/'>Bayesian statistics consulting<\/a><\/li>\n<\/ul>\n<p>[1] There are multiple conventions for parameterizing the gamma distribution. Here we&#8217;re using the shape-rate parameterization, where the mean is &alpha;\/&beta;.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Common sense says that what you believe after seeing new data should be some sort of compromise between what you believed before and what the new data says. You don&#8217;t want to ignore previous information or new information. How much should new data change your prior beliefs? When prior judgment and new information are in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[17],"tags":[25],"class_list":["post-247322","post","type-post","status-publish","format-standard","hentry","category-statistics","tag-bayesian"],"acf":[],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Three examples of conjugate models and their posterior means, given as a weighted average of prior mean and data mean, weighted by precision.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"John\"\/>\n\t<meta name=\"keywords\" content=\"bayesian\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.johndcook.com\/blog\/2026\/07\/12\/posterior-mean\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"John D. Cook | Applied Mathematics Consulting\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Posterior mean of conjugate Bayesian models\" \/>\n\t\t<meta property=\"og:description\" content=\"Three examples of conjugate models and their posterior means, given as a weighted average of prior mean and data mean, weighted by precision.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.johndcook.com\/blog\/2026\/07\/12\/posterior-mean\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2026-07-12T17:48:14+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2026-07-12T18:21:06+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Posterior mean of conjugate Bayesian models\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Three examples of conjugate models and their posterior means, given as a weighted average of prior mean and data mean, weighted by precision.\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.johndcook.com\/blog\/wp-content\/uploads\/2022\/05\/twittercard.png\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Posterior mean of conjugate Bayesian models","description":"Three examples of conjugate models and their posterior means, given as a weighted average of prior mean and data mean, weighted by precision.","canonical_url":"https:\/\/www.johndcook.com\/blog\/2026\/07\/12\/posterior-mean\/","robots":"max-image-preview:large","keywords":"bayesian","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"John D. Cook | Applied Mathematics Consulting","og:type":"article","og:title":"Posterior mean of conjugate Bayesian models","og:description":"Three examples of conjugate models and their posterior means, given as a weighted average of prior mean and data mean, weighted by precision.","og:url":"https:\/\/www.johndcook.com\/blog\/2026\/07\/12\/posterior-mean\/","article:published_time":"2026-07-12T17:48:14+00:00","article:modified_time":"2026-07-12T18:21:06+00:00","twitter:card":"summary","twitter:title":"Posterior mean of conjugate Bayesian models","twitter:description":"Three examples of conjugate models and their posterior means, given as a weighted average of prior mean and data mean, weighted by precision.","twitter:image":"https:\/\/www.johndcook.com\/blog\/wp-content\/uploads\/2022\/05\/twittercard.png"},"aioseo_meta_data":{"post_id":"247322","title":"Posterior mean of conjugate Bayesian models","description":"Three examples of conjugate models and their posterior means, given as a weighted average of prior mean and data mean, weighted by precision.","keywords":null,"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"created":"2026-07-12 12:24:55","updated":"2026-07-12 19:20:59","ai":{"faqs":[],"keyPoints":[],"schemas":[],"titles":[],"descriptions":[],"socialPosts":{"email":{"subject":"","preview":"","content":""},"linkedin":[],"twitter":[],"facebook":[],"instagram":[]}},"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.johndcook.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.johndcook.com\/blog\/category\/statistics\/\" title=\"Statistics\">Statistics<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tPosterior mean\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.johndcook.com\/blog"},{"label":"Statistics","link":"https:\/\/www.johndcook.com\/blog\/category\/statistics\/"},{"label":"Posterior mean","link":"https:\/\/www.johndcook.com\/blog\/2026\/07\/12\/posterior-mean\/"}],"_links":{"self":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts\/247322","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/comments?post=247322"}],"version-history":[{"count":10,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts\/247322\/revisions"}],"predecessor-version":[{"id":247333,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts\/247322\/revisions\/247333"}],"wp:attachment":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/media?parent=247322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/categories?post=247322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/tags?post=247322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}},{"id":247319,"date":"2026-07-11T16:30:11","date_gmt":"2026-07-11T21:30:11","guid":{"rendered":"https:\/\/www.johndcook.com\/blog\/?p=247319"},"modified":"2026-07-12T13:28:26","modified_gmt":"2026-07-12T18:28:26","slug":"progress-on-gilbreaths-conjecture","status":"publish","type":"post","link":"https:\/\/www.johndcook.com\/blog\/2026\/07\/11\/progress-on-gilbreaths-conjecture\/","title":{"rendered":"Progress on Gilbreath&#8217;s conjecture"},"content":{"rendered":"<p>Years ago I wrote about <a href=\"https:\/\/www.johndcook.com\/blog\/2009\/09\/09\/gilbreath-conjecture\/\">Gilbreath&#8217;s conjecture<\/a>. It&#8217;s a simple conjecture; you could explain it to anyone who understands what prime numbers are. See the linked post for a description of the problem.<\/p>\n<p>Gilbreath&#8217;s conjecture is simple, but it&#8217;s also kinda weird. As I wrote before,<\/p>\n<blockquote><p>Paul Erd\u0151s speculated that Gilbreath\u2019s conjecture is true but it would be 200 years before anyone could prove it. I find Erd\u0151s\u2019s conjecture more interesting than Gilbreath\u2019s conjecture.<\/p><\/blockquote>\n<p>The conjecture is hard in a way that, say, solving a nasty-looking differential equation is not. Over the last three centuries, mathematics has developed quite a toolbox for solving differential equations. But Gilbreath&#8217;s conjecture is just odd enough that it&#8217;s not at all clear what kind of tool might be useful in approaching it.<\/p>\n<p>Terence Tao has a <a href=\"https:\/\/terrytao.wordpress.com\/2026\/07\/11\/gilbreaths-conjecture-a-cramer-random-model-and-a-deterministic-analysis\/\">new blog post<\/a> announcing a <a href=\"https:\/\/arxiv.org\/abs\/2607.08712\">paper<\/a> that he and two coauthors wrote on a random model intended to mimic Gilbreath&#8217;s calculation on primes. This random model is more sophisticated than the little game Gilbreath was playing, but it&#8217;s also much more amenable to analysis by established techniques. Tao&#8217;s post gives a heuristic explanation for why Gilbreath&#8217;s conjecture is plausible, but then adds<\/p>\n<blockquote><p>However, it seems well beyond current technology to try to make these heuristics rigorous; even the first step \u2026 is far out of reach.<\/p><\/blockquote>\n<h2>Related posts<\/h2>\n<ul>\n<li class=\"link\"><a href=\"https:\/\/www.johndcook.com\/blog\/2025\/07\/29\/moessners-magic\/\">Moessner\u2019s Magic<\/a><\/li>\n<li class=\"link\"><a href=\"https:\/\/www.johndcook.com\/blog\/2024\/04\/25\/closed-form-pde\/\">Closed form solutions to PDEs<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Years ago I wrote about Gilbreath&#8217;s conjecture. It&#8217;s a simple conjecture; you could explain it to anyone who understands what prime numbers are. See the linked post for a description of the problem. Gilbreath&#8217;s conjecture is simple, but it&#8217;s also kinda weird. As I wrote before, Paul Erd\u0151s speculated that Gilbreath\u2019s conjecture is true but [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[9],"tags":[94],"class_list":["post-247319","post","type-post","status-publish","format-standard","hentry","category-math","tag-number-theory"],"acf":[],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Gilbreath&#039;s simple but weird conjecture, and progress on an analogous problem by Terence Tao.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"John\"\/>\n\t<meta name=\"keywords\" content=\"number theory\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.johndcook.com\/blog\/2026\/07\/11\/progress-on-gilbreaths-conjecture\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"John D. Cook | Applied Mathematics Consulting\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Progress on Gilbreath\u2019s conjecture\" \/>\n\t\t<meta property=\"og:description\" content=\"Gilbreath&#039;s simple but weird conjecture, and progress on an analogous problem by Terence Tao.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.johndcook.com\/blog\/2026\/07\/11\/progress-on-gilbreaths-conjecture\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2026-07-11T21:30:11+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2026-07-12T18:28:26+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Progress on Gilbreath\u2019s conjecture\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Gilbreath&#039;s simple but weird conjecture, and progress on an analogous problem by Terence Tao.\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.johndcook.com\/blog\/wp-content\/uploads\/2022\/05\/twittercard.png\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Progress on Gilbreath\u2019s conjecture","description":"Gilbreath's simple but weird conjecture, and progress on an analogous problem by Terence Tao.","canonical_url":"https:\/\/www.johndcook.com\/blog\/2026\/07\/11\/progress-on-gilbreaths-conjecture\/","robots":"max-image-preview:large","keywords":"number theory","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"John D. Cook | Applied Mathematics Consulting","og:type":"article","og:title":"Progress on Gilbreath\u2019s conjecture","og:description":"Gilbreath's simple but weird conjecture, and progress on an analogous problem by Terence Tao.","og:url":"https:\/\/www.johndcook.com\/blog\/2026\/07\/11\/progress-on-gilbreaths-conjecture\/","article:published_time":"2026-07-11T21:30:11+00:00","article:modified_time":"2026-07-12T18:28:26+00:00","twitter:card":"summary","twitter:title":"Progress on Gilbreath\u2019s conjecture","twitter:description":"Gilbreath's simple but weird conjecture, and progress on an analogous problem by Terence Tao.","twitter:image":"https:\/\/www.johndcook.com\/blog\/wp-content\/uploads\/2022\/05\/twittercard.png"},"aioseo_meta_data":{"post_id":"247319","title":null,"description":"Gilbreath's simple but weird conjecture, and progress on an analogous problem by Terence Tao.","keywords":null,"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"created":"2026-07-11 21:09:01","updated":"2026-07-12 19:20:59","ai":{"faqs":[],"keyPoints":[],"schemas":[],"titles":[],"descriptions":[],"socialPosts":{"email":{"subject":"","preview":"","content":""},"linkedin":[],"twitter":[],"facebook":[],"instagram":[]}},"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.johndcook.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.johndcook.com\/blog\/category\/math\/\" title=\"Math\">Math<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tProgress on Gilbreath\u2019s conjecture\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.johndcook.com\/blog"},{"label":"Math","link":"https:\/\/www.johndcook.com\/blog\/category\/math\/"},{"label":"Progress on Gilbreath&#8217;s conjecture","link":"https:\/\/www.johndcook.com\/blog\/2026\/07\/11\/progress-on-gilbreaths-conjecture\/"}],"_links":{"self":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts\/247319","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/comments?post=247319"}],"version-history":[{"count":3,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts\/247319\/revisions"}],"predecessor-version":[{"id":247335,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts\/247319\/revisions\/247335"}],"wp:attachment":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/media?parent=247319"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/categories?post=247319"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/tags?post=247319"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}},{"id":247315,"date":"2026-07-06T09:22:35","date_gmt":"2026-07-06T14:22:35","guid":{"rendered":"https:\/\/www.johndcook.com\/blog\/?p=247315"},"modified":"2026-07-06T11:55:34","modified_gmt":"2026-07-06T16:55:34","slug":"arc-hypotenuse","status":"publish","type":"post","link":"https:\/\/www.johndcook.com\/blog\/2026\/07\/06\/arc-hypotenuse\/","title":{"rendered":"Reproducing a geometry theorem diagram"},"content":{"rendered":"<p>I ran across a geometry theorem with the following diagram.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium\" src=\"https:\/\/www.johndcook.com\/three_circles1.png\" width=\"407\" height=\"360\" \/><\/p>\n<p>The theorem corresponding to the diagram is interesting, but I found reproducing the diagram more interesting.<\/p>\n<p>The segment\u00a0<em>AB<\/em> is a diameter and the line\u00a0<em>CD<\/em> is perpendicular to the diameter.<\/p>\n<p>Assume the outer circle is a unit circle. I guessed\u00a0<em>C<\/em> = (cos(1), sin(1)) and made the following diagram.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium\" src=\"https:\/\/www.johndcook.com\/three_circles2.png\" width=\"360\" height=\"360\" \/><\/p>\n<p>I guessed the value of <em>C<\/em> by eyeballing it, but in retrospect this would have been a convenient value for the creator of the original diagram to have chosen.<\/p>\n<p>Drawing the blue circle inscribed in the triangle was easy using the equations for the center and radius from <a href=\"https:\/\/www.johndcook.com\/blog\/2026\/06\/25\/incircle-excircle\/\">this post<\/a>. Drawing the other two circles, the green and orange circles, was harder. They are also inscribed circles, but not inscribed in a triangle. They&#8217;re inscribed in a three-sided figure with two perpendicular sides and a circular arc.<\/p>\n<p>The radius <em>r<\/em> of the green circle is the distance from the center of the circle to each of its tangent lines. Also, the distance from the origin to the center of the circle must be 1 \u2212 <em>r<\/em>. This is enough information to set up a quadratic equation for\u00a0<em>r<\/em>. The same reasoning applies to the orange circle.<\/p>\n<p>The original diagram comes from [1] and the theorem it illustrates says the diameter of the blue circle equals the sum of the radii of the green and orange circles.<\/p>\n<h2>Python code<\/h2>\n<p>In case you&#8217;re interested, here&#8217;s the code that created the diagram.<\/p>\n<pre>\r\n#!\/usr\/bin\/env -S uv run --script\r\n\r\n# \/\/\/ script\r\n# dependencies = [\"numpy\", \"matplotlib\"]\r\n# \/\/\/\r\n\r\nimport numpy as np\r\nimport matplotlib.pyplot as plt\r\n\r\ndef connect(A, B, color='gray'):\r\n    plt.plot([A[0], B[0]], [A[1], B[1]], color=color, linewidth=2)\r\n\r\ndef circle(c, r, color='gray'):\r\n    t = np.linspace(0, 2*np.pi)\r\n    plt.plot(c[0] + r*np.cos(t), c[1] + r*np.sin(t), color=color, linewidth=2)\r\n\r\ndef quadratic(a, b, c):\r\n    det = b**2 - 4*a*c\r\n    return ((-b - det**0.5)\/(2*a), (-b + det**0.5)\/(2*a))\r\n\r\nA = np.array([-1, 0])\r\nB = np.array([ 1, 0])\r\nC = np.array([np.cos(1), np.sin(1)])\r\na = np.linalg.norm(B - C)\r\nb = np.linalg.norm(A - C)\r\nc = np.linalg.norm(B - A)\r\ns = (a + b + c)\/2\r\n\r\ncircle([0,0], 1)\r\nconnect(A, B,)\r\nconnect(A, C)\r\nconnect(C, B)\r\nconnect(C, C*np.array([1, -1]))\r\n\r\ncenter = (a*A + b*B + c*C)\/(2*s)\r\nradius = 0.5*a*b\/s\r\ncircle(center, radius, 'C0')\r\n\r\nEx = C[0]\r\nroots = quadratic(1, 2 + 2*Ex, Ex**2 - 1)\r\nr = roots[1] # Smaller root is negaive\r\nprint(roots)\r\ncenter = (r + Ex, -r)\r\ncircle(center, r, 'C1')\r\n\r\nroots = quadratic(1, 2 - 2*Ex, Ex**2 - 1)\r\nr = roots[1] # Smaller root is negaive\r\ncenter = (Ex - r, -r)\r\ncircle(center, r, 'C2')\r\n\r\nplt.gca().set_aspect(\"equal\")\r\nplt.axis(\"off\")\r\nplt.show()\r\n<\/pre>\n<p>[1] Leon Bankoff. A Geometrical Coincidence. Mathematics Magazine, Vol. 37, No. 5 (Nov., 1964), p. 324.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I ran across a geometry theorem with the following diagram. The theorem corresponding to the diagram is interesting, but I found reproducing the diagram more interesting. The segment\u00a0AB is a diameter and the line\u00a0CD is perpendicular to the diameter. Assume the outer circle is a unit circle. I guessed\u00a0C = (cos(1), sin(1)) and made the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[9],"tags":[224],"class_list":["post-247315","post","type-post","status-publish","format-standard","hentry","category-math","tag-geometry"],"acf":[],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Reproducing a geometry theorem diagram\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"John\"\/>\n\t<meta name=\"keywords\" content=\"geometry\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.johndcook.com\/blog\/2026\/07\/06\/arc-hypotenuse\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"John D. Cook | Applied Mathematics Consulting\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Reproducing a geometry theorem diagram\" \/>\n\t\t<meta property=\"og:description\" content=\"Reproducing a geometry theorem diagram\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.johndcook.com\/blog\/2026\/07\/06\/arc-hypotenuse\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2026-07-06T14:22:35+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2026-07-06T16:55:34+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Reproducing a geometry theorem diagram\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Reproducing a geometry theorem diagram\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.johndcook.com\/blog\/wp-content\/uploads\/2022\/05\/twittercard.png\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Reproducing a geometry theorem diagram","description":"Reproducing a geometry theorem diagram","canonical_url":"https:\/\/www.johndcook.com\/blog\/2026\/07\/06\/arc-hypotenuse\/","robots":"max-image-preview:large","keywords":"geometry","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"John D. Cook | Applied Mathematics Consulting","og:type":"article","og:title":"Reproducing a geometry theorem diagram","og:description":"Reproducing a geometry theorem diagram","og:url":"https:\/\/www.johndcook.com\/blog\/2026\/07\/06\/arc-hypotenuse\/","article:published_time":"2026-07-06T14:22:35+00:00","article:modified_time":"2026-07-06T16:55:34+00:00","twitter:card":"summary","twitter:title":"Reproducing a geometry theorem diagram","twitter:description":"Reproducing a geometry theorem diagram","twitter:image":"https:\/\/www.johndcook.com\/blog\/wp-content\/uploads\/2022\/05\/twittercard.png"},"aioseo_meta_data":{"post_id":"247315","title":null,"description":"Reproducing a geometry theorem diagram","keywords":null,"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"created":"2026-07-06 13:46:12","updated":"2026-07-06 16:57:00","ai":{"faqs":[],"keyPoints":[],"schemas":[],"titles":[],"descriptions":[],"socialPosts":{"email":{"subject":"","preview":"","content":""},"linkedin":[],"twitter":[],"facebook":[],"instagram":[]}},"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.johndcook.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.johndcook.com\/blog\/category\/math\/\" title=\"Math\">Math<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tReproducing a geometry theorem diagram\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.johndcook.com\/blog"},{"label":"Math","link":"https:\/\/www.johndcook.com\/blog\/category\/math\/"},{"label":"Reproducing a geometry theorem diagram","link":"https:\/\/www.johndcook.com\/blog\/2026\/07\/06\/arc-hypotenuse\/"}],"_links":{"self":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts\/247315","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/comments?post=247315"}],"version-history":[{"count":3,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts\/247315\/revisions"}],"predecessor-version":[{"id":247318,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts\/247315\/revisions\/247318"}],"wp:attachment":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/media?parent=247315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/categories?post=247315"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/tags?post=247315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}},{"id":247311,"date":"2026-07-06T07:22:29","date_gmt":"2026-07-06T12:22:29","guid":{"rendered":"https:\/\/www.johndcook.com\/blog\/?p=247311"},"modified":"2026-07-06T07:22:29","modified_gmt":"2026-07-06T12:22:29","slug":"e-approximation","status":"publish","type":"post","link":"https:\/\/www.johndcook.com\/blog\/2026\/07\/06\/e-approximation\/","title":{"rendered":"e approximation"},"content":{"rendered":"<p>I ran across the approximation<\/p>\n<p style=\"padding-left: 40px;\"><em>e<\/em> \u2248 2721\/1001<\/p>\n<p>recently. What makes this remarkable is its accuracy relative to the size of the denominator.<\/p>\n<p>You can create a trivial approximation just by truncating a decimal expansion<\/p>\n<p style=\"padding-left: 40px;\"><em>e<\/em> \u2248 2718\/1000<\/p>\n<p>but this is only good to four significant figures, but 2721\/1001 is good to seven, almost eight, significant figures.<\/p>\n<pre>e         = 2.71828182\u2026 \r\n2721\/1001 = 2.71828171\u2026\r\n<\/pre>\n<p>The comparison is more impressive in binary.<\/p>\n<pre>$ bc -l\r\n&gt;&gt;&gt; obase=2\r\n&gt;&gt;&gt; 2721\/1001\r\n10.10110111111000010100\u2026\r\n&gt;&gt;&gt; e(1)\r\n10.10110111111000010101\u2026\r\n<\/pre>\n<p>The denominator is a 10-bit number but the approximation is accurate to 21 bits.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I ran across the approximation e \u2248 2721\/1001 recently. What makes this remarkable is its accuracy relative to the size of the denominator. You can create a trivial approximation just by truncating a decimal expansion e \u2248 2718\/1000 but this is only good to four significant figures, but 2721\/1001 is good to seven, almost eight, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[9],"tags":[],"class_list":["post-247311","post","type-post","status-publish","format-standard","hentry","category-math"],"acf":[],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"I ran across the approximation e \u2248 2721\/1001 recently. What makes this remarkable is its accuracy relative to the size of the denominator. You can create a trivial approximation just by truncating a decimal expansion e \u2248 2718\/1000 but this is only good to four significant figures, but 2721\/1001 is good to seven, almost eight,\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"John\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.johndcook.com\/blog\/2026\/07\/06\/e-approximation\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"John D. Cook | Applied Mathematics Consulting\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"e approximation\" \/>\n\t\t<meta property=\"og:description\" content=\"I ran across the approximation e \u2248 2721\/1001 recently. What makes this remarkable is its accuracy relative to the size of the denominator. You can create a trivial approximation just by truncating a decimal expansion e \u2248 2718\/1000 but this is only good to four significant figures, but 2721\/1001 is good to seven, almost eight,\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.johndcook.com\/blog\/2026\/07\/06\/e-approximation\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2026-07-06T12:22:29+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2026-07-06T12:22:29+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"e approximation\" \/>\n\t\t<meta name=\"twitter:description\" content=\"I ran across the approximation e \u2248 2721\/1001 recently. What makes this remarkable is its accuracy relative to the size of the denominator. You can create a trivial approximation just by truncating a decimal expansion e \u2248 2718\/1000 but this is only good to four significant figures, but 2721\/1001 is good to seven, almost eight,\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.johndcook.com\/blog\/wp-content\/uploads\/2022\/05\/twittercard.png\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"e approximation","description":"I ran across the approximation e \u2248 2721\/1001 recently. What makes this remarkable is its accuracy relative to the size of the denominator. You can create a trivial approximation just by truncating a decimal expansion e \u2248 2718\/1000 but this is only good to four significant figures, but 2721\/1001 is good to seven, almost eight,","canonical_url":"https:\/\/www.johndcook.com\/blog\/2026\/07\/06\/e-approximation\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"John D. Cook | Applied Mathematics Consulting","og:type":"article","og:title":"e approximation","og:description":"I ran across the approximation e \u2248 2721\/1001 recently. What makes this remarkable is its accuracy relative to the size of the denominator. You can create a trivial approximation just by truncating a decimal expansion e \u2248 2718\/1000 but this is only good to four significant figures, but 2721\/1001 is good to seven, almost eight,","og:url":"https:\/\/www.johndcook.com\/blog\/2026\/07\/06\/e-approximation\/","article:published_time":"2026-07-06T12:22:29+00:00","article:modified_time":"2026-07-06T12:22:29+00:00","twitter:card":"summary","twitter:title":"e approximation","twitter:description":"I ran across the approximation e \u2248 2721\/1001 recently. What makes this remarkable is its accuracy relative to the size of the denominator. You can create a trivial approximation just by truncating a decimal expansion e \u2248 2718\/1000 but this is only good to four significant figures, but 2721\/1001 is good to seven, almost eight,","twitter:image":"https:\/\/www.johndcook.com\/blog\/wp-content\/uploads\/2022\/05\/twittercard.png"},"aioseo_meta_data":{"post_id":"247311","title":null,"description":null,"keywords":null,"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"created":"2026-07-06 12:10:11","updated":"2026-07-06 13:46:57","ai":{"faqs":[],"keyPoints":[],"schemas":[],"titles":[],"descriptions":[],"socialPosts":{"email":{"subject":"","preview":"","content":""},"linkedin":[],"twitter":[],"facebook":[],"instagram":[]}},"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.johndcook.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.johndcook.com\/blog\/category\/math\/\" title=\"Math\">Math<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\te approximation\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.johndcook.com\/blog"},{"label":"Math","link":"https:\/\/www.johndcook.com\/blog\/category\/math\/"},{"label":"e approximation","link":"https:\/\/www.johndcook.com\/blog\/2026\/07\/06\/e-approximation\/"}],"_links":{"self":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts\/247311","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/comments?post=247311"}],"version-history":[{"count":3,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts\/247311\/revisions"}],"predecessor-version":[{"id":247314,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts\/247311\/revisions\/247314"}],"wp:attachment":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/media?parent=247311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/categories?post=247311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/tags?post=247311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}},{"id":247301,"date":"2026-07-03T21:50:36","date_gmt":"2026-07-04T02:50:36","guid":{"rendered":"https:\/\/www.johndcook.com\/blog\/?p=247301"},"modified":"2026-07-12T13:53:34","modified_gmt":"2026-07-12T18:53:34","slug":"does-additional-data-always-reduce-posterior-variance","status":"publish","type":"post","link":"https:\/\/www.johndcook.com\/blog\/2026\/07\/03\/does-additional-data-always-reduce-posterior-variance\/","title":{"rendered":"Does additional data always reduce posterior variance?"},"content":{"rendered":"<p>A discussion over lunch today brought up the fact that additional data does not always decrease the size of a confidence interval. This post will look at this from a Bayesian perspective.<\/p>\n<p>In general, new information reduces your uncertainty regarding whatever you&#8217;re estimating. The posterior distribution becomes more concentrated as more data are collected.<\/p>\n<p>That&#8217;s what happens &#8220;in general&#8221; but does it necessarily happen every time you get new data? Conceivably if you get surprising data, data that is very unlikely given your current prior, posterior uncertainty might increase.<\/p>\n<h2>Beta-binomial model<\/h2>\n<p>To show that this is the case, suppose the probability of success in some binary trial has parameter \u03b8 and that \u03b8 has a beta prior. You could imagine this prior to be the posterior after having made some number of previous observations. Can a new observation increase the posterior variance in \u03b8? If so, under what conditions?<\/p>\n<p>The variance of a beta(<em>a<\/em>, <em>b<\/em>) random variable is<\/p>\n<p style=\"padding-left: 40px;\"><em>ab<\/em> \/ (<em>a<\/em> + <em>b<\/em>)\u00b2(<em>a<\/em> + <em>b<\/em> + 1).<\/p>\n<p>After observing a successful trial, the posterior distribution on \u03b8 is beta(<em>a<\/em> + 1, <em>b<\/em>). We can calculate the ratio of the posterior variance to the prior variance and ask under what circumstances, if any, the ratio is greater than 1.<\/p>\n<p>If 2<em>a<\/em> \u2265 <em>b<\/em> the posterior variance will be strictly less than the prior variance. This says if the prior mean odds against a success are no more than 2 : 1, observing a success will reduce the variance. (So will observing a failure.) But for any value of <em>b<\/em>, you can find a small enough value of\u00a0<em>a<\/em> that observing a success will increase the variance.<\/p>\n<h2>Normal-normal model<\/h2>\n<p>Whether an observation can increase the posterior variance depends on the data model. If your data have a normal likelihood function with known variance and a normal prior on the mean \u03b8, the posterior variance is always less than the prior observation, and it reduces by the same amount, independent of the observation\u00a0<em>x<\/em>. If <em>x<\/em> is very unlikely <em>a priori<\/em> then it will pull the posterior mean toward itself more than an observation that is more concordant with the prior would have, but the change in the posterior variance is the same.<\/p>\n<h2>Proof of beta theorem<\/h2>\n<p>Here is a proof in Lean 4 of the statement above that if 2<em>a<\/em> \u2265 <em>b<\/em> the posterior variance will be strictly less than the prior variance.<\/p>\n<pre>import Mathlib\r\n\r\nset_option linter.style.header false\r\n\r\nnoncomputable def f (a b : \u211d) : \u211d := a * b \/ ((a + b) ^ 2 * (a + b + 1))\r\n\r\ntheorem f_ratio_lt_one' (a b : \u211d) (ha : 0 &lt; a) (hb : 0 &lt; b) (hab : b \u2264 2 * a) :\r\n    f (a + 1) b \/ f a b &lt; 1 := by\r\n  have hs : 0 &lt; a + b := by linarith\r\n  have h2ab : 0 \u2264 2 * a - b := by linarith\r\n  have hprod : 0 \u2264 (a + b) * (2 * a - b) := mul_nonneg hs.le h2ab\r\n  -- key polynomial inequality (\u2217)\r\n  have key : (a + 1) * (a + b) ^ 2 &lt; a * ((a + b + 1) * (a + b + 2)) := by\r\n    nlinarith [hprod, ha]\r\n  -- nonzero facts needed to clear denominators\r\n  have ha' : a \u2260 0 := ne_of_gt ha\r\n  have hb' : b \u2260 0 := ne_of_gt hb\r\n  have hs' : a + b \u2260 0 := ne_of_gt hs\r\n  have hs1' : a + b + 1 \u2260 0 := by positivity\r\n  have hs2' : a + b + 2 \u2260 0 := by positivity\r\n  have ha1' : a + 1 \u2260 0 := by positivity\r\n  -- express the ratio as a single closed-form fraction\r\n  have hratio : f (a + 1) b \/ f a b\r\n      = ((a + 1) * (a + b) ^ 2) \/ (a * ((a + b + 1) * (a + b + 2))) := by\r\n    unfold f\r\n    have e : a + 1 + b = a + b + 1 := by ring\r\n    rw [e]\r\n    field_simp\r\n    ring\r\n  rw [hratio, div_lt_one (by positivity)]\r\n  exact key\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>A discussion over lunch today brought up the fact that additional data does not always decrease the size of a confidence interval. This post will look at this from a Bayesian perspective. In general, new information reduces your uncertainty regarding whatever you&#8217;re estimating. The posterior distribution becomes more concentrated as more data are collected. That&#8217;s [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[9],"tags":[25,324],"class_list":["post-247301","post","type-post","status-publish","format-standard","hentry","category-math","tag-bayesian","tag-formal-methods"],"acf":[],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Observing data that is moderately concordant with what you&#039;ve seen before decreases posterior variance. But discordant data could increase posterior variance.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"John\"\/>\n\t<meta name=\"keywords\" content=\"bayesian,formal methods\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.johndcook.com\/blog\/2026\/07\/03\/does-additional-data-always-reduce-posterior-variance\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"John D. Cook | Applied Mathematics Consulting\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Does additional data always reduce posterior variance?\" \/>\n\t\t<meta property=\"og:description\" content=\"Observing data that is moderately concordant with what you&#039;ve seen before decreases posterior variance. But discordant data could increase posterior variance.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.johndcook.com\/blog\/2026\/07\/03\/does-additional-data-always-reduce-posterior-variance\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2026-07-04T02:50:36+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2026-07-12T18:53:34+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Does additional data always reduce posterior variance?\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Observing data that is moderately concordant with what you&#039;ve seen before decreases posterior variance. But discordant data could increase posterior variance.\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.johndcook.com\/blog\/wp-content\/uploads\/2022\/05\/twittercard.png\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Does additional data always reduce posterior variance?","description":"Observing data that is moderately concordant with what you've seen before decreases posterior variance. But discordant data could increase posterior variance.","canonical_url":"https:\/\/www.johndcook.com\/blog\/2026\/07\/03\/does-additional-data-always-reduce-posterior-variance\/","robots":"max-image-preview:large","keywords":"bayesian,formal methods","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"John D. Cook | Applied Mathematics Consulting","og:type":"article","og:title":"Does additional data always reduce posterior variance?","og:description":"Observing data that is moderately concordant with what you've seen before decreases posterior variance. But discordant data could increase posterior variance.","og:url":"https:\/\/www.johndcook.com\/blog\/2026\/07\/03\/does-additional-data-always-reduce-posterior-variance\/","article:published_time":"2026-07-04T02:50:36+00:00","article:modified_time":"2026-07-12T18:53:34+00:00","twitter:card":"summary","twitter:title":"Does additional data always reduce posterior variance?","twitter:description":"Observing data that is moderately concordant with what you've seen before decreases posterior variance. But discordant data could increase posterior variance.","twitter:image":"https:\/\/www.johndcook.com\/blog\/wp-content\/uploads\/2022\/05\/twittercard.png"},"aioseo_meta_data":{"post_id":"247301","title":null,"description":"Observing data that is moderately concordant with what you've seen before decreases posterior variance. But discordant data could increase posterior variance.","keywords":null,"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"created":"2026-07-04 02:07:44","updated":"2026-07-12 19:20:59","ai":{"faqs":[],"keyPoints":[],"schemas":[],"titles":[],"descriptions":[],"socialPosts":{"email":{"subject":"","preview":"","content":""},"linkedin":[],"twitter":[],"facebook":[],"instagram":[]}},"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.johndcook.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.johndcook.com\/blog\/category\/math\/\" title=\"Math\">Math<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tDoes additional data always reduce posterior variance?\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.johndcook.com\/blog"},{"label":"Math","link":"https:\/\/www.johndcook.com\/blog\/category\/math\/"},{"label":"Does additional data always reduce posterior variance?","link":"https:\/\/www.johndcook.com\/blog\/2026\/07\/03\/does-additional-data-always-reduce-posterior-variance\/"}],"_links":{"self":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts\/247301","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/comments?post=247301"}],"version-history":[{"count":6,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts\/247301\/revisions"}],"predecessor-version":[{"id":247337,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts\/247301\/revisions\/247337"}],"wp:attachment":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/media?parent=247301"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/categories?post=247301"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/tags?post=247301"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}},{"id":247287,"date":"2026-06-30T19:21:21","date_gmt":"2026-07-01T00:21:21","guid":{"rendered":"https:\/\/www.johndcook.com\/blog\/?p=247287"},"modified":"2026-07-01T10:46:31","modified_gmt":"2026-07-01T15:46:31","slug":"dna-sequence-alignment-and-kings","status":"publish","type":"post","link":"https:\/\/www.johndcook.com\/blog\/2026\/06\/30\/dna-sequence-alignment-and-kings\/","title":{"rendered":"DNA Sequence Alignment and Kings"},"content":{"rendered":"<p><a href=\"https:\/\/www.johndcook.com\/blog\/2026\/06\/30\/silver-kings\/\">This morning<\/a> I wrote a post that included the central Delannoy numbers. The\u00a0<em>n<\/em>th central Delannoy number\u00a0<em>D<\/em><sub><em>n<\/em><\/sub> counts the number of ways a king can move from one corner of a chessboard to the diagonally opposite corner without backtracking.<\/p>\n<p>The more general Delannoy numbers <em>D<\/em><sub><em>m<\/em>,<em>n<\/em><\/sub> are the analogy for an <em>m<\/em> \u00d7 <em>n<\/em> rectangular board, not necessarily square.<\/p>\n<p><em>D<\/em><sub><em>m<\/em>,<em>n<\/em><\/sub> is also the number of possible sequence alignments for a strand of DNA with <em>m<\/em> base pairs and a strand with <em>n<\/em> base pairs [1]. At each step in the alignment process, you can introduce a gap in the first strand, the second strand or neither, which is analogous to the king who can move N, E, or NE at each step.<\/p>\n<p>The Delannoy numbers can be computed recursively:<\/p>\n<pre>def D(m, n):\r\n    if m == 0 or n == 0:\r\n        return 1\r\n    return D(m - 1, n) + D(m, n - 1) + D(m - 1, n - 1)\r\n<\/pre>\n<p>The code above can be sped up tremendously by adding the decorator<\/p>\n<pre>@lru_cache(maxsize=None)<\/pre>\n<p>above the function definition to turn on memoization. I did an experiment computing <em>D<\/em><sub>12,15<\/sub> with and without memoization and the times were 77.1805 seconds and 0.000062 seconds respectively, i.e. memoization made the code over a million times faster.<\/p>\n<p>Incidentally, <em>D<\/em><sub>12,15<\/sub> = 2653649025 and so there are a <em>lot<\/em> of ways to align even short sequences unless you place some restriction on the permissible alignments.<\/p>\n<p><strong>Update<\/strong>: Here&#8217;s a heatmap plotting log<sub>10<\/sub>(<em>D<\/em><sub><em>m<\/em>,<em>n<\/em><\/sub>). Obviously the function increases with\u00a0<em>m<\/em> and\u00a0<em>n<\/em>: bigger chessboards have more possible paths. Moreover, it&#8217;s larger along the diagonal (i.e. the <em>central<\/em> Delannoy numbers). If you look along northeast to southwest diagonals, the function is largest in the middle where <em>m<\/em> = <em>n<\/em>. <\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium\" src=\"https:\/\/www.johndcook.com\/delannoy_heatmap.png\" width=\"500\" height=\"375\" \/><\/p>\n<p>[1] Torres, A., Cabada, A., &amp; Nieto, J. J. (2003). An exact formula for the number of alignments between two DNA sequences. <em>DNA Sequence, 14<\/em>(6), 427\u2013430. https:\/\/doi.org\/10.1080\/10425170310001617894<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This morning I wrote a post that included the central Delannoy numbers. The\u00a0nth central Delannoy number\u00a0Dn counts the number of ways a king can move from one corner of a chessboard to the diagonally opposite corner without backtracking. The more general Delannoy numbers Dm,n are the analogy for an m \u00d7 n rectangular board, not [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[9],"tags":[197,60],"class_list":["post-247287","post","type-post","status-publish","format-standard","hentry","category-math","tag-combinatorics","tag-genetics"],"acf":[],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"How DNA sequence alignment and a chess problem have the same combinatorics.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"John\"\/>\n\t<meta name=\"keywords\" content=\"combinatorics,genetics\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.johndcook.com\/blog\/2026\/06\/30\/dna-sequence-alignment-and-kings\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"John D. Cook | Applied Mathematics Consulting\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"DNA sequence alignment and Delannoy numbers\" \/>\n\t\t<meta property=\"og:description\" content=\"How DNA sequence alignment and a chess problem have the same combinatorics.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.johndcook.com\/blog\/2026\/06\/30\/dna-sequence-alignment-and-kings\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2026-07-01T00:21:21+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2026-07-01T15:46:31+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"DNA sequence alignment and Delannoy numbers\" \/>\n\t\t<meta name=\"twitter:description\" content=\"How DNA sequence alignment and a chess problem have the same combinatorics.\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.johndcook.com\/blog\/wp-content\/uploads\/2022\/05\/twittercard.png\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"DNA sequence alignment and Delannoy numbers","description":"How DNA sequence alignment and a chess problem have the same combinatorics.","canonical_url":"https:\/\/www.johndcook.com\/blog\/2026\/06\/30\/dna-sequence-alignment-and-kings\/","robots":"max-image-preview:large","keywords":"combinatorics,genetics","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"John D. Cook | Applied Mathematics Consulting","og:type":"article","og:title":"DNA sequence alignment and Delannoy numbers","og:description":"How DNA sequence alignment and a chess problem have the same combinatorics.","og:url":"https:\/\/www.johndcook.com\/blog\/2026\/06\/30\/dna-sequence-alignment-and-kings\/","article:published_time":"2026-07-01T00:21:21+00:00","article:modified_time":"2026-07-01T15:46:31+00:00","twitter:card":"summary","twitter:title":"DNA sequence alignment and Delannoy numbers","twitter:description":"How DNA sequence alignment and a chess problem have the same combinatorics.","twitter:image":"https:\/\/www.johndcook.com\/blog\/wp-content\/uploads\/2022\/05\/twittercard.png"},"aioseo_meta_data":{"post_id":"247287","title":"DNA sequence alignment and Delannoy numbers","description":"How DNA sequence alignment and a chess problem have the same combinatorics.","keywords":null,"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"created":"2026-06-30 23:44:52","updated":"2026-07-01 18:17:58","ai":{"faqs":[],"keyPoints":[],"schemas":[],"titles":[],"descriptions":[],"socialPosts":{"email":{"subject":"","preview":"","content":""},"linkedin":[],"twitter":[],"facebook":[],"instagram":[]}},"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.johndcook.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.johndcook.com\/blog\/category\/math\/\" title=\"Math\">Math<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tDNA Sequence Alignment and Kings\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.johndcook.com\/blog"},{"label":"Math","link":"https:\/\/www.johndcook.com\/blog\/category\/math\/"},{"label":"DNA Sequence Alignment and Kings","link":"https:\/\/www.johndcook.com\/blog\/2026\/06\/30\/dna-sequence-alignment-and-kings\/"}],"_links":{"self":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts\/247287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/comments?post=247287"}],"version-history":[{"count":7,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts\/247287\/revisions"}],"predecessor-version":[{"id":247294,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts\/247287\/revisions\/247294"}],"wp:attachment":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/media?parent=247287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/categories?post=247287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/tags?post=247287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}},{"id":247281,"date":"2026-06-30T13:51:36","date_gmt":"2026-06-30T18:51:36","guid":{"rendered":"https:\/\/www.johndcook.com\/blog\/?p=247281"},"modified":"2026-07-02T08:31:13","modified_gmt":"2026-07-02T13:31:13","slug":"variables-and-parameters","status":"publish","type":"post","link":"https:\/\/www.johndcook.com\/blog\/2026\/06\/30\/variables-and-parameters\/","title":{"rendered":"Distinguishing variables from parameters"},"content":{"rendered":"<p>Imagine the following dialog.<\/p>\n<p style=\"padding-left: 40px;\"><strong>Professor<\/strong>:\u00a0<em>f<\/em> is a function of a real variable\u00a0<em>x<\/em> that takes a real parameter\u00a0<em>k<\/em>.<\/p>\n<p style=\"padding-left: 40px;\"><strong>Student<\/strong>: What&#8217;s a parameter?<\/p>\n<p style=\"padding-left: 40px;\"><strong>Professor<\/strong>: It&#8217;s a constant that can vary.<\/p>\n<p style=\"padding-left: 40px;\"><strong>Student<\/strong>: Then if it can vary, isn&#8217;t it a variable?<\/p>\n<p style=\"padding-left: 40px;\"><strong>Professor<\/strong>: Sorta, but no not really.<\/p>\n<p>This conversation plays out over and over, and unfortunately it often ends as it does above, with the student confused. Here&#8217;s how I believe the conversation should continue.<\/p>\n<p style=\"padding-left: 40px;\"><strong>Professor<\/strong>: You&#8217;re absolutely right that <em>f<\/em> is a function of two variables,\u00a0<em>x<\/em> and\u00a0<em>k<\/em>. But usually <em>k<\/em> is fixed in the context of a specific application and\u00a0<em>x<\/em> is not. A different application might have a different, but also fixed, value of <em>k<\/em>. So it is helpful to think of\u00a0<em>f<\/em>(<em>x<\/em>;\u00a0<em>k<\/em>), a function of\u00a0<em>x<\/em> with a parameter\u00a0<em>k<\/em>, rather than\u00a0<em>f<\/em>(<em>x<\/em>,\u00a0<em>k<\/em>), a function of two variables. The former carries more information, giving a hint as to how the numbers are used.<\/p>\n<p>Is there really a difference between a parameter and a variable? In a reductionistic sense, no. But in a practical sense, yes, absolutely.<\/p>\n<p>It might sound pedantic to distinguish a variable from a parameter, and it is, in the best sense of the word. Pedant literally means teacher. Usually <em>pedantic<\/em> carries a negative connotation, such as making a distinction without a difference. But here the pedant would be making a helpful distinction.<\/p>\n<p>For example, we might write a probability density function as <em>f<\/em>(<em>x<\/em>; \u03bc, \u03c3). The function gives the probability density at a point\u00a0<em>x<\/em>. The density depends on parameters \u03bc and \u03c3, and these parameters change between applications, but for a given application they have fixed values.<\/p>\n<p>You find the probability of a random variable taking on values in an interval [<em>a<\/em>,\u00a0<em>b<\/em>] by integrating\u00a0<em>f<\/em> over that interval. When I say that, you know that I mean you&#8217;d integrate with respect to\u00a0<em>x<\/em>, because\u00a0<em>f<\/em> is a function of\u00a0<em>x<\/em>. It is also, in an abstract sense, a function of \u03bc and \u03c3, but it&#8217;s typically not useful to think of it that way.<\/p>\n<p>Hypergeometric functions have two sets of parameters, and so you may see two semicolons, such as\u00a0<em>f<\/em>(<em>x<\/em>;\u00a0<em>a<\/em>,\u00a0<em>b<\/em>;\u00a0<em>c<\/em>). This denotes a function of the variable\u00a0<em>x<\/em>, with upper parameters\u00a0<em>a<\/em> and\u00a0<em>b<\/em>, and a lower parameter\u00a0<em>c<\/em>. In some abstract sense this is a function of four variables, but it acts very differently with respect to\u00a0<em>x<\/em> than with respect to\u00a0<em>a<\/em>,\u00a0<em>b<\/em>, and\u00a0<em>c<\/em>. There&#8217;s also a difference between\u00a0<em>a<\/em> and\u00a0<em>b<\/em> on the one hand and\u00a0<em>c<\/em> on the other, one worth paying attention to, though it is less of a difference than between\u00a0<em>x<\/em> and the parameters collectively.<\/p>\n<p>Sometimes you&#8217;ll see a vertical bar rather than a semicolon to separate variables from parameters. This works out even better for probability densities because then <em>f<\/em>(<em>x<\/em> | \u03bc, \u03c3) suggests the probability density of <em>x<\/em> <em>given<\/em> \u03bc and \u03c3 since the vertical bar is also used for conditional probability. You might also see\u00a0<em>f<\/em>(<em>x<\/em> |\u00a0<em>a, b;<\/em>\u00a0c) for hypergeometric functions, with the vertical bar separating variables from parameters and the semicolon separating two kinds of parameters.<\/p>\n<p>When I first saw a semicolon separating variables from parameters, no explanation was given, and I figured I could mentally replace the semicolon with a comma. Then later I realized that the semicolon was an act of kindness by the author giving the reader additional information.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Imagine the following dialog. Professor:\u00a0f is a function of a real variable\u00a0x that takes a real parameter\u00a0k. Student: What&#8217;s a parameter? Professor: It&#8217;s a constant that can vary. Student: Then if it can vary, isn&#8217;t it a variable? Professor: Sorta, but no not really. This conversation plays out over and over, and unfortunately it often [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[9],"tags":[93],"class_list":["post-247281","post","type-post","status-publish","format-standard","hentry","category-math","tag-notation"],"acf":[],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"The distinction between a variable and a parameter may seem unnecessary or even nonsensical, but it&#039;s very useful when done thoughtfully.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"John\"\/>\n\t<meta name=\"keywords\" content=\"notation\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.johndcook.com\/blog\/2026\/06\/30\/variables-and-parameters\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"John D. Cook | Applied Mathematics Consulting\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Distinguishing variables from parameters\" \/>\n\t\t<meta property=\"og:description\" content=\"The distinction between a variable and a parameter may seem unnecessary or even nonsensical, but it&#039;s very useful when done thoughtfully.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.johndcook.com\/blog\/2026\/06\/30\/variables-and-parameters\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2026-06-30T18:51:36+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2026-07-02T13:31:13+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Distinguishing variables from parameters\" \/>\n\t\t<meta name=\"twitter:description\" content=\"The distinction between a variable and a parameter may seem unnecessary or even nonsensical, but it&#039;s very useful when done thoughtfully.\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.johndcook.com\/blog\/wp-content\/uploads\/2022\/05\/twittercard.png\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Distinguishing variables from parameters","description":"The distinction between a variable and a parameter may seem unnecessary or even nonsensical, but it's very useful when done thoughtfully.","canonical_url":"https:\/\/www.johndcook.com\/blog\/2026\/06\/30\/variables-and-parameters\/","robots":"max-image-preview:large","keywords":"notation","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"John D. Cook | Applied Mathematics Consulting","og:type":"article","og:title":"Distinguishing variables from parameters","og:description":"The distinction between a variable and a parameter may seem unnecessary or even nonsensical, but it's very useful when done thoughtfully.","og:url":"https:\/\/www.johndcook.com\/blog\/2026\/06\/30\/variables-and-parameters\/","article:published_time":"2026-06-30T18:51:36+00:00","article:modified_time":"2026-07-02T13:31:13+00:00","twitter:card":"summary","twitter:title":"Distinguishing variables from parameters","twitter:description":"The distinction between a variable and a parameter may seem unnecessary or even nonsensical, but it's very useful when done thoughtfully.","twitter:image":"https:\/\/www.johndcook.com\/blog\/wp-content\/uploads\/2022\/05\/twittercard.png"},"aioseo_meta_data":{"post_id":"247281","title":null,"description":"The distinction between a variable and a parameter may seem unnecessary or even nonsensical, but it's very useful when done thoughtfully.","keywords":null,"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"created":"2026-06-30 16:48:14","updated":"2026-07-04 02:05:58","ai":{"faqs":[],"keyPoints":[],"schemas":[],"titles":[],"descriptions":[],"socialPosts":{"email":{"subject":"","preview":"","content":""},"linkedin":[],"twitter":[],"facebook":[],"instagram":[]}},"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.johndcook.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.johndcook.com\/blog\/category\/math\/\" title=\"Math\">Math<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tDistinguishing variables from parameters\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.johndcook.com\/blog"},{"label":"Math","link":"https:\/\/www.johndcook.com\/blog\/category\/math\/"},{"label":"Distinguishing variables from parameters","link":"https:\/\/www.johndcook.com\/blog\/2026\/06\/30\/variables-and-parameters\/"}],"_links":{"self":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts\/247281","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/comments?post=247281"}],"version-history":[{"count":6,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts\/247281\/revisions"}],"predecessor-version":[{"id":247300,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts\/247281\/revisions\/247300"}],"wp:attachment":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/media?parent=247281"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/categories?post=247281"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/tags?post=247281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}},{"id":247278,"date":"2026-06-30T09:36:14","date_gmt":"2026-06-30T14:36:14","guid":{"rendered":"https:\/\/www.johndcook.com\/blog\/?p=247278"},"modified":"2026-07-02T08:30:27","modified_gmt":"2026-07-02T13:30:27","slug":"silver-kings","status":"publish","type":"post","link":"https:\/\/www.johndcook.com\/blog\/2026\/06\/30\/silver-kings\/","title":{"rendered":"Silver Rectangles and the Ways of Kings"},"content":{"rendered":"<h2>Golden rectangles<\/h2>\n<p>The defining property of golden rectangle is that if you stick a square on its longer side, you get another golden rectangle.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium\" src=\"https:\/\/www.johndcook.com\/golden_rectangle.png\" width=\"263\" height=\"188\" \/><\/p>\n<p>The smaller vertical rectangle is similar to the larger horizontal rectangle. This means<\/p>\n<p style=\"padding-left: 40px;\">\u03c6 \/ 1 = (1 + \u03c6) \/ \u03c6<\/p>\n<p>which tells us \u03c6\u00b2 = 1 + \u03c6 and so the golden ratio \u03c6 equals (1 + \u221a5)\/2.<\/p>\n<h2>Silver rectangles<\/h2>\n<p>A silver rectangle is one that if you stick <em>two<\/em> squares on its longer side you get another rectangle with the same aspect ratio.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium aligncenter\" src=\"https:\/\/www.johndcook.com\/silver_rectangle.png\" width=\"530\" height=\"254\" \/><\/p>\n<p>This tells us<\/p>\n<p style=\"padding-left: 40px;\">\u03c3 \/ 1 = (1 + 2\u03c3) \/ \u03c3<\/p>\n<p>and so \u03c3\u00b2 = 1 + 2\u03c3 and the silver ratio is \u03c3 = 1 + \u221a2.<\/p>\n<p>Just as you can define a golden ratio and a silver ratio, there&#8217;s an analogous way to define a sequence of <a href=\"https:\/\/www.johndcook.com\/blog\/2023\/04\/14\/metallic-ratios\/\">metallic ratios<\/a>.<\/p>\n<h2>Kings and Delannoy numbers<\/h2>\n<p>The silver ratio has several connections to the ways of ways kings. By that I mean the number of ways a king can go from one corner of a chessboard to the diagonally opposite corner without backtracking.<\/p>\n<p>A king can move one space in any direction. If we start with a king in the bottom left corner of the board, the no-backtracking requirement means the king can move up, right, or up and right.<\/p>\n<p>The number of paths a king can take from one corner to the opposite corner of an <em>n<\/em> \u00d7 <em>n<\/em> chessboard is the <em>n<\/em>th central Delannoy number <em>D<\/em><sub><em>n<\/em><\/sub>. more generally Delannoy numbers are defined for an <em>m<\/em> \u00d7 <em>n<\/em> chessboard, but I&#8217;ll stick to the case\u00a0<em>m<\/em> =\u00a0<em>n<\/em> called the\u00a0<em>central<\/em> Delannoy number, or just Delannoy numbers for short.<\/p>\n<p>The first Delannoy number is 1 because there&#8217;s only one way for a king to get from one corner to the other: do nothing, because the opposite corner is the same corner. The second Delannoy number is 3 because the king can move up then right, or right then up, or move diagonally up and right.<\/p>\n<p>For a 3 \u00d7 3 grid things are significantly more complicated, and <em>D<\/em><sub>3<\/sub> = 13. For an 8 \u00d7 8 grid the number of paths is 48,639.<\/p>\n<h2>Generating function<\/h2>\n<p>How would you estimate the number of paths on an <em>n<\/em> \u00d7 <em>n<\/em> board for large values of <em>n<\/em> without calculating it exactly? You might start by finding a generating function for the Delannoy numbers, which works out to be<\/p>\n<p style=\"padding-left: 40px;\">(<em>x<\/em>\u00b2 \u2212 6<em>x<\/em> + 1)<sup>\u22121\/2<\/sup><\/p>\n<p>The radius of convergence <em>r<\/em> for the generating function series is the distance from 0 to the closest singularity of the generating function, which is the smaller root of<\/p>\n<p style=\"padding-left: 40px;\"><em>x<\/em>\u00b2 \u2212 6<em>x<\/em> + 1<\/p>\n<p>which is<\/p>\n<p style=\"padding-left: 40px;\">3 \u2212 \u221a8 = (3 + \u221a8)<sup>\u22121<\/sup> = (1 + \u221a2)<sup>\u22122<\/sup> = 1\/\u03c3\u00b2<\/p>\n<p>i.e. the radius of convergence is the reciprocal of the silver ratio squared.<\/p>\n<h2>Asymptotic estimate<\/h2>\n<p>The radius of convergence gives us a first approximation to the asymptotic size of the series coefficients. Since we&#8217;re working with the generating function of the Delannoy numbers, these coefficients are the Delannoy numbers. That is,<\/p>\n<p style=\"padding-left: 40px;\"><em>D<\/em><sub><em>n<\/em><\/sub> ~ <em>r<\/em><sup>\u2212<em>n<\/em><\/sup> = (\u03c3<sup>2<\/sup>)<sup><em>n<\/em><\/sup> = \u03c3<sup>2<em>n<\/em><\/sup>.<\/p>\n<p>That&#8217;s as good as you can do just knowing the radius of convergence. A more careful analysis would refine this estimate by dividing by a factor proportional to \u221a<em>n<\/em>.<\/p>\n<h2>Related posts<\/h2>\n<ul>\n<li class='link'><a href='https:\/\/www.johndcook.com\/blog\/2009\/05\/20\/the-silver-ratio\/'>The silver ratio<\/a><\/li>\n<li class='link'><a href='https:\/\/www.johndcook.com\/blog\/2011\/04\/13\/a-magic-kings-tour\/'>A magic king&#8217;s tour<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Golden rectangles The defining property of golden rectangle is that if you stick a square on its longer side, you get another golden rectangle. The smaller vertical rectangle is similar to the larger horizontal rectangle. This means \u03c6 \/ 1 = (1 + \u03c6) \/ \u03c6 which tells us \u03c6\u00b2 = 1 + \u03c6 and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[9],"tags":[33,197],"class_list":["post-247278","post","type-post","status-publish","format-standard","hentry","category-math","tag-chess","tag-combinatorics"],"acf":[],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Silver rectangles and a connection to counting the number of ways a king can move from one corner of the chessboard to the opposite corner\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"John\"\/>\n\t<meta name=\"keywords\" content=\"chess,combinatorics\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.johndcook.com\/blog\/2026\/06\/30\/silver-kings\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"John D. Cook | Applied Mathematics Consulting\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Silver Rectangles and the Ways of Kings\" \/>\n\t\t<meta property=\"og:description\" content=\"Silver rectangles and a connection to counting the number of ways a king can move from one corner of the chessboard to the opposite corner\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.johndcook.com\/blog\/2026\/06\/30\/silver-kings\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2026-06-30T14:36:14+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2026-07-02T13:30:27+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Silver Rectangles and the Ways of Kings\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Silver rectangles and a connection to counting the number of ways a king can move from one corner of the chessboard to the opposite corner\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.johndcook.com\/blog\/wp-content\/uploads\/2022\/05\/twittercard.png\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Silver Rectangles and the Ways of Kings","description":"Silver rectangles and a connection to counting the number of ways a king can move from one corner of the chessboard to the opposite corner","canonical_url":"https:\/\/www.johndcook.com\/blog\/2026\/06\/30\/silver-kings\/","robots":"max-image-preview:large","keywords":"chess,combinatorics","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"John D. Cook | Applied Mathematics Consulting","og:type":"article","og:title":"Silver Rectangles and the Ways of Kings","og:description":"Silver rectangles and a connection to counting the number of ways a king can move from one corner of the chessboard to the opposite corner","og:url":"https:\/\/www.johndcook.com\/blog\/2026\/06\/30\/silver-kings\/","article:published_time":"2026-06-30T14:36:14+00:00","article:modified_time":"2026-07-02T13:30:27+00:00","twitter:card":"summary","twitter:title":"Silver Rectangles and the Ways of Kings","twitter:description":"Silver rectangles and a connection to counting the number of ways a king can move from one corner of the chessboard to the opposite corner","twitter:image":"https:\/\/www.johndcook.com\/blog\/wp-content\/uploads\/2022\/05\/twittercard.png"},"aioseo_meta_data":{"post_id":"247278","title":null,"description":"Silver rectangles and a connection to counting the number of ways a king can move from one corner of the chessboard to the opposite corner","keywords":null,"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"created":"2026-06-30 12:51:52","updated":"2026-07-04 02:05:58","ai":{"faqs":[],"keyPoints":[],"schemas":[],"titles":[],"descriptions":[],"socialPosts":{"email":{"subject":"","preview":"","content":""},"linkedin":[],"twitter":[],"facebook":[],"instagram":[]}},"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.johndcook.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.johndcook.com\/blog\/category\/math\/\" title=\"Math\">Math<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tSilver Rectangles and the Ways of Kings\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.johndcook.com\/blog"},{"label":"Math","link":"https:\/\/www.johndcook.com\/blog\/category\/math\/"},{"label":"Silver Rectangles and the Ways of Kings","link":"https:\/\/www.johndcook.com\/blog\/2026\/06\/30\/silver-kings\/"}],"_links":{"self":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts\/247278","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/comments?post=247278"}],"version-history":[{"count":3,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts\/247278\/revisions"}],"predecessor-version":[{"id":247299,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts\/247278\/revisions\/247299"}],"wp:attachment":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/media?parent=247278"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/categories?post=247278"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/tags?post=247278"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}},{"id":247274,"date":"2026-06-29T20:06:12","date_gmt":"2026-06-30T01:06:12","guid":{"rendered":"https:\/\/www.johndcook.com\/blog\/?p=247274"},"modified":"2026-06-29T20:06:12","modified_gmt":"2026-06-30T01:06:12","slug":"derivative-equals-inverse","status":"publish","type":"post","link":"https:\/\/www.johndcook.com\/blog\/2026\/06\/29\/derivative-equals-inverse\/","title":{"rendered":"Derivative equals inverse"},"content":{"rendered":"<p>Here&#8217;s kind of a strange problem with an interesting solution: find a function\u00a0<em>f<\/em> such that the derivative of\u00a0<em>f<\/em> equals the inverse of\u00a0<em>f<\/em> for all positive <em>x<\/em>.<\/p>\n<p style=\"padding-left: 40px;\"><em>f<\/em>\u2009\u2032(<em>x<\/em>) =\u00a0<em>f<\/em><sup>\u22121<\/sup>(<em>x<\/em>)<\/p>\n<p>This is a differential equation, but a very unusual one, one that cannot be solved using any of the techniques taught in a class on differential equations.<\/p>\n<p>The unique solution is<\/p>\n<p style=\"padding-left: 40px;\"><em>f<\/em>(<em>x<\/em>) = \u03c6(<em>x<\/em> \/ \u03c6)<sup>\u03c6<\/sup><\/p>\n<p>where \u03c6 is the golden ratio. What an unexpected appearance of the golden ratio!<\/p>\n<p>The problem was proposed by H. L. Nelson and solved by A. C. Hindmarsh. See The American Mathematical Monthly, Vol. 76, No. 6 p. 696.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s kind of a strange problem with an interesting solution: find a function\u00a0f such that the derivative of\u00a0f equals the inverse of\u00a0f for all positive x. f\u2009\u2032(x) =\u00a0f\u22121(x) This is a differential equation, but a very unusual one, one that cannot be solved using any of the techniques taught in a class on differential equations. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[9],"tags":[47],"class_list":["post-247274","post","type-post","status-publish","format-standard","hentry","category-math","tag-differential-equations"],"acf":[],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Find a function whose derivative is its inverse.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"John\"\/>\n\t<meta name=\"keywords\" content=\"differential equations\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.johndcook.com\/blog\/2026\/06\/29\/derivative-equals-inverse\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"John D. Cook | Applied Mathematics Consulting\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Derivative equals inverse\" \/>\n\t\t<meta property=\"og:description\" content=\"Find a function whose derivative is its inverse.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.johndcook.com\/blog\/2026\/06\/29\/derivative-equals-inverse\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2026-06-30T01:06:12+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2026-06-30T01:06:12+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Derivative equals inverse\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Find a function whose derivative is its inverse.\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.johndcook.com\/blog\/wp-content\/uploads\/2022\/05\/twittercard.png\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Derivative equals inverse","description":"Find a function whose derivative is its inverse.","canonical_url":"https:\/\/www.johndcook.com\/blog\/2026\/06\/29\/derivative-equals-inverse\/","robots":"max-image-preview:large","keywords":"differential equations","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"John D. Cook | Applied Mathematics Consulting","og:type":"article","og:title":"Derivative equals inverse","og:description":"Find a function whose derivative is its inverse.","og:url":"https:\/\/www.johndcook.com\/blog\/2026\/06\/29\/derivative-equals-inverse\/","article:published_time":"2026-06-30T01:06:12+00:00","article:modified_time":"2026-06-30T01:06:12+00:00","twitter:card":"summary","twitter:title":"Derivative equals inverse","twitter:description":"Find a function whose derivative is its inverse.","twitter:image":"https:\/\/www.johndcook.com\/blog\/wp-content\/uploads\/2022\/05\/twittercard.png"},"aioseo_meta_data":{"post_id":"247274","title":null,"description":"Find a function whose derivative is its inverse.","keywords":null,"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"created":"2026-06-30 00:39:55","updated":"2026-06-30 09:26:58","ai":{"faqs":[],"keyPoints":[],"schemas":[],"titles":[],"descriptions":[],"socialPosts":{"email":{"subject":"","preview":"","content":""},"linkedin":[],"twitter":[],"facebook":[],"instagram":[]}},"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.johndcook.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.johndcook.com\/blog\/category\/math\/\" title=\"Math\">Math<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tDerivative equals inverse\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.johndcook.com\/blog"},{"label":"Math","link":"https:\/\/www.johndcook.com\/blog\/category\/math\/"},{"label":"Derivative equals inverse","link":"https:\/\/www.johndcook.com\/blog\/2026\/06\/29\/derivative-equals-inverse\/"}],"_links":{"self":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts\/247274","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/comments?post=247274"}],"version-history":[{"count":3,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts\/247274\/revisions"}],"predecessor-version":[{"id":247277,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/posts\/247274\/revisions\/247277"}],"wp:attachment":[{"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/media?parent=247274"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/categories?post=247274"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.johndcook.com\/blog\/wp-json\/wp\/v2\/tags?post=247274"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}]