{"id":1460,"date":"2024-12-14T19:45:58","date_gmt":"2024-12-14T19:45:58","guid":{"rendered":"https:\/\/www.allendowney.com\/blog\/?p=1460"},"modified":"2024-12-14T19:45:58","modified_gmt":"2024-12-14T19:45:58","slug":"reject-math-supremacy","status":"publish","type":"post","link":"https:\/\/www.allendowney.com\/blog\/2024\/12\/14\/reject-math-supremacy\/","title":{"rendered":"Reject Math Supremacy"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The premise of <em>Think Stats<\/em>, and the other books in the <em>Think<\/em> series, is that <a href=\"https:\/\/www.scientificamerican.com\/blog\/guest-blog\/programming-as-a-way-of-thinking\/?WT.mc_id=SA_TW_TECH_BLOG\">programming is a tool for teaching and learning<\/a> &#8212; and many ideas that are commonly presented in math notation can be more clearly presented in code.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the <a href=\"https:\/\/allendowney.github.io\/ThinkStats\">draft third edition<\/a> of <em>Think Stats<\/em> there is almost no math &#8212; not because I made a special effort to avoid it, but because I found that I didn&#8217;t need it. For example, here&#8217;s how I present the binomial distribution in <a href=\"https:\/\/allendowney.github.io\/ThinkStats\/chap05.html#the-binomial-distribution\">Chapter 5<\/a>:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Mathematically, the distribution of these outcomes follows a <strong>binomial distribution<\/strong>, which has a PMF that is easy to compute.<\/p>\n\n\n\n<pre id=\"codecell14\" class=\"wp-block-preformatted\">from scipy.special import comb<br><br>def binomial_pmf(k, n, p):<br>    return comb(n, k) * (p**k) * ((1 - p) ** (n - k))<br><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">SciPy provides the <code>comb<\/code> function, which computes the number of combinations of <code>n<\/code> things taken <code>k<\/code> at a time, often pronounced \u201cn choose k\u201d.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>binomial_pmf<\/code> computes the probability of getting <code>k<\/code> hits out of <code>n<\/code> attempts, given <code>p<\/code>.<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">I could also present the PMF in math notation, but I&#8217;m not sure how it would help &#8212; the Python code represents the computation just as clearly. Some readers find math notation intimidating, and even for the ones who don&#8217;t, it takes some effort to decode. In my opinion, the payoff for this additional effort is too low.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But one of the people who read the draft disagrees. They wrote:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Provide equations for the distributions. You assume that the reader knows them and then you suddenly show a programming code for them &#8212; the code is a challenge to the reader to interpret without knowing the actual equation.<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">I acknowledge that my approach defies the expectation that we should present math first and then translate it into code. For readers who are used to this convention, presenting the code first is &#8220;sudden&#8221;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But why? I think there are two reasons, one practical and one philosophical:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The practical reason is the presumption that the reader is more familiar with math notation and less familiar with code. Of course that&#8217;s true for some people, but for other people, it&#8217;s the other way around. People who like math have lots of books to choose from; people who like code don&#8217;t.<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The philosophical reason is what I&#8217;m calling <strong>math supremacy<\/strong>, which is the idea that math notation is the real thing, and everything else &#8212; including and especially code &#8212; is an inferior imitation. My correspondent hints at this idea with the suggestion that the reader should see the &#8220;actual equation&#8221;. Math is actual; code is not.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">I reject math supremacy. Math notation did not come from the sky on stone tablets; it was designed by people for a purpose. Programming languages were also designed by people, for different purposes. Math notation has some good properties &#8212; it is concise and it is nearly universal. But programming languages also have good properties &#8212; most notably, they are executable. When we express an idea in code, we can run it, test it, and debug it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So here&#8217;s a thought: if you are writing for an audience that is comfortable with math notation, and your ideas can be expressed well in that form &#8212; go ahead and use math notation. But if you are writing for an audience that understands code, and your ideas can be expressed well in code &#8212; well then you should probably use code. &#8220;Actual&#8221; code.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The premise of Think Stats, and the other books in the Think series, is that programming is a tool for teaching and learning &#8212; and many ideas that are commonly presented in math notation can be more clearly presented in code. In the draft third edition of Think Stats there is almost no math &#8212; not because I made a special effort to avoid it, but because I found that I didn&#8217;t need it. For example, here&#8217;s how I present&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/www.allendowney.com\/blog\/2024\/12\/14\/reject-math-supremacy\/\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1],"tags":[],"class_list":["post-1460","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Reject Math Supremacy - Probably Overthinking It<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.allendowney.com\/blog\/2024\/12\/14\/reject-math-supremacy\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Reject Math Supremacy - Probably Overthinking It\" \/>\n<meta property=\"og:description\" content=\"The premise of Think Stats, and the other books in the Think series, is that programming is a tool for teaching and learning &#8212; and many ideas that are commonly presented in math notation can be more clearly presented in code. In the draft third edition of Think Stats there is almost no math &#8212; not because I made a special effort to avoid it, but because I found that I didn&#8217;t need it. For example, here&#8217;s how I present... Read More Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.allendowney.com\/blog\/2024\/12\/14\/reject-math-supremacy\/\" \/>\n<meta property=\"og:site_name\" content=\"Probably Overthinking It\" \/>\n<meta property=\"article:published_time\" content=\"2024-12-14T19:45:58+00:00\" \/>\n<meta name=\"author\" content=\"Allen B. Downey\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@AllenDowney\" \/>\n<meta name=\"twitter:site\" content=\"@AllenDowney\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Allen B. Downey\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.allendowney.com\\\/blog\\\/2024\\\/12\\\/14\\\/reject-math-supremacy\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.allendowney.com\\\/blog\\\/2024\\\/12\\\/14\\\/reject-math-supremacy\\\/\"},\"author\":{\"name\":\"Allen B. Downey\",\"@id\":\"https:\\\/\\\/www.allendowney.com\\\/blog\\\/#\\\/schema\\\/person\\\/4e5bfb2e9af6c3446cb0031a7bf83207\"},\"headline\":\"Reject Math Supremacy\",\"datePublished\":\"2024-12-14T19:45:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.allendowney.com\\\/blog\\\/2024\\\/12\\\/14\\\/reject-math-supremacy\\\/\"},\"wordCount\":551,\"publisher\":{\"@id\":\"https:\\\/\\\/www.allendowney.com\\\/blog\\\/#\\\/schema\\\/person\\\/4e5bfb2e9af6c3446cb0031a7bf83207\"},\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.allendowney.com\\\/blog\\\/2024\\\/12\\\/14\\\/reject-math-supremacy\\\/\",\"url\":\"https:\\\/\\\/www.allendowney.com\\\/blog\\\/2024\\\/12\\\/14\\\/reject-math-supremacy\\\/\",\"name\":\"Reject Math Supremacy - Probably Overthinking It\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.allendowney.com\\\/blog\\\/#website\"},\"datePublished\":\"2024-12-14T19:45:58+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.allendowney.com\\\/blog\\\/2024\\\/12\\\/14\\\/reject-math-supremacy\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.allendowney.com\\\/blog\\\/2024\\\/12\\\/14\\\/reject-math-supremacy\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.allendowney.com\\\/blog\\\/2024\\\/12\\\/14\\\/reject-math-supremacy\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.allendowney.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Reject Math Supremacy\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.allendowney.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.allendowney.com\\\/blog\\\/\",\"name\":\"Probably Overthinking It\",\"description\":\"Data science, Bayesian Statistics, and other ideas\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.allendowney.com\\\/blog\\\/#\\\/schema\\\/person\\\/4e5bfb2e9af6c3446cb0031a7bf83207\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.allendowney.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/www.allendowney.com\\\/blog\\\/#\\\/schema\\\/person\\\/4e5bfb2e9af6c3446cb0031a7bf83207\",\"name\":\"Allen B. Downey\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.allendowney.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/03\\\/probably_logo.png\",\"url\":\"https:\\\/\\\/www.allendowney.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/03\\\/probably_logo.png\",\"contentUrl\":\"https:\\\/\\\/www.allendowney.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/03\\\/probably_logo.png\",\"width\":714,\"height\":784,\"caption\":\"Allen B. Downey\"},\"logo\":{\"@id\":\"https:\\\/\\\/www.allendowney.com\\\/blog\\\/wp-content\\\/uploads\\\/2025\\\/03\\\/probably_logo.png\"},\"sameAs\":[\"https:\\\/\\\/www.allendowney.com\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/allendowney\\\/\",\"https:\\\/\\\/x.com\\\/AllenDowney\",\"https:\\\/\\\/github.com\\\/AllenDowney\",\"https:\\\/\\\/bsky.app\\\/profile\\\/allendowney.bsky.social\",\"https:\\\/\\\/allendowney.github.io\\\/Portfolio\\\/\",\"https:\\\/\\\/greenteapress.com\\\/wp\\\/\"],\"url\":\"https:\\\/\\\/www.allendowney.com\\\/blog\\\/author\\\/allen-downey\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Reject Math Supremacy - Probably Overthinking It","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.allendowney.com\/blog\/2024\/12\/14\/reject-math-supremacy\/","og_locale":"en_US","og_type":"article","og_title":"Reject Math Supremacy - Probably Overthinking It","og_description":"The premise of Think Stats, and the other books in the Think series, is that programming is a tool for teaching and learning &#8212; and many ideas that are commonly presented in math notation can be more clearly presented in code. In the draft third edition of Think Stats there is almost no math &#8212; not because I made a special effort to avoid it, but because I found that I didn&#8217;t need it. For example, here&#8217;s how I present... Read More Read More","og_url":"https:\/\/www.allendowney.com\/blog\/2024\/12\/14\/reject-math-supremacy\/","og_site_name":"Probably Overthinking It","article_published_time":"2024-12-14T19:45:58+00:00","author":"Allen B. Downey","twitter_card":"summary_large_image","twitter_creator":"@AllenDowney","twitter_site":"@AllenDowney","twitter_misc":{"Written by":"Allen B. Downey","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.allendowney.com\/blog\/2024\/12\/14\/reject-math-supremacy\/#article","isPartOf":{"@id":"https:\/\/www.allendowney.com\/blog\/2024\/12\/14\/reject-math-supremacy\/"},"author":{"name":"Allen B. Downey","@id":"https:\/\/www.allendowney.com\/blog\/#\/schema\/person\/4e5bfb2e9af6c3446cb0031a7bf83207"},"headline":"Reject Math Supremacy","datePublished":"2024-12-14T19:45:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.allendowney.com\/blog\/2024\/12\/14\/reject-math-supremacy\/"},"wordCount":551,"publisher":{"@id":"https:\/\/www.allendowney.com\/blog\/#\/schema\/person\/4e5bfb2e9af6c3446cb0031a7bf83207"},"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.allendowney.com\/blog\/2024\/12\/14\/reject-math-supremacy\/","url":"https:\/\/www.allendowney.com\/blog\/2024\/12\/14\/reject-math-supremacy\/","name":"Reject Math Supremacy - Probably Overthinking It","isPartOf":{"@id":"https:\/\/www.allendowney.com\/blog\/#website"},"datePublished":"2024-12-14T19:45:58+00:00","breadcrumb":{"@id":"https:\/\/www.allendowney.com\/blog\/2024\/12\/14\/reject-math-supremacy\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.allendowney.com\/blog\/2024\/12\/14\/reject-math-supremacy\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.allendowney.com\/blog\/2024\/12\/14\/reject-math-supremacy\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.allendowney.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Reject Math Supremacy"}]},{"@type":"WebSite","@id":"https:\/\/www.allendowney.com\/blog\/#website","url":"https:\/\/www.allendowney.com\/blog\/","name":"Probably Overthinking It","description":"Data science, Bayesian Statistics, and other ideas","publisher":{"@id":"https:\/\/www.allendowney.com\/blog\/#\/schema\/person\/4e5bfb2e9af6c3446cb0031a7bf83207"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.allendowney.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.allendowney.com\/blog\/#\/schema\/person\/4e5bfb2e9af6c3446cb0031a7bf83207","name":"Allen B. Downey","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2025\/03\/probably_logo.png","url":"https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2025\/03\/probably_logo.png","contentUrl":"https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2025\/03\/probably_logo.png","width":714,"height":784,"caption":"Allen B. Downey"},"logo":{"@id":"https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2025\/03\/probably_logo.png"},"sameAs":["https:\/\/www.allendowney.com\/","https:\/\/www.linkedin.com\/in\/allendowney\/","https:\/\/x.com\/AllenDowney","https:\/\/github.com\/AllenDowney","https:\/\/bsky.app\/profile\/allendowney.bsky.social","https:\/\/allendowney.github.io\/Portfolio\/","https:\/\/greenteapress.com\/wp\/"],"url":"https:\/\/www.allendowney.com\/blog\/author\/allen-downey\/"}]}},"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.allendowney.com\/blog\/wp-json\/wp\/v2\/posts\/1460","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.allendowney.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.allendowney.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.allendowney.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.allendowney.com\/blog\/wp-json\/wp\/v2\/comments?post=1460"}],"version-history":[{"count":4,"href":"https:\/\/www.allendowney.com\/blog\/wp-json\/wp\/v2\/posts\/1460\/revisions"}],"predecessor-version":[{"id":1464,"href":"https:\/\/www.allendowney.com\/blog\/wp-json\/wp\/v2\/posts\/1460\/revisions\/1464"}],"wp:attachment":[{"href":"https:\/\/www.allendowney.com\/blog\/wp-json\/wp\/v2\/media?parent=1460"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.allendowney.com\/blog\/wp-json\/wp\/v2\/categories?post=1460"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.allendowney.com\/blog\/wp-json\/wp\/v2\/tags?post=1460"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}