พื้นฐานความน่าจะเป็น basic probability

Post on 30-Dec-2015

90 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

พื้นฐานความน่าจะเป็น Basic Probability. Goals. วัตถุประสงค์การเรียนรู้ : นิยามความน่าจะเป็นและอธิบายหลักการเบื้องต้นได้ ใช้ contingency tables ในการวิเคราะห์ได้ เข้าใจและสามารถประยุกต์ใช้กฏเบื้องต้นของความน่าจะเป็นได้ คำนวณความน่าจะเป็นแบบมีเงื่อนไขได้ - PowerPoint PPT Presentation

TRANSCRIPT

พื้��นฐานความนาจะเป็�น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

ต้�วอยาง

การโยนล3กเต้4า 1 ล3ก 1 คร��ง จะม+ผลล�พื้ธิ#ที่+,เป็�นไป็ได้�ที่��งหมด้ 6 แบบ

การเล�อกไพื้ 1 ใบ จากไพื้ 1 ส)าร�บ ม+ผลล�พื้ธิ#ท��เป�นไปได� 52 แบบไ

Sample Spaces and Events

ต�วัอย�างการน!ยาม Sample Space

กระบวันการฉี�ดขึ้$%นร�ปพลาสต!ก ต�องม�การค์วับค์�มค์วัามหนาขึ้องชิ้!%นงานท��ฉี�ดขึ้$%นร�ป พบวั�าค์วัามขึ้องงานแต�ละชิ้!%นไม�เท�าก�นขึ้$%นอย��ก�บป)จจ�ยต�าง ๆ เชิ้�นวั!ธี�การท-างาน เค์ร.�องจ�กร

โมล และค์วัามละเอ�ยดขึ้องเค์ร.�องม.อวั�ด ขึ้นาดค์วัามหนาขึ้องชิ้!%นงานท��เป�นไปได�ท�%งหมดสามารถุน!ยามได�ด�งน�%

Example (continued)

Example (continued)

Example (continued)

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’) ผลล�พื้ธิ#ที่��งหมด้ที่+,ไมอย3ในเหต้'การณ# A เช้น ไพื้ที่��งหมด้ที่+,ไมใช้หน�า diamonds

เหต้'การณ#รวม (Joint event) เหต้'การณ#ใด้ ๆ ที่+,ต้�องอธิ�บายด้�วยค'ณล�กษณะ 2 อยางพื้ร�อม

ๆ ก�น เช้น ไพื้ ace ที่+,เป็�นส+ แดง จากไพื้ส)าร�บหน5,ง

Visualizing Events

Contingency Tables

Tree Diagrams

Red 2 24 26

Black 2 24 26

Total 4 48 52

Ace Not Ace Total

Full Deck of 52 Cards

Red Card

Black Card

Not an Ace

Ace

Ace

Not an Ace

Sample Space

Sample Space2

24

2

24

Mutually Exclusive Events

Mutually exclusive events เหต้'การณ#ที่+,จะไมเก�ด้รวมก�น

example:

A = ไพื้ Queen ส+แด้ง; B = ไพื้ Queen ส+ด้)า

Events A และ B เป็�นเหต้'การณ# mutually exclusive

Collectively Exhaustive Events

เหต้'การณ#รวม เหต้'การณ#ใด้ ๆ จะต้�องเก�ด้ข้5�น เช้ต้ข้องเหต้'การณ#ที่��งหมด้จะครอบคล'ม Sample Space

example: จากเหต้'การณ#ต้อไป็น+� A = Ace B = ส+ด้)า

C = ข้�าวหลามต้�ด้ D = โพื้ธิ�6แด้ง

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

การป็ระเม�นเป็�นต้�วเลข้เก+,ยวก�บโอกาสการเก�ด้ข้5�นข้องเหต้'การณ#ที่+,สนใจใด้ ๆ

ม+คาระหวาง 0 ถ5ง 1

ผลรวมข้องเหต้'การณ# mutually exclusive และ collectively exhaustive ที่��งหมด้เที่าก�บ 1

Certain

Impossible

.5

1

0

0 ≤ P(A) ≤ 1 For any event A

1P(C)P(B)P(A) เม�,อ 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

outcomeselementaryofnumbertotal

occurcaneventthewaysofnumber

T

Xoccurrenceofyprobabilit

observedoutcomesofnumbertotal

observedoutcomesfavorableofnumberoccurrenceofyprobabilit

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

Addition Rules

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

outcomeselementaryofnumbertotal

BandAsatisfyingoutcomesofnumber)BandA(P

)BdanP(A)BandP(A)BandP(AP(A) k21

Joint Probability Example

P(Red and Ace)

BlackColor

Type Red Total

Ace 2 2 4

Non-Ace 24 24 48

Total 26 26 52

52

2

cards of number total

ace and red are that cards of number

Marginal Probability Example

P(Ace)

BlackColor

Type Red Total

Ace 2 2 4

Non-Ace 24 24 48

Total 26 26 52

52

4

52

2

52

2)BlackandAce(P)dReandAce(P

P(A1 and B2) P(A1)

TotalEvent

Joint Probabilities Using Contingency Table

P(A2 and B1)

P(A1 and B1)

Event

Total 1

Joint Probabilities Marginal (Simple) Probabilities

A1

A2

B1 B2

P(B1) P(B2)

P(A2 and B2) P(A2)

General Addition Rule Example

P(Red or Ace) = P(Red) +P(Ace) - P(Red and Ace)

= 26/52 + 4/52 - 2/52 = 28/52Don’t count the two red aces twice!

BlackColor

Type Red Total

Ace 2 2 4

Non-Ace 24 24 48

Total 26 26 52

Conditional Probability

สมมต้�ในการผล�ต้ช้��นสวน ม+เหต้'การณ#ที่+,สนใจค�อ D เหต้'การณ#ที่+,ช้��นสวนบกพื้รอง และ F เหต้'การณ#ที่+,ช้��นสวนม+รอยข้3ด้ข้+ด้ที่+,ผ�ว

ถ�าว�ศวกรสนใจเหต้'การณ#ที่+,ช้��นสวนบกพื้รองเน�,องจากม+รอยข้3ด้ข้+ด้ที่+,ผ�ว (E)

จะแที่นความนาจะเป็�นข้อง E ด้�วย P(D|F) อานวาความนาจะเป็�นแบบม+เง�,อนไข้ข้อง D given F

และแปรค์วัามหมายวั�าค์วัามน�าจะเป�นท��ชิ้!%นส�วันจะบกพร�องเม�,อม+รอยข้3ด้ข้+ด้ที่+,ผ�ว

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:

P(B)

B)andP(AB)|P(A

P(A)

B)andP(AA)|P(B

Where P(A and B) = joint probability of A and B

P(A) = marginal probability of A

P(B) = marginal probability of B

The conditional probability of A given that B has occurred

The conditional probability of B given that A has occurred

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

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.

Conditional Probability Example

No CDCD Total

AC .2 .5 .7

No AC .2 .1 .3

Total .4 .6 1.0

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.

.2857.7

.2

P(AC)

AC)andP(CDAC)|P(CD

(continued)

Conditional Probability Example

No CDCD Total

AC .2 .5 .7

No AC .2 .1 .3

Total .4 .6 1.0

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%.

.2857.7

.2

P(AC)

AC)andP(CDAC)|P(CD

(continued)

Using Decision Trees

Has AC

Does not have AC

Has CD

Does not have CD

Has CD

Does not have CD

P(AC)= .7

P(AC’)= .3

P(AC and CD) = .2

P(AC and CD’) = .5

P(AC’ and CD’) = .1

P(AC’ and CD) = .2

7.

5.

3.

2.

3.

1.

AllCars

7.

2.

Given AC or no AC:

Using Decision Trees

Has CD

Does not have CD

Has AC

Does not have AC

Has AC

Does not have AC

P(CD)= .4

P(CD’)= .6

P(CD and AC) = .2

P(CD and AC’) = .2

P(CD’ and AC’) = .1

P(CD’ and AC) = .5

4.

2.

6.

5.

6.

1.

AllCars

4.

2.

Given CD or no CD:

(continued)

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

P(A)B)|P(A

Multiplication Rules

Multiplication rule for two events A and B:

P(B)B)|P(AB)andP(A

P(A)B)|P(A Note: If A and B are independent, thenand the multiplication rule simplifies to

P(B)P(A)B)andP(A

Total Probability Rules

Partitioning an event into two mutually exclusive subsets.

Partitioning an event into several mutually exclusive subsets.

Total (marginal) Probability Rules

Total Probability Rules

Example 4

Total Probability Rules

multiple events

Independence

Definition

Independence

Definition

Example 5

Bayes’ Theorem

where:

Bi = ith event of k mutually exclusive and collectively

exhaustive events

A = new event that might impact P(Bi)

))P(BB|P(A))P(BB|P(A))P(BB|P(A

))P(BB|P(AA)|P(B

kk2211

iii

การจ�ดล-าด�บ (Permutations)

การจ�ดล-าด�บหมายถ5ง การจ�ด้เร+ยงรายการสมาช้�กโด้ยสนใจล)าด้�บกอนหล�งในแซ้ำมเป็8ลสเป็ซ้ำข้องการที่ด้ลองส'มใด้ ๆ ม+จ)านวนว�ธิ+การจ�ด้เร+ยงได้� nPr (อานวา n-P-r)

การจ�ด้เร+ยง ข้อง n ส�,ง ซ้ำ5,งม+ข้องไมแต้กต้างก�น n1, n2,…, nk ส�,ง ม+จ)านวนว�ธิ+การจ�ด้เร+ยงได้� ซ้ำ5,งค)านวณได้�ด้�งน+�

nPr = !r-n

n! เม�,อ r ≤ n

!!...nn!n

n!P

k21n,...,n,n

n

k21 เม�,อ ni < n และ n1 + n2 + … + nk = n

การจ�ดหมวัดหม�� (Combinations)

การจ�ดหมวัดหม�� หมายถ5ง การจ�ด้กล'มข้องสมาช้�กในแซ้ำมเป็8ลสเป็ซ้ำข้องการที่ด้ลองส'มใด้ ๆ โด้ยไมสนใจถ5งล)าด้�บข้องสมาช้�ก ด้�งน��นการจ�ด้หมวด้หม3จะม+ความแต้กต้างเฉพื้าะสมาช้�กในแต้ละหมวด้หม3เที่าน��น ม+จ)านวนว�ธิ+การจ�ด้หมวด้หม3 nCr (อานวา n-C-r) ซ้ำ5,งค)านวณได้�ด้�งน+�

nCr =

!r-nr!

n! เม�,อ r ≤ n nCr =

top related