SecreC 2 language 2.9.0 (2026.10)
Language and standard library reference
Loading...
Searching...
No Matches
Functions
chiSquared(goodness of fit with probabilities)

Functions

template<domain D>
D float32 chiSquared (D uint32 observed, D float32 p)
 
template<domain D>
D float64 chiSquared (D uint64 observed, D float64 p)
 

Detailed Description

Perform Pearson's chi-squared goodness of fit test.

Note
D - any protection domain
Supported types - uint32 / uint64
Parameters
observed- observed frequency of each class
p- theoretical probability of each class
Returns
returns chi-squared test statistic

Function Documentation

◆ chiSquared() [1/2]

template<domain D>
D float32 chiSquared ( D uint32  observed,
D float32  p 
)

◆ chiSquared() [2/2]

template<domain D>
D float64 chiSquared ( D uint64  observed,
D float64  p 
)