{"id":18752999,"url":"https://github.com/spotify/confidence","last_synced_at":"2025-05-15T11:09:13.406Z","repository":{"id":38315046,"uuid":"348120266","full_name":"spotify/confidence","owner":"spotify","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-26T15:46:56.000Z","size":9699,"stargazers_count":271,"open_issues_count":10,"forks_count":32,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-05-11T10:57:00.655Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spotify.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-15T20:56:40.000Z","updated_at":"2025-04-16T11:42:04.000Z","dependencies_parsed_at":"2023-01-22T18:45:11.433Z","dependency_job_id":"44a964be-768d-4e9c-be85-e4317ec453ff","html_url":"https://github.com/spotify/confidence","commit_stats":{"total_commits":156,"total_committers":7,"mean_commits":"22.285714285714285","dds":"0.13461538461538458","last_synced_commit":"29be675522812ea734288fd2854c44cabe6b1fcb"},"previous_names":[],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spotify%2Fconfidence","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spotify%2Fconfidence/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spotify%2Fconfidence/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spotify%2Fconfidence/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spotify","download_url":"https://codeload.github.com/spotify/confidence/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254328386,"owners_count":22052632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T17:23:40.793Z","updated_at":"2025-05-15T11:09:13.377Z","avatar_url":"https://github.com/spotify.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Spotify Confidence\n========\n\n![Status](https://img.shields.io/badge/Status-Beta-blue.svg)\n![Latest release](https://img.shields.io/badge/release-4.0.0-green.svg \"Latest release: 4.0.0\")\n![Python](https://img.shields.io/badge/Python-3.9-blue.svg \"Python\")\n![Python](https://img.shields.io/badge/Python-3.10-blue.svg \"Python\")\n![Python](https://img.shields.io/badge/Python-3.11-blue.svg \"Python\")\n\nPython library for AB test analysis.\n\nWhy use Spotify Confidence?\n-----------------\n\nSpotify Confidence provides convenience wrappers around statsmodel's various functions for computing p-values and confidence intervalls. \nWith Spotify Confidence it's easy to compute several p-values and confidence bounds in one go, e.g. one for each country or for each date. \nEach function comes in two versions: \n - one that return a pandas dataframe,\n - one that returns a [Chartify](https://github.com/spotify/chartify) chart.\n\nSpotify Confidence has support calculating p-values and confidence intervals using Z-statistics, Student's T-statistics \n(or more exactly [Welch's T-test](https://en.wikipedia.org/wiki/Welch%27s_t-test)), as well as Chi-squared statistics. \nIt also supports a variance reduction technique based on using pre-exposure data to fit a linear model.  \n\nThere is also a Bayesian alternative in the BetaBinomial class.\n\nBasic Example\n--------\n```\nimport spotify_confidence as confidence\nimport pandas as pd\n\ndata = pd.DataFrame(\n    {'variation_name': ['treatment1', 'control', 'treatment2', 'treatment3'],\n     'success': [50, 40, 10, 20],\n     'total': [100, 100, 50, 60]\n    }\n)\n\ntest = confidence.ZTest(\n    data,\n    numerator_column='success',\n    numerator_sum_squares_column=None,\n    denominator_column='total',\n    categorical_group_columns='variation_name',\n    correction_method='bonferroni')\n    \ntest.summary()\ntest.difference(level_1='control', level_2='treatment1')\ntest.multiple_difference(level='control', level_as_reference=True)\n\ntest.summary_plot().show()\ntest.difference_plot(level_1='control', level_2='treatment1').show()\ntest.multiple_difference_plot(level='control', level_as_reference=True).show()\n```\n\nThere's a lot more you can do:\n- Segment results by one or more dimensions\n- Use non-inferiority margins\n- Group sequential tests\n- Sample size and power calculations\n- etc\n\nSee jupyter notebooks in `examples` folder for more complete examples.\n\nInstallation\n------------\nSpotify Confidence can be installed via pip:\n\n```pip install spotify-confidence```\n\n[Find the latest release version here](https://github.com/spotify/confidence/releases)\n\n### Code of Conduct\n\nThis project adheres to the [Open Code of Conduct](https://github.com/spotify/code-of-conduct/blob/master/code-of-conduct.md) By participating, you are expected to honor this code.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspotify%2Fconfidence","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspotify%2Fconfidence","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspotify%2Fconfidence/lists"}