Chapterبەش 5 · Lectureوانە 5.7

The Normal Distribution (Supplementary)دابەشبوونی ئاسایی (زیادە)

The bell curve: why it appears (a Galton board), how μ\mu and σ\sigma shape it, the 68–95–99.7 rule, z-scores and the standard normal, probabilities as areas with Python's NormalDist instead of tables, the binomial–normal link, and a look back over the whole course.

چەماوەی زەنگوڵەئاسا: بۆچی دەردەکەوێت ()، μ\mu و σ\sigma چۆن شێوەی دەدەن، ، و ، وەک ڕووبەر بە NormalDistـی Python لە جیاتی خشتە، پەیوەندیی دووڕادەیی–ئاسایی و ئاوڕدانەوەیەک بە هەموو کۆرسەکەدا.

14 min read14 خولەک خوێندنەوە · 14 stepsهەنگاو

What you will learnچی فێر دەبیت

  • Describe the normal distribution N(μ,σ)N(\mu, \sigma) and explain why bell curves are common.
  • Use the 68–95–99.7 rule and z-scores to judge how unusual a value is.
  • Find normal probabilities and percentiles with statistics.NormalDist.
  • Approximate a binomial distribution with a normal curve when nn is large.
  • N(μ,σ)N(\mu, \sigma) وەسف بکەیت و ڕوون بکەیتەوە بۆچی چەماوەی زەنگوڵەئاسا زۆرە.
  • و بەکاربهێنیت بۆ ئەوەی بزانیت نرخێک چەند نائاساییە.
  • و ئاسایی بە statistics.NormalDist بدۆزیتەوە.
  • بە چەماوەیەکی ئاسایی نزیک بکەیتەوە کاتێک nn گەورەیە.

The bell curveچەماوەی زەنگوڵەئاسا

A machine in a bazaar fills 1 kg bags of rice. No machine is perfect: one bag holds 1003 g, the next 994 g, the next 1001 g. Weigh thousands of bags and draw a histogram. Most bags are close to 1000 g, fewer are far away, and the two sides look alike. Make the classes narrower and narrower and the tops of the bars trace a smooth bell-shaped curve.

ئامێرێک لە بازاڕدا کیسەی برنجی 1 کیلۆیی پڕ دەکاتەوە. هیچ ئامێرێک بێ کەموکوڕی نییە: کیسەیەک ⁦1003⁩ گرامی تێدایە، دواتر ⁦994⁩ گرام، دواتر ⁦1001⁩ گرام. هەزاران کیسە بکێشە و هیستۆگرامێک بکێشە. زۆربەی کیسەکان نزیکی ⁦1000⁩ گرامن، کەمتر دوورن و هەردوو لا وەک یەک دەردەکەون. باریکتر و باریکتر بکە و سەری ستوونەکان چەماوەیەکی لووسی زەنگوڵەئاسا دەکێشن.

This curve is the density of the normal distribution, the most used model in statistics. Many measurements are close to normal: weights from a filling machine, people's heights, errors of a measuring instrument, marks of a large exam. As for every continuous random variable, probability is area under the curve.

ئەم چەماوەیە چڕیی ، کە بەکارهاتووترین مۆدێلی . زۆر پێوانە نزیکن لە ئاسایی: کێشی ئامێرێکی پڕکردنەوە، باڵای خەڵک، هەڵەی ئامێرێکی پێوان، نمرەکانی تاقیکردنەوەیەکی گەورە. وەک هەموو گۆڕاوێکی هەڕەمەکیی بەردەوام، ڕووبەرـە لە ژێر چەماوەکەدا.

Definitionپێناسە

The symmetric, bell-shaped distribution set by its μ\mu and σ\sigma. Many measurements, such as heights, are close to normal.

دابەشبوونە هاوجێ و زەنگوڵەئاساکەیە کە بە μ\mu و σ\sigma دیاری دەکرێت. زۆر پێوانە، وەک باڵا، نزیکن لە ئاسایی.

Quick checkپشکنینی خێراWhich of these is most likely to follow a bell-shaped distribution?کامیان زیاتر لەوانەیە دابەشبوونێکی زەنگوڵەئاسای هەبێت؟

Why bells appear: the Galton boardبۆچی زەنگوڵە دەردەکەوێت: تەختەی گاڵتن

A Galton board shows where the bell comes from. Each ball falls through 12 rows of pins and at every pin it bounces left or right with equal chance. Its final bin is the number of right bounces, so it is binomial, B(12,12)B(12, \tfrac12). Watch 1,000 balls pile up:

نیشان دەدات زەنگوڵەکە لە کوێوە دێت. هەر تۆپێک بە ⁦12⁩ ڕیز بزماردا دەکەوێت و لە هەر بزمارێکدا بە چانسی یەکسان بەرەو چەپ یان ڕاست دەچێت. ئەو خانەیەی تێیدا دەوەستێت ژمارەی چوونەکانی بەرەو ڕاستە، بۆیە دووڕادەییە، B(12,12)B(12, \tfrac12). سەیری کۆبوونەوەی ⁦1,000⁩ تۆپ بکە:

Animation in eight frames. A triangle of pins in 12 rows sits above 13 bins. In the first frames single balls fall and a dashed line shows the zigzag path of the newest ball; the bins fill with 1, 3 and 10 balls. Later frames show 30, 100, 300 and 1,000 balls as growing columns: tall in the middle bins, short at the edges. The last frame draws a smooth bell curve over the columns, labelled B(12, 0.5) ≈ N(6, 1.73).
Animation in eight frames. A triangle of pins in 12 rows sits above 13 bins. In the first frames single balls fall and a dashed line shows the zigzag path of the newest ball; the bins fill with 1, 3 and 10 balls. Later frames show 30, 100, 300 and 1,000 balls as growing columns: tall in the middle bins, short at the edges. The last frame draws a smooth bell curve over the columns, labelled B(12, 0.5) ≈ N(6, 1.73).
1,000 simulated balls on a 12-row Galton board. Many small left/right steps add up to a bell shape.⁦1,000⁩ تۆپی لاسایی لەسەر ⁦12⁩ ڕیزی. زۆر هەنگاوی بچووکی چەپ/ڕاست کۆ دەبنەوە بۆ شێوەیەکی زەنگوڵەئاسا.CêIT

Few balls reach the edge bins: to land in bin 0 a ball must go left 12 times in a row, probability (12)12=14096(\tfrac12)^{12} = \tfrac{1}{4096}. The middle bin 6 can be reached in (126)=924\binom{12}{6} = 924 ways. A bag of rice is like a ball: many small causes (grain size, vibration, timing) each push its weight a little up or down.

تۆپی کەم دەگەنە خانەکانی لێوار: بۆ گەیشتن بە خانەی 0 تۆپێک دەبێت ⁦12⁩ جار لە سەر یەک بەرەو چەپ بچێت، (12)12=14096(\tfrac12)^{12} = \tfrac{1}{4096}. خانەی ناوەڕاست 6 بە (126)=924\binom{12}{6} = 924 ڕێگا دەگاتێ. کیسەیەک برنج وەک تۆپێکە: زۆر هۆکاری بچووک (قەبارەی دەنک، لەرزین، کات) هەریەکە کێشەکەی کەمێک بەرز یان نزم دەکات.

Quick checkپشکنینی خێراWhy do so few balls land in the outermost bins?بۆچی تۆپی ئەوەندە کەم دەکەونە دوورترین خانەکان؟

But what is the Central Limit Theorem?3Blue1Brown · Englishئینگلیزی · 4.6M viewsبینین · 84K likesلایک · Partبەشی 1:53–6:15 (ofلە 31:14)

A Galton board: each ball bounces left or right at every pin, adding many small random steps, and the piles form a bell curve.

: هەر تۆپێک لە هەر بزمارێکدا بەرەو چەپ یان ڕاست دەچێت، زۆر هەنگاوی بچووکی هەڕەمەکی کۆ دەبنەوە و کەڵەکەکان چەماوەیەکی زەنگوڵەیی دروست دەکەن.

Chapters 'A simplified Galton board' and 'The general idea' (1:53-6:15): sums of many independent bounces pile up into a bell.

بەشەکانی « سادەکراو» و «بیرۆکە گشتییەکە» (⁦1:53⁩ تا ⁦6:15⁩): کۆی زۆر بازدانی سەربەخۆ کەڵەکە دەبن و دەبنە زەنگوڵەیەک.

Two numbers fix the curve: μ\mu and σ\sigmaدوو ژمارە چەماوەکە دیاری دەکەن: μ\mu و σ\sigma

Every normal curve is set by its mean μ\mu and its standard deviation σ\sigma. We write X∼N(μ,σ)X \sim N(\mu, \sigma). μ\mu puts the peak in its place; σ\sigma decides how wide the bell is:

هەموو چەماوەیەکی ئاسایی بە μ\mu و σ\sigma دیاری دەکرێت. دەنووسین X∼N(μ,σ)X \sim N(\mu, \sigma). μ\mu لووتکەکە لە شوێنی خۆی دادەنێت؛ σ\sigma بڕیار دەدات زەنگوڵەکە چەند پانە:

Three normal curves on one axis from −5 to 8. Two have σ = 1 and the same shape: one centred at 0 and one at 4 (dashed). The third has μ = 0 and σ = 2: it is twice as wide and half as tall.سێ چەماوەی ئاسایی لەسەر یەک تەوەر لە −5 تا 8. دوانیان σ = 1ـیان هەیە و هەمان شێوە: یەکێکیان ناوەندی لە 0ـە و ئەوی تر لە 4 (پچڕپچڕ). سێیەمیان μ = 0 و σ = 2ـی هەیە: دوو هێندە پانترە و نیوەی بەرزییەکەیە.
Changing μ\mu slides the curve; a larger σ\sigma makes it wider and lower, because the total area stays 1.گۆڕینی μ\mu چەماوەکە دەخزێنێت؛ σ\sigmaـی گەورەتر پانتر و نزمتری دەکات، چونکە کۆی ڕووبەر 1 دەمێنێتەوە.CêIT
f(x)=1σ2π  e−(x−μ)22σ2,−∞<x<∞f(x) = \frac{1}{\sigma\sqrt{2\pi}}\; e^{-\frac{(x - \mu)^2}{2\sigma^2}}, \qquad -\infty < x < \infty

The density of N(μ,σ)N(\mu, \sigma). You will rarely use it by hand: computers and tables give the areas. The square (x−μ)2(x - \mu)^2 makes it symmetric, and ee to a negative power makes it fall fast in the tails.

چڕیی N(μ,σ)N(\mu, \sigma). بە دەگمەن بە دەست بەکاری دەهێنیت: و خشتەکان ڕووبەرەکان دەدەن. دووجای (x−μ)2(x - \mu)^2 هاوجێی دەکات و ee بە سالب وا دەکات لە کلکەکاندا بە خێرایی دابەزێت.

Quick checkپشکنینی خێراTwo machines fill bags with mean 1000 g. Machine A has σ=5\sigma = 5 g, machine B has σ=12\sigma = 12 g. Whose curve is taller at 1000 g?دوو ئامێر کیسە پڕ دەکەنەوە بە ⁦1000⁩ گرام. ئامێری A σ=5\sigma = 5 گرامی هەیە و ئامێری B σ=12\sigma = 12 گرام. چەماوەی کامیان لە ⁦1000⁩ گرام بەرزترە؟

Two numbers fix the curve: μ\mu and σ\sigmaدوو ژمارە چەماوەکە دیاری دەکەن: μ\mu و σ\sigma

Four facts about every normal curveچوار ڕاستی دەربارەی هەموو چەماوەیەکی ئاسایی

Whatever μ\mu and σ\sigma are, every normal curve has these properties:

μ\mu و σ\sigma هەرچییەک بن، هەموو چەماوەیەکی ئاسایی ئەم تایبەتمەندییانەی هەیە:

  • Symmetric about μ\mu, so the mean, the median and the mode all equal μ\mu, and its skewness is 0.
  • The total area is 1. The tails get very close to the axis but never touch it: any value is possible, far values are just very unlikely.
  • The curve changes from bending down to bending up exactly at μ−σ\mu - \sigma and μ+σ\mu + \sigma: you can read σ\sigma off the picture.
  • It is the mesokurtic reference curve: M4/(M2)2=3M_4 / (M_2)^2 = 3, so its excess kurtosis B is 0.
  • هاوجێیە بە دەوری μ\muـدا، بۆیە ، و هەموویان یەکسانن بە μ\mu و ناهاوجێبوونی 0ـە.
  • کۆی ڕووبەر 1ـە. کلکەکان زۆر لە تەوەرەکە نزیک دەبنەوە بەڵام هەرگیز پێی ناگەن: هەموو نرخێک دەکرێت ڕوو بدات، تەنها نرخە دوورەکان زۆر کەمە.
  • چەماوەکە ڕێک لە μ−σ\mu - \sigma و μ+σ\mu + \sigma لە چەمانەوە بەرەو خوارەوە دەگۆڕێت بۆ چەمانەوە بەرەو سەرەوە: دەتوانیت σ\sigma لە وێنەکەوە بخوێنیتەوە.
  • چەماوەی بنەڕەتیی : M4/(M2)2=3M_4 / (M_2)^2 = 3، بۆیە BBـی پلەی لووتکەیی دەکاتە 0.
Quick checkپشکنینی خێراFor a normal distribution N(μ,σ)N(\mu, \sigma), where are the mean, the median and the mode?بۆ N(μ,σ)N(\mu, \sigma)، ، و لە کوێن؟

The 68–95–99.7 ruleیاسای 68–95–99.7

For every normal distribution the same share of the area lies within 1, 2 and 3 standard deviations of the mean. Watch the bands fill in:

بۆ هەموو هەمان بەشی ڕووبەر لە ماوەی 1، 2 و 3 لە دەوری . سەیری پڕبوونەوەی ناوچەکان بکە:

Animation in four frames. A normal curve with the axis marked μ − 3σ, μ − 2σ, μ − σ, μ, μ + σ, μ + 2σ, μ + 3σ. Frame 2 shades the area between μ − σ and μ + σ and labels it 68.27%. Frame 3 adds the band to μ ± 2σ, labelled 95.45%. Frame 4 adds the band to μ ± 3σ, labelled 99.73%.
Animation in four frames. A normal curve with the axis marked μ − 3σ, μ − 2σ, μ − σ, μ, μ + σ, μ + 2σ, μ + 3σ. Frame 2 shades the area between μ − σ and μ + σ and labels it 68.27%. Frame 3 adds the band to μ ± 2σ, labelled 95.45%. Frame 4 adds the band to μ ± 3σ, labelled 99.73%.
About 68%, 95% and 99.7% of a normal distribution lie within one, two and three standard deviations of the mean.نزیکەی ⁦68%⁩، ⁦95%⁩ و ⁦99.7%⁩ی لە ماوەی یەک، دوو و سێ لە دەوری .CêIT
Definitionپێناسە

For a , about 68%, 95% and 99.7% of values lie within 1, 2 and 3 standard deviations of the mean.

بۆ ، دووریی نزیکەی ⁦68%⁩ و ⁦95%⁩ و ⁦99.7%⁩ی نرخەکان لە تێکڕاوە کەمترە لە 1 و 2 و 3 .

The rule with exact values, and what it means for the rice bagsیاساکە بە نرخە وردەکان و واتاکەی بۆ کیسەکانی برنج
RangeناوچەShare of valuesبەشی نرخەکانRice bags, N(1000,8)N(1000, 8)کیسەی برنج، N(1000,8)N(1000, 8)
μ±σ\mu \pm \sigma68.27%68.27\%992 g to 1008 g⁦992⁩ تا ⁦1008⁩ گرام
μ±2σ\mu \pm 2\sigma95.45%95.45\%984 g to 1016 g⁦984⁩ تا ⁦1016⁩ گرام
μ±3σ\mu \pm 3\sigma99.73%99.73\%976 g to 1024 g⁦976⁩ تا ⁦1024⁩ گرام

So a bag lighter than 976 g (more than 3σ3\sigma below the mean) should almost never happen: about 1 bag in 740 (0.135%0.135\%). If the shop finds many such bags, the machine is probably faulty. You met the first two numbers as a rule of thumb for bell-shaped data in What the standard deviation tells you.

کەواتە کیسەیەک کە لە ⁦976⁩ گرام سووکتر بێت (زیاتر لە 3σ3\sigma لە خوار ) دەبێت نزیکەی هەرگیز ڕوو نەدات: نزیکەی 1 کیسە لە ⁦740⁩ (0.135%0.135\%). گەر دوکانەکە زۆر کیسەی لەو جۆرە بدۆزێتەوە، ئامێرەکە لەوانەیە تێکچووبێت. دوو ژمارەی یەکەمت وەک یاسایەکی نزیکەیی بۆ زەنگوڵەئاسا لە ئەوەی لادانی پێوانەیی پێت دەڵێت بینی.

Quick checkپشکنینی خێراBag weights are N(1000,8)N(1000, 8). About what share of bags weigh between 984 g and 1016 g?کێشی کیسەکان N(1000,8)N(1000, 8)ـە. نزیکەی چ بەشێکی کیسەکان لە نێوان ⁦984⁩ و ⁦1016⁩ گرامدان؟

The Normal Distribution and the 68-95-99.7 Rule (5.2)Simple Learning Pro · Englishئینگلیزی · 1.9M viewsبینین · 55K likesلایک · Partبەشی 4:27–8:32 (ofلە 8:50)

About 68 %, 95 % and 99.7 % of a normal distribution lie within 1, 2 and 3 standard deviations of the mean, with two practice questions.

نزیکەی ⁦68%⁩، ⁦95%⁩ و ⁦99.7%⁩ـی تا 1، 2 و 3 لە دوورن، لەگەڵ دوو پرسیاری ڕاهێنان.

Plays 4:27-8:32: the 68-95-99.7 rule on the bell curve, then two practice questions.

لە ⁦4:27⁩ تا ⁦8:32⁩ پەخش دەبێت: لەسەر چەماوە زەنگوڵەییەکە، پاشان دوو پرسیاری ڕاهێنان.

z-scores: how unusual is a value?نمرە پێوانەییەکان: نرخێک چەند نائاساییە؟

To compare values from different normal distributions, measure each one in standard deviations from its own mean. This is its z-score:

بۆ بەراوردکردنی نرخەکان لە جیاوازەوە، هەریەکەیان بە لە خۆیەوە بپێوە. ئەمە :

z=x−μσ,x=μ+z σz = \frac{x - \mu}{\sigma}, \qquad x = \mu + z\,\sigma

z>0z > 0: above the mean; z<0z < 0: below it; z=0z = 0: exactly at the mean. The second form turns a z-score back into a value.

z>0z > 0: لە سەرووی ؛ z<0z < 0: لە خوارییەوە؛ z=0z = 0: ڕێک لەسەر . شێوەی دووەم دەگەڕێنێتەوە بۆ نرخ.

Definitionپێناسە

How many a value is above or below the mean: z=x−μσz = \frac{x - \mu}{\sigma}.

ئەوەیە کە نرخێک چەند لە سەرووی تێکڕاوە یان لە خوارییەوەیە: z=x−μσz = \frac{x - \mu}{\sigma}.

Dilan got 75 in Statistics, where the class marks are about N(60,10)N(60, 10), and 78 in Mathematics, where they are about N(70,5)N(70, 5). Which result is better compared with the class?

دیلان لە ⁦75⁩ی هێنا، کە نمرەکانی پۆل نزیکەی N(60,10)N(60, 10)ـن و لە بیرکاریدا ⁦78⁩، کە نمرەکان نزیکەی N(70,5)N(70, 5)ـن. کام ئەنجام بە بەراورد بە پۆلەکە باشترە؟

zStat=75−6010=1.5,zMath=78−705=1.6z_{\text{Stat}} = \frac{75 - 60}{10} = 1.5, \qquad z_{\text{Math}} = \frac{78 - 70}{5} = 1.6

The Mathematics mark is lower in points but further above its class: 1.6 standard deviations against 1.5. About 94.5% of the Mathematics class is below 78, and about 93.3% of the Statistics class is below 75.

نمرەی بیرکاری بە خاڵ کەمترە بەڵام زیاتر لە سەرووی پۆلەکەیەوەیە: ⁦1.6⁩ بەرامبەر ⁦1.5⁩. نزیکەی ⁦94.5%⁩ی پۆلی بیرکاری لە خوار ⁦78⁩ـن و نزیکەی ⁦93.3%⁩ی پۆلی لە خوار ⁦75⁩ـن.

Turning every value into its z-score turns N(μ,σ)N(\mu, \sigma) into the standard normal distribution Z∼N(0,1)Z \sim N(0, 1). That is why one table, or one Python function, is enough for every normal distribution.

گۆڕینی هەموو نرخێک بۆ N(μ,σ)N(\mu, \sigma) دەگۆڕێت بۆ Z∼N(0,1)Z \sim N(0, 1). لەبەر ئەوە یەک خشتە، یان یەک Python، بۆ هەموو بەسە.

Quick checkپشکنینی خێراA bag weighs 1012 g; the machine is N(1000,8)N(1000, 8). What is its z-score?کیسەیەک ⁦1012⁩ گرامە؛ ئامێرەکە N(1000,8)N(1000, 8)ـە. چەندە؟

Z-Scores, Standardization, and the Standard Normal Distribution (5.3)Simple Learning Pro · Englishئینگلیزی · 2M viewsبینین · 67K likesلایک · Partبەشی 0:15–6:39 (ofلە 6:56)

z-scores turn any normal distribution into the standard normal N(0, 1), so one table gives areas; practice questions included.

هەر دەگۆڕن بۆ N(0,1)N(0, 1)، بۆیە یەک خشتە ڕووبەرەکان دەدات؛ لەگەڵ پرسیاری ڕاهێنان.

Plays 0:15-6:39: the standard normal, z-table areas, standardisation z = (x - mu)/sigma (2:40) and three practice questions.

لە ⁦0:15⁩ تا ⁦6:39⁩ پەخش دەبێت: ، ڕووبەرەکان لە خشتەی z، پێوانەییکردن z=(x−μ)/σz = (x - \mu)/\sigma ⁦(2:40)⁩ و سێ پرسیاری ڕاهێنان.

Probabilities are areasئەگەرەکان ڕووبەرن

What share of bags weigh less than 990 g? It is the area under the curve to the left of 990. First the z-score: z=990−10008=−1.25z = \frac{990 - 1000}{8} = -1.25.

چ بەشێکی کیسەکان لە ⁦990⁩ گرام سووکترن؟ ئەوە ڕووبەری ژێر چەماوەکەیە لە چەپی ⁦990⁩. سەرەتا : z=990−10008=−1.25z = \frac{990 - 1000}{8} = -1.25.

A normal curve for bag weights centred at 1000 g, with grams 976 to 1024 on the axis and the matching z-scores −3 to 3 underneath. The area left of 990 g is shaded and labelled 0.1056.چەماوەیەکی ئاسایی بۆ کێشی کیسەکان بە ناوەندی 1000 گرام، تەوەرەکە 976 تا 1024 گرام و نمرە پێوانەییەکانی هاوتای −3 تا 3 لە ژێریەوە. ڕووبەری چەپی 990 گرام ڕەنگ کراوە و نووسراوە 0.1056.
P(X<990)=P(Z<−1.25)≈0.106P(X < 990) = P(Z < -1.25) \approx 0.106: about one bag in ten is lighter than 990 g.P(X<990)=P(Z<−1.25)≈0.106P(X < 990) = P(Z < -1.25) \approx 0.106: نزیکەی یەک کیسە لە دە لە ⁦990⁩ گرام سووکترە.CêIT
  • P(X<a)P(X < a) is the area to the left of aa: the CDF F(a)F(a).
  • P(X>a)=1−F(a)P(X > a) = 1 - F(a). By symmetry P(X>1010)=P(X<990)≈0.106P(X > 1010) = P(X < 990) \approx 0.106.
  • P(a<X<b)=F(b)−F(a)P(a < X < b) = F(b) - F(a).
  • A single value has probability 0, so << and ≤\le give the same answer (why).
  • P(X<a)P(X < a) ڕووبەری چەپی aaـیە، واتە نەخشەی دابەشبوونی کەڵەکەبوو F(a)F(a).
  • P(X>a)=1−F(a)P(X > a) = 1 - F(a). بە هۆی P(X>1010)=P(X<990)≈0.106P(X > 1010) = P(X < 990) \approx 0.106.
  • P(a<X<b)=F(b)−F(a)P(a < X < b) = F(b) - F(a).
  • نرخێکی تاک 0ـە، بۆیە << و ≤\le هەمان وەڵام دەدەن (بۆچی).
Quick checkپشکنینی خێراBags are N(1000,8)N(1000, 8) and P(X<990)≈0.106P(X < 990) \approx 0.106. What is P(990<X<1010)P(990 < X < 1010)?کیسەکان N(1000,8)N(1000, 8)ـن و P(X<990)≈0.106P(X < 990) \approx 0.106. P(990<X<1010)P(990 < X < 1010) چەندە؟

Normal probabilities in Python: no tables neededئەگەرەکانی ئاسایی لە Pythonـدا: خشتە پێویست نییە

Python's statistics.NormalDist (Python 3.8+) does all the area work. cdf(x) is the area to the left of xx, inv_cdf(p) goes backwards from an area to a value, and zscore(x) gives (x−μ)/σ(x - \mu)/\sigma:

statistics.NormalDistـی ⁦Python (Python 3.8+)⁩ هەموو کاری ڕووبەرەکان دەکات. cdf(x) ڕووبەری چەپی xxـە، inv_cdf(p) بە پێچەوانەوە لە ڕووبەرێکەوە دەگاتە نرخێک و zscore(x) (x−μ)/σ(x - \mu)/\sigma دەدات:

The rice bags with NormalDistکیسەکانی برنج بە NormalDistnormal_bags.pyPYTHONType in a terminalلە تێرمیناڵدا بینووسە
from statistics import NormalDist

bags = NormalDist(mu=1000, sigma=8)      # weights of rice bags, in grams
print("P(X < 990)        =", round(bags.cdf(990), 4))
print("P(X > 1010)       =", round(1 - bags.cdf(1010), 4))
print("P(992 < X < 1008) =", round(bags.cdf(1008) - bags.cdf(992), 4))
print("z-score of 990 g  =", bags.zscore(990))
print("lightest 5% below =", round(bags.inv_cdf(0.05), 1), "g")

Z = NormalDist()                         # standard normal: mu = 0, sigma = 1
for k in (1, 2, 3):
    print(f"within {k} sd of the mean: {Z.cdf(k) - Z.cdf(-k):.4f}")
Explain the codeڕوونکردنەوەی کۆدەکە
Lineدێڕی 3

A normal distribution with mean 1000 and standard deviation 8.

بە ⁦1000⁩ و 8.

Lineدێڕی 4-6

Left area, right area (1 minus the left area) and the area between two values.

ڕووبەری چەپ، ڕووبەری ڕاست (⁦1⁩ کەم ڕووبەری چەپ) و ڕووبەری نێوان دوو نرخ.

Lineدێڕی 8

inv_cdf(0.05) is the 5th percentile: 5% of bags weigh less than 986.8 g.

inv_cdf(0.05) سەدیەکی 5ـەمە: ⁦5%⁩ی کیسەکان لە ⁦986.8⁩ گرام سووکترن.

Lineدێڕی 10-12

The standard normal checks the 68–95–99.7 rule exactly.

بە وردی دەپشکنێت.

Going backwards is useful for decisions. The shop wants to label the lightest 5% of bags as "under weight": the cut is 1000+(−1.645)(8)≈986.81000 + (-1.645)(8) \approx 986.8 g. The middle 95% of any normal distribution lies within μ±1.96σ\mu \pm 1.96\sigma, because Z.inv_cdf(0.975) is about 1.96.

گەڕانەوە بە پێچەوانەوە بۆ بڕیاردان بەسوودە. دوکانەکە دەیەوێت سووکترین ⁦5%⁩ی کیسەکان بە «کەمکێش» نیشان بکات: سنوورەکە 1000+(−1.645)(8)≈986.81000 + (-1.645)(8) \approx 986.8 گرامە. ⁦95%⁩ی ناوەڕاستی هەموو لە ماوەی μ±1.96σ\mu \pm 1.96\sigmaـدایە، چونکە Z.inv_cdf(0.975) نزیکەی ⁦1.96⁩ـە.

Quick checkپشکنینی خێراWhich call gives the weight that only 10% of bags exceed?کام بانگکردن ئەو کێشە دەدات کە تەنها ⁦10%⁩ی کیسەکان لێی زیاترن؟

From binomial bars to the bellلە ستوونە دووڕادەییەکانەوە بۆ زەنگوڵە

The Galton board already showed it: when nn is large, the bars of B(n,p)B(n, p) follow the normal curve with the same mean and standard deviation, μ=np\mu = np and σ=npq\sigma = \sqrt{npq}.

پێشتر نیشانی دا: کاتێک nn گەورەیە، ستوونەکانی B(n,p)B(n, p) بەدوای چەماوەی ئاسایی دەکەون بە هەمان و ، μ=np\mu = np و σ=npq\sigma = \sqrt{npq}.

Four panels with binomial bar charts for p = 0.5 and n = 5, 10, 30 and 100, each with the normal curve of the same mean and standard deviation drawn over the bars. For n = 5 the curve fits roughly; for n = 30 and n = 100 the bars hug the curve closely.چوار بەش بە هێڵکارییە ستوونییەکانی دووڕادەیی بۆ p = 0.5 و n = 5, 10, 30, 100، هەریەکە بە چەماوەی ئاسایی بە هەمان ناوەند و لادانی پێوانەیی کە بەسەر ستوونەکاندا کێشراوە. بۆ n = 5 چەماوەکە بە نزیکەیی دەگونجێت؛ بۆ n = 30 و n = 100 ستوونەکان زۆر لە چەماوەکە نزیکن.
B(n,0.5)B(n, 0.5) for n=5,10,30,100n = 5, 10, 30, 100 with the matching normal curves.B(n,0.5)B(n, 0.5) بۆ n=5,10,30,100n = 5, 10, 30, 100 لەگەڵ چەماوە ئاساییە هاوتاکان.CêIT

Example: 100 fair coin tosses, μ=50\mu = 50, σ=5\sigma = 5. The exact binomial P(40≤X≤60)≈0.9648P(40 \le X \le 60) \approx 0.9648; the normal curve between 39.5 and 60.5 gives 0.96430.9643. The rule of thumb: the approximation is good when npnp and nqnq are both at least about 5 (some books ask for 10).

نموونە: ⁦100⁩ جار هەڵدانی دراوی دادپەروەر، μ=50\mu = 50، σ=5\sigma = 5. ورد P(40≤X≤60)≈0.9648P(40 \le X \le 60) \approx 0.9648؛ چەماوەی ئاسایی لە نێوان ⁦39.5⁩ و ⁦60.5⁩دا 0.96430.9643 دەدات. یاسای نزیکەیی: نزیککردنەوەکە باشە کاتێک npnp و nqnq هەردووکیان لانیکەم نزیکەی 5 بن (هەندێک کتێب ⁦10⁩ داوا دەکەن).

Quick checkپشکنینی خێراWhich binomial is closest to a normal curve?کام دووڕادەیی لە چەماوەی ئاسایی نزیکترە؟

Common mistakesهەڵە باوەکان

MistakeهەڵەWhy it is wrongبۆچی هەڵەیەCorrectڕاست
Dividing by the variance in zدابەشکردن بە لە zzـداzz counts standard deviationszz ژمارەی دەژمێرێتz=(x−μ)/σz = (x - \mu)/\sigma
Reading the curve's height as a probabilityخوێندنەوەی بەرزیی چەماوەکە وەک For a density only areas are probabilitiesبۆ چڕی تەنها ڕووبەرەکان P(a<X<b)=F(b)−F(a)P(a < X < b) = F(b) - F(a)
Using F(a)F(a) for "more than a"بەکارهێنانی F(a)F(a) بۆ «زیاتر لە a»F(a)F(a) is the area to the leftF(a)F(a) ڕووبەری چەپـەP(X>a)=1−F(a)P(X > a) = 1 - F(a)
Applying the 68–95–99.7 rule to any dataبەکارهێنانی بۆ هەر It holds only for (roughly) normal shapesتەنها بۆ شێوەی (نزیکەی) ئاسایی ڕاستەLook at the histogram firstسەرەتا سەیری بکە
Thinking a normal variable has a smallest and largest valueوابزانیت گۆڕاوی ئاسایی بچووکترین و گەورەترین نرخی هەیەThe tails go on forever; far values are just rareکلکەکان کۆتاییان نییە؛ نرخە دوورەکان تەنها دەگمەننUse the rule: beyond 3σ3\sigma is about 0.3%0.3\%یاساکە بەکاربهێنە: دەرەوەی 3σ3\sigma نزیکەی 0.3%0.3\%ـە
Writing N(μ,σ)N(\mu, \sigma) when the book means N(μ,σ2)N(\mu, \sigma^2)نووسینی N(μ,σ)N(\mu, \sigma) کاتێک کتێبەکە مەبەستی N(μ,σ2)N(\mu, \sigma^2)ـەSome books put the variance secondهەندێک کتێب لە شوێنی دووەم دادەنێنCheck which one is meant: N(1000,64)N(1000, 64) and N(1000,8)N(1000, 8) can be the same bagsبپشکنە مەبەست کامیانە: N(1000,64)N(1000, 64) و N(1000,8)N(1000, 8) دەکرێت هەمان کیسەکان بن
Quick checkپشکنینی خێراHana says: "The density of N(0,1)N(0, 1) at 0 is 0.399, so P(X=0)=0.399P(X = 0) = 0.399." What is wrong?هانا دەڵێت: «چڕیی N(0,1)N(0, 1) لە 0 دەکاتە ⁦0.399⁩، بۆیە P(X=0)=0.399P(X = 0) = 0.399.» چی هەڵەیە؟

Exercisesڕاهێنانەکان

ExerciseڕاهێنانExam marksنمرەکانی تاقیکردنەوە

Marks in a large exam are about N(65,10)N(65, 10). (a) What share is above 85? (b) What share is between 50 and 80? (c) Above which mark are the top 10%?

نمرەکانی تاقیکردنەوەیەکی گەورە نزیکەی N(65,10)N(65, 10)ـن. (أ) چ بەشێک لە سەرووی ⁦85⁩ـن؟ (ب) چ بەشێک لە نێوان ⁦50⁩ و ⁦80⁩دان؟ (ج) باشترین ⁦10%⁩ لە سەرووی کام نمرەوەن؟

Show answerوەڵامەکە پیشان بدە
(a) z=85−6510=2,P(X>85)=1−0.9772≈0.023(b) −1.5≤z≤1.5,P≈0.9332−0.0668=0.866(c) x=65+1.2816×10≈77.8\begin{aligned} &(a)\ z = \tfrac{85 - 65}{10} = 2,\quad P(X > 85) = 1 - 0.9772 \approx 0.023 \\ &(b)\ -1.5 \le z \le 1.5,\quad P \approx 0.9332 - 0.0668 = 0.866 \\ &(c)\ x = 65 + 1.2816 \times 10 \approx 77.8 \end{aligned}

In Python: m = NormalDist(65, 10); 1 - m.cdf(85), m.cdf(80) - m.cdf(50), m.inv_cdf(0.9).

لە Pythonـدا: m = NormalDist(65, 10)؛ 1 - m.cdf(85)، m.cdf(80) - m.cdf(50)، m.inv_cdf(0.9).

ExerciseڕاهێنانUse the ruleیاساکە بەکاربهێنە

Without a computer: bags are N(1000,8)N(1000, 8). About what share weigh more than 1016 g?

بەبێ : کیسەکان N(1000,8)N(1000, 8)ـن. نزیکەی چ بەشێکیان لە ⁦1016⁩ گرام قورسترن؟

Show answerوەڵامەکە پیشان بدە

1016 is μ+2σ\mu + 2\sigma. 95% lie within μ±2σ\mu \pm 2\sigma, so 5% lie outside, half on each side: about 2.5% (exactly 2.28%).

⁦1016⁩ دەکاتە μ+2σ\mu + 2\sigma. ⁦95%⁩ لە ماوەی μ±2σ\mu \pm 2\sigmaـدان، بۆیە ⁦5%⁩ لە دەرەوەن، نیوەی لە هەر لایەک: نزیکەی ⁦2.5%⁩ (بە وردی ⁦2.28%⁩).

ExerciseڕاهێنانCompare two resultsدوو ئەنجام بەراورد بکە

Aram runs 100 m in 12.4 s, where his age group is N(13.0,0.4)N(13.0, 0.4). Lana jumps 4.6 m, where her group is N(4.0,0.5)N(4.0, 0.5). Who did better relative to their group? (For running, a smaller time is better.)

ئارام ⁦100⁩ مەتر لە ⁦12.4⁩ چرکەدا ڕادەکات، کە گرووپی تەمەنەکەی N(13.0,0.4)N(13.0, 0.4)ـە. لانا ⁦4.6⁩ مەتر باز دەدات، کە گرووپەکەی N(4.0,0.5)N(4.0, 0.5)ـە. کێیان بە بەراورد بە گرووپەکەی باشتر بوو؟ (بۆ ڕاکردن کاتی کەمتر باشترە.)

Show answerوەڵامەکە پیشان بدە
zAram=12.4−13.00.4=−1.5,zLana=4.6−4.00.5=1.2z_{\text{Aram}} = \frac{12.4 - 13.0}{0.4} = -1.5, \qquad z_{\text{Lana}} = \frac{4.6 - 4.0}{0.5} = 1.2

Aram is 1.5 standard deviations faster than average, Lana 1.2 above average. Aram did better relative to his group.

ئارام ⁦1.5⁩ لە تێکڕا خێراترە، لانا ⁦1.2⁩ لە سەرووی تێکڕاوە. ئارام بە بەراورد بە گرووپەکەی باشتر بوو.

ExerciseڕاهێنانCoins and the bellدراو و زەنگوڵە

Toss a fair coin 100 times. Use the normal curve (with the continuity correction) to estimate P(X≥60)P(X \ge 60).

دراوێکی دادپەروەر ⁦100⁩ جار هەڵبدە. بە چەماوەی ئاسایی (بە ڕاستکردنەوەی بەردەوامی) P(X≥60)P(X \ge 60) بخەمڵێنە.

Show answerوەڵامەکە پیشان بدە
μ=50, σ=5,P(X≥60)≈P(Y>59.5)=P ⁣(Z>59.5−505)=P(Z>1.9)≈0.029\mu = 50,\ \sigma = 5, \qquad P(X \ge 60) \approx P(Y > 59.5) = P\!\left(Z > \tfrac{59.5 - 50}{5}\right) = P(Z > 1.9) \approx 0.029

Summaryپوختە

  • The normal distribution N(μ,σ)N(\mu, \sigma) is the symmetric bell curve; many measurements are close to it because many small independent effects add up (the Galton board).
  • μ\mu is where the peak stands (the mean, median and mode are all μ\mu) and σ\sigma sets the width; skewness 0 and excess kurtosis 0.
  • 68.27%, 95.45% and 99.73% of values lie within 1, 2 and 3 standard deviations of the mean (μ±σ\mu \pm \sigma, μ±2σ\mu \pm 2\sigma, μ±3σ\mu \pm 3\sigma).
  • z=(x−μ)/σz = (x - \mu)/\sigma measures a value in standard deviations and turns every normal into N(0,1)N(0, 1).
  • Probabilities are areas: NormalDist(mu, sigma).cdf, inv_cdf and zscore replace printed tables.
  • For large n, B(n,p)≈N(np,npq)B(n, p) \approx N(np, \sqrt{npq}).
  • N(μ,σ)N(\mu, \sigma) چەماوە هاوجێ و زەنگوڵەئاساکەیە؛ زۆر پێوانە لێی نزیکن چونکە زۆر کاریگەریی بچووکی سەربەخۆ کۆ دەبنەوە ().
  • μ\mu شوێنی لووتکەکەیە (، و هەموویان μ\muـن) و σ\sigma پانییەکەی دیاری دەکات؛ 0ـە و BBـی 0ـە.
  • ⁦68.27%⁩، ⁦95.45%⁩ و ⁦99.73%⁩ی نرخەکان لە ماوەی 1، 2 و 3 لە دەوری (μ±σ\mu \pm \sigma، μ±2σ\mu \pm 2\sigma، μ±3σ\mu \pm 3\sigma).
  • z=(x−μ)/σz = (x - \mu)/\sigma نرخێک بە دەپێوێت و هەموو دەکات بە N(0,1)N(0, 1).
  • ڕووبەرن: NormalDist(mu, sigma).cdf، inv_cdf و zscore جێگای خشتە چاپکراوەکان دەگرنەوە.
  • بۆ nnـی گەورە، B(n,p)≈N(np,npq)B(n, p) \approx N(np, \sqrt{npq}).

Looking back: from data to distributionsئاوڕدانەوە: لە دراوەوە بۆ دابەشبوونەکان

This lesson closes the main path of the course. You started by describing data with means, spreads and shapes; learned to count and to compute probabilities; turned outcomes into random variables; and found that the same ideas of centre and spread return as the expected value and the variance. The normal curve is where the two halves meet: the bell that real data often follow, and the model that probability predicts.

ئەم وانەیە ڕێگای سەرەکیی کۆرسەکە دادەخات. بە وەسفکردنی بە ، بڵاوبوونەوە و شێوە دەستت پێکرد؛ فێری ژماردن و ژمێرکاریی بوویت؛ کرد بە ؛ و بینیت هەمان بیرۆکەکانی ناوەند و بڵاوبوونەوە وەک و دەگەڕێنەوە. چەماوەی ئاسایی ئەو شوێنەیە کە دوو نیوەکە بەیەک دەگەن: ئەو زەنگوڵەیەی ڕاستەقینە زۆر جار بەدوایدا دەچێت و ئەو مۆدێلەی پێشبینیی دەکات.

The same ideas on both sides of the courseهەمان بیرۆکەکان لە هەردوو بەشی کۆرسەکەدا
Data (descriptive statistics) ()Model (probability)مۆدێل ()
Relative frequency of a value نرخێکProbability P(x)P(x) or density f(x)f(x) P(x)P(x) یان چڕی f(x)f(x)
Histogrampmf stems or density curveستوونەکانی یان چەماوەی چڕی
Mean xˉ\bar x xˉ\bar xExpected value E(X)=μE(X) = \mu E(X)=μE(X) = \mu
Variance s2s^2, σ2\sigma^2 s2s^2، σ2\sigma^2Var⁡(X)=E(X−μ)2\operatorname{Var}(X) = E(X - \mu)^2Var⁡(X)=E(X−μ)2\operatorname{Var}(X) = E(X - \mu)^2
Bell-shaped histogram زەنگوڵەئاساNormal distribution

The last chapter of the course, Probability at Work, uses these tools: Probability in Computing (speech recognition, predictive text, risk and random numbers) and a football prediction project.

دوایین بەشی کۆرسەکە، لە کاردا، ئەم ئامرازانە بەکار دەهێنێت: ئەگەر لە بواری کۆمپیوتەردا (، ، و ) و پرۆژەیەکی پێشبینیکردنی یاریی تۆپی پێ.

Videoڤیدیۆ

Watch a videoسەیری ڤیدیۆیەک بکە

A video that viewers liked a lot and praised in their comments, chosen for this lesson.ڤیدیۆیەک کە بینەران زۆریان پێ خۆش بووە و لە کۆمێنتەکانیاندا ستایشیان کردووە، بۆ ئەم وانەیە هەڵبژێردراوە.

The Normal Distribution, Clearly Explained!!!StatQuest with Josh Starmer · Englishئینگلیزی · 2.1M viewsبینین · 36K likesلایک

What a normal curve shows: most values near the mean, fewer far away; the mean sets the centre and the standard deviation the width.

چەماوەی چی پیشان دەدات: زۆربەی نرخەکان نزیکی ، کەمتریان دوورن؛ چەقەکە دیاری دەکات و پانییەکە.

Whole video (5 minutes): the bell curve, its centre and width, and how much of the data is near the mean.

هەموو ڤیدیۆکە (⁦5⁩ خولەک): چەماوە زەنگوڵەییەکە، چەق و پانییەکەی، هەروەها چەند لە نزیکی .

Lesson complete!وانەکە تەواو بوو!

Well done. Review the key terms, then go on to the next lesson.دەستخۆش. سەیرێکی زاراوە سەرەکییەکان بکەرەوە، پاشان بڕۆ بۆ وانەی داهاتوو.

Key termsزاراوە سەرەکییەکان

Next lessonوانەی داهاتوو

Probability in Computing: Speech, Predictive Text and Riskبەکارهێنانی ئەگەر لە بواری کۆمپیوتەردا: ئاخاوتن، پێشبینیی دەق و مەترسی

References and further readingسەرچاوەکان و خوێندنەوەی زیاتر

This lecture is a first edition. The Kurdish text and terminology are waiting for review by Kurdish IT teachers.ئەم وانەیە چاپی یەکەمە. دەقە کوردییەکە و زاراوەکانی چاوەڕێی پێداچوونەوەی مامۆستایانی کوردی بواری IT ن.