{"id":6996,"date":"2023-04-26T00:00:00","date_gmt":"2023-04-26T04:00:00","guid":{"rendered":"https:\/\/www.sisense.com\/how-to-calculate-confidence-intervals-in-sql\/"},"modified":"2024-09-23T15:20:54","modified_gmt":"2024-09-23T19:20:54","slug":"how-to-calculate-confidence-intervals-in-sql","status":"publish","type":"post","link":"https:\/\/www.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/","title":{"rendered":"How to calculate confidence intervals in SQL"},"content":{"rendered":"<p><\/p>\r\n<h2 class=\"wp-block-heading\">Statistical overconfidence: Dangerous and easy<\/h2>\r\n<p>Imagine you have a small online business. This month 200 users signed up on your website, and 10 of them bought your $800 service. Great! You\u2019ve made $8k of income. How much should you expect to make this year?<\/p>\r\n<p>The straightforward answer is $8k * 12 = $96k. But how confident should you be? Will your conversion rate always be so close to 5%? You could pad the estimate \u00b120% for safety, guessing at $77k to $115k. If $77k would cover all your expenses, should you feel secure?<\/p>\r\n<p>This is a question of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Binomial_distribution\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">binomial probability<\/a>. Using our favorite binomial confidence interval calculator, the 95% confidence interval for your conversion rate is about 2.5% to 9%.<\/p>\r\n<p>With a confidence interval that wide, you should expect to make somewhere between $48k and $172k. Yikes! You could end up with half of your simple guess, and that\u2019s if your business doesn\u2019t change.<\/p>\r\n<h2>Automating statistics: Calculating confidence intervals in SQL<\/h2>\r\n<p>These confidence intervals are very informative, but turning to a calculator for every metric is tedious. If you\u2019ve got hundreds of metrics across dozens of dashboards, it\u2019s downright unsustainable.<\/p>\r\n<p>Fortunately, the math for calculating confidence interval is simple to implement:<\/p>\r\n<h2>The normal approximation interval formula for binomial confidence intervals<\/h2>\r\n<pre class=\"wp-block-code\"><code>n = number of users\r\nx = number of conversions\r\np = probability of conversion = (x \/ n)\r\nse = standard error of p = sqrt((p * (1 - p)) \/ n)\r\nconfidence interval = p \u00b1 (1.96 * se)<\/code><\/pre>\r\n<p><em>See\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/Binomial_proportion_confidence_interval#Normal_approximation_interval\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Normal approximation interval on wikipedia<\/a>. Note the 1.96 constant specifies a 95% interval on a\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/One-_and_two-tailed_tests\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">two-tailed normal distribution<\/a>.<\/em><\/p>\r\n<p><strong>Implementing the formula in SQL<\/strong><\/p>\r\n<p>Let\u2019s start with a table of the total number of users, and how many converted. Any data that represents a rate \u2014 conversions per user, server errors per request, etc. \u2014 will also work.<\/p>\r\n<pre class=\"wp-block-code\"><code>select \r\n  count(1) as n, \r\n  sum(case when converted then 1 else 0 end) as x\r\nfrom users\r\ngroup by date_trunc('month', created_at);<\/code><\/pre>\r\n<figure class=\"wp-block-image fancybox\"><img decoding=\"async\" class=\"wp-image-78764\" src=\"https:\/\/cdn.sisense.com\/wp-content\/uploads\/image-01-19.png\" alt=\"Users table\" \/><\/figure>\r\n<p>With our basic data in hand, we want to implement the above formula in SQL. To keep things clear, we wrap each step of the calculation separately:<\/p>\r\n<ol>\r\n<li>Calculate the conversation rate, p.<\/li>\r\n<li>Using p, calculate the standard error, se.<\/li>\r\n<li>Compute the low and high confidence intervals.<\/li>\r\n<li>Include the original p conversion rate as our mid estimate.<\/li>\r\n<\/ol>\r\n<pre class=\"wp-block-code\"><code>select \r\n  rates.n as users, \r\n  rates.x as conversions, \r\n  p - se * 1.96 as low, \r\n  intervals.p as mid, \r\n  p + se * 1.96 as high \r\nfrom (\r\n  select \r\n    rates.*, \r\n    sqrt(p * (1 - p) \/ n) as se -- calculate se\r\n  from (\r\n      select conversions.*, \r\n      x \/ n::float as p -- calculate p\r\n    from ( \r\n      -- Our conversion rate table from above\r\n      select \r\n        count(1) as n, \r\n        sum(case when converted then 1 else 0 end) as x\r\n      from users\r\n      group by date_trunc('month', created_at);\r\n    ) conversions\r\n  ) rates\r\n) intervals<\/code><\/pre>\r\n<figure class=\"wp-block-image fancybox\"><img decoding=\"async\" class=\"wp-image-78770\" src=\"https:\/\/cdn.sisense.com\/wp-content\/uploads\/image-02-20.png\" alt=\"adjusted table\" \/><\/figure>\r\n<p>You might be wondering why we\u2019re seeing 8% on the high end, rather than the 9% mentioned in the introduction. We used the Adjusted Wald method in the introduction, which produces more accurate estimates for small amounts of data.<\/p>\r\n<h2>A refinement for little data: The Adjusted Wald method<\/h2>\r\n<p>The math explained above, though quite accurate with hundreds of users and a healthy conversion rate, becomes increasingly biased with less data or extremely high or low rates. A rule of thumb is to avoid using it with fewer than 5 conversions or 100 users.<\/p>\r\n<p>One way to adjust for these shortcomings is to use a more robust <a href=\"https:\/\/en.wikipedia.org\/wiki\/Binomial_proportion_confidence_interval\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">binomial proportion confidence<\/a> interval technique like the Adjusted Wald method. In short, it adds a bit of fuzziness to the estimated probability to smooth out the extremely high or low rates which are more common with few data points.<\/p>\r\n<p>Given the z-score needed to reach a certain confidence level (1.96 for a 95% confidence), add 0.5 * z^2 to the number of conversions, and z^2 to the number of users. This is roughly +2 and +4 for the 1.96 z-score for 95%.<\/p>\r\n<pre class=\"wp-block-code\"><code>select \r\n  rates.n as users, \r\n  rates.x as conversions, \r\n  p - se * 1.96 as low, \r\n  intervals.p as mid, \r\n  p + se * 1.96 as high \r\nfrom (\r\n  select \r\n    rates.*, \r\n    sqrt(p * (1 - p) \/ n) as se -- calculate se\r\n  from (\r\n    select \r\n      conversions.*, \r\n      (x + 1.92) \/ (n + 3.84)::float as p -- calculate p\r\n    from ( \r\n      -- Our conversion rate table from above\r\n      select \r\n        count(1) as n, \r\n        sum(case when converted then 1 else 0 end) as x\r\n      from users\r\n      group by date_trunc('month', created_at);\r\n    ) conversions\r\n  ) rates\r\n) intervals<\/code><\/pre>\r\n<p>The important adjustment is here, where we add the constants to the numerator and denominator when calculating\u00a0p:<\/p>\r\n<pre class=\"wp-block-code\"><code>(x + 1.92) \/ (n + 3.84)::float as p -- calculate p<\/code><\/pre>\r\n<figure class=\"wp-block-image fancybox\"><img decoding=\"async\" class=\"wp-image-78788\" src=\"https:\/\/cdn.sisense.com\/wp-content\/uploads\/image-03-15.png\" alt=\"Conversions table\" \/><\/figure>\r\n<p>This isn\u2019t a magical solution to not enough data: If you have an expected 1% conversion rate and only 100 users, this adjustment will triple the estimated conversion rate, giving you a confidence interval of 0-6%. More data is the answer. At 10 conversions and 1,000 users, the interval shrinks to 0.5% to 1.9%.<\/p>\r\n<p>In general, the more data you have, the more statistical approaches like these will be helpful to you.<\/p>\r\n<h2>Who are we?<\/h2>\r\n<p>We make a tool that makes data analysis on large SQL databases fast and easy. You could use our Snippets feature to implement this logic once, and apply it to any dataset.<\/p>\r\n<p>If you have a database with many millions or billions of rows, and running hundreds of analyses is getting slow and cumbersome, we think you\u2019ll really love it. Sign up for a free demo. We can also set you up with a free trial on the same day!<\/p>\r\n<p>\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n<\/p>","protected":false},"excerpt":{"rendered":"<p>Statistical overconfidence: Dangerous and easy Imagine you have a small online business. This month 200 users signed up on your website, and 10 of them bought your $800 service. Great! You\u2019ve made $8k of income. How much should you expect&#8230;<\/p>\n","protected":false},"author":4,"featured_media":7198,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_searchwp_excluded":"","footnotes":"","_links_to":"","_links_to_target":""},"categories":[44],"tags":[472],"application":[10],"buyer-role":[],"buyer-stage":[],"department":[6],"industry":[],"topic":[],"class_list":["post-6996","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech-talk","tag-data-team","application-cloud-data-teams","department-it"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v23.5 (Yoast SEO v23.8) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Calculate Confidence Intervals in SQL | Sisense<\/title>\n<meta name=\"description\" content=\"Confidence intervals are informative, but turning to a calculator for every metric is tedious. Fortunately, the math is simple to implement.\" \/>\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.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to calculate confidence intervals in SQL\" \/>\n<meta property=\"og:description\" content=\"Statistical overconfidence: Dangerous and easy Imagine you have a small online business. This month 200 users signed up on your website, and 10 of them\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/\" \/>\n<meta property=\"og:site_name\" content=\"Sisense\" \/>\n<meta property=\"article:published_time\" content=\"2023-04-26T04:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-23T19:20:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.sisense.com\/wp-content\/uploads\/yoast-calculate-blog-min.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Sisense Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/cdn.sisense.com\/wp-content\/uploads\/yoast-calculate-blog-min.jpg\" \/>\n<meta name=\"twitter:creator\" content=\"@sisense\" \/>\n<meta name=\"twitter:site\" content=\"@sisense\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sisense Team\" \/>\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.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/\"},\"author\":{\"name\":\"Sisense Team\",\"@id\":\"https:\/\/www.sisense.com\/#\/schema\/person\/e70aa3a7bbc471e4b7b8c5a7d2b36115\"},\"headline\":\"How to calculate confidence intervals in SQL\",\"datePublished\":\"2023-04-26T04:00:00+00:00\",\"dateModified\":\"2024-09-23T19:20:54+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/\"},\"wordCount\":668,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.sisense.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdn.sisense.com\/wp-content\/uploads\/2014\/05\/10161640\/featured-calculate-blog-min.jpg\",\"keywords\":[\"data team\"],\"articleSection\":[\"Tech Talk\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/\",\"url\":\"https:\/\/www.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/\",\"name\":\"How to Calculate Confidence Intervals in SQL | Sisense\",\"isPartOf\":{\"@id\":\"https:\/\/www.sisense.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdn.sisense.com\/wp-content\/uploads\/2014\/05\/10161640\/featured-calculate-blog-min.jpg\",\"datePublished\":\"2023-04-26T04:00:00+00:00\",\"dateModified\":\"2024-09-23T19:20:54+00:00\",\"description\":\"Confidence intervals are informative, but turning to a calculator for every metric is tedious. Fortunately, the math is simple to implement.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/#primaryimage\",\"url\":\"https:\/\/cdn.sisense.com\/wp-content\/uploads\/2014\/05\/10161640\/featured-calculate-blog-min.jpg\",\"contentUrl\":\"https:\/\/cdn.sisense.com\/wp-content\/uploads\/2014\/05\/10161640\/featured-calculate-blog-min.jpg\",\"width\":1200,\"height\":628,\"caption\":\"featured calculate blog min\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sisense.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to calculate confidence intervals in SQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.sisense.com\/#website\",\"url\":\"https:\/\/www.sisense.com\/\",\"name\":\"Sisense\",\"description\":\"Build your business with anywhere-analytics\",\"publisher\":{\"@id\":\"https:\/\/www.sisense.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.sisense.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.sisense.com\/#organization\",\"name\":\"Sisense\",\"url\":\"https:\/\/www.sisense.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.sisense.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdn.sisense.com\/wp-content\/uploads\/sisense-yoast-og.jpg\",\"contentUrl\":\"https:\/\/cdn.sisense.com\/wp-content\/uploads\/sisense-yoast-og.jpg\",\"width\":1200,\"height\":600,\"caption\":\"Sisense\"},\"image\":{\"@id\":\"https:\/\/www.sisense.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/sisense\",\"https:\/\/www.linkedin.com\/company\/sisense\",\"https:\/\/github.com\/sisense\/\"],\"description\":\"Sisense accelerates product innovation through AI\/ML capabilities. Our global analytics platform lets customers drive better, faster decisions for their business and end users.\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.sisense.com\/#\/schema\/person\/e70aa3a7bbc471e4b7b8c5a7d2b36115\",\"name\":\"Sisense Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.sisense.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/213e415f47bc3c7f0155a0755b1cea8c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/213e415f47bc3c7f0155a0755b1cea8c?s=96&d=mm&r=g\",\"caption\":\"Sisense Team\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Calculate Confidence Intervals in SQL | Sisense","description":"Confidence intervals are informative, but turning to a calculator for every metric is tedious. Fortunately, the math is simple to implement.","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.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/","og_locale":"en_US","og_type":"article","og_title":"How to calculate confidence intervals in SQL","og_description":"Statistical overconfidence: Dangerous and easy Imagine you have a small online business. This month 200 users signed up on your website, and 10 of them","og_url":"https:\/\/www.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/","og_site_name":"Sisense","article_published_time":"2023-04-26T04:00:00+00:00","article_modified_time":"2024-09-23T19:20:54+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/cdn.sisense.com\/wp-content\/uploads\/yoast-calculate-blog-min.jpg","type":"image\/jpeg"}],"author":"Sisense Team","twitter_card":"summary_large_image","twitter_image":"https:\/\/cdn.sisense.com\/wp-content\/uploads\/yoast-calculate-blog-min.jpg","twitter_creator":"@sisense","twitter_site":"@sisense","twitter_misc":{"Written by":"Sisense Team","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/#article","isPartOf":{"@id":"https:\/\/www.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/"},"author":{"name":"Sisense Team","@id":"https:\/\/www.sisense.com\/#\/schema\/person\/e70aa3a7bbc471e4b7b8c5a7d2b36115"},"headline":"How to calculate confidence intervals in SQL","datePublished":"2023-04-26T04:00:00+00:00","dateModified":"2024-09-23T19:20:54+00:00","mainEntityOfPage":{"@id":"https:\/\/www.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/"},"wordCount":668,"commentCount":0,"publisher":{"@id":"https:\/\/www.sisense.com\/#organization"},"image":{"@id":"https:\/\/www.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.sisense.com\/wp-content\/uploads\/2014\/05\/10161640\/featured-calculate-blog-min.jpg","keywords":["data team"],"articleSection":["Tech Talk"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/","url":"https:\/\/www.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/","name":"How to Calculate Confidence Intervals in SQL | Sisense","isPartOf":{"@id":"https:\/\/www.sisense.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/#primaryimage"},"image":{"@id":"https:\/\/www.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.sisense.com\/wp-content\/uploads\/2014\/05\/10161640\/featured-calculate-blog-min.jpg","datePublished":"2023-04-26T04:00:00+00:00","dateModified":"2024-09-23T19:20:54+00:00","description":"Confidence intervals are informative, but turning to a calculator for every metric is tedious. Fortunately, the math is simple to implement.","breadcrumb":{"@id":"https:\/\/www.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/#primaryimage","url":"https:\/\/cdn.sisense.com\/wp-content\/uploads\/2014\/05\/10161640\/featured-calculate-blog-min.jpg","contentUrl":"https:\/\/cdn.sisense.com\/wp-content\/uploads\/2014\/05\/10161640\/featured-calculate-blog-min.jpg","width":1200,"height":628,"caption":"featured calculate blog min"},{"@type":"BreadcrumbList","@id":"https:\/\/www.sisense.com\/blog\/how-to-calculate-confidence-intervals-in-sql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sisense.com\/"},{"@type":"ListItem","position":2,"name":"How to calculate confidence intervals in SQL"}]},{"@type":"WebSite","@id":"https:\/\/www.sisense.com\/#website","url":"https:\/\/www.sisense.com\/","name":"Sisense","description":"Build your business with anywhere-analytics","publisher":{"@id":"https:\/\/www.sisense.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sisense.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.sisense.com\/#organization","name":"Sisense","url":"https:\/\/www.sisense.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sisense.com\/#\/schema\/logo\/image\/","url":"https:\/\/cdn.sisense.com\/wp-content\/uploads\/sisense-yoast-og.jpg","contentUrl":"https:\/\/cdn.sisense.com\/wp-content\/uploads\/sisense-yoast-og.jpg","width":1200,"height":600,"caption":"Sisense"},"image":{"@id":"https:\/\/www.sisense.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/sisense","https:\/\/www.linkedin.com\/company\/sisense","https:\/\/github.com\/sisense\/"],"description":"Sisense accelerates product innovation through AI\/ML capabilities. Our global analytics platform lets customers drive better, faster decisions for their business and end users."},{"@type":"Person","@id":"https:\/\/www.sisense.com\/#\/schema\/person\/e70aa3a7bbc471e4b7b8c5a7d2b36115","name":"Sisense Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sisense.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/213e415f47bc3c7f0155a0755b1cea8c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/213e415f47bc3c7f0155a0755b1cea8c?s=96&d=mm&r=g","caption":"Sisense Team"}}]}},"_links":{"self":[{"href":"https:\/\/www.sisense.com\/wp-json\/wp\/v2\/posts\/6996"}],"collection":[{"href":"https:\/\/www.sisense.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sisense.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sisense.com\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sisense.com\/wp-json\/wp\/v2\/comments?post=6996"}],"version-history":[{"count":0,"href":"https:\/\/www.sisense.com\/wp-json\/wp\/v2\/posts\/6996\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sisense.com\/wp-json\/wp\/v2\/media\/7198"}],"wp:attachment":[{"href":"https:\/\/www.sisense.com\/wp-json\/wp\/v2\/media?parent=6996"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sisense.com\/wp-json\/wp\/v2\/categories?post=6996"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sisense.com\/wp-json\/wp\/v2\/tags?post=6996"},{"taxonomy":"application","embeddable":true,"href":"https:\/\/www.sisense.com\/wp-json\/wp\/v2\/application?post=6996"},{"taxonomy":"buyer-role","embeddable":true,"href":"https:\/\/www.sisense.com\/wp-json\/wp\/v2\/buyer-role?post=6996"},{"taxonomy":"buyer-stage","embeddable":true,"href":"https:\/\/www.sisense.com\/wp-json\/wp\/v2\/buyer-stage?post=6996"},{"taxonomy":"department","embeddable":true,"href":"https:\/\/www.sisense.com\/wp-json\/wp\/v2\/department?post=6996"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.sisense.com\/wp-json\/wp\/v2\/industry?post=6996"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.sisense.com\/wp-json\/wp\/v2\/topic?post=6996"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}