Created
February 26, 2020 03:18
-
-
Save theideasmith/81be1b6041d5f5bed2f8e201d8b891b9 to your computer and use it in GitHub Desktop.
Basic Thermodynamics Simulations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
N = 10**4 | |
xs = np.random.binomial(1, 0.5, size=(N, 100)) | |
U = np.sum(xs, axis=1) | |
plt.hist(U, bins=100) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment