TTest
Contents
45. TTest#
T test
import scipy as sp
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
46. Draw from population#
Assume a distribution
sampling_means = []
for i in range(10000):
sampling_means.append(
np.mean(
np.random.normal(size=10)
)
)
fig, ax = plt.subplots(figsize=(10,6.18))
sns.histplot(sampling_means, ax=ax, bins=20)
ax.set_xlabel("Sample Means")
Text(0.5, 0, 'Sample Means')
![../../_images/ttest_7_1.png](../../_images/ttest_7_1.png)