<jupyter_start><jupyter_text>Using Numpy<jupyter_code># number of trials (of binomial)
n_trial = 10000

# number of draw (in each binomial trial)
n = 100

# probability of success
p = 0.8

# when n_trial is large, binomial tends to normal distribution
m = np.random.binomial(p=p, n=n, size=n_trial)
plt.hist(m, density=True)
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11232876712328767, 'fraction_numerical': 0.0273972602739726, 'mean_word_length': 5.777777777777778, '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': '284391', 'license': 'MIT', 'n_tokens_mistral': 157, 'n_tokens_neox': 135, 'n_words': 39, 'path': 'distribution/binomial.ipynb', 'repo_name': 'shawlu95/Data_Science_Toolbox', 'size': '365'}