Skip to main content

Nightingale

I named this package Nightingale in honour of Florence Nightingale, The lady with the data.

Installation

You can use pip to install Nightingale:

pip install nightingale

Usage

Population Proportion

from nightingale import get_sample_size, PopulationProportion, get_z_score

print('z-score for 0.95 confidence:', get_z_score(confidence=0.95))
print('sample size:', get_sample_size(confidence=0.95, error_margin=0.05, population_size=1000))
print('with 10% group proportion:', get_sample_size(confidence=0.95, error_margin=0.05, population_size=1000, group_proportion=0.1))

population_proportion = PopulationProportion(sample_n=239, group_proportion=0.5)
print('error:', population_proportion.get_error(confidence=0.95))

Ordinary Least Squares (OLS)

import pandas as pd
import numpy as np
from nightingale import OrdinaryLeastSquares

data = pd.DataFrame({
    'x': np.random.normal(size=20, scale=5), 
    'y': np.random.normal(size=20, scale=5),
})
data['z'] = data['x'].values + data['y'].values + np.random.normal(size=20, scale=1)
print('data:')
display(data.head())

ols = OrdinaryLeastSquares(data=data, formula='z ~ x + y')
print('ols results:')
display(ols.table)

print('r-squared:', ols.r_squared)
print('adjusted r-squared:', ols.adjusted_r_squared)

ANOVA

References

z-score: https://stackoverflow.com/questions/20864847/probability-to-z-score-and-vice-versa-in-python

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nightingale-1.3.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nightingale-1.3-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file nightingale-1.3.tar.gz.

File metadata

  • Download URL: nightingale-1.3.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.22.0 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5

File hashes

Hashes for nightingale-1.3.tar.gz
Algorithm Hash digest
SHA256 9ece9df88be0200325d31cfc4d1439ed0afab2a990c074cac6e88e205d941980
MD5 2c385d23b089ded7045e34e482d86de1
BLAKE2b-256 ecbb1e1b1c6f64144f132e5a297c2255c8e89cb4dd17fed63dc8b7afd344ffd5

See more details on using hashes here.

File details

Details for the file nightingale-1.3-py3-none-any.whl.

File metadata

  • Download URL: nightingale-1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.22.0 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5

File hashes

Hashes for nightingale-1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9566a618020c617cbad65736fc7389956cfaca2ea39660f97bd1259d08360517
MD5 6e874f01baae4631e94f106ce23243a2
BLAKE2b-256 fd161e9fb862f3dd983dcf97849b64a9194e5b0df6cd1d7f59e8666ce8b73ba4

See more details on using hashes here.

Release history Release notifications | RSS feed

2025.2.6.2

2 files

2025.2.6.1

2 files

2025.2.6.0

2 files

2020.11.12

2 files

2020.7.26

2 files

2020.4.28.2

2 files

2020.4.28.1

2 files

2020.4.28

2 files

2020.4.17

2 files

2020.4.7

2 files

2020.4.6

2 files

2020.4.1

2 files

2020.3.23.2

2 files

2020.3.23.1

2 files

2020.3.23

2 files

2020.3.9

2 files

2020.1.6

2 files

2020.1.5

2 files

2019.12.29.4

2 files

2019.12.29.3

2 files

2019.12.29.2

2 files

2019.12.29.1

2 files

2019.12.29

2 files

2019.12.28

2 files

1.5

2 files

This release

1.3 This release

2 files

1.2

2 files

1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page