Chapterبەش 4 · Lectureوانە 4.8
Bayes' Theoremسەلمێنراوی بەیز
Turn a conditional probability around: partitions, the law of total probability, Bayes' formula with the course's three examples, and why base rates matter for medical tests and spam filters.
پێچەوانەکردنەوەی : ، ، بەیز لەگەڵ سێ نموونەکەی کۆرسەکە و بۆچی ڕێژەی بنەڕەت بۆ پشکنینی پزیشکی و گرنگە.
What you will learnچی فێر دەبیت
- Recognise a partition of the sample space and use the law of total probability.
- Use Bayes' theorem to find from and the priors.
- Solve the course's Examples 23–25 and check that posteriors add to 1.
- Explain the base rate fallacy with 1000 people and apply Bayes to a spam filter.
- بناسیتەوە و بەکار بهێنیت.
- بە لە و بدۆزیتەوە.
- نموونەکانی 23–25ی کۆرسەکە چارەسەر بکەیت و پشتڕاستی بکەیتەوە کە کۆی پارچەکان 1ـە.
- بە 1000 کەس ڕوون بکەیتەوە و بەیز لە بەکار بهێنیت.
Turning a question aroundپێچەوانەکردنەوەی پرسیارێک
A factory has three machines, A, B and C. Each machine makes some broken (defective) units, and the factory knows how often: for example, 3% of machine A's units are defective. That is a conditional probability: , the probability of defective, given that the unit came from A.
کارگەیەک سێ ئامێری هەیە: A، B و C. هەر ئامێرێک هەندێک بەرهەمی خراپ دروست دەکات و کارگەکە دەزانێت چەند جار: بۆ نموونە 3%ی بەرهەمەکانی ئامێری A خراپن. ئەمە : ، واتە خراپبوون بە مەرجێک بەرهەمەکە هی ئامێری A بێت.
Now an inspector picks up a defective unit. Which machine made it? The question has turned around: we know , but we want . These two are not the same number. Bayes' theorem is the rule that turns one into the other.
ئێستا پشکنەرێک بەرهەمێکی خراپ هەڵدەگرێت. کام ئامێر دروستی کردووە؟ پرسیارەکە پێچەوانە بووەتەوە: دەزانین، بەڵام ـمان دەوێت. ئەم دووانە هەمان ژمارە نین. ئەو یاسایەیە کە یەکێکیان دەکات بە ئەوی تر.
You need one idea from the previous lesson: , so (the multiplication rule). If this is new to you, read Conditional Probability, Independence and the Multiplication Rule first.
یەک بیرۆکەت لە وانەی پێشوو پێویستە: ، بۆیە (یاسای لێکدانی ئەگەر). گەر ئەمە بۆت نوێیە، سەرەتا ئەگەری مەرجدار، سەربەخۆیی و یاسای لێکدانی ئەگەر بخوێنەوە.
Cutting the sample space into piecesپارچەکردنی بۆشایی نموونە
Bayes' theorem starts from a partition of the sample space : events that do not overlap and together cover everything.
لە دەست پێ دەکات: کە یەکتر نابڕن و پێکەوە هەموو شتێک دادەپۆشن.
The two conditions: no two pieces share an outcome, and every outcome is in some piece. So every outcome lies in exactly one piece.
دوو مەرجەکە: هیچ دوو پارچەیەک هاوبەشیان نییە و هەموو لە پارچەیەکدایە. کەواتە هەر ڕێک لە یەک پارچەدایە.
Think of a city cut into neighbourhoods. Every house is in exactly one neighbourhood, and the neighbourhoods together make the whole city. If you want the number of tea houses in the city, you can count them neighbourhood by neighbourhood and add.
شارێک بهێنە بەرچاو کە کراوە بە گەڕەک. هەموو خانوویەک ڕێک لە یەک گەڕەکدایە و گەڕەکەکان پێکەوە هەموو شارەکە پێک دەهێنن. گەر ژمارەی چایخانەکانی شارەکەت بوێت، دەتوانیت گەڕەک بە گەڕەک بیانژمێریت و کۆیان بکەیتەوە.
Where the analogy stops workingسنووری ئەم نموونەیە
A real border street could belong to two neighbourhoods; in a partition that is not allowed — every outcome must belong to one piece only.
شەقامێکی سەر سنوور لەوانەیە سەر بە دوو گەڕەک بێت؛ لە ئەمە ڕێگە پێنەدراوە: هەر دەبێت تەنها سەر بە یەک پارچە بێت.
The law of total probabilityیاسای ئەگەری گشتی
How likely is it that a randomly chosen unit is defective at all? The defective units come from A, from B or from C. These three pieces of do not overlap, so their probabilities add, and each piece is a multiplication: the share of the machine times its defective rate.
چەندە دەگونجێت بەرهەمێکی هەڕەمەکی بە گشتی خراپ بێت؟ بەرهەمە خراپەکان یان لە A، یان لە B یان لە C دێن. ئەم سێ پارچەیەی یەکتر نابڕن، بۆیە کۆ دەکرێنەوە و هەر پارچەیەک لێکدانێکە: بەشی ئامێرەکە جارانی ڕێژەی بەرهەمی خراپی.
The law of total probability: add up the pieces of B over a partition. It is exactly the denominator of Bayes' formula.
: پارچەکانی B لە سەر کۆ بکەرەوە. ئەمە ڕێک بەیزە.
For the factory: 3.7% of all units are defective.
بۆ کارگەکە: 3.7%ی هەموو بەرهەمەکان خراپن.
Why does it work? : the pieces do not overlap, so the addition rule adds them, and the multiplication rule gives each piece: .
بۆچی کار دەکات؟ : پارچەکان یەکتر نابڕن، بۆیە یاسای کۆکردنەوەی ئەگەر کۆیان دەکاتەوە و هەر پارچەیەک دەدات: .
The law of total probability: split the sample space into pieces, add "share × rate" for each piece; worked with machines making faulty parts.
: بکە بە چەند پارچەیەک، بۆ هەر پارچەیەک «بەش × ڕێژە» کۆ بکەرەوە؛ بە نموونەی چەند ئامێرێک کە پارچەی خراپ دروست دەکەن.
Idea from 0:00, formal statement at 2:36, a machine-parts example at 4:26 (the same set-up as Example 23), tree diagram at 7:12.
بیرۆکەکە لە 0:00ـەوە، دەربڕینی فەرمی لە 2:36، نموونەی پارچەی ئامێرەکان لە 4:26 (هەمان بارودۆخی نموونەی (23))، لە 7:12.
Bayes' theoremسەلمێنراوی بەیز
Write the definition of conditional probability, then replace the top with the multiplication rule and the bottom with the law of total probability:
پێناسەی بنووسە، پاشان بە و بە بگۆڕە:
Bayes' theorem. Conditions: are a partition of (mutually exclusive, union ) and .
. مەرجەکان: پێک دەهێنن ( و یەکگرتنەکەیان ـە) و .
| Partبەش | Nameناو | In the factoryلە کارگەکەدا |
|---|---|---|
| prior probability: what you believe before the clue: ئەوەی پێش نیشانەکە باوەڕت پێیەتی | A makes 50% of all unitsA 50%ی هەموو بەرهەمەکان دروست دەکات | |
| how well piece explains the clueپارچەی چەندە نیشانەکە ڕوون دەکاتەوە | 3% of A's units are defective3%ی بەرهەمەکانی A خراپن | |
| posterior probability: what you believe after the clue: ئەوەی دوای نیشانەکە باوەڕت پێیەتی | a defective unit came from Aبەرهەمێکی خراپ هی A بووە |
In words: the new belief is the old belief times how well it explains the clue, shared out so that everything adds to 1. The denominator is the same for every ; it only rescales.
بە وشە: باوەڕی نوێ = باوەڕی کۆن جارانی ئەوەی چەندە نیشانەکە ڕوون دەکاتەوە، دابەشکراو بە شێوەیەک کە هەمووی بکاتە 1. بۆ هەموو ـیەک هەمان شتە؛ تەنها پێوانەکە ڕێک دەخاتەوە.
Example 23: which machine made it?نموونەی 23: کام ئامێر دروستی کردووە؟
Machines A, B and C make 50%, 30% and 20% of a factory's output. Their defective rates are 3%, 4% and 5%. A unit chosen at random is defective. What is the probability that machine A made it?
ئامێرەکانی A، B و C بە ڕیز 50%، 30% و 20%ی بەرهەمی کارگەیەک دروست دەکەن. ڕێژەی بەرهەمی خراپیان 3%، 4% و 5%ـە. بەرهەمێکی هەڕەمەکی هەڵدەبژێردرێت و خراپ دەردەچێت. ئەوە چەندە کە ئامێری A دروستی کردبێت؟
- Write what you knowئەوەی دەیزانیت بینووسە
Priors: . Defective rates: .
: . ڕێژەی خراپ: .
- The denominator: all defective unitsژێرەکە: هەموو بەرهەمە خراپەکان
(the law of total probability).
().
- Machine A's share of themبەشی ئامێری A لەوان
Divide A's strip by the total:
پارچەی A دابەش بکە بەسەر کۆی گشتیدا:
The same way, and . The three answers add to 1: the defective unit came from some machine.
بە هەمان شێوە، و . کۆی سێ وەڵامەکە 1ـە: بەرهەمە خراپەکە هی ئامێرێک بووە.
Example 24: when the clue tells you nothingنموونەی 24: کاتێک نیشانەکە هیچ ناڵێت
A class is 70% boys and 30% girls. In a maths exam 5% of the boys and 5% of the girls fail. A student chosen at random failed. What is the probability that the student is a girl? A boy?
پۆلێک 70% کوڕ و 30% کچە. لە تاقیکردنەوەیەکی بیرکاریدا 5%ی کوڕەکان و 5%ی کچەکان دەکەون. قوتابییەکی هەڕەمەکی هەڵدەبژێردرێت و کەوتووە. ئەوە چەندە کە کچ بێت؟ کوڕ بێت؟
: girl, : boy, : failed. The notes leave both answers as question marks; here they are.
بۆ کچ، بۆ کوڕ و بۆ کەوتوو. تێبینییەکان لە جیاتی هەردوو وەڵامەکە نیشانەی پرسیار دادەنێن؛ ئەمە وەڵامەکانن.
The posteriors are exactly the priors, 0.3 and 0.7. That is not an accident: both groups fail at the same rate, so 0.05 cancels from the top and the bottom. Failing tells you nothing about who the student is: the events “girl” and “failed” are independent.
ڕێک هەمان : 0.3 و 0.7. ئەمە ڕێکەوت نییە: هەردوو کۆمەڵە بە هەمان ڕێژە دەکەون، بۆیە 0.05 لە و لادەچێت. کەوتن هیچ دەربارەی ئەوەی قوتابییەکە کێیە ناڵێت: «کچ» و «کەوتوو» ڕووداوی سەربەخۆن.
Example 25: three boxes of ballsنموونەی 25: سێ سندووقی تۆپ
Box A holds 3 red and 5 white balls, box B 2 red and 1 white, box C 2 red and 3 white. A box is chosen at random and one ball is drawn from it. The ball is red. What is the probability that it came from box A?
سندووقی A 3 تۆپی سوور و 5 سپیی تێدایە، سندووقی B 2 سوور و 1 سپی، سندووقی C 2 سوور و 3 سپی. سندووقێک بە هەڕەمەکی هەڵدەبژێردرێت و تۆپێکی لێ دەردەهێنرێت. تۆپەکە سوورە. ئەوە چەندە کە لە سندووقی A هاتبێت؟
- Priors and likelihoodsئەگەری پێشینە و ڕێژەکان
Each box is chosen with probability . Red in each box: .
هەر سندووقێک بە هەڵدەبژێردرێت. سوور لە هەر سندووقێکدا: .
- Bayesبەیز
The is in every term, so it cancels:
لە هەموو بەشێکدا هەیە، بۆیە لادەچێت:
- Check with countsبە ژماردن پشتڕاستی بکەرەوە
Imagine 360 draws, 120 from each box. Red balls: 45 from A, 80 from B, 48 from C, 173 in all. Of the 173 red balls, 45 came from A.
360 جار دەرهێنان بهێنە بەرچاو، 120 جار لە هەر سندووقێک. تۆپی سوور: 45 لە A، 80 لە B، 48 لە C، کۆی گشتی 173. لە 173 تۆپە سوورەکە 45یان لە A هاتوون.
A positive test: why base rates matterپشکنینێکی ئەرێنی: بۆچی ڕێژەی بنەڕەت گرنگە
A condition affects 1% of people. A screening test finds it in 90% of the people who have it (its sensitivity), but it also says “positive” for 10% of healthy people (a false positive rate of 10%). Your test is positive. How likely is it that you have the condition?
نەخۆشییەک 1%ی خەڵک دەگرێتەوە. پشکنینێکی سەرەتایی لە 90%ی ئەو کەسانەدا دەیدۆزێتەوە کە هەیانە ()، بەڵام بۆ 10%ی کەسانی ساغیش دەڵێت «ئەرێنی» (ڕێژەی 10%ـە). ئەنجامی پشکنینەکەت ئەرێنییە. چەندە دەگونجێت نەخۆشییەکەت هەبێت؟
Why a positive result from a good test can still mean a low chance of disease: count 1000 people, sensitivity and false positives.
بۆچی کاتێک پشکنینێکی باش ئەرێنی دەردەچێت، هێشتا دەکرێت نەخۆشی کەم بێت: 1000 کەس بژمێرە، لەگەڵ و .
Plays 0:00-5:53, the paradox itself with 1% prevalence; the later "Bayes factor" part is beyond this lesson.
لە 0:00 تا 5:53 پەخش دەبێت: خودی پارادۆکسەکە بە ڕێژەی تووشبوونی 1%؛ بەشی دواتری «Bayes factor» لە ئاستی ئەم وانەیە بەرزترە.
A positive test: why base rates matterپشکنینێکی ئەرێنی: بۆچی ڕێژەی بنەڕەت گرنگە
Think of 1000 people1000 کەس بهێنە بەرچاو
Percentages hide the sizes of the groups. Count people instead (natural frequencies): of 1000 people, 10 have the condition and 990 do not. The test finds 9 of the 10. It also flags 10% of the 990 healthy people: 99. So people get a positive result, and only 9 of them are sick.
قەبارەی کۆمەڵەکان دەشارنەوە. لە جیاتیان کەسەکان بژمێرە (): لە 1000 کەس، 10 کەس نەخۆشییەکەیان هەیە و 990 کەس نییانە. پشکنینەکە 9 لە 10 کەسەکە دەدۆزێتەوە. هەروەها 10%ی 990 کەسە ساغەکەش ئەرێنی دەکات: 99 کەس. کەواتە کەس ئەنجامی ئەرێنی وەردەگرن و تەنها 9یان نەخۆشن.
Bayes' theorem gives the same answer as counting. : has the condition, : healthy, : positive result.
هەمان وەڵامی ژماردن دەدات. بۆ نەخۆش، بۆ ساغ و بۆ ئەنجامی ئەرێنی.
A positive test: why base rates matterپشکنینێکی ئەرێنی: بۆچی ڕێژەی بنەڕەت گرنگە
Watch the 1000 peopleسەیری 1000 کەسەکە بکە
The animation shows the same 1000 people as dots. Watch how few of the positive results belong to sick people.
ئەنیمەیشنەکە هەمان 1000 کەس وەک خاڵ نیشان دەدات. سەیر بکە چەند کەم لە ئەنجامە ئەرێنییەکان هی کەسانی نەخۆشن.


This trap has a name: the base rate fallacy, judging only by the test's accuracy and forgetting how rare the condition is (its base rate, the prior 1%). A small share of a big healthy group can easily outnumber a big share of a small sick group.
ئەم تەڵەیە ناوی هەیە: ، واتە تەنها بە وردیی پشکنینەکە بڕیار بدەیت و لەبیرت بچێت نەخۆشییەکە چەندە دەگمەنە (واتە ڕێژەی بنەڕەت، 1%). بەشێکی بچووک لە کۆمەڵەیەکی گەورەی ساغ بە ئاسانی لە بەشێکی گەورەی کۆمەڵەیەکی بچووکی نەخۆش زیاتر دەبێت.
Ignoring how rare something is in general (the base rate) when judging evidence, so a positive test looks more convincing than it is.
پشتگوێخستنی ئەوەی شتێک بە گشتی چەند دەگمەنە (ڕێژەی بنەڕەت) لە کاتی هەڵسەنگاندنی بەڵگەدا، بۆیە ئەنجامێکی ئەرێنیی پشکنین لەوەی هەیە بەهێزتر دەردەکەوێت.
A positive test: why base rates matterپشکنینێکی ئەرێنی: بۆچی ڕێژەی بنەڕەت گرنگە
A second test, and a negative resultپشکنینی دووەم و ئەنجامی نەرێنی
The 108 people with a positive result take a second, independent test with the same rates. Now the prior is , not 1%: yesterday's posterior is today's prior.
ئەو 108 کەسەی ئەنجامیان ئەرێنی بووە پشکنینێکی دووەمی سەربەخۆ دەکەن بە هەمان ڕێژەکان. ئێستا ـە، نەک 1%: دوێنێ ئەمڕۆیە.
In counts: of the 108, the 9 sick give 8.1 positives on average and the 99 healthy give 9.9, so of the new positives are sick.
بە ژمارە: لە 108 کەسەکە، 9 نەخۆشەکە بە تێکڕا 8.1 ئەرێنی دەدەن و 99 ساغەکە 9.9، کەواتە ـی ئەرێنییە نوێیەکان نەخۆشن.
A negative first result is very reassuring: of the 892 negatives (1 sick + 891 healthy), only 1 is sick, so . The share of healthy people that the test correctly clears, , is its specificity.
ئەنجامی نەرێنی لە یەکەم پشکنیندا زۆر دڵنیاکەرەوەیە: لە 892 نەرێنییەکە (1 نەخۆش + 891 ساغ)، تەنها 1 نەخۆشە، بۆیە . ئەو بەشەی کەسانی ساغ کە پشکنینەکە بە دروستی نەرێنییان دەکات، ، .
Bayes in your inbox: spam filtersبەیز لە ئیمەیڵەکەتدا: فلتەرەکانی سپام
An email program learns from old mail: 30% of the messages are spam. The word “prize” appears in 20% of spam messages but in only 1% of normal ones. A new message contains “prize”. Is it spam?
بەرنامەیەکی لە نامە کۆنەکانەوە فێر دەبێت: 30%ی نامەکان . وشەی «خەڵات» لە 20%ی نامەکانی هەیە، بەڵام تەنها لە 1%ی نامە ئاساییەکاندا. نامەیەکی نوێ وشەی «خەڵات»ـی تێدایە. ؟
: spam, : the word appears. In counts: of 1000 messages, 300 spam (60 with the word) and 700 normal (7 with the word); 60 of the 67 are spam.
بۆ و بۆ بوونی وشەکە. بە ژمارە: لە 1000 نامە، 300 (60یان وشەکەیان تێدایە) و 700 ئاسایی (7یان وشەکەیان تێدایە)؛ 60 لە 67 نامەکە .
Bayes in your inbox: spam filtersبەیز لە ئیمەیڵەکەتدا: فلتەرەکانی سپام
Many words at once: naive Bayesزۆر وشە پێکەوە: پۆلێنکەری بەیزی ساکار
A real filter looks at many words at once. A naive Bayes classifier multiplies the evidence of each word as if the words were independent (that simplification is why it is called “naive”), then moves messages above a threshold into the spam folder. It is one of the oldest tools of machine learning: it learns its numbers from labelled examples.
ڕاستەقینە هاوکات سەیری زۆر وشە دەکات. بەڵگەی هەر وشەیەک لێک دەدات وەک ئەوەی وشەکان سەربەخۆ بن (ئەم سادەکردنەوەیە هۆی ناوی «ساکار»ـە)، پاشان ئەو نامانەی لە سنوورێک تێدەپەڕن دەخاتە بوخچەی . یەکێکە لە کۆنترین ئامرازەکانی فێربوونی ئامێر: ژمارەکانی لە نموونەی نیشانەکراوەوە فێر دەبێت.
How a naive Bayes spam filter scores a message from word probabilities, and why it is called "naive".
لە جۆری چۆن بە وشەکان نمرە دەداتە نامەیەک، هەروەها بۆچی پێی دەوترێت «ساکار».
Plays 1:08-14:00: word probabilities in normal and spam messages, classifying two messages, pseudocounts, and why naive Bayes is naive (12:35); stops before the closing self-promotion.
لە 1:08 تا 14:00 پەخش دەبێت: وشەکان لە نامەی ئاسایی و ، دوو نامە، ژمارەی زیادکراوی گریمانەیی (pseudocounts)، هەروەها بۆچی پێی دەوترێت «ساکار» (12:35)؛ پێش ڕیکلامی کۆتایی بۆ کارەکانی خۆی ڕادەوەستێت.
Common mistakesهەڵە باوەکان
- Swapping the condition. does not mean . Always ask: which group am I looking inside?
- Forgetting the base rate. A very accurate test for a very rare condition still gives mostly false alarms. Put the prior into the formula.
- A partition with gaps or overlaps. The pieces must cover every case once. If a fourth machine exists, the denominator is wrong.
- The wrong numerator. The numerator is the one term of the denominator that belongs to the piece you ask about: , never .
- Not checking the total. The posteriors of all the pieces must add to 1 (; the tiny gap is rounding). If they do not, something is wrong.
- گۆڕینەوەی مەرجەکە. واتای نییە. هەمیشە بپرسە: لە ناو کام کۆمەڵەدا دەڕوانم؟
- لەبیرکردنی ڕێژەی بنەڕەت. پشکنینێکی زۆر ورد بۆ نەخۆشییەکی زۆر دەگمەن هێشتا زۆربەی ئاگادارکردنەوەکانی هەڵەن. بخەرە ناو .
- بە بۆشایی یان یەکتربڕینەوە. پارچەکانی دەبێت هەموو حاڵەتێک یەک جار دابپۆشن. گەر ئامێری چوارەم هەبێت، هەڵەیە.
- هەڵە. ئەو یەک بەشەی کە هی ئەو پارچەیەیە پرسیاری دەربارە دەکەیت: ، هەرگیز نا.
- پشتڕاستنەکردنەوەی کۆکە. کۆی هەموو پارچەکان دەبێت 1 بێت (؛ جیاوازییە بچووکەکە لە خڕکردنەوەوە دێت). گەر وا نەبوو، شتێک هەڵەیە.
Exercisesڕاهێنانەکان
A shop buys 70% of its bread from bakery X and 30% from bakery Y. 2% of X's loaves and 5% of Y's loaves are stale. A customer gets a stale loaf. What is the probability that it came from Y?
دوکانێک 70%ی نانەکەی لە نانەواخانەی X و 30%ی لە نانەواخانەی Y دەکڕێت. 2%ی نانەکانی X و 5%ی نانەکانی Y وشکن. کڕیارێک نانێکی وشکی بەردەکەوێت. ئەوە چەندە کە لە Y هاتبێت؟
Hintئاماژە
First find the share of stale bread with the law of total probability.
سەرەتا بە بەشی نانی وشک بدۆزەوە.
Show answerوەڵامەکە پیشان بدە
Y supplies less bread, but its higher stale rate makes it the more likely source (51.7% against 48.3% for X).
Y نانی کەمتر دەدات، بەڵام چونکە ڕێژەی نانی وشکی بەرزترە، ئەوەی سەرچاوەکە بێت زیاترە (51.7% بەرامبەر 48.3% بۆ X).
A bag holds two coins: a fair one and one with heads on both sides. You take one at random and toss it: heads. (a) What is the probability that it is the two-headed coin? (b) You toss the same coin again: heads again. What is the probability now?
توورەکەیەک دوو دراوی تێدایە: یەکێکی دادپەروەر و یەکێک کە هەردوو ڕووی شێرە. بە هەڕەمەکی یەکێکیان دەردەهێنیت و هەڵیدەدەیت: شێر. (أ) ئەوە چەندە کە دراوە دوو شێرەکە بێت؟ (ب) هەمان دراو دووبارە هەڵدەدەیتەوە: دیسان شێر. ئێستا چەندە؟
Show answerوەڵامەکە پیشان بدە
: the two-headed coin. Each new head is more evidence, so the probability climbs: .
بۆ دراوە دوو شێرەکە. هەر شێرێکی نوێ بەڵگەیەکی زیاترە، بۆیە بەرز دەبێتەوە: .
In Example 25 (boxes A, B, C, chosen at random), the ball drawn is red. Find the probability that it came from box C, and check that the three answers add to 1.
لە نموونەی 25دا (سندووقەکانی A، B، C، بە هەڕەمەکی هەڵدەبژێردرێن)، تۆپە دەرهێنراوەکە سوورە. ئەوە بدۆزەوە کە لە سندووقی C هاتبێت و پشتڕاستی بکەرەوە کە کۆی سێ وەڵامەکە 1ـە.
Show answerوەڵامەکە پیشان بدە
Use the same test as before (sensitivity 90%, false positive rate 10%), but now 10% of the people have the condition. What is ? Use 1000 people.
هەمان پشکنینی پێشوو بەکار بهێنە ( 90%، ڕێژەی 10%)، بەڵام ئێستا 10%ی خەڵک نەخۆشییەکەیان هەیە. چەندە؟ 1000 کەس بەکار بهێنە.
Show answerوەڵامەکە پیشان بدە
100 people have it and 90 of them test positive; 900 are healthy and 90 of them test positive. So 90 of the 180 positives are sick: . The same test is much more useful when the condition is more common.
100 کەس نەخۆشییەکەیان هەیە و 90یان ئەنجامیان ئەرێنییە؛ 900 کەس ساغن و 90یان ئەنجامیان ئەرێنییە. کەواتە 90 لە 180 ئەرێنییەکە نەخۆشن: . هەمان پشکنین کاتێک نەخۆشییەکە باوترە زۆر بەسوودترە.
Summaryکورتە
- A partition cuts into pieces that do not overlap and cover everything.
- Law of total probability: .
- Bayes' theorem: : the prior times how well it explains the clue, rescaled so that everything adds to 1.
- Examples: machine A made a defective unit with probability 0.405; equal failure rates leave the prior unchanged (0.3); a red ball came from box A with probability .
- Base rates matter: with a rare condition most positive results are false alarms (9 of 108). Counting 1000 people makes this easy to see.
- Spam filters (naive Bayes) use the same formula, word by word.
- () دەکات بە پارچەگەلێک کە یەکتر نابڕن و هەموو شتێک دادەپۆشن.
- : ، واتە کۆکردنەوەی پارچەکانی B.
- : : جارانی ئەوەی چەندە نیشانەکە ڕوون دەکاتەوە، ڕێکخراو بە شێوەیەک کە کۆیان 1 بێت.
- نموونەکان: ئامێری A بە 0.405 بەرهەمە خراپەکەی دروست کردووە؛ ڕێژەی کەوتنی یەکسان ناگۆڕێت (0.3)؛ تۆپە سوورەکە بە لە سندووقی A هاتووە.
- ڕێژەی بنەڕەت گرنگە: لە نەخۆشییەکی دەگمەندا زۆربەی ئەنجامە ئەرێنییەکان ئاگادارکردنەوەی هەڵەن (9 لە 108). ژماردنی 1000 کەس ئەمە ئاسان نیشان دەدات.
- () هەمان بەکار دەهێنن، وشە بە وشە.
Videoڤیدیۆ
Watch a videoسەیری ڤیدیۆیەک بکە
A video that viewers liked a lot and praised in their comments, chosen for this lesson.ڤیدیۆیەک کە بینەران زۆریان پێ خۆش بووە و لە کۆمێنتەکانیاندا ستایشیان کردووە، بۆ ئەم وانەیە هەڵبژێردراوە.
Bayes' theorem as a picture: start from a prior, keep only the cases that fit the evidence, and read off the new probability.
وەک وێنە: لە دەست پێبکە، تەنها ئەو حاڵەتانە بهێڵەوە کە لەگەڵ بەڵگەکە دەگونجێن، پاشان نوێیەکە () بخوێنەوە.
Example from 0:00, the formula from 4:09, making it intuitive with area from 10:13.
نموونەیەک لە 0:00ـەوە، لە 4:09ـەوە، تێگەیشتنی ئاسان بە ڕووبەر لە 10:13ـەوە.
Lesson complete!وانەکە تەواو بوو!
Well done. Review the key terms, then go on to the next lesson.دەستخۆش. سەیرێکی زاراوە سەرەکییەکان بکەرەوە، پاشان بڕۆ بۆ وانەی داهاتوو.
Key termsزاراوە سەرەکییەکان
Random Variables and Probability Mass Functionsگۆڕاوە هەڕەمەکییەکان و نەخشەی بارستەی ئەگەر
Related lecturesوانە پەیوەندیدارەکان
References and further readingسەرچاوەکان و خوێندنەوەی زیاتر
- MIT 18.05 Introduction to Probability and Statistics (Spring 2022), Reading 3: Conditional Probability, Independence and Bayes' Theorem (law of total probability, trees, the base rate fallacy)
- MIT 18.05 (Spring 2022), course calendar: class 3 conditional probability and Bayes, classes 11–13 Bayesian updating
This lecture is a first edition. The Kurdish text and terminology are waiting for review by Kurdish IT teachers.ئەم وانەیە چاپی یەکەمە. دەقە کوردییەکە و زاراوەکانی چاوەڕێی پێداچوونەوەی مامۆستایانی کوردی بواری IT ن.