Hello @JJaassoonn, very well said! The expected value is the average of all the trials/samples. With a very small sample size, the average you get would have a larger deviation from the true mean. With sufficient samples, the deviation becomes smaller. With infinite samples, the deviation is close to 0.

We say the device generates samples for a variable V_i that follows the gaussian distribution of N(1.7, 1.), and the expected value of V_i is 1.7. Here, I want to make sure you know that, during all this time discussing about the device, we are only dealing one variable. A sample is NOT a variable. OK? The variable follows a distribution, and we generate samples from those distribution. If you are not sure, you may want to google some readings with keywords like â€śstatitics variables vs samplesâ€ť.

I remember we have discussed in the DLS/MLS forums, so I trust you can find yourself a Python environment. I would like you to study and run the following code, and make sure you see the difference by progressively changing the `size`

parameter from 10 to 100, to 1000, to 10000, and so on. I also trust you can find explanations to any library function used on the Internet, so I did not add comments about that.

```
import numpy as np
from matplotlib import pyplot as plt
rng = np.random.default_rng(10)
samples = rng.normal(loc=0., scale=1., size=10)
print(
f'Mean and variance of the samples: {samples.mean()}, {samples.var()}'
)
plt.hist(samples, bins=100)
plt.show()
```

Please take your time playing with the codes.

Coming back to the central limit theorem lecture, can you write another piece of code that demonstrates the content of the lecture?

I mean, you know what the theorem is about from the lecture. You know how to have a variable to generate samples in Python. You know how to plot the distribution to see if anything shows a normal distribution.

This is not going to be easy, so please take your time. I would like to see what you will get us, and then we will move on from there.

Cheers,

Raymond