-
Notifications
You must be signed in to change notification settings - Fork 45
Description
Hi
I am reading your book on the net and I would like a precision in a piece of code taken from the chapter INTRODUCTION TO PROBABILITY.
I found the code
import numpy as np
import scipy.stats as stats
import pandas as pd
import seaborn as sns
mu = 5
variance = 1
sigma = np.sqrt(variance)
x = np.linspace(1, 10, 100)
y1 = stats.norm.pdf(x, mu, 1)
variance = 2
sigma = np.sqrt(variance)
y2 = stats.norm.pdf(x, mu, 2)
fig = sns.lineplot(x = x, y = y1)
ax2=fig.twiny()
ax2.tick_params(left=False, labelleft=False, top=False, labeltop=False,
right=False, labelright=False, bottom=False, labelbottom=False)
sns.lineplot(x = x, y = y2, ax=ax2, linestyle='--')
sns.despine()
I wonder if the calls to stats.norm.pdf we should not find Sigma in the call rather than 1 and 2.
Anyway thanks for this great book.