Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Contributor II

Chi square for campaign analyses


I was stupid enough to tell my manager that I could say whether or not a campaign did statistacilly better than a control group. But I can't figure out how :-)

So we have a campaign where we contact some clients (target) and other client without a contact (control group).

Some of the targets bought the product but also the control group. Now we want to know if the difference between the target and control group is statistical relevant.

Normally we use Chi² test to do this. I'm not very familiar with the test and I can't get it operational in QV.

In my example in one campaign the target group has statistically significant more conversion but not in the other campaign.

f I calculate the Chi² manually I have 4.602 and 0.136.

But how do I do this in QV?

I found the post ChiSquare.qvw but in that example there are expected values. In my example I don't have these expected values.

I could calculate them but I didn't manage to use them in the formul

An important remark: the actual model has dozens of campaign with milions of targets. So a chance in the model will have some large consequences. And I would be great if QV could give a list of campaigns that are statiscally relevant.

6 Replies
Contributor II

Re: Chi square for campaign analyses

no ideas?

Re: Chi square for campaign analyses

I'm not sure if such a statistical approach could be applied to your campaign and if it would be very reasonable. I would rather try a more "classical" method and create a consolidated datamodel from my sales- and campaign-data which would contain fields like:


CampaignCustomerGroup#CustomerPeriodClusterDaysSalesQuota per customerQuota per day
XControl 125campaign10
XControl 250after30
XControl 375long term effects90
XControl 4100

to get the quota per Customer/Days which could be then compared against eachother within a campaign and as well as overall.

- Marcus

Contributor II

Re: Chi square for campaign analyses

Hi Marcus

What you suggest is something we already do and now we want to go to the next level ... are the results of the targets significantly better then the control group or not. Which, I think, you would also want to do eventually.

If we can achieve this then we don't need any "classical" method were we would still calculate the Chi² manually :-)

As mentioned, we have dozens maybe a hundred campaigns in a year with the ambition to generate a lot more but smaller campaign. It is something I just can't do manually.

Also we apply this method already in R and SAS. Now we want to see what QV can do and it would a shame if I had to calculate is manually in the script (which would be very difficult in the current model).

Re: Chi square for campaign analyses

I think you will need these classical method as a basis for your statistical analysis. Very probably I would create one or two scores (maybe a correlations between targets and control-groups and/or before/after-sales) on the mentioned quote-results.

And on these score-level you could try to apply various statistically analysis. Whereby you might need to extend your datas with some "invented" campaigns (randomly created customer- and product-groups) which fill up your base of data to get a larger basement for a statistical evaluation.

Beside them I'm not sure if a statistical analyses is really helpful. Our experience is that while a campaign the sales for the pushed articles increase significantely but quite often they cannibalize only other products and the overall sales increase not very noticeable and if I then look on the extra cost for advertising, promoters and such things not many campaigns will be successful - from a pure financial point of view ...

- Marcus

Contributor II

Re: Chi square for campaign analyses

I don't want to go into detail how we evaluate campaigns but this is how we do it in other tools for a few campaigns and we want to continue doing this with QV for all our campaigns.

Today most campaign leaders believe they have a positive impact. And I follow you completely that from financial point of view most campaigns won't be a success. And that's exactly what we want to communicate. We want them to experiment with smaller groups (A-B testing, control groups), determine which experiment was the best and then send out the whole bulk.

But smaller test mean more evaluations which we won't do manually. Therefore we want to use some statistical analyses to do that job for us.

Today we use Chi² in R and SAS but in QV I can't get it to work with the data in my example.

Is there a way to use the Chi² with the data I gave or what do I need to do the get this working?

Re: Chi square for campaign analyses

Have a look on the statistics chart wizard (menu extras) and a description will you find here on page 769: http://semanticommunity.info/@api/deki/files/24990/QlikView_Reference_Manual.pdf.

From another community I have also the following informations which might be useful for you (here translated with google):

Thanks for the answers. Maybe time to bring some light on the matter.
There are two major methods of determination of correlation coefficients:
1. Pearson correlation
2. Spearman's rank correlation coefficient
If my comparisons agree between SPSS and QlikView correl () the Pearson and rangecorrel () the Spearman Correlation (both well-sided). Unfortunately, the manual is silent from it.
So, at first not bad by QlikView. The result is btw. -1 And 1.
1 it says, there is a 100% correlation.
And now for the P-value: This is a test which tells us whether this correlation is random or not. So an additional test to check his result. If the value as <5%, it is assumed that the correlation is not accidental. The test is somewhat controversial, but still standard.
Too bad that QT has no equal with integiert. In Excel does that. In SPSS and R, of course.
R integration into QlikView is designed sexy, but who has R views, know that is the very Zeitaufwenig.
I was hoping someone had once the same problem and may already have a formula for it. In the community there is unfortunately nothing useful
I explore just about 50-70 different variants in which QlikView always fine me indicates the correlation. But come to the P-value for I have to always export the complete data set and import it into SPSS - pretty aufwenig.
LG Michael

Another possibility might be to integrate R into qlikview: QlikView and R Integration for Predictive Analytics Example.

- Marcus

Community Browser