> For the complete documentation index, see [llms.txt](https://ds.howtocode.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ds.howtocode.dev/dummy-big-data/population-sample.md).

# পপুলেশন ও স্যাম্পল

এ দুটো যথাক্রমে Census এবং Sample এর প্রতিশব্দ। এখানে আবার এই প্রসঙ্গ আনার কারন হচ্ছে, যখন Sample নিয়ে কাজ করতে হবে তখন Sample Variance জানতে হবে যা কিনা Population নিয়ে কাজ করার সময়কার সাধারণ Variance থেকে ভিন্ন।

N সংখ্যক স্যাম্পল নিয়ে কাজ করার সময় Sample Variance বের করার সূত্রে ভগ্নাংশের নিচে মোট এলিমেন্ট (গোটা পপুলেশন) সংখ্যা না হয়ে N-1 হবে। আর স্বভাবতই Sample Standard Deviation হবে ওই Sample Variance এর Square Root.

![$$\begin{equation\*} Population \\, Variance, \\, \sigma ^ 2 = \frac{\sum (x-\mu) ^ 2}{N} \end{equation\*}$$](https://render.githubusercontent.com/render/math?math=\begin{equation*}%20Population%20\\%2C%20Variance%2C%20\\%2C%20\sigma%20^%202%20%3D%20\frac{\sum%20\(x-\mu\)%20^%202}{N}%20\end{equation*}\&mode=display)

![$$\begin{equation\*} Sample \\, Variance, \\, S ^ 2 = \frac{\sum (x-M) ^ 2}{N-1} \end{equation\*}$$](https://render.githubusercontent.com/render/math?math=\begin{equation*}%20Sample%20\\%2C%20Variance%2C%20\\%2C%20S%20^%202%20%3D%20\frac{\sum%20\(x-M\)%20^%202}{N-1}%20\end{equation*}\&mode=display)

দু ক্ষেত্রেই![$Standard \\, Deviation$](https://render.githubusercontent.com/render/math?math=Standard%20\\%2C%20Deviation\&mode=inline)যথাক্রমে![$\sigma$](https://render.githubusercontent.com/render/math?math=\sigma\&mode=inline)এবং![$S$](https://render.githubusercontent.com/render/math?math=S\&mode=inline)

**এ অবস্থায় আরেকটি উদাহরণ দেখে নেই,**

```
incomes = np.random.normal(100.0, 50.0, 10000) # সেন্টার ভ্যালু 100, স্ট্যান্ডার্ড ডেভিয়েশন 20, ডাটা পয়েন্ট 10000 টি

plt.hist(incomes, 50)
plt.show()
```

![](https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LMyNawUiccrxuCBk4Uq%2Fuploads%2FCsbUfq9noUxYVkrEubZB%2Ffile.png?alt=media)

```
incomes.var() # Variance
```

```
2483.8524780006833
```

```
incomes.std() # Standard Deviation
```

```
49.838263192056395
```
