Skip to content

Instantly share code, notes, and snippets.

@aisven
aisven / probability_scratch_pad.py
Created September 14, 2025 23:44
probability scratch pad
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import bernoulli
from scipy.stats import rv_discrete
def plot_histogram(sample, theoretical_min=None, theoretical_max=None, title="Histogram"):
if not theoretical_min:
theoretical_min = np.min(sample)