3 Replies Latest reply on Jan 23, 2019 6:32 AM by nick masca

    95% CIs -- How do they work?

    Dan Bartels

      When I drag and drop Average or Median with 95% CIs from the Analytics tab, Tableau's response does not capture 95% of my data.  My expectation is that the formula being used underneath this function is reflective of the data-set being used, thus if I select 95%CI, I would expect Tableau to create bands where ~ 95% of my data falls within.  I've tried this a few times with different data, and the results always seem to include less data than I would expect.  What am I missing here?! 


      I've attached a jpg because I'm assuming the error relates to my understanding of the function, but I can attach an extract if necessary...







      Message was edited by: Dan Bartels Sure Thing.  I simplified my example to just two fields.  In the attached workbook, when I drag the 95% CI from the Analytics tab, it shows bands that are very narrow.  I'm expecting (right or wrong) the bands to highlight ~~ 95% of my data, thus allowing me to quickly see outliers on both ends.  Thank You. 

        • 1. Re: 95% CIs -- How do they work?
          Shinichiro Murakami

          Hi Dan


          We need your data to investigate.

          Could you please attach packaged workbook.


          Tableau Forum Guidelines





          • 2. Re: 95% CIs -- How do they work?
            Liana Crisan-Vandeborne

            Without having your data, I cannot figure out what you are trying to do.

            But picking up from the main knowledge base article: Creating Error Bars or CI Bars: http://kb.tableau.com/articles/HowTo/creating-error-bars

            You could update your file to display the confidence intervals around the average or around the mean. I used the Error or CI Bars.twbx and created 2 additional worksheets. I included the formulas for the CI around the mean and around the median, depending what you choose to display. Then I used those values to add bands to the viz, per cell (one of your examples seems to be per pane). You will see that the values used as margins for the bands are the calculated fields.

            95% Lower_AVG

            AVG([Sales] )-(1.96*((STDEV([Sales])/SQRT(sum([Number of Records] )-1) )))

            95% Upper_AVG

            AVG([Sales] )+(1.96*((STDEV([Sales])/SQRT(sum([Number of Records] )-1) )))




            95% Lower_MEDIAN

            MEDIAN([Sales] )-(1.96*((STDEV([Sales])/SQRT(sum([Number of Records] )-1) )))

            95% Upper_MEDIAN

            MEDIAN([Sales] )+(1.96*((STDEV([Sales])/SQRT(sum([Number of Records] )-1) )))


            Here is the link to this workbook in my public account:

            Tableau Public

            • 3. Re: 95% CIs -- How do they work?
              nick masca

              Hi Dan,


              You appear to have misunderstood what a confidence interval represents - there is a simple explanation of what confidence intervals are here: Confidence Intervals.


              It sounds like you actually want to display error bars relating to the 2.5% and 97.5% percentiles, which would show the range of values in which 95% of your data lie within.  Alternatively, you could consider showing a boxplot instead, which provides similar information about the distribution of your data.