There has been a lot of discussion on the forums about getting basic statistical tests into Tableau. With the assistance of a couple of other members, I was able to create a completely reusable Z-Test which I have found to be faster than using R. I have an in-depth blog post about using this file (with pictures!) at http://breaking-bi.blogspot.com/2013/04/conducting-1-and-2-sample-z-tests-in.html.
Data set stored in Excel.
Does not have to be at the appropriate grain.
The workbook will handle any and all necessary aggregations.
Open the attached .twbx
Right-Click the Excel Data Source
Edit Connection (Change to your Excel Worksheet)
Edit the following calculated fields:
Value: The measure you would like to use in your test, along with the aggregation function to be used, such as SUM() or MAX()
Grain: The dimension of the grain you would like your measure aggregated to.
Slicer: The dimension you would like to use to create your two samples.
Use the quick filter on the right side to select which slices you would like to use.
Selecting 1 slice will compute a 1-sample Z test against the Theoretical Mean Parameter
Selecting 2 slices will compute a 2-sample Z test.
That's it. Your Z-Test has been completed. Now, you can slice your data any way you would like and can look for any patterns. I've found that this quite a bit faster than using R to pull in your data, separate it into 2 data sets, then perform the test.
There is now a 2nd worksheet that allows you to compare the histograms for the two sets of data. This was not simple and there is a blog post explaining the technique at http://breaking-bi.blogspot.com/2013/05/creating-histograms-in-tableau.html.
The P-Value formula came from
Reusable Simple Linear Regression:
4/26/2013: Added in-depth blog post for use.
5/22/2013: Added histograms
7/3/2013: Added "Related Calculations" Section
Updated the workbook to include histogram labels.