Mathematical Modeling, Statistical Analysis, Python, Data Visualization, Monte Carlo Simulation.
estimate_pi(n): count = 0 for i in range(n): x = random.uniform(-1, 1) y = random.uniform(-1, 1) if x**2 + y**2 <= 1: count += 1 return 4 * count / n # Generate a list of sample sizes sample_sizes = np.logspace(1, 7, num=50, dtype=int) # Generate a list of estimates of pi for each sample size