Pearson's chi squared test.

# Documentation

:: (Vector v (Int, Double), Vector v Double) | |

=> Double | p-value |

-> Int | Number of additional degrees of freedom. One degree of freedom is due to the fact that the are N observation in total and accounted for automatically. |

-> v (Int, Double) | Observation and expectation. |

-> TestResult |

Generic form of Pearson chi squared tests for binned data. Data sample is supplied in form of tuples (observed quantity, expected number of events). Both must be positive.

# Data types

data TestResult Source

Result of hypothesis testing

Significant | Null hypothesis should be rejected |

NotSignificant | Data is compatible with hypothesis |