{"id":2287,"date":"2020-02-27T04:30:17","date_gmt":"2020-02-27T01:30:17","guid":{"rendered":"http:\/\/kusuaks7\/?p=1892"},"modified":"2024-01-03T17:03:55","modified_gmt":"2024-01-03T17:03:55","slug":"confidence-intervals-explained-simply-for-datascientists","status":"publish","type":"post","link":"https:\/\/www.experfy.com\/blog\/bigdata-cloud\/confidence-intervals-explained-simply-for-datascientists\/","title":{"rendered":"Confidence Intervals Explained Simply for Data Scientists"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"2287\" class=\"elementor elementor-2287\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-52ef9fb5 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"52ef9fb5\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-76a263cf\" data-id=\"76a263cf\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-b2237b6 elementor-widget elementor-widget-text-editor\" data-id=\"b2237b6\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tRecently, I got asked about how to explain confidence intervals in simple terms to a layperson. I found that it is hard to do that.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5c15325 elementor-widget elementor-widget-text-editor\" data-id=\"5c15325\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><br \/>Confidence Intervals are always a headache to explain even to someone who knows about them, let alone someone who doesn\u2019t understand statistics.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-caf0326 elementor-widget elementor-widget-text-editor\" data-id=\"caf0326\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tI went to Wikipedia to find something and here is the definition:\n<blockquote>In\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/Frequentist_statistics\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">statistics<\/a>, a\u00a0<strong>confidence interval<\/strong>\u00a0(<strong>CI<\/strong>) is a type of\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/Interval_estimate\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">estimate<\/a>\u00a0computed from the statistics of the observed data. This proposes a range of plausible values for an unknown\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/Parameter\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">parameter<\/a>. The interval has an associated\u00a0<strong>confidence level<\/strong>\u00a0that the true parameter is in the proposed range. This is more clearly stated as: the confidence level represents the\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/Probability\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">probability<\/a>\u00a0that the unknown parameter lies in the stated interval. The level of confidence can be chosen by the investigator. In general terms, a confidence interval for an unknown parameter is based on sampling the\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/Probability_distribution\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">distribution<\/a>\u00a0of a corresponding\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/Estimator\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">estimator<\/a>.\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/Confidence_interval#cite_note-:0-1\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">[1]<\/a><\/blockquote>\nAnd my first thought was that might be they have written it like this so that nobody could understand it. The problem here lies with a lot of terminology and language that statisticians enjoy to employ.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-dff31de elementor-widget elementor-widget-text-editor\" data-id=\"dff31de\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<strong><em>This post is about explaining confidence intervals in an easy to understand way without all that pretentiousness<\/em><\/strong>.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ab730b7 elementor-widget elementor-widget-heading\" data-id=\"ab730b7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">\n<h2 id=\"a-real-life-problem\">A Real-Life problem<\/h2><\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-197230d elementor-widget elementor-widget-image\" data-id=\"197230d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" src=\"https:\/\/miro.medium.com\/max\/2080\/0*YzSndnsoO_qGKIqr.png\" alt=\"\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-dbe0b15 elementor-widget elementor-widget-text-editor\" data-id=\"dbe0b15\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tLet\u2019s start by creating a real-life scenario.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7c0dd54 elementor-widget elementor-widget-text-editor\" data-id=\"7c0dd54\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\n<strong><em>Imagine you want to find the mean height of all the people in a particular US state.<\/em><\/strong>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1978f2c elementor-widget elementor-widget-text-editor\" data-id=\"1978f2c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\nYou could go to each person in that particular state and ask for their height, or you can do the smarter thing by taking a sample of 1000 people in the state.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8f76ddd elementor-widget elementor-widget-text-editor\" data-id=\"8f76ddd\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tThen you can use the mean of their heights (<strong>Estimated Mean<\/strong>) to estimate the average of heights in the state(<strong>True Mean<\/strong>)\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3b65eb5 elementor-widget elementor-widget-text-editor\" data-id=\"3b65eb5\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tThis is all well and good, but you being the true data scientist, are not satisfied. The estimated mean is just a single number, and you want to have a range where the true mean could lie.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b0a4340 elementor-widget elementor-widget-text-editor\" data-id=\"b0a4340\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<strong><em>Why do we want a range? Because in real life, we are concerned about the confidence of our estimates.<\/em><\/strong>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9ff0ec2 elementor-widget elementor-widget-text-editor\" data-id=\"9ff0ec2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tTypically even if I ask you to guess the height of people in the particular US state, you are more inclined to say something like:\u00a0<em>\u201cI believe it is between 6 foot to 6 Foot 2 Inch\u201d rather than a point estimate like \u201cIts 6 foot 2.2345 inches\u201d.<\/em>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b298173 elementor-widget elementor-widget-text-editor\" data-id=\"b298173\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tWe humans also like to attach a level of confidence when we give estimates. Have you ever said \u2014 \u201cI am 90% confident\u201d.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d220cfa elementor-widget elementor-widget-text-editor\" data-id=\"d220cfa\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tIn this particular example, I can be more confident about the statement-\u00a0<em>\u201cI believe it is between 5 foot to 7 Foot\u201d than \u201cI believe it is between 6 foot to 6 Foot 2 Inch\u201d as the first range is a superset of the second one.<\/em>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1bacea4 elementor-widget elementor-widget-text-editor\" data-id=\"1bacea4\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\nSo how do we get this range and quantify a confidence value?\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-62bfc15 elementor-widget elementor-widget-heading\" data-id=\"62bfc15\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\"><h2 id=\"strategy\">Strategy<\/h2><\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c8a1796 elementor-widget elementor-widget-text-editor\" data-id=\"c8a1796\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tTo understand how we will calculate the confidence intervals, we need to understand the Central Limit Theorem.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-fbfb6ea elementor-widget elementor-widget-text-editor\" data-id=\"fbfb6ea\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<strong><em>Central Limit Theorem:<\/em><\/strong>\u00a0The\u00a0<strong>Central Limit Theorem(CLT)<\/strong>\u00a0simply states that if you have a population with mean \u03bc and standard deviation \u03c3, and take random samples from the population, then the\u00a0<strong>distribution<\/strong>\u00a0of the\u00a0<strong>sample<\/strong>\u00a0means will be approximately normally\u00a0<strong><em>distributed with mean as the population mean<\/em><\/strong>\u00a0and estimated\u00a0<strong>standard deviation<\/strong>\u00a0s\/\u221an\u00a0<strong><em>where s is the standard deviation of the sample and n is the number of observations in the sample.<\/em><\/strong>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-394b1a1 elementor-widget elementor-widget-text-editor\" data-id=\"394b1a1\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tSo knowing all this, you become curious. We already have a sample of 1000 people in the US state. Can we apply CLT?\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5378992 elementor-widget elementor-widget-text-editor\" data-id=\"5378992\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tWe know that the mean of the sampling distribution is equal to the population mean(which we don\u2019t know and want to estimate)and the sample deviation of the sampling distribution is given by\u00a0<strong>\u03c3\/\u221an<\/strong>( i.e., the standard deviation of the sample divided by the number of observations in the sample)\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f13af33 elementor-widget elementor-widget-image\" data-id=\"f13af33\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" src=\"https:\/\/mlwhiz.com\/images\/ci\/1.png\" alt=\"\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-fb53836 elementor-widget elementor-widget-text-editor\" data-id=\"fb53836\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<em>Now, you want to find intervals on the X-axis that contains the true population mean.<\/em>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5ece630 elementor-widget elementor-widget-text-editor\" data-id=\"5ece630\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<strong><em>So what do we do? We cast a net from the value we know.<\/em><\/strong>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-baa4ac3 elementor-widget elementor-widget-text-editor\" data-id=\"baa4ac3\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\n<strong><em>To get such ranges\/intervals, we go 1.96 standard deviations away from Xbar, the sample mean in both directions. And this range is the 95% confidence interval.<\/em><\/strong>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3e76d5b elementor-widget elementor-widget-text-editor\" data-id=\"3e76d5b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tNow, when I say that I estimate the true mean to be Xbar (The sample Mean) with a confidence interval of [Xbar-1.96SD, Xbar+1.96SD], I am saying that:\n<blockquote>That this is an interval constructed using a certain procedure. Were this procedure to be repeated on numerous samples, the fraction of calculated confidence intervals (which would differ for each sample) that encompass the true population parameter would tend toward 95%<\/blockquote>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-bf206c7 elementor-widget elementor-widget-text-editor\" data-id=\"bf206c7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<strong>When you take 99% CI, you essentially increase the proportion and thus cast a wider net with three standard deviations.<\/strong>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8c865a1 elementor-widget elementor-widget-image\" data-id=\"8c865a1\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" src=\"https:\/\/mlwhiz.com\/images\/ci\/2.png\" alt=\"\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c4cdef5 elementor-widget elementor-widget-text-editor\" data-id=\"c4cdef5\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<ul>\n \t<li>Here Xbar is the sample mean(mean of the 1000 heights sample you took).<\/li>\n \t<li>Z is the no of standard deviations away from the sample mean(1.96 for 95%, 2.576 for 99%) \u2014\u00a0<strong><em>level of confidence<\/em><\/strong>\u00a0you want.<\/li>\n \t<li>s is the standard deviation in the sample.<\/li>\n \t<li>n is the size of the sample.<\/li>\n<\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ca17b01 elementor-widget elementor-widget-image\" data-id=\"ca17b01\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" src=\"https:\/\/mlwhiz.com\/images\/ci\/3.png\" alt=\"\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-294087d elementor-widget elementor-widget-text-editor\" data-id=\"294087d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t&#8220;Most of the nets we cast in different experiments do contain the true population mean&#8221; \t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-eea3ce8 elementor-widget elementor-widget-text-editor\" data-id=\"eea3ce8\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\nEach line in the figure above is one such experiment where the dot signifies the sample mean, and the line signifies the range. The dotted line in this figure is the true population mean<em>.<\/em>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-75f1d39 elementor-widget elementor-widget-heading\" data-id=\"75f1d39\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\"><h2 id=\"the-critica\/\u0294l-z-value\">The Critical Z value<\/h2><\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1201ba2 elementor-widget elementor-widget-text-editor\" data-id=\"1201ba2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tAs we said, Z is the no of standard deviations away from the sample mean(1.96 for 95%, 2.576 for 99%) \u2014\u00a0<strong><em>level of confidence<\/em><\/strong>\u00a0you want.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-971697e elementor-widget elementor-widget-text-editor\" data-id=\"971697e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tYou can go for any arbitrary level of confidence. Say, for example, you want 90% confidence. You can get that by using the idea that the shaded area inside the normal curve needs to be 0.90.\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3ee0132 elementor-widget elementor-widget-image\" data-id=\"3ee0132\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" src=\"https:\/\/mlwhiz.com\/images\/ci\/4.png\" alt=\"\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e08e8c1 elementor-widget elementor-widget-text-editor\" data-id=\"e08e8c1\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<pre><code>import scipy.stats as st\np = 0.9 + (1-0.9)\/2\nZ = st.norm.ppf(p, loc=0, scale=1)\nprint(Z)\n----------------------------------------------------------\n1.6448536269514722\n<\/code><\/pre>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Confidence Intervals are always a headache to explain even to someone who knows about them, let alone someone who doesn&rsquo;t understand statistics. In&nbsp;statistics, a&nbsp;confidence interval&nbsp;(CI) is a type of&nbsp;estimate&nbsp;computed from the statistics of the observed data. This proposes a range of plausible values for an unknown&nbsp;parameter. The interval has an associated&nbsp;confidence level&nbsp;that the true parameter is in the proposed range. This post is about explaining confidence intervals in an easy to understand way without all that pretentiousness.<\/p>\n","protected":false},"author":653,"featured_media":3821,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"content-type":"","footnotes":""},"categories":[187],"tags":[94],"ppma_author":[3409],"class_list":["post-2287","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bigdata-cloud","tag-data-science"],"authors":[{"term_id":3409,"user_id":653,"is_guest":0,"slug":"rahul-agarwal","display_name":"Rahul Agarwal","avatar_url":"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/04\/medium_cc5785b8-8195-44e6-a0de-2e33be05d7cb-150x150.png","user_url":"http:\/\/bit.ly\/384SBYb","last_name":"Agarwal","first_name":"Rahul","job_title":"","description":"Rahul Agarwal is a Data Scientist at Walmart Labs."}],"_links":{"self":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/2287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/users\/653"}],"replies":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/comments?post=2287"}],"version-history":[{"count":5,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/2287\/revisions"}],"predecessor-version":[{"id":35350,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/2287\/revisions\/35350"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/media\/3821"}],"wp:attachment":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/media?parent=2287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/categories?post=2287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/tags?post=2287"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=2287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}