<jupyter_start><jupyter_text>* Probability Density Function (use for continous data)For a given range of values it tells us the Probability of that range occuring* Probability Mass Function (use for discrete data)Probability of discrete data occuring. Example of Data Distribution 1 - Uniform DistributionThere is flat constant probability occuring of a vlaue  within given  range<jupyter_code>import numpy as np
import matplotlib.pyplot as plt

value = np.random.uniform(-10.0, 10.0, 100000)
plt.hist(value, 50)
plt.show()<jupyter_output><empty_output><jupyter_text>2 - Normal / Gaussian DistributionVisualize the probability densisity function<jupyter_code>from scipy.stats import norm
import matplotlib.pyplot as plt

x = np.arange(-3, 3, 0.001)
plt.plot(x, norm.pdf(x))<jupyter_output><empty_output><jupyter_text>Generate some random numbers with a normal distribution. "mu" is the desired mean, "sigma" is the std<jupyter_code>mu = 5.0
sigma = 2.0
values = np.random.normal(mu, sigma, 10000)
plt.hist(values, 50)
plt.show()<jupyter_output><empty_output><jupyter_text>Exponential PDF / "Power Law"<jupyter_code>from scipy.stats import expon

x = np.arange(0, 10, 0.001)
plt.plot(x, expon.pdf(x))<jupyter_output><empty_output><jupyter_text>Binomial Probability Mass Function<jupyter_code>from scipy.stats import binom

n, p = 10, 0.5
x = np.arange(0, 10, 0.001)
plt.plot(x, binom.pmf(x, n, p))<jupyter_output><empty_output><jupyter_text>Poisson Probability Mass FunctionExample: My website gets on average 500 visits per day. What's the odds of getting 550?<jupyter_code>from scipy.stats import poisson

mu = 500
x = np.arange(400, 600, 0.5)
plt.plot(x, poisson.pmf(x, mu))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10492379835873387, 'fraction_numerical': 0.03985932004689332, 'mean_word_length': 6.233050847457627, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, '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': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '260488', 'license': 'MIT', 'n_tokens_mistral': 671, 'n_tokens_neox': 599, 'n_words': 171, 'path': 'notebooks/statistics/pdf_pmf.ipynb', 'repo_name': 'ericarnaudmakita/machine_learning_projects', 'size': '1706'}