{"id":1163,"date":"2023-12-29T17:34:36","date_gmt":"2023-12-29T17:34:36","guid":{"rendered":"https:\/\/www.allendowney.com\/blog\/?p=1163"},"modified":"2023-12-29T17:44:10","modified_gmt":"2023-12-29T17:44:10","slug":"how-many-books","status":"publish","type":"post","link":"https:\/\/www.allendowney.com\/blog\/2023\/12\/29\/how-many-books\/","title":{"rendered":"How Many Books?"},"content":{"rendered":"\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>If you like this article, you can read more about this kind of Bayesian analysis in <em><a href=\"https:\/\/greenteapress.com\/wp\/think-bayes\/\">Think Bayes<\/a><\/em>.<\/p>\n<\/blockquote>\n\n\n\n<p>Recently I found a copy of <em><a href=\"https:\/\/greenteapress.com\/wp\/probably-overthinking-it\/\">Probably Overthinking It<\/a><\/em> at a local bookstore and posted a picture on Twitter. Aubrey Clayton replied with this question:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"802\" height=\"224\" src=\"https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-6.png\" alt=\"The author's dilemma: do you want to see many copies of your book at the store or none?\" class=\"wp-image-1164\" style=\"width:620px;height:auto\" srcset=\"https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-6.png 802w, https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-6-300x84.png 300w, https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-6-768x215.png 768w, https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-6-604x169.png 604w\" sizes=\"auto, (max-width: 802px) 100vw, 802px\" \/><\/figure>\n\n\n\n<p>It&#8217;s a great question with what turns out to be an interesting answer. I&#8217;ll summarize the results here, but if you want to see the calculations, you can <a href=\"https:\/\/colab.research.google.com\/github\/AllenDowney\/ThinkBayes2\/blob\/master\/examples\/bookstore.ipynb\">run the notebook on Colab<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Assumptions<\/h2>\n\n\n\n<p>Suppose you are the author of a book like <em><a href=\"https:\/\/greenteapress.com\/wp\/probably-overthinking-it\/\">Probably Overthinking It<\/a><\/em>, and when you visit a local bookstore, like Newtonville Books in Newton, MA, you see that they have two copies of your book on display.<\/p>\n\n\n\n<p>Is it good that they have only a few copies, because it suggests they started with more and sold some? Or is it bad because it suggests they only keep a small number in stock, and they have not sold. More generally, what number of books would you like to see?<\/p>\n\n\n\n<p>To answer these questions, we have to make some modeling decisions. To keep it simple, I\u2019ll assume:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The bookstore orders books on some regular cycle of unknown duration.<\/li>\n\n\n\n<li>At the beginning of every cycle, they start with <code>k<\/code> books.<\/li>\n\n\n\n<li>People buy the book at a rate of <code>\u03bb<\/code> books per cycle.<\/li>\n\n\n\n<li>When you visit the store, you arrive at a random time <code>t<\/code> during the cycle.<\/li>\n<\/ul>\n\n\n\n<p>We\u2019ll start by defining prior distributions for these parameters, and then we\u2019ll update it with the observed data. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Priors<\/h2>\n\n\n\n<p>For some books, the store only keeps one copy in stock. For others it might keep as many as ten. If we would be equally unsurprised by any value in this range, the prior distribution of <code>k<\/code> is uniform between <code>1<\/code> and <code>10<\/code>. <\/p>\n\n\n\n<p>If we arrive at a random point in the cycle, the prior distribution of <code>t<\/code> is uniform between <code>0<\/code> and <code>1<\/code>, measured in cycles. <\/p>\n\n\n\n<p>Now let\u2019s figure the book-buying rate is probably between <code>2<\/code> and <code>3<\/code> copies per cycle, but it could be substantially higher \u2013 with low probability. We can choose a lognormal distribution that has a mean and shape that seem reasonable. Here\u2019s what it looks like.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"630\" height=\"470\" src=\"https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-7.png\" alt=\"\" class=\"wp-image-1165\" srcset=\"https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-7.png 630w, https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-7-300x224.png 300w, https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-7-362x270.png 362w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/figure>\n\n\n\n<p>From these marginal prior distributions, we can form the joint prior. Now let&#8217;s update it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The update<\/h2>\n\n\n\n<p>Now for the update, we have to handle two cases:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If we observe at least one book, <code>n<\/code>, the probability of the data is the probability of selling <code>k-n<\/code> books at rate <code>\u03bb<\/code> over period <code>t<\/code>, which is given by the Poisson PMF.<\/li>\n\n\n\n<li>If there are no copies left, we have to add in the probability that the number of books sold in this period could have exceeded <code>k<\/code>, which is given by the Poisson survival function.<\/li>\n<\/ul>\n\n\n\n<p>After computing these likelihoods for all possible sets of parameters, we do a Bayesian update in the usual way, multiplying the priors by the likelihoods and normalizing the result.<\/p>\n\n\n\n<p>As an example, we\u2019ll do an update with the hypothetically observed <code>2<\/code> books. Then, from the joint posterior, we can extract the marginal distributions of <code>k<\/code> and <code>\u03bb<\/code>, and compute their means.<\/p>\n\n\n\n<p>Seeing two books suggests that the store starts each cycle with 3-4 books and sells 2-3 per cycle. Here\u2019s the posterior distribution of <code>k<\/code> compared to its prior. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"630\" height=\"470\" src=\"https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-8.png\" alt=\"\" class=\"wp-image-1166\" srcset=\"https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-8.png 630w, https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-8-300x224.png 300w, https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-8-362x270.png 362w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/figure>\n\n\n\n<p>And here\u2019s the posterior distribution of <code>\u03bb<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"630\" height=\"470\" src=\"https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-9.png\" alt=\"\" class=\"wp-image-1167\" srcset=\"https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-9.png 630w, https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-9-300x224.png 300w, https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-9-362x270.png 362w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/figure>\n\n\n\n<p>Seeing two books doesn\u2019t provide much information about the book-selling rate.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Optimization<\/h2>\n\n\n\n<p>Now let\u2019s consider the more general question, \u201cWhat number of books would you most like to see?\u201d There are two ways we might answer:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>One answer might be the observation that leads to the highest estimate of <code>\u03bb<\/code>. But if the book-selling rate is high, relative to <code>k<\/code>, the book will sometimes be out of stock, leading to lost sales.<\/li>\n\n\n\n<li>So an alternative is to choose the observation that implies the highest number of books sold per cycle.<\/li>\n<\/ul>\n\n\n\n<p>Computing the second is a little tricky &#8212; you can see the <a href=\"https:\/\/colab.research.google.com\/github\/AllenDowney\/ThinkBayes2\/blob\/master\/examples\/bookstore.ipynb\">details in the notebook<\/a>. But with that problem solved, we can loop over possible values of <code>n<\/code> and compute for each one the posterior mean values of <code>\u03bb<\/code> and the implied number of books sold per cycle.<\/p>\n\n\n\n<p>Here\u2019s the implied sales rate as a function of the observed number of books. By this metric, the best number of books to see is <code>0<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"630\" height=\"470\" src=\"https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-10.png\" alt=\"\" class=\"wp-image-1168\" srcset=\"https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-10.png 630w, https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-10-300x224.png 300w, https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-10-362x270.png 362w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/figure>\n\n\n\n<p>And here\u2019s the implied number of books sold per cycle. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"630\" height=\"470\" src=\"https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-11.png\" alt=\"\" class=\"wp-image-1169\" srcset=\"https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-11.png 630w, https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-11-300x224.png 300w, https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-11-362x270.png 362w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/figure>\n\n\n\n<p>This result is a little more interesting. Seeing <code>0<\/code> books is still good, but the optimal value is around <code>5<\/code>. The worst possibility is to see just one book.<\/p>\n\n\n\n<p>Now, we should not take these values too literally, as they are based on a very small amount of data and a lot of assumptions \u2013 both in the model and in the priors. But it is interesting that the optimal point is neither <code>0<\/code> nor \u201cas many as possible.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>Thanks again to Aubrey Clayton for asking such an interesting question. If you are interesting in the history and future of statistical thinking, you might like his book, <em><a href=\"https:\/\/www.amazon.com\/Bernoullis-Fallacy-Statistical-Illogic-Science\/dp\/0231199945?&amp;_encoding=UTF8&amp;tag=greenteapre01-20&amp;linkCode=ur2&amp;linkId=b8e19f57934094d9dc93820811dd6097&amp;camp=1789&amp;creative=9325\">Bernoulli&#8217;s Fallacy<\/a><\/em>.<\/p>\n<\/blockquote>\n\n\n\n<p><\/p>\n\n\n\n<p><a href=\"file:\/\/\/home\/downey\/ThinkBayes2\/jb\/_build\/html\/ok.html\"><\/a><\/p>\n\n\n\n<p><a href=\"file:\/\/\/home\/downey\/ThinkBayes2\/jb\/_build\/html\/ok.html\"><\/a><\/p>\n\n\n\n<p><a href=\"file:\/\/\/home\/downey\/ThinkBayes2\/jb\/_build\/html\/ok.html\">previous<\/a><\/p>\n\n\n\n<p><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you like this article, you can read more about this kind of Bayesian analysis in Think Bayes. Recently I found a copy of Probably Overthinking It at a local bookstore and posted a picture on Twitter. Aubrey Clayton replied with this question: It&#8217;s a great question with what turns out to be an interesting answer. I&#8217;ll summarize the results here, but if you want to see the calculations, you can run the notebook on Colab. Assumptions Suppose you are&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/www.allendowney.com\/blog\/2023\/12\/29\/how-many-books\/\"> 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_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_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}},"categories":[1],"tags":[],"class_list":["post-1163","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How Many Books? - 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\/2023\/12\/29\/how-many-books\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How Many Books? - Probably Overthinking It\" \/>\n<meta property=\"og:description\" content=\"If you like this article, you can read more about this kind of Bayesian analysis in Think Bayes. Recently I found a copy of Probably Overthinking It at a local bookstore and posted a picture on Twitter. Aubrey Clayton replied with this question: It&#8217;s a great question with what turns out to be an interesting answer. I&#8217;ll summarize the results here, but if you want to see the calculations, you can run the notebook on Colab. Assumptions Suppose you are... Read More Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.allendowney.com\/blog\/2023\/12\/29\/how-many-books\/\" \/>\n<meta property=\"og:site_name\" content=\"Probably Overthinking It\" \/>\n<meta property=\"article:published_time\" content=\"2023-12-29T17:34:36+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-29T17:44:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-6.png\" \/>\n<meta name=\"author\" content=\"AllenDowney\" \/>\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=\"AllenDowney\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.allendowney.com\/blog\/2023\/12\/29\/how-many-books\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.allendowney.com\/blog\/2023\/12\/29\/how-many-books\/\"},\"author\":{\"name\":\"AllenDowney\",\"@id\":\"https:\/\/www.allendowney.com\/blog\/#\/schema\/person\/4e5bfb2e9af6c3446cb0031a7bf83207\"},\"headline\":\"How Many Books?\",\"datePublished\":\"2023-12-29T17:34:36+00:00\",\"dateModified\":\"2023-12-29T17:44:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.allendowney.com\/blog\/2023\/12\/29\/how-many-books\/\"},\"wordCount\":825,\"publisher\":{\"@id\":\"https:\/\/www.allendowney.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.allendowney.com\/blog\/2023\/12\/29\/how-many-books\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-6.png\",\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.allendowney.com\/blog\/2023\/12\/29\/how-many-books\/\",\"url\":\"https:\/\/www.allendowney.com\/blog\/2023\/12\/29\/how-many-books\/\",\"name\":\"How Many Books? - Probably Overthinking It\",\"isPartOf\":{\"@id\":\"https:\/\/www.allendowney.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.allendowney.com\/blog\/2023\/12\/29\/how-many-books\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.allendowney.com\/blog\/2023\/12\/29\/how-many-books\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-6.png\",\"datePublished\":\"2023-12-29T17:34:36+00:00\",\"dateModified\":\"2023-12-29T17:44:10+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.allendowney.com\/blog\/2023\/12\/29\/how-many-books\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.allendowney.com\/blog\/2023\/12\/29\/how-many-books\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.allendowney.com\/blog\/2023\/12\/29\/how-many-books\/#primaryimage\",\"url\":\"https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-6.png\",\"contentUrl\":\"https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-6.png\",\"width\":802,\"height\":224},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.allendowney.com\/blog\/2023\/12\/29\/how-many-books\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.allendowney.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How Many Books?\"}]},{\"@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\/#organization\"},\"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\":\"Organization\",\"@id\":\"https:\/\/www.allendowney.com\/blog\/#organization\",\"name\":\"Probably Overthinking It\",\"url\":\"https:\/\/www.allendowney.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.allendowney.com\/blog\/#\/schema\/logo\/image\/\",\"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\":\"Probably Overthinking It\"},\"image\":{\"@id\":\"https:\/\/www.allendowney.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/AllenDowney\",\"https:\/\/www.linkedin.com\/in\/allendowney\/\",\"https:\/\/bsky.app\/profile\/allendowney.bsky.social\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.allendowney.com\/blog\/#\/schema\/person\/4e5bfb2e9af6c3446cb0031a7bf83207\",\"name\":\"AllenDowney\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.allendowney.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/fb01b3a7f7190bea1bbf7f0852e686c2f8c03b099222df2ce4bc7926f15bcb43?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/fb01b3a7f7190bea1bbf7f0852e686c2f8c03b099222df2ce4bc7926f15bcb43?s=96&d=mm&r=g\",\"caption\":\"AllenDowney\"},\"url\":\"https:\/\/www.allendowney.com\/blog\/author\/allendowney_6dbrc4\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How Many Books? - 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\/2023\/12\/29\/how-many-books\/","og_locale":"en_US","og_type":"article","og_title":"How Many Books? - Probably Overthinking It","og_description":"If you like this article, you can read more about this kind of Bayesian analysis in Think Bayes. Recently I found a copy of Probably Overthinking It at a local bookstore and posted a picture on Twitter. Aubrey Clayton replied with this question: It&#8217;s a great question with what turns out to be an interesting answer. I&#8217;ll summarize the results here, but if you want to see the calculations, you can run the notebook on Colab. Assumptions Suppose you are... Read More Read More","og_url":"https:\/\/www.allendowney.com\/blog\/2023\/12\/29\/how-many-books\/","og_site_name":"Probably Overthinking It","article_published_time":"2023-12-29T17:34:36+00:00","article_modified_time":"2023-12-29T17:44:10+00:00","og_image":[{"url":"https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-6.png","type":"","width":"","height":""}],"author":"AllenDowney","twitter_card":"summary_large_image","twitter_creator":"@AllenDowney","twitter_site":"@AllenDowney","twitter_misc":{"Written by":"AllenDowney","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.allendowney.com\/blog\/2023\/12\/29\/how-many-books\/#article","isPartOf":{"@id":"https:\/\/www.allendowney.com\/blog\/2023\/12\/29\/how-many-books\/"},"author":{"name":"AllenDowney","@id":"https:\/\/www.allendowney.com\/blog\/#\/schema\/person\/4e5bfb2e9af6c3446cb0031a7bf83207"},"headline":"How Many Books?","datePublished":"2023-12-29T17:34:36+00:00","dateModified":"2023-12-29T17:44:10+00:00","mainEntityOfPage":{"@id":"https:\/\/www.allendowney.com\/blog\/2023\/12\/29\/how-many-books\/"},"wordCount":825,"publisher":{"@id":"https:\/\/www.allendowney.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.allendowney.com\/blog\/2023\/12\/29\/how-many-books\/#primaryimage"},"thumbnailUrl":"https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-6.png","inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.allendowney.com\/blog\/2023\/12\/29\/how-many-books\/","url":"https:\/\/www.allendowney.com\/blog\/2023\/12\/29\/how-many-books\/","name":"How Many Books? - Probably Overthinking It","isPartOf":{"@id":"https:\/\/www.allendowney.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.allendowney.com\/blog\/2023\/12\/29\/how-many-books\/#primaryimage"},"image":{"@id":"https:\/\/www.allendowney.com\/blog\/2023\/12\/29\/how-many-books\/#primaryimage"},"thumbnailUrl":"https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-6.png","datePublished":"2023-12-29T17:34:36+00:00","dateModified":"2023-12-29T17:44:10+00:00","breadcrumb":{"@id":"https:\/\/www.allendowney.com\/blog\/2023\/12\/29\/how-many-books\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.allendowney.com\/blog\/2023\/12\/29\/how-many-books\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.allendowney.com\/blog\/2023\/12\/29\/how-many-books\/#primaryimage","url":"https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-6.png","contentUrl":"https:\/\/www.allendowney.com\/blog\/wp-content\/uploads\/2023\/12\/image-6.png","width":802,"height":224},{"@type":"BreadcrumbList","@id":"https:\/\/www.allendowney.com\/blog\/2023\/12\/29\/how-many-books\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.allendowney.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How Many Books?"}]},{"@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\/#organization"},"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":"Organization","@id":"https:\/\/www.allendowney.com\/blog\/#organization","name":"Probably Overthinking It","url":"https:\/\/www.allendowney.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.allendowney.com\/blog\/#\/schema\/logo\/image\/","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":"Probably Overthinking It"},"image":{"@id":"https:\/\/www.allendowney.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/AllenDowney","https:\/\/www.linkedin.com\/in\/allendowney\/","https:\/\/bsky.app\/profile\/allendowney.bsky.social"]},{"@type":"Person","@id":"https:\/\/www.allendowney.com\/blog\/#\/schema\/person\/4e5bfb2e9af6c3446cb0031a7bf83207","name":"AllenDowney","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.allendowney.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/fb01b3a7f7190bea1bbf7f0852e686c2f8c03b099222df2ce4bc7926f15bcb43?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fb01b3a7f7190bea1bbf7f0852e686c2f8c03b099222df2ce4bc7926f15bcb43?s=96&d=mm&r=g","caption":"AllenDowney"},"url":"https:\/\/www.allendowney.com\/blog\/author\/allendowney_6dbrc4\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":353,"url":"https:\/\/www.allendowney.com\/blog\/2019\/12\/08\/handicapping-pub-trivia\/","url_meta":{"origin":1163,"position":0},"title":"Handicapping pub trivia","author":"AllenDowney","date":"December 8, 2019","format":false,"excerpt":"Introduction The following question was posted recently on Reddit's statistics forum: If there is a quiz of x questions with varying results between teams of different sizes, how could you logically handicap the larger teams to bring some sort of equivalence in performance measure?[Suppose there are] 25 questions and a\u2026","rel":"","context":"In \"binomial\"","block_context":{"text":"binomial","link":"https:\/\/www.allendowney.com\/blog\/tag\/binomial\/"},"img":{"alt_text":"","src":"https:\/\/pbs.twimg.com\/media\/ELS2XD4XsAMoGzX?format=jpg&name=medium","width":350,"height":200},"classes":[]},{"id":826,"url":"https:\/\/www.allendowney.com\/blog\/2022\/11\/14\/overthinking-the-question\/","url_meta":{"origin":1163,"position":1},"title":"Overthinking the question","author":"AllenDowney","date":"November 14, 2022","format":false,"excerpt":"\"Tell me if you agree or disagree with this statement: \u00a0Most men are better suited emotionally for politics than are most women.\" That's one of the questions on the General Social Survey. In 1974, when it was first asked, 47% of respondents said they agreed. In 2018, the most recent\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1233,"url":"https:\/\/www.allendowney.com\/blog\/2024\/02\/18\/the-gender-gap-in-political-beliefs-is-small\/","url_meta":{"origin":1163,"position":2},"title":"The Gender Gap in Political Beliefs Is Small","author":"AllenDowney","date":"February 18, 2024","format":false,"excerpt":"In previous articles (here, here, and here) I've looked at evidence of a gender gap in political alignment (liberal or conservative), party affiliation (Democrat or Republican), and policy preferences. Using data from the GSS, I found that women are more likely to say they are liberal, and more likely to\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.allendowney.com\/blog\/wp-content\/uploads\/2024\/02\/belief_gap3-1.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.allendowney.com\/blog\/wp-content\/uploads\/2024\/02\/belief_gap3-1.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.allendowney.com\/blog\/wp-content\/uploads\/2024\/02\/belief_gap3-1.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.allendowney.com\/blog\/wp-content\/uploads\/2024\/02\/belief_gap3-1.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/www.allendowney.com\/blog\/wp-content\/uploads\/2024\/02\/belief_gap3-1.png?resize=1050%2C600&ssl=1 3x, https:\/\/i0.wp.com\/www.allendowney.com\/blog\/wp-content\/uploads\/2024\/02\/belief_gap3-1.png?resize=1400%2C800&ssl=1 4x"},"classes":[]},{"id":596,"url":"https:\/\/www.allendowney.com\/blog\/2021\/05\/03\/simpsons-paradox-and-age-effects\/","url_meta":{"origin":1163,"position":3},"title":"Simpson&#8217;s Paradox and Age Effects","author":"AllenDowney","date":"May 3, 2021","format":false,"excerpt":"As people get older, do they become more racist, sexist, and homophobic? To find out, you could use data from the General Social Survey (GSS), which asks questions like: Do you think there should be laws against marriages between Blacks\/African-Americans and whites?Should a man who admits[mfn]If you find the wording\u2026","rel":"","context":"In \"general social survey\"","block_context":{"text":"general social survey","link":"https:\/\/www.allendowney.com\/blog\/tag\/general-social-survey\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.allendowney.com\/blog\/wp-content\/uploads\/2021\/05\/fepol_vs_age_by_cohort10.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.allendowney.com\/blog\/wp-content\/uploads\/2021\/05\/fepol_vs_age_by_cohort10.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.allendowney.com\/blog\/wp-content\/uploads\/2021\/05\/fepol_vs_age_by_cohort10.jpg?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":845,"url":"https:\/\/www.allendowney.com\/blog\/2023\/01\/19\/smoking-causes-cancer\/","url_meta":{"origin":1163,"position":4},"title":"Smoking causes cancer","author":"AllenDowney","date":"January 19, 2023","format":false,"excerpt":"Here's a question posted on Reddit's statistics forum: The Centers for Disease Control and Prevention states on its website that \u201cin the United States, cigarette smoking causes about 90% of lung cancers.\u201d If S is the event \u201csmokes cigarettes\u201d and L is the event \u201chas lung cancer,\u201d then the prob\u0002ability\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":442,"url":"https:\/\/www.allendowney.com\/blog\/2020\/04\/13\/bayesian-hypothesis-testing\/","url_meta":{"origin":1163,"position":5},"title":"Bayesian hypothesis testing","author":"AllenDowney","date":"April 13, 2020","format":false,"excerpt":"I have mixed feelings about Bayesian hypothesis testing. On the positive side, it's better than null-hypothesis significance testing (NHST). And it is probably necessary as an onboarding tool: Hypothesis testing is one of the first things future Bayesians ask about; we need to have an answer. On the negative side,\u2026","rel":"","context":"In \"bayesian statistics\"","block_context":{"text":"bayesian statistics","link":"https:\/\/www.allendowney.com\/blog\/tag\/bayesian-statistics\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.allendowney.com\/blog\/wp-content\/uploads\/2020\/04\/image.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.allendowney.com\/blog\/wp-json\/wp\/v2\/posts\/1163","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=1163"}],"version-history":[{"count":3,"href":"https:\/\/www.allendowney.com\/blog\/wp-json\/wp\/v2\/posts\/1163\/revisions"}],"predecessor-version":[{"id":1172,"href":"https:\/\/www.allendowney.com\/blog\/wp-json\/wp\/v2\/posts\/1163\/revisions\/1172"}],"wp:attachment":[{"href":"https:\/\/www.allendowney.com\/blog\/wp-json\/wp\/v2\/media?parent=1163"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.allendowney.com\/blog\/wp-json\/wp\/v2\/categories?post=1163"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.allendowney.com\/blog\/wp-json\/wp\/v2\/tags?post=1163"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}