
1. Re: Easy confidence interval question... I think
Shawn Wallwork May 11, 2013 5:13 PM (in response to . Jawon) 
2. Re: Easy confidence interval question... I think
Jim Wahl May 12, 2013 12:39 AM (in response to . Jawon)Hi Jawon,
In the JPGs you attached, your measure is an aggregate  AVG(REV)  and, therefore, the view only has one value per row / cell. Since reference lines are calculated based on data in the view, the confidence band is just for one value, which is, of course, the value +/ 0, since CI = mean(values) +/ 1.96*sd(values)/sqrt(count(values)).
You can experiment with this a bit by clicking on the revenue pill in columns and selecting Dimension. Now you'll see a line for each data point. To better show overlapping marks, I usually change the Marks from Automatic to Shape, which creates an open circle and click on color to reduce the transparency.
Now you can add a reference line showing the AVG and another band with the CI. NOTE: Tableau's default of "Aggregate Measures" can cause problems here. From the menu bar, select Analysis and uncheck Aggregate Measures. When this is checked, only one mark is drawn for each value. Since reference lines are calculated on the data in thew view, the average will be incorrect. For example the values 3, 5, 7, 7, 7, 7 will result in three marks (3, 5, 7) and an average of 5. By disabling Aggregate Measures, you'll get six marks and the correct average of 6.
If you want to stick with your original view, you can use calculated fields:
Rev CI lower = AVG([Rev])  1.96*STDEV([Rev])/SQRT(COUNT([Rev]))
Rev CI upper = AVG([Rev]) + 1.96*STDEV([Rev])/SQRT(COUNT([Rev]))
Now you can add a reference band using these calculated fields as the lower and upper bounds.
I'm not entirely convinced that you really want to use a statistical CI in this case (and that your data is normally distributed, ...), but that's another topic.
Jim

3. Re: Easy confidence interval question... I think
. Jawon May 13, 2013 11:35 AM (in response to Jim Wahl)