bugGNU Octave - Bugs: bug #58838, [octave forge] (statistics)...

 
 

bug #58838: [octave forge] (statistics) chisquare_test_homogeneity result does not equal equivalent chisquare_test_independence

Submitted by:  Tasos Papastylianou <tpapastylianou>
Submitted on:  Mon 27 Jul 2020 05:09:56 PM UTC  
 
Category:  Octave Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  None Assigned to:  None
Originator Name:  Tasos Papastylianou Open/Closed:  Open
Release:  5.2.0 Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 27 Jul 2020 05:09:56 PM UTC, original submission:  

Prompted by this question: https://stackoverflow.com/a/63119920/4183191

If my understanding of how chisquare_test_homogeneity is supposed to work (as described in that stackoverflow post) is correct, then the following two should have been equivalent, but in fact the resulting p-value is different.

x = [ones(1,10), zeros(1,10)];
y = [ones(1,5 ), zeros(1,15)];
chisquare_test_homogeneity (x, y, 0.5)
% pval: 0.31731

chisquare_test_independence ( [10, 10; 15, 5] )
% pval: 0.10247

While the code involved in the m-file is fairly short and simple, the documentation of this function is paltry. Also the implementation seems to rely on some sort of 'cumulative' version of the chi square, which I have not seen before. Is there a reference for this?

Tasos Papastylianou <tpapastylianou>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by siko1056 (Updated the item)
  • -email is unavailable- added by tpapastylianou (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-08-26 siko1056 SummaryStatistics package - chisquare_test_homogeneity result does not equal equivalent chisquare_test_independence => [octave forge] (statistics) chisquare_test_homogeneity result does not equal equivalent chisquare_test_independence

    Back to the top


    Powered by Savane 3.5