“distribusi normal” Kode Jawaban

distribusi normal

>>> import matplotlib.pyplot as plt
>>> count, bins, ignored = plt.hist(s, 30, density=True)
>>> plt.plot(bins, 1/(sigma * np.sqrt(2 * np.pi)) *
...                np.exp( - (bins - mu)**2 / (2 * sigma**2) ),
...          linewidth=2, color='r')
>>> plt.show()
Kind Kinkajou

distribusi normal

# Creating a normal distribution
import numpy as np 
mu, sigma = 0, 0.1 # mean and standard deviation
s = np.random.normal(mu, sigma, 1000)

# Visualizing the Normal Distribution
import matplotlib.pyplot as plt
count, bins, ignored = plt.hist(s, 30, density=True)
plt.plot(bins, 1/(sigma * np.sqrt(2 * np.pi)) *
         np.exp(- (bins - mu)**2 / (2 * sigma**2)), linewidth=2, color='r')
plt.show()
iPablo

Jawaban yang mirip dengan “distribusi normal”

Pertanyaan yang mirip dengan “distribusi normal”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya