Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On Demand Webinar: See Why Thousands of QlikView Users Have Switched to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
maxime_gerard
Partner
Partner

Chi square for list of values

Hello all,

I'm trying to make a chi square test on this table :

Chi Data.PNG

I want to compare MX and FE.

I tried that :

Chi2Test_p(Groupe,Name,[Test Score])

but it's not working...

Someone can help please?

Thanks!

6 Replies
Anil_Babu_Samineni

May be you need AGGR() to sum the score for table suggests

Chi2Test_p( Groupe, Name, AGGR(Sum([Test Score]),  Groupe, Name))

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
maxime_gerard
Partner
Partner

Not working neither...

Anil_Babu_Samineni

Seems, Working for me

Striaght table - Dim as Groupe

Chi2Test_p(Groupe,Name,Sales)

Or

Sum(Aggr(Chi2Test_p(Groupe,Name,Sales),Groupe))

Capture.PNG

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Anil_Babu_Samineni

Even, this is also working for your case

Aggr(Chi2Test_p(Groupe,Name,Sales), Groupe)

Note: The P-value is the probability that a chi-square statistic having 2 degrees of freedom is more extreme than 19.58. We use the Chi-Square Distribution Calculator to find P(Χ2 > 19.58) = 0.0001. Interpret results. Since the P-value (0.0001) is less than the significance level (0.05), we cannot accept the null hypothesis.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
maxime_gerard
Partner
Partner

Thank you for your answer! It's working. My problem came from my model.

faraujo
Contributor
Contributor

Excellent question!
with the same data above my application got results:
MX = 0.986, which is different from MX = 0.7055 in the example shown... why? Thank.