im getting an error here and im not sure whats wrong:
import numpy as np
from numpy import random
import matplotlib.pyplot as plt
from scipy.stats import norm, binom, poisson
# Binomial Distribution
n, p = 10, 0.5 # Number of trials and probability of success
data_binomial = random.binomial(n, p, 1000)
# Plot the histogram of the binomial distribution
plt.hist(data_binomial, bins=arange(0, n + 2) - 0.5, density=True, alpha=0.6, color='b')
# Add labels and title
plt.title('Binomial Distribution (n=10, p=0.5)')
plt.xlabel('Number of Successes')
plt.ylabel('Probability')
plt.show()
there traceback is:
plt.hist(data_binomial, bins=arange(0, n + 2) - 0.5, density=True, alpha=0.6, color='b')
^^^^^^
NameError: name 'arange' is not defined. Did you mean: 'range'?```