LoginSignup
0
0

More than 3 years have passed since last update.

均一な乱数と正規分布に従う乱数をグラフにしてみる

Last updated at Posted at 2021-05-08

Jupyter を使ってやってみます。

均一な乱数

import numpy as np
import matplotlib.pyplot as plt

n = 500  # サンプル数
x = np.random.rand(n)
y = np.random.rand(n)

plt.scatter(x, y)
plt.grid()
plt.show()

image.png

正規分布に従う乱数

import numpy as np
import matplotlib.pyplot as plt

n = 500  # サンプル数
x = np.random.randn(n)
y = np.random.randn(n)

plt.scatter(x, y)
plt.grid()
plt.show()

image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0