1. Standard error and confidence intervals
The added value of the variance and standard deviation from a sample, is that you can use them to calculate the standard error and confidence intervals to make statements about the population.
2. The standard error (SE)
Calculating the standard error and confidence intervals only makes sense when you have a sample from a population. The goal is, for example, to estimate how close the sample mean (x bar) is to the true population mean (mu). How much the estimated and true mean deviate, is defined by the standard error.
You can calculate the standard error for any other statistic, but that is beyond the scope of this course and is explained in other DataCamp courses.
If you have just one sample and your sample comes from a non skewed distribution, you can use this formula for the standard error. You divide the sample standard deviation by the square root of the sample size. In the formula, you can see that the larger your sample size is, the smaller the standard error becomes, since you're approaching the population size and the sample mean will converge to the population mean.
3. The confidence interval (CI)
Finally, the standard error is used to calculate a confidence interval. A confidence interval allows you to make statements such as: I'm 95 percent confident that the true population mean lies within the ranges of my confidence interval. Or, in other words: if you would keep taking samples from the population, 95% of the confidence intervals will contain the true population mean. You can choose whichever confidence interval you like, but 95 percent is pretty common.
For example, I've taken a sample of 30 orders of one manufacturer, and let Tableau calculate the mean and 95 percent confidence interval for profit. The gray area represents the band of the confidence interval, showing that the true profit mean for all orders of that manufacturer is 95 percent certain between 25 point 9 and 67 point 2. Indeed, the population (all 64 orders) has a mean of 44 point 4, pretty close to our sample mean of 46 point 6 and within the confidence interval.
The confidence interval is directly calculated from the standard error, as you see in the formula. You take the sample mean, and subtract and add (to get the lower and upper bound respectively) the standard error multiplied by a confidence level. This confidence level depends on the confidence you want to achieve, and is for example one point 96 for a confidence interval of 95 percent.
Don't worry too much about this. Tableau automatically handles all of this for you.
4. Let's practice!
Let's recap this quickly in a conceptual exercise, and then see how you create confidence intervals in Tableau.