Suppose we have website access data for 2 web pages ("A" and "B"). It has "Impressions", "Clicks", and "CTR" (Click-Through Rates) columns and data is already aggregated like the following.
Now, we want to calculate 95% confidence intervals of CTR for those web pages. There is a function called "calc_confint_ratio" in Exploratory that can calculate confidence intervals from the ratio of the group and sample (group) size.
calc_confint_ratio(<Ratio of the group>, <Sample Size>)
See the function reference for details.
Let's take a look at how to do it in Exploratory.
From the column header menu of the "CTR" column, choose "calc_confint_ratio".
Then it opens up the "Create Calculation" dialog with the "calc_confint_ratio" function in the Calculation Editor. Follow the steps below.
Once you click the "Run" button, you will see a new column "CI". This CI column contains 95% confidence interval ranges.
Note that those values are the width of the range. You can calculate the actual 95% confidence interval value ranges of CTR by the following formula.
CTR_upper = CTR + CI
CTR_lower = CTR - CI
Here is how to do it in Exploratory.
From the column header menu of the "CTR" column, choose "Create Calculation (Mutate)".
It opens up the "Create Calculation" dialog. Do the following steps.
It will create the "CTR_upper" column. Create the "CTR_lower" column in the same way. Now you get the 95% confidence interval value ranges of CTR.
You can visualize CTR values with 95% confidence interval ranges using the "Scatter (No Aggregation)" chart by following the steps below.
It will show the CTR values with 95% confidence interval ranges.
You can change the percentage of the confidence intervals by setting the "level" option to the "calc_confint_ratio" function. If you don't specify it, "95%" is used by default. You can change it to "99%" for example by the following steps.
We have seen how to calculate confidence intervals for the ratio values. But, what if we want to calculate the confidence intervals for the mean (average) values? There is a function called "calc_confint_mean" that can do the trick.
calc_confint_mean(<Standard Deviation of the group>, <Sample Size>, level=0.95)
See the function reference for details.