Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
maxime_gerard
Partner - Contributor II
Partner - Contributor II

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))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
maxime_gerard
Partner - Contributor II
Partner - Contributor II
Author

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

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
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.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
maxime_gerard
Partner - Contributor II
Partner - Contributor II
Author

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.