{"id":23101,"date":"2023-03-02T09:42:23","date_gmt":"2023-03-02T09:42:23","guid":{"rendered":"https:\/\/www.booksofall.com\/in\/?post_type=product&#038;p=23101"},"modified":"2023-03-02T09:42:23","modified_gmt":"2023-03-02T09:42:23","slug":"think-stats-probability-and-statistics-for-programmers","status":"publish","type":"product","link":"https:\/\/www.booksofall.com\/in\/think-stats-probability-and-statistics-for-programmers\/","title":{"rendered":"Think Stats &#8211; Probability and Statistics for Programmers"},"content":{"rendered":"<h2><b>Chapter 1 &#8211; <\/b><b>Statistical thinking for programmers<\/b><\/h2>\n<p>This book is about turning data into knowledge. Data is cheap (at least relatively); knowledge is harder to come by. I will present three related pieces:<\/p>\n<ul>\n<li><a href=\"https:\/\/byjus.com\/maths\/probability\/\"><b>Probability\u00a0<\/b><\/a>is the study of random events. Most people have an intuitive understanding of degrees of probability, which is why you can use words like \u201cprobably\u201d and \u201cunlikely\u201d without special training, but we will talk about how to make quantitative claims about those degrees.<\/li>\n<li><a href=\"https:\/\/www.investopedia.com\/terms\/s\/statistics.asp\"><b>Statistics\u00a0<\/b><\/a>is the discipline of using data samples to support claims about populations. Most statistical analysis is based on probability, which is why these pieces are usually presented together.<\/li>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Computation\"><b>Computation\u00a0<\/b><\/a>is a tool that is well-suited to quantitative analysis, and computers are commonly used to process statistics. Also, computational experiments are useful for exploring concepts in probability and statistics.<\/li>\n<\/ul>\n<p>The thesis of this book is that if you know how to program, you can use that skill to help you understand probability and statistics. These topics are often presented from a mathematical perspective, and that approach works well for some people. But some important ideas in this area are hard to work with mathematically and relatively easy to approach computationally.<\/p>\n<p>The rest of this chapter presents a case study motivated by a question I heard when my wife and I were expecting our first child: do first babies tend to arrive late?<\/p>\n<p><b>1.1 Do first babies arrive late?\u00a0<\/b><\/p>\n<p>If you <a href=\"https:\/\/www.google.com.hk\/\">Google<\/a> this question, you will find plenty of discussion. Some people claim it\u2019s true, others say it\u2019s a myth, and some people say it\u2019s the other way around: first babies come early.<\/p>\n<p>In many of these discussions, people provide data to support their claims. I found many examples like these:<\/p>\n<p>\u201cMy two friends that have given birth recently to their first babies, BOTH went almost 2 weeks overdue before going into labour or being induced.\u201d<br \/>\n\u201cMy first one came 2 weeks late and now I think the second one is going to come out two weeks early!!\u201d<br \/>\n\u201cI don\u2019t think that can be true because my sister was my mother\u2019s first and she was early, as with many of my cousins.\u201d<\/p>\n<p>Reports like these are called\u00a0<b>anecdotal evidence\u00a0<\/b>because they are based on data that is unpublished and usually personal. In casual conversation, there is nothing wrong with anecdotes, so I don\u2019t mean to pick on the people I quoted.<\/p>\n<p>But we might want evidence that is more persuasive and an answer that is more reliable. By those standards, anecdotal evidence usually fails, because:<\/p>\n<ul>\n<li><b>Small number of observations:\u00a0<\/b>If the gestation period is longer for first babies, the difference is probably small compared to the natural variation. In that case, we might have to compare a large number of pregnancies to be sure that a difference exists.<\/li>\n<li><b><a href=\"https:\/\/en.wikipedia.org\/wiki\/Selection_bias\">Selection bias<\/a>:\u00a0<\/b>People who join a discussion of this question might be interested because their first babies were late. In that case the process of selecting data would bias the results.<\/li>\n<li><b><a href=\"https:\/\/www.scribbr.com\/research-bias\/confirmation-bias\/\">Confirmation bias<\/a>:\u00a0<\/b>People who believe the claim might be more likely to contribute examples that confirm it. People who doubt the claim are more likely to cite counterexamples.<\/li>\n<li><b>Inaccuracy:\u00a0<\/b>Anecdotes are often personal stories, and often misremembered, misrepresented, repeated inaccurately, etc.<\/li>\n<\/ul>\n<p>So how can we do better?<\/p>\n<p><b>1.2 A statistical approach\u00a0<\/b><\/p>\n<p>To address the limitations of anecdotes, we will use the tools of statistics, which include:<\/p>\n<ul>\n<li><b><a href=\"https:\/\/www.simplilearn.com\/what-is-data-collection-article\">Data collection<\/a>:\u00a0<\/b>We will use data from a large national survey that was de- signed explicitly with the goal of generating statistically valid inferences about the U.S. population.<\/li>\n<li><b><a href=\"https:\/\/www.investopedia.com\/terms\/d\/descriptive_statistics.asp\">Descriptive statistics<\/a>:\u00a0<\/b>We will generate statistics that summarize the data concisely, and evaluate different ways to visualize data.<\/li>\n<li><b>Exploratory data analysis:\u00a0<\/b>We will look for patterns, differences, and other features that address the questions we are interested in. At the same time we will check for inconsistencies and identify limitations.<\/li>\n<li><b>Hypothesis testing:\u00a0<\/b>Where we see apparent effects, like a difference be- tween two groups, we will evaluate whether the effect is real, or whether it might have happened by chance.<\/li>\n<li><b>Estimation:\u00a0<\/b>We will use data from a sample to estimate characteristics of the general population.<\/li>\n<\/ul>\n<p>By performing these steps with care to avoid pitfalls, we can reach conclusions that are more justifiable and more likely to be correct.<\/p>\n","protected":false},"excerpt":{"rendered":"<p><iframe style=\"width: 100%; height: 750px; border: none;\" src=\"https:\/\/online.visual-paradigm.com\/share\/book\/think-stats-probability-and-statistics-for-programmers-19mdus27n4?p=1\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n","protected":false},"featured_media":23105,"template":"","meta":{"_yoast_wpseo_title":"","_yoast_wpseo_metadesc":"Probability and Statistics is a field that focuses on the application of probabilistic and statistical methods. Learn more about it here!"},"product_brand":[],"product_cat":[365],"product_tag":[],"class_list":{"0":"post-23101","1":"product","2":"type-product","3":"status-publish","4":"has-post-thumbnail","6":"product_cat-mathematics-subjects","8":"first","9":"instock","10":"shipping-taxable","11":"product-type-simple"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Think Stats - Probability and Statistics for Programmers - BooksOffAll Indian<\/title>\n<meta name=\"description\" content=\"Probability and Statistics is a field that focuses on the application of probabilistic and statistical methods. Learn more about it here!\" \/>\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.booksofall.com\/in\/think-stats-probability-and-statistics-for-programmers\/\" \/>\n<meta property=\"og:locale\" content=\"hi_IN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Think Stats - Probability and Statistics for Programmers - BooksOffAll Indian\" \/>\n<meta property=\"og:description\" content=\"Probability and Statistics is a field that focuses on the application of probabilistic and statistical methods. Learn more about it here!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.booksofall.com\/in\/think-stats-probability-and-statistics-for-programmers\/\" \/>\n<meta property=\"og:site_name\" content=\"BooksOffAll Indian\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.booksofall.com\/in\/wp-content\/uploads\/sites\/13\/2023\/03\/Think-Stats-Probability-and-Statistics-for-Programmers.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.booksofall.com\/in\/wp-content\/uploads\/sites\/13\/2023\/03\/Think-Stats-Probability-and-Statistics-for-Programmers.jpg\" \/>\n<meta name=\"twitter:label1\" content=\"\u0905\u0928\u0941\u092e\u093e\u0928\u093f\u0924 \u092a\u0922\u093c\u0928\u0947 \u0915\u093e \u0938\u092e\u092f\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 \u092e\u093f\u0928\u091f\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.booksofall.com\/in\/think-stats-probability-and-statistics-for-programmers\/\",\"url\":\"https:\/\/www.booksofall.com\/in\/think-stats-probability-and-statistics-for-programmers\/\",\"name\":\"Think Stats - Probability and Statistics for Programmers - BooksOffAll Indian\",\"isPartOf\":{\"@id\":\"https:\/\/www.booksofall.com\/in\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.booksofall.com\/in\/think-stats-probability-and-statistics-for-programmers\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.booksofall.com\/in\/think-stats-probability-and-statistics-for-programmers\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.booksofall.com\/in\/wp-content\/uploads\/sites\/13\/2023\/03\/Think-Stats-Probability-and-Statistics-for-Programmers.jpg\",\"datePublished\":\"2023-03-02T09:42:23+00:00\",\"description\":\"Probability and Statistics is a field that focuses on the application of probabilistic and statistical methods. Learn more about it here!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.booksofall.com\/in\/think-stats-probability-and-statistics-for-programmers\/#breadcrumb\"},\"inLanguage\":\"hi-IN\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.booksofall.com\/in\/think-stats-probability-and-statistics-for-programmers\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"hi-IN\",\"@id\":\"https:\/\/www.booksofall.com\/in\/think-stats-probability-and-statistics-for-programmers\/#primaryimage\",\"url\":\"https:\/\/www.booksofall.com\/in\/wp-content\/uploads\/sites\/13\/2023\/03\/Think-Stats-Probability-and-Statistics-for-Programmers.jpg\",\"contentUrl\":\"https:\/\/www.booksofall.com\/in\/wp-content\/uploads\/sites\/13\/2023\/03\/Think-Stats-Probability-and-Statistics-for-Programmers.jpg\",\"width\":\"595\",\"height\":\"842\",\"caption\":\"Think Stats - Probability and Statistics for Programmers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.booksofall.com\/in\/think-stats-probability-and-statistics-for-programmers\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.booksofall.com\/in\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Categories\",\"item\":\"https:\/\/www.booksofall.com\/in\/categories\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Think Stats &#8211; Probability and Statistics for Programmers\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.booksofall.com\/in\/#website\",\"url\":\"https:\/\/www.booksofall.com\/in\/\",\"name\":\"BooksOffAll Indian\",\"description\":\"Biggest IT eBooks library and learning resources - Free eBooks for programming, computing, artificial intelligence and more.\",\"publisher\":{\"@id\":\"https:\/\/www.booksofall.com\/in\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.booksofall.com\/in\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"hi-IN\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.booksofall.com\/in\/#organization\",\"name\":\"BooksOffAll Indian\",\"url\":\"https:\/\/www.booksofall.com\/in\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"hi-IN\",\"@id\":\"https:\/\/www.booksofall.com\/in\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.booksofall.com\/in\/wp-content\/uploads\/sites\/13\/2022\/06\/booksofall-logo-2.png\",\"contentUrl\":\"https:\/\/www.booksofall.com\/in\/wp-content\/uploads\/sites\/13\/2022\/06\/booksofall-logo-2.png\",\"width\":166,\"height\":30,\"caption\":\"BooksOffAll Indian\"},\"image\":{\"@id\":\"https:\/\/www.booksofall.com\/in\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Think Stats - Probability and Statistics for Programmers - BooksOffAll Indian","description":"Probability and Statistics is a field that focuses on the application of probabilistic and statistical methods. Learn more about it here!","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.booksofall.com\/in\/think-stats-probability-and-statistics-for-programmers\/","og_locale":"hi_IN","og_type":"article","og_title":"Think Stats - Probability and Statistics for Programmers - BooksOffAll Indian","og_description":"Probability and Statistics is a field that focuses on the application of probabilistic and statistical methods. Learn more about it here!","og_url":"https:\/\/www.booksofall.com\/in\/think-stats-probability-and-statistics-for-programmers\/","og_site_name":"BooksOffAll Indian","og_image":[{"url":"https:\/\/www.booksofall.com\/in\/wp-content\/uploads\/sites\/13\/2023\/03\/Think-Stats-Probability-and-Statistics-for-Programmers.jpg","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_image":"https:\/\/www.booksofall.com\/in\/wp-content\/uploads\/sites\/13\/2023\/03\/Think-Stats-Probability-and-Statistics-for-Programmers.jpg","twitter_misc":{"\u0905\u0928\u0941\u092e\u093e\u0928\u093f\u0924 \u092a\u0922\u093c\u0928\u0947 \u0915\u093e \u0938\u092e\u092f":"4 \u092e\u093f\u0928\u091f"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.booksofall.com\/in\/think-stats-probability-and-statistics-for-programmers\/","url":"https:\/\/www.booksofall.com\/in\/think-stats-probability-and-statistics-for-programmers\/","name":"Think Stats - Probability and Statistics for Programmers - BooksOffAll Indian","isPartOf":{"@id":"https:\/\/www.booksofall.com\/in\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.booksofall.com\/in\/think-stats-probability-and-statistics-for-programmers\/#primaryimage"},"image":{"@id":"https:\/\/www.booksofall.com\/in\/think-stats-probability-and-statistics-for-programmers\/#primaryimage"},"thumbnailUrl":"https:\/\/www.booksofall.com\/in\/wp-content\/uploads\/sites\/13\/2023\/03\/Think-Stats-Probability-and-Statistics-for-Programmers.jpg","datePublished":"2023-03-02T09:42:23+00:00","description":"Probability and Statistics is a field that focuses on the application of probabilistic and statistical methods. Learn more about it here!","breadcrumb":{"@id":"https:\/\/www.booksofall.com\/in\/think-stats-probability-and-statistics-for-programmers\/#breadcrumb"},"inLanguage":"hi-IN","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.booksofall.com\/in\/think-stats-probability-and-statistics-for-programmers\/"]}]},{"@type":"ImageObject","inLanguage":"hi-IN","@id":"https:\/\/www.booksofall.com\/in\/think-stats-probability-and-statistics-for-programmers\/#primaryimage","url":"https:\/\/www.booksofall.com\/in\/wp-content\/uploads\/sites\/13\/2023\/03\/Think-Stats-Probability-and-Statistics-for-Programmers.jpg","contentUrl":"https:\/\/www.booksofall.com\/in\/wp-content\/uploads\/sites\/13\/2023\/03\/Think-Stats-Probability-and-Statistics-for-Programmers.jpg","width":"595","height":"842","caption":"Think Stats - Probability and Statistics for Programmers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.booksofall.com\/in\/think-stats-probability-and-statistics-for-programmers\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.booksofall.com\/in\/"},{"@type":"ListItem","position":2,"name":"Categories","item":"https:\/\/www.booksofall.com\/in\/categories\/"},{"@type":"ListItem","position":3,"name":"Think Stats &#8211; Probability and Statistics for Programmers"}]},{"@type":"WebSite","@id":"https:\/\/www.booksofall.com\/in\/#website","url":"https:\/\/www.booksofall.com\/in\/","name":"BooksOffAll Indian","description":"Biggest IT eBooks library and learning resources - Free eBooks for programming, computing, artificial intelligence and more.","publisher":{"@id":"https:\/\/www.booksofall.com\/in\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.booksofall.com\/in\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"hi-IN"},{"@type":"Organization","@id":"https:\/\/www.booksofall.com\/in\/#organization","name":"BooksOffAll Indian","url":"https:\/\/www.booksofall.com\/in\/","logo":{"@type":"ImageObject","inLanguage":"hi-IN","@id":"https:\/\/www.booksofall.com\/in\/#\/schema\/logo\/image\/","url":"https:\/\/www.booksofall.com\/in\/wp-content\/uploads\/sites\/13\/2022\/06\/booksofall-logo-2.png","contentUrl":"https:\/\/www.booksofall.com\/in\/wp-content\/uploads\/sites\/13\/2022\/06\/booksofall-logo-2.png","width":166,"height":30,"caption":"BooksOffAll Indian"},"image":{"@id":"https:\/\/www.booksofall.com\/in\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.booksofall.com\/in\/wp-json\/wp\/v2\/product\/23101","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.booksofall.com\/in\/wp-json\/wp\/v2\/product"}],"about":[{"href":"https:\/\/www.booksofall.com\/in\/wp-json\/wp\/v2\/types\/product"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.booksofall.com\/in\/wp-json\/wp\/v2\/media\/23105"}],"wp:attachment":[{"href":"https:\/\/www.booksofall.com\/in\/wp-json\/wp\/v2\/media?parent=23101"}],"wp:term":[{"taxonomy":"product_brand","embeddable":true,"href":"https:\/\/www.booksofall.com\/in\/wp-json\/wp\/v2\/product_brand?post=23101"},{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/www.booksofall.com\/in\/wp-json\/wp\/v2\/product_cat?post=23101"},{"taxonomy":"product_tag","embeddable":true,"href":"https:\/\/www.booksofall.com\/in\/wp-json\/wp\/v2\/product_tag?post=23101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}