SecreC 2 language 2.9.0 (2026.10)
Language and standard library reference
Loading...
Searching...
No Matches
Functions

Functions

template<domain D>
D float32 chiSquared (D uint32 contTable)
 
template<domain D>
D float64 chiSquared (D uint64 contTable)
 

Detailed Description

Perform Pearson's chi-squared test of independence.

Note
D - any protection domain
Supported types - int32 / int64
This version does not do continuity correction so the R equivalent is chisq.test(contingencyTable, correct=FALSE)
Parameters
contTable- contingency table in the format
CasesControls
Option 1c1d1
Option 2c2d2
Option 3c3d3
………
Returns
returns the test statistic
Leakage
None

Function Documentation

◆ chiSquared() [1/2]

template<domain D>
D float32 chiSquared ( D uint32  contTable)

◆ chiSquared() [2/2]

template<domain D>
D float64 chiSquared ( D uint64  contTable)