550 likes | 955 Views
พื้นฐานความน่าจะเป็น Basic Probability. Goals. วัตถุประสงค์การเรียนรู้ : นิยามความน่าจะเป็นและอธิบายหลักการเบื้องต้นได้ ใช้ contingency tables ในการวิเคราะห์ได้ เข้าใจและสามารถประยุกต์ใช้กฏเบื้องต้นของความน่าจะเป็นได้ คำนวณความน่าจะเป็นแบบมีเงื่อนไขได้
E N D
พื้นฐานความน่าจะเป็น Basic Probability
Goals วัตถุประสงค์การเรียนรู้: • นิยามความน่าจะเป็นและอธิบายหลักการเบื้องต้นได้ • ใช้ contingency tables ในการวิเคราะห์ได้ • เข้าใจและสามารถประยุกต์ใช้กฏเบื้องต้นของความน่าจะเป็นได้ • คำนวณความน่าจะเป็นแบบมีเงื่อนไขได้ • เข้าใจเหตุการณ์ที่เป็นอิสระและไม่เป็นอิสระต่อกัน • เข้าใจและประยุกต์ใช้กฏของเบย์ (Bayes’ Theorem) สำหรับความน่าจะเป็นแบบมีเงื่อนไข
Sample Spaces and Events การทดลองแบบสุ่ม (Random Experiments)
Sample Spaces and Events การทดลองแบบสุ่ม (Random Experiments) Definition ระบบหรือการทดลองใด ๆ ที่ผลลัพธ์จากการดำเนินการแต่ละครั้งมีความแตกต่างกัน ทั้ง ๆ ที่ดำเนินการหรือทำการทดลองซ้ำลักษณะเดิม
Sample Spaces and Events Sample Spaces Definition
Sample Space ตัวอย่าง การโยนลูกเต๋า 1 ลูก 1 ครั้ง จะมีผลลัพธ์ที่เป็นไปได้ทั้งหมด 6 แบบ การเลือกไพ่ 1 ใบ จากไพ่ 1 สำรับ มีผลลัพธ์ที่เป็นไปได้ 52 แบบไ
Sample Spaces and Events ตัวอย่างการนิยาม Sample Space กระบวนการฉีดขึ้นรูปพลาสติก ต้องมีการควบคุมความหนาของชิ้นงานที่ฉีดขึ้นรูป พบว่าความของงานแต่ละชิ้นไม่เท่ากันขึ้นอยู่กับปัจจัยต่าง ๆ เช่นวิธีการทำงาน เครื่องจักร โมล และความละเอียดของเครื่องมือวัด ขนาดความหนาของชิ้นงานที่เป็นไปได้ทั้งหมด สามารถนิยามได้ดังนี้
Sample Spaces Tree Diagrams • Sample spaces สามารถแสดงได้ด้วย tree diagrams. • เมื่อsample space สามารถวิเคราะห์แยกเป็นขั้น ๆ ได้ ถ้าแทนจำนวนทางเลือกของผลลัพธ์ที่เป็นไปได้ในขั้นที่ 1 ด้วย n1จะแทนแต่ละทางเลือกได้ด้วย กิ่งของต้นไม้ n1กิ่ง • ถ้าแทนจำนวนทางเลือกของผลลัพธ์ที่เป็นไปได้ในขั้นที่ 2 ด้วย n2จะแทนแต่ละทางเลือกได้ด้วย กิ่งของต้นไม้ n2กิ่ง • …………………….
Sample Spaces Example 2 การส่งข้อความผ่านระบบ 3 ข้อความต่อเนื่อง คุณลักษณะที่สนใจคือแต่ละข้อความมาถึง Late และ On time จะได้
Events • Simple event • เหตุการณ์จาก Sample Space ที่มีเพียงคุณลักษณะเดียว • เช่นไพ่ red card จากไพ่ 1 สำรับ • Complement ของเหตุการณ์ A (แทนด้วย A’) • ผลลัพธ์ทั้งหมดที่ไม่อยู่ในเหตุการณ์ A • เช่นไพ่ทั้งหมดที่ไม่ใช่หน้า diamonds • เหตุการณ์ร่วม (Joint event) • เหตุการณ์ใด ๆ ที่ต้องอธิบายด้วยคุณลักษณะ 2 อย่างพร้อม ๆ กัน • เช่นไพ่ aceที่เป็นสี แดง จากไพ่สำรับหนึ่ง
Visualizing Events • Contingency Tables • Tree Diagrams Ace Not Ace Total Black 2 24 26 Red 2 24 26 Total 4 48 52 Sample Space 2 24 2 24 Ace Sample Space Black Card Not an Ace Full Deck of 52 Cards Ace Red Card Not an Ace
Mutually Exclusive Events • Mutually exclusive events • เหตุการณ์ที่จะไม่เกิดร่วมกัน example: A = ไพ่ Queen สีแดง; B = ไพ่ Queen สีดำ • Events A และ B เป็นเหตุการณ์ mutually exclusive
Collectively Exhaustive Events • เหตุการณ์รวม • เหตุการณ์ใด ๆ จะต้องเกิดขึ้น • เชตของเหตุการณ์ทั้งหมดจะครอบคลุม Sample Space example: จากเหตุการณ์ต่อไปนี้ A = Ace B = สีดำ C = ข้าวหลามตัด D = โพธิ์แดง • Events A, B, C และ D เป็นเหตุการณ์ที่ collectively exhaustive (แต่ไม่ mutually exclusive) • Events B, C และ D เป็นเหตุการณ์ที่ collectively exhaustive
Sample Spaces and Events Basic Set Operations
Sample Spaces and Events Venn Diagrams
Sample Spaces and Events Definition
Probability • การประเมินเป็นตัวเลขเกี่ยวกับโอกาสการเกิดขึ้นของเหตุการณ์ที่สนใจใด ๆ • มีค่าระหว่าง 0ถึง 1 • ผลรวมของเหตุการณ์ mutually exclusive และ collectively exhaustive ทั้งหมดเท่ากับ 1 1 Certain 0 ≤ P(A) ≤ 1 For any event A .5 0 Impossible เมื่อ A, B, and C และ mutually exclusive และcollectively exhaustive
Assessing Probability • Approaches to assessing the probability of un uncertain event: 1. a priori classical probability 2. empirical classical probability
2-2 Interpretations of Probability Definition The notations may varies depend on the types of books
Interpretations of Probability Example 3
Interpretations of Probability คุณสมบัติของความน่าจะเป็น
Addition Rules Addition Rule:กฏการบวก Mutually Exclusive Events
Addition Rules Three or More Events
Addition Rules Venn diagram of four mutually exclusive events
Computing Probabilities • The probability of a joint event, A and B: • Computing a marginal (or simple) probability: • Where B1, B2, …, Bk are k mutually exclusive and collectively exhaustive events
Joint Probability Example P(Red and Ace) Color Type Total Red Black 2 2 4 Ace 24 24 48 Non-Ace 26 26 52 Total
Marginal Probability Example P(Ace) Color Type Total Red Black 2 2 4 Ace 24 24 48 Non-Ace 26 26 52 Total
Joint Probabilities Using Contingency Table Event Total B1 B2 Event A1 P(A1 and B1) P(A1 and B2) P(A1) P(A2 and B2) A2 P(A2) P(A2 and B1) 1 Total P(B1) P(B2) Marginal (Simple) Probabilities Joint Probabilities
General Addition Rule Example P(Red or Ace) = P(Red) +P(Ace) - P(Redand Ace) = 26/52 + 4/52 - 2/52 = 28/52 Don’t count the two red aces twice! Color Type Total Red Black 2 2 4 Ace 24 24 48 Non-Ace 26 26 52 Total
Conditional Probability • สมมติในการผลิตชิ้นส่วน มีเหตุการณ์ที่สนใจคือ Dเหตุการณ์ที่ชิ้นส่วนบกพร่อง และ Fเหตุการณ์ที่ชิ้นส่วนมีรอยขูดขีดที่ผิว • ถ้าวิศวกรสนใจเหตุการณ์ที่ชิ้นส่วนบกพร่องเนื่องจากมีรอยขูดขีดที่ผิว (E) • จะแทนความน่าจะเป็นของ Eด้วย P(D|F) อ่านว่าความน่าจะเป็นแบบมีเงื่อนไขของ D given F • และแปรความหมายว่าความน่าจะเป็นที่ชิ้นส่วนจะบกพร่องเมื่อมีรอยขูดขีดที่ผิว
Conditional Probability Conditional probabilities for parts with surface flaws
Conditional Probability Definition
Computing Conditional Probabilities • A conditional probability is the probability of one event, given that another event has occurred: The conditional probability of A given that B has occurred The conditional probability of B given that A has occurred Where P(A and B) = joint probability of A and B P(A) = marginal probability of A P(B) = marginal probability of B
Conditional Probability Example • Of the cars on a used car lot, 70% have air conditioning (AC) and 40% have a CD player (CD). 20% of the cars have both. • What is the probability that a car has a CD player, given that it has AC ? i.e., we want to find P(CD | AC)
Conditional Probability Example (continued) • Of the cars on a used car lot, 70% have air conditioning (AC) and 40% have a CD player (CD). 20% of the cars have both. CD No CD Total .2 .5 .7 AC .2 .1 No AC .3 .4 .6 1.0 Total
Conditional Probability Example (continued) • Given AC, we only consider the top row (70% of the cars). Of these, 20% have a CD player. 20% of 70% is about 28.57%. CD No CD Total .2 .5 .7 AC .2 .1 No AC .3 .4 .6 1.0 Total
Using Decision Trees P(AC and CD) = .2 Given AC or no AC: Has CD P(AC)= .7 Does not have CD P(AC and CD’) = .5 Has AC All Cars Does not have AC P(AC’ and CD) = .2 Has CD P(AC’)= .3 Does not have CD P(AC’ and CD’) = .1
Using Decision Trees (continued) P(CD and AC) = .2 Given CD or no CD: Has AC P(CD)= .4 Does not have AC P(CD and AC’) = .2 Has CD All Cars Does not have CD P(CD’ and AC) = .5 Has AC P(CD’)= .6 Does not have AC P(CD’ and AC’) = .1
Statistical Independence • Two events are independent if and only if: • Events A and B are independent when the probability of one event is not affected by the other event
Multiplication Rules • Multiplication rule for two events A and B: Note:If A and B are independent, then and the multiplication rule simplifies to
Total Probability Rules Partitioning an event into two mutually exclusive subsets. Partitioning an event into several mutually exclusive subsets.
Total Probability Rules Example 4
Total Probability Rules multiple events
Independence Definition
Independence Definition