Skip to main content

Data Analysis

Why did I write this code?

I'm often handed a dataset and asked to do the same thing - determine if the experimental group is different than the control group, and generate some descriptive statistics along the way. As an alternative to writing all operations manually for each project I've created a Python module using Object Oriented Programming (OOP). This eliminates the need to search for old projects, copy and paste long lines of code and cross my fingers that it works.

What libraries does this code use?

This code uses a Scipy, a widely accepted statistical package, to perform hypothesis testing.

I also use Pandas, an extremely popular data analysis and manipulation library for organizing the data and providing descriptive statistics.

For data visualization I use the Seaborn library (built on top of matplotlib)

Hypothesis Testing

My main task is often to determine if the results are statistically significant. For this we need to implement a hypthesis test, however there are many to choose from. The decision tree of this code looks something like this:

  1. Is the data Normally Distributed and do the experimental and control groups have Equal Variance? Student's t-test
  2. Is the data Normally Distributed but do the experimental and control groups have Unequal Variance? Welches' t-test
  3. Is the data not Normally Distributed? Mann-Whitney U test

Where to Start

See This Notebook for a demo on the Breast Cancer Wisconsin (Diagnostic) Dataset found Here

autohyp

Metadata

Release files for autohyp 0.0.2

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

Source distribution (sdist)

Source distribution for autohyp 0.0.2
File Size Uploaded
autohyp-0.0.2.tar.gz 3.7 kB Details

Built distribution (wheel)

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

Total release size: 7.6 kB

Release files / autohyp-0.0.2.tar.gz

Download URL autohyp-0.0.2.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3e6627e1ba71c4e51f145e1ceccd302dc79cf442351b568641203d3eda98d1e3
BLAKE2b-256 checksum
How to use checksums
ee06f7ecda85809e3b0c32cf443f280ea84a1593ea2d0906385e22e2dcd77236
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

Release files / autohyp-0.0.2-py3-none-any.whl

Download URL autohyp-0.0.2-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e3b7cf5ea96557ec26c6fdf69ceb1a4e55a89977c3d4ec9d43d6b61cc3a899c7
BLAKE2b-256 checksum
How to use checksums
f645b807e9173e49bf4b1899470f0d03084cf31adf35e06f9b62f62b6984abfe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

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