https://github.com/steviecurran/two-sample
The confidence interval for a two sample test.
https://github.com/steviecurran/two-sample
ab-testing confidence-intervals hypothesis-testing normal-distribution sample-tests statistics students-t t-score z-score
Last synced: about 2 months ago
JSON representation
The confidence interval for a two sample test.
- Host: GitHub
- URL: https://github.com/steviecurran/two-sample
- Owner: steviecurran
- Created: 2024-06-16T22:36:58.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-02-24T06:26:01.000Z (2 months ago)
- Last Synced: 2025-02-24T07:31:44.135Z (2 months ago)
- Topics: ab-testing, confidence-intervals, hypothesis-testing, normal-distribution, sample-tests, statistics, students-t, t-score, z-score
- Language: Python
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Two sample test
Python code to give the confidence interval for two sample test.
Uses z and t-distributions, without the need of look-up tables.
Data can be extracted any column in an ascii for csv files.
E.g. Data wtih the two samples to compare? 3.15_apples.dat
For NY - n = 10, mean = 3.941, SD = 0.184 [sample]
For LA - n = 8, mean = 3.245, SD = 0.268 [sample]
Level of confidence [e.g. 95, 99, 99.9% - z = 3 sigma is 99.75]? 95
At least one sample size < 30 so using t-value
Variance ratio is 0.47,
Assume equal sample variances (for ratio between 0.5 and 2 can assume equal) [y/n]? y
For 95.00% confidence (16 DoFs), t-value is 2.120, giving mean diff of 0.70 +/- 0.23 (0.47 to 0.92)
For 99.90% confidence (16 DoFs), t-value is 4.006, giving mean diff of 0.70 +/- 0.43 (0.27 to 1.12)
-----------------------------------------------------------------------------------------------------
For one sample version see https://github.com/steviecurran/one-sample