<jupyter_start><jupyter_text><jupyter_code>import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
# sales figure
my_data=pd.read_csv("/content/drive/MyDrive/hypothesis_testing.csv")
my_data.head()<jupyter_output><empty_output><jupyter_text>Hypotheis- H0: current  = new- H1: current != new<jupyter_code>current=my_data['Current']
new=my_data['New']<jupyter_output><empty_output><jupyter_text>Two Sample T-test<jupyter_code>from scipy.stats import ttest_ind
ttest_ind(current,new)<jupyter_output><empty_output><jupyter_text>Accepting the H0 hypothesis Two sample Z-test<jupyter_code>from statsmodels.stats import weightstats as stests
ztest,pval1=stests.ztest(current,x2=new,value=0,alternative='two-sided')  # two tail
print(float(pval1))<jupyter_output>0.18405868087594723<jupyter_text>- it is same - t-distribution will start following the z-distribution after the certain value which is 30- When degree of freedom which is (n-1) is start increasing n will also increase resulting to  t-distribution will start following z-distribution Paird T-test<jupyter_code>from scipy import stats
stats.ttest_rel(current,new)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10267111853088481, 'fraction_numerical': 0.02337228714524207, 'mean_word_length': 8.083333333333334, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '111226', 'license': 'MIT', 'n_tokens_mistral': 445, 'n_tokens_neox': 418, 'n_words': 92, 'path': 'Hypothesis_Testing.ipynb', 'repo_name': 'capitallatera/Statistics', 'size': '1198'}