```python
from Exercise import Exercise, MarkdownBlock
from config import URL, TOKEN
import json

import numpy as np
import sympy as sp
import matplotlib.pyplot as plt

import matplotlib as mpl
mpl.rcParams['figure.dpi'] = 100

Exercise.URL = URL
Exercise.TOKEN = TOKEN
```


```python
mu, sigma = 0, 1.5 # mean and standard deviation
s0 = np.random.normal(mu, sigma, 10)
mu, sigma = 3, 2 # mean and standard deviation
s1 = np.random.normal(mu, sigma, 10)
```


```python
plt.ylim(-0.1, 1.1)
plt.scatter(s0, y=[0 for i in range(len(s))], marker="+")
plt.scatter(s1, y=[0 for i in range(len(s))], marker="x")

from pylab import *
# Create some test data
dx = 0.01
X  = np.arange(-3, 9, dx)
# Y  = exp(-X ** 2)
def normal_dist(x , mean , sd):
    prob_density = (np.pi*sd) * np.exp(-0.5*((x-mean)/sd)**2)
    return prob_density
Y = normal_dist(X, 3, 2)

# Normalize the data to a proper PDF
Y /= (dx * Y).sum()

# Compute the CDF
CY = np.cumsum(Y * dx)

# Plot both
plot(X, Y)
plot(X, CY, 'r--')


# plt.ylim(0.1, 1)
```


```python
import numpy as np
import statsmodels.api as sm # recommended import according to the docs
import matplotlib.pyplot as plt

ecdf = sm.distributions.ECDF(s0)

x = np.linspace(min(s0), max(s0))
y = ecdf(x)
plt.step(x, y)
plt.show()
```


```python

```

64c7c8cc63cb81e78fd5b668c08c0a6d4957e833
ipynb
Jupyter Notebook
probability.ipynb
rkeulemans/exercise_public
5f8020198b8b234169eea4d5e08c98344438de5d
MIT
probability.ipynb
rkeulemans/exercise_public
5f8020198b8b234169eea4d5e08c98344438de5d
MIT
probability.ipynb
rkeulemans/exercise_public
5f8020198b8b234169eea4d5e08c98344438de5d
MIT
Qwen/Qwen-72B
1. YES
2. YES