cashstatistic
Utility functions related to the Cash statistic
The Poisson distribution is
P(x|mu) = exp(-mu) mu^x / x!
The Cash statistic is defined to be the model (mu) dependent part of -2ln(P), analogous to the role that chi^2 plays for the Gaussian distribution,
C = 2( mu - x*ln(mu) ).
A modified version,
C_m = 2( mu - x + x*ln(x/mu) ),
is equivalent to C for parameter inference (i.e. has the same dependence on mu), and also has the nice property of becoming equivalent to chi^2 when x is large. Kaastra (2017) was kind enough to provide approximate expressions for the mean and variance of C_m, which can be used to determine whether the actual C_m corresponding to a fitted model is indicative of a good fit (just as chi^2 does for the Gaussian distribution).
This package contains python code to calculate C, C_m, and the theoretical mean and variance of C_m. The GitHub repo contains implementations in other languages.
Metadata
Release files for cashstatistic 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cashstatistic-0.1.3.tar.gz | 4.3 kB | Without provenance | Details for cashstatistic-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cashstatistic-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for cashstatistic-0.1.3-py3-none-any.whl |
Total release size: 8.4 kB
Release files / cashstatistic-0.1.3.tar.gz
| Download URL | cashstatistic-0.1.3.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f0f4e019569851c0965e421ed76131468105389a9134399d1a5dbdfd06f688bf
|
|
BLAKE2b-256 checksum How to use checksums |
c791d0ed88cd1ce8dcdfeea127479c98a7dfc739a57adc25711a09032f1d3187
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.5
|
Release files / cashstatistic-0.1.3-py3-none-any.whl
| Download URL | cashstatistic-0.1.3-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e0b80bede00f122bfc342cfe0feb732e4df197ad6aa155eece5af49c0d9fe23e
|
|
BLAKE2b-256 checksum How to use checksums |
0f5664e30eedd6e820cc90d7d193bc7b42dd2810cb6e2095dd944a65ae69df26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.5
|
Security for cashstatistic 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.