.. image:: https://img.shields.io/pypi/v/cashstatistic.svg
:alt: PyPi
:target: https://pypi.python.org/pypi/cashstatistic
.. image:: https://img.shields.io/pypi/l/cashstatistic.svg
:alt: MIT
:target: https://mit-license.org/license.txt
===============
cashstatistic
===============
**Utility functions related to the Cash statistic**
The Poisson distribution is
P(x|mu) = exp(-mu) mu^x / x!
The `Cash statistic <http://adsabs.harvard.edu/abs/1979ApJ...228..939C>`_ 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) <http://adsabs.harvard.edu/abs/2017A%26A...605A..51K>`_ 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 <https://github.com/abmantz/cstat>`_ contains implementations in other languages.
:alt: PyPi
:target: https://pypi.python.org/pypi/cashstatistic
.. image:: https://img.shields.io/pypi/l/cashstatistic.svg
:alt: MIT
:target: https://mit-license.org/license.txt
===============
cashstatistic
===============
**Utility functions related to the Cash statistic**
The Poisson distribution is
P(x|mu) = exp(-mu) mu^x / x!
The `Cash statistic <http://adsabs.harvard.edu/abs/1979ApJ...228..939C>`_ 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) <http://adsabs.harvard.edu/abs/2017A%26A...605A..51K>`_ 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 <https://github.com/abmantz/cstat>`_ contains implementations in other languages.
Metadata
Release files for cashstatistic 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cashstatistic-0.1.1.tar.gz | 4.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cashstatistic-0.1.1-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 9.0 kB
Release files / cashstatistic-0.1.1.tar.gz
| Download URL | cashstatistic-0.1.1.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
abf60cd19df94258f964728b95ca083716018b951907fc9c9a64d5c389b59d45
|
|
BLAKE2b-256 checksum How to use checksums |
5c985b758ed894a57bda1f8addc73f36f98af3b9dceeba12a8e65ff2b708bcea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / cashstatistic-0.1.1-py2-none-any.whl
| Download URL | cashstatistic-0.1.1-py2-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
3b264751f1aab625d1b6320a434f6f7ef793fbb7164d1d07c8e7816aeceae0f0
|
|
BLAKE2b-256 checksum How to use checksums |
037d132c910e4aa3c7460b73d5027a5b2648c379e057b0a7614a861e8c382325
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |