<jupyter_start><jupyter_text>Import dataset<jupyter_code>import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
import seaborn as sns
data = pd.read_csv('/Users/Katerina/Desktop/EDA/StudentsPerformance.csv')[['math score']]
data.head()
data.hist(grid=False)<jupyter_output><empty_output><jupyter_text>It is not normal distribution<jupyter_code>data.describe()<jupyter_output><empty_output><jupyter_text>Bootstrap Resampling<jupyter_code>print('Rows of data:{}'.format(len(data)))
mean_of_sample = pd.DataFrame({'mean': [np.mean(data.sample(100,replace=True)['math score']) for i in range(1000)]})
mean_of_sample.head()
print('Mean of Math Score: {}'.format(np.round(data['math score'].mean(),3)))
print('Mean of Math Score after Bootstrap Sampling: {}'.format(np.round(mean_of_sample['mean'].mean(),3)))
fig,(ax1,ax2) = plt.subplots(1,2,figsize = (10,5))
ax1.hist(data)
ax1.set_title('Original Math Score Distribution')
ax2.hist(mean_of_sample)
ax2.set_title('Bootstrap Sampling Math Score Distribution')
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15833333333333333, 'fraction_numerical': 0.018518518518518517, 'mean_word_length': 9.702970297029703, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '75128', 'license': 'MIT', 'n_tokens_mistral': 403, 'n_tokens_neox': 387, 'n_words': 69, 'path': 'Analysis/Bootstrap Resampling.ipynb', 'repo_name': 'Katerina420/Data-Analysis-Portfolio', 'size': '1080'}