Skip to content

Latest commit

 

History

History
80 lines (55 loc) · 2.89 KB

README-en.md

File metadata and controls

80 lines (55 loc) · 2.89 KB

PyStatPower

PyPI - Version PyPI - Python Version GitHub License PyPI - Status PyPI Downloads

Build Status Test Status Documentation Status codecov pre-commit.ci status

Ruff pytest sphinx

简体中文 | English

PyStatPower is an open-source Python library focused on power analysis in the field of statistics.

Main features: calculation of sample size and test power, and estimation of the required effect size

Installation

pip install pystatpower

Example

from pystatpower.models import one_proportion

result = one_proportion.solve_for_sample_size(
    alpha=0.05, power=0.80, nullproportion=0.80, proportion=0.95, alternative="two_sided", test_type="exact_test"
)
print(result)

Output:

Size(41.59499160228066)

Build

  1. Clone this repository

    git clone https://github.com/Snoopy1866/pystatpower.git
  2. Install dependencies

    pip install .[docs]
  3. Change to the documentation directory

    cd docs
  4. Build the documentation

    make clean
    make html

You can view the generated documentation in the docs/build/html directory by opening index.html in your browser.

Acknowledgements