<jupyter_start><jupyter_text>H0 -> The sentiments remain same for consecutive years.H1 -> The sentiments does not remain same for consecutive years.To prove this Hypothesis two sample is performed and p-value threshold is p = 0.05<jupyter_code>#two sample test for two years of raleigh document on 3000 words each
stats.ttest_ind(RCE14_.sentiment, RCE15_.sentiment)<jupyter_output><empty_output><jupyter_text>As the p-value is much greater than threshold, we fail to reject Null Hypothesis<jupyter_code>#two sample test for two years of whole document for Raleigh City
stats.ttest_ind(RCE14.sentiment, RCE15.sentiment)

print(RCE14.mean())
print(RCE15.mean())<jupyter_output>page_number    104.663456
sent_count       1.765014
sentiment        2.223570
dtype: float64
{'fraction_non_alphanumeric': 0.07170795306388526, 'fraction_numerical': 0.05997392438070404, 'mean_word_length': 5.564102564102564, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 10, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '159717', 'license': 'MIT', 'n_tokens_mistral': 278, 'n_tokens_neox': 245, 'n_words': 79, 'path': 'src/SentimentAnalysis/HypothesisTesting.ipynb', 'repo_name': 'naseebth/Budget_Text_Analysis', 'size': '767'}