Skip to main content

Weighted statistics

What?

We've re-implemented some weighted statistics inspired by the weights R package (https://github.com/cran/weights/tree/master). At the moment, it's just the weighted t-test, but this may expand.

How?

import numpy as np
from wstats import wtd_t_test

# Example data for testing
x = np.random.normal(0, 1, 100)
y = np.random.normal(0.5, 1, 100)
wx = np.random.rand(100)
wy = np.random.rand(100)

# Execute tests
# Without bootstrapping
result_no_boot = wtd_t_test(x, y, wx, wy, alternative="two-sided", bootse=False)
# With bootstrapping
result_boot = wtd_t_test(x, y, wx, wy, alternative="two-sided", bootse=True, bootn=int(1e4))

(result_no_boot, result_boot)

Metadata

Release files for wstats 0.0.99

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wstats 0.0.99
File Size Uploaded Provenance
wstats-0.0.99.tar.gz 3.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for wstats 0.0.99
File Interpreter ABI Platform
wstats-0.0.99-py3-none-any.whl Python 3 none any Details

Total release size: 8.7 kB

Release files / wstats-0.0.99.tar.gz

Download URL wstats-0.0.99.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ec7c53ac903f884bcc2fbd7d3c1150cee3177fdbf38c27486beb21825e01d5ce
BLAKE2b-256 checksum
How to use checksums
5d51c33b36e1b6234371c5d10c0fcf6fd580bfce7d7483b57fdcc9aa98a33079
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.5

Release files / wstats-0.0.99-py3-none-any.whl

Download URL wstats-0.0.99-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b557daa4da40dcec7016feec110ca643d6b5101627563e3d6af050965dd88d45
BLAKE2b-256 checksum
How to use checksums
28c676b2d9f6115fe2fa4fcf6d0f651a1d3844f34374c71aa6dc3cc9a59242dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.5

Security for wstats 0.0.99

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.

Release history Release notifications | RSS feed

This release

0.0.99 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page