<jupyter_start><jupyter_text>The Bootstrap<jupyter_code>np.random.choice?
np.random.choice(fake_fmri_data_2, 20)
b_fmri_data_2.mean()
b_fmri_data_2 = np.random.choice(fake_fmri_data_2, (1000,20))
b_fmri_data_2.shape
b_fmri_data_2_means = b_fmri_data_2.mean(axis=1)
b_fmri_data_2_means.shape
%matplotlib inline
from matplotlib import pyplot as plt
plt.hist(b_fmri_data_2_means, 30);
percs = np.percentile(b_fmri_data_2_means, [2.5, 97.5])
plt.hist(b_fmri_data_2_means, 30);
plt.vlines(percs, 0, 80);
np.sort(b_fmri_data_2_means)[[25,975]]
np.percentile(b_fmri_data_2_means, [2.5, 97.5])
standard_error_2 = b_fmri_data_2_means.std()
standard_error_2
fake_fmri_data_3.shape, fake_fmri_data_3.mean()
b_fmri_data_3 = np.random.choice(fake_fmri_data_3, (1000,2000))
b_fmri_data_3_means = b_fmri_data_3.mean(axis=1)
plt.hist(b_fmri_data_2_means, 30);
plt.hist(b_fmri_data_3_means, 30);
b_fmri_data_3_means.std()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1252676659528908, 'fraction_numerical': 0.07387580299785867, 'mean_word_length': 10.0, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '603851', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 500, 'n_tokens_neox': 453, 'n_words': 50, 'path': 'lectures/17-bootstrap/in-class-demo.ipynb', 'repo_name': 'alexhuth/ndap-fa2020', 'size': '934'}