Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ch 6 實習.

Similar presentations


Presentation on theme: "Ch 6 實習."— Presentation transcript:

1 Ch 6 實習

2 Assigning probabilities to Events
Random experiment a random experiment is a process or course of action, whose outcome is uncertain. Examples 擲一粒骰子,觀察其出現何種點數 抽取一份統計考試成績,觀察其分數 在馬路上假裝跌倒,看看多少時間後有沒有人來扶你(當然也不太鼓勵你,做這樣的試驗,以免自信心受傷) Jia-Ying Chen

3 Assigning probabilities to Events
Performing the same random experiment repeatedly, may result in different outcomes, therefore, the best we can do is consider the probability of occurrence of a certain outcome. To determine the probabilities we need to define and list the possible outcomes first. Jia-Ying Chen

4 Sample Space Determining the outcomes.
Build an exhaustive list of all possible outcomes. Make sure the listed outcomes are mutually exclusive. A list of outcomes that meets the two conditions above is called a sample space. Jia-Ying Chen

5 Sample Space: S = {O1, O2,…,Ok}
a sample space of a random experiment is a list of all possible outcomes of the experiment. The outcomes must be mutually exclusive and exhaustive. Simple Events The individual outcomes are called simple events. Simple events cannot be further decomposed into constituent outcomes. Event An event is any collection of one or more simple events Our objective is to determine P(A), the probability that event A will occur. Jia-Ying Chen

6 Assigning Probabilities
Given a sample space S={O1,O2,…,Ok}, the following characteristics for the probability P(Oi) of the simple event Oi must hold: Probability of an event: The probability P(A) of event A is the sum of the probabilities assigned to the simple events contained in A. Jia-Ying Chen

7 Approaches to Assigning Probabilities…
There are three ways to assign a probability, P(Oi), to an outcome, Oi, namely: Classical approach: make certain assumptions (such as equally likely, independence) about situation. Relative frequency: assigning probabilities based on experimentation or historical data. 重複進行此一實驗許多次,並觀察該事件出現次數的比例 有一位英國統計學家Pearson( )很神勇的擲一個銅板24,000次,結果出現12,012次正面,出現正面的機率為12012/24000=0.5005。 Jia-Ying Chen

8 Approaches to Assigning Probabilities…
Subjective approach: Assigning probabilities based on the assignor’s judgment. 例一:有一對夫妻,想生3胎,認為3個都是男生的機率為8成,故: 3個都是男生的機率=0.8 例二:某甲花很多時間念EMBA,所以他認為畢業時他得到第一名的機率為9成。 故:某甲認為他得到第一名的機率=0.9 Jia-Ying Chen

9 Example 1 A quiz contains multiple-choice questions with five possible answers, only one of which is correct. A student plans to guess the answers because he knows absolutely nothing about the subject. a. Produce the sample space for each question. b. Assign probabilities to the simple events in the sample space you produced. c. Which approach did you use to answer part b d. Interpret the probabilities you assigned in part b Jia-Ying Chen

10 Solution a. {a is correct, b is correct, c is correct, d is correct, e is correct} B. P(a is correct) = P(b is correct) = P(c is correct) = P(d is correct) = P(e is correct) = .2 c. Classical approach d. In the long run all answers are equally likely to be correct. Jia-Ying Chen

11 統計機率笑話(你不懂機率阿) 「某人搭飛機安檢時,機場人員發現他的行李有枚炸彈,立刻將他逮捕詢問;調查後,發現是個統計學教授,深入調查背景,知道他有個老婆、女兒,是個好爸爸,好教授,也是完美的大好人,而這次坐飛機,也為了要去演講。 警察很好奇的問:“你人這麼好,為什麼想不開要帶炸彈呢?” 教授回答說:“因為我很怕飛飛機,怕有恐怖份子” 警察不懂;教授解釋說:“你知道飛機上有一枚炸彈的機率是多少嗎?是1/1000,還蠻高的,但是飛機上有二枚炸彈的機率就是1/ ;所以假如我身上有一枚炸彈,再有第二枚機率就是1/ ,所以帶一枚炸彈我感覺安全多了”。」 其實,既然自己帶了一枚炸彈上飛機,飛機上有炸彈的機率已經成為是百分之百了,這是貝氏學派針對古典學派提出的笑話。 類似的笑話也發生在戰爭中,在第一次世界大戰期間,常有「因在同一天兩個砲彈不太可能擊中相同地點」,主帥因而鼓勵士兵們。往剛被砲彈炸成的坑洞跳的指令。 Jia-Ying Chen

12 你了解機率嗎? “這是對機率的錯誤解釋!” (因為你成功機率還是只有1/10) 有一則笑話,有一天你去看一個醫生,
醫生對你說:”我替病人開刀成功機率是1/10。” “但是在你之前,已經有9位病人刀到命除了。” 你是第10位, 所以你一定會成功. “這是對機率的錯誤解釋!” (因為你成功機率還是只有1/10) Jia-Ying Chen

13 Joint, Marginal, and Conditional Probability
We study methods to determine probabilities of events that result from combining other events in various ways. There are several types of combinations and relationships between events: Intersection of events Union of events Dependent and independent events Complement event Jia-Ying Chen

14 Intersection The intersection of event A and B is the event that occurs when both A and B occur. The intersection of events A and B is denoted by (A and B; A∩B). The joint probability of A and B is the probability of the intersection of A and B, which is denoted by P(A and B) Jia-Ying Chen

15 Intersection Additional Example – 1 3 1 1 A A and B 2 2 2 2 B
The number of spots turning up when a six-side die is tossed is observed. Consider the following events. A: The number observed is at most 2. B: The number observed is an even number. Determine the probability of the intersection event A and B. 3 1 1 A A and B 2 2 2 2 B P(A and B) = P(2) = 1/6 6 6 4 4 5 Jia-Ying Chen

16 Marginal Probability These probabilities are computed by adding across rows and down columns 在兩個或兩個以上類別的樣本空間中,若僅考慮一類別個別發生的機率稱之。 Mutual fund outperforms the market (B1) Mutual fund doesn’t outperform the market (B2) Marginal Prob. P(Ai) Top 20 MBA program (A1) 0.11 0.29 Not top 20 MBA program (A2) 0.06 0.54 Marginal Probability P(Bj) P(A1 and B1)+ P(A1 and B2) = P(A1) P(A2 and B1)+ P(A2 and B2) = P(A2) Jia-Ying Chen

17 Marginal Probability These probabilities are computed by adding across rows and down columns Mutual fund outperforms the market (B1) Mutual fund doesn’t outperform the market (B2) Marginal Prob. P(Ai) Top 20 MBA program (A1) .40 Not top 20 MBA program (A2) .60 Marginal Probability P(Bj) P(A1 and B1) + P(A2 and B1 = P(B1) P(A1 and B2) + P(A2 and B2 = P(B2) 0.17 0.83 Jia-Ying Chen

18 Conditional Probability
已知A 事件發生下,另一B事件發生的機率,稱為在A發生條件下,A的條件機率。 P(A|B) = P(A and B) / P(B) Example 6.2 (Example 6.1 – continued) Find the conditional probability that a randomly selected fund is managed by a “Top 20 MBA Program graduate”, given that it did not outperform the market. Solution P(A1|B2) = P(A1 and B2) = .29 = P(B2) Jia-Ying Chen

19 Independence & Union Independent events
Two events A and B are said to be independent if P(A|B) = P(A) or P(B|A) = P(B) That is, the probability of one event is not affected by the occurrence of the other event. The union event of A and B is the event that occurs when either A or B or both occur. It is denoted “A or B” ; (A∪B). Jia-Ying Chen

20 Example 2 Suppose we have the following joint probabilities
Compute the marginal probabilities, A1 A2 A3 B1 0.2 0.15 0.1 B2 0.25 0.05 Jia-Ying Chen

21 Solution P(A1)= =0.45, P(A2)= =0.4, P(A3)= =0.15, P(B1)= =0.45, P(B2)= =0.55 Jia-Ying Chen

22 Example 3 He is a smoker He is a nonsmoker He has lung disease 0.1
The following tables lists the joint probabilities associated with smoking and lung disease among 60 to 65 year-old-men. One 60 to 65 year old man is selected at random. What is the probability of the following events a. He is a smoker b. He does not have lung disease c. He has lung disease given that he is a smoker d. He has lung disease given that he does not smoke He is a smoker He is a nonsmoker He has lung disease 0.1 0.03 He does not have lung disease 0.21 0.66 Jia-Ying Chen

23 Solution Jia-Ying Chen

24 Probability Rules and Trees
We present more methods to determine the probability of the intersection and the union of two events. Three rules assist us in determining the probability of complex events from the probability of simpler events. Complement Rule The complement of event A (denoted by AC) is the event that occurs when event A does not occur. The probability of the complement event is calculated by A and AC consist of all the simple events in the sample space. Therefore, P(A) + P(AC) = 1 P(AC) = 1 - P(A) Jia-Ying Chen

25 Multiplication Rule For any two events A and B
When A and B are independent P(A and B) = P(A)P(B|A) = P(B)P(A|B) P(A and B) = P(A)P(B) Jia-Ying Chen

26 P(A or B) = P(A) + P(B) - P(A and B)
Addition Rule For any two events A and B P(A or B) = P(A) + P(B) - P(A and B) P(A) =6/13 A or B + A P(B) =5/13 _ B P(A and B) =3/13 P(A or B) = 8/13 Jia-Ying Chen

27 Addition Rule A B B When A and B are mutually exclusive,
P(A or B) = P(A) + P(B) A B B P(A and B) = 0 Jia-Ying Chen

28 思考!! What is the difference between mutually exclusive and Independent ? Mutually exclusive P(A or B) = P(A) + P(B) P(A and B)=0 Independent P(A and B) = P(A)P(B) P(A∣B)=P(A) or P(B∣A)=P(B) Jia-Ying Chen

29 Example 4 Approximately 10% of people are left-handed. If two people are selected at random, what is the probability of the following events? Both are right-handed Both are left-handed One is right-handed and the other is left-handed At least one is right-handed Jia-Ying Chen

30 Solution Jia-Ying Chen

31 貝氏定理(Bayes’ Theorem) P(Ai|B) = ,i = 1, 2,…, k
Thomas Bayes是18世紀的一位長老會牧師及數學家,他藉由考量已發生的相關事物,來表示各種事物存在的機率 機率總和定理為 P(B) = P(A1∩B) + P(A2∩B) + … + P(Ak∩B) = P(A1)P(B|A1) + … + P(Ak)P(B|Ak) 因此,貝氏定理為 式中P(Ai)稱為事前機率(prior probability); 條件機率P(Ai|B)稱為事件B發生後之事後機率(posterior probability)。 P(Ai|B) = ,i = 1, 2,…, k Jia-Ying Chen

32 貝氏定理(Bayes’ Theorem) Example
Medical tests can produce false-positive or false-negative results. A particular test is found to perform as follows: Correctly diagnose “Positive” 94% of the time. Correctly diagnose “Negative” 98% of the time. It is known that 4% of men in the general population suffer from the illness. What is the probability that a man is suffering from the illness, if the test result were positive? Jia-Ying Chen

33 貝氏定理(Bayes’ Theorem) Solution Define the following events
D = Has a disease DC = Does not have the disease PT = Positive test results NT = Negative test results Build a probability tree Jia-Ying Chen

34 貝氏定理(Bayes’ Theorem) Solution – Continued
The probabilities provided are: P(D) = .04 P(DC) = .96 P(PT|D) = .94 P(NT|D)= .06 P(PT|DC) = .02 P(NT|DC) = .98 The probability to be determined is Jia-Ying Chen

35 貝氏定理(Bayes’ Theorem) + D PT D PT|D PT|D PT|D PT D D PT|D D D| PT|D PT
P(D and PT) =.0376 PT|D P(PT|DC) = .02 P( NT|DC) = .98 P(PT|D) = .94 P( NT|D) = .06 P(PT) =.0568 + P(DC) = .96 P(D) = .04 P(DC and PT) =.0192 Jia-Ying Chen

36 貝氏定理(Bayes’ Theorem) Prior Likelihood probabilities probabilities
P(PT|DC) = .02 P( NT|DC) = .98 P(PT|D) = .94 P( NT|D) = .06 Posterior probabilities P(DC) = .96 P(D) = .04 Jia-Ying Chen

37 貝氏定理 算出 有上帝存在 機率67% 雖然「上帝是否存在」這個問題通常被認為是一種「信則有不信則無」的信仰問題,不過曾專職為美國政府預測核子災變風險的英國物理學家昂溫(Stephen Unwin)博士宣稱,他利用統計學中著名的貝氏定理,推算出上帝存在的機會為67%。 昂溫說上帝是否存在不只是宗教上的問題,更是一個統計學問題。他使用來推算上帝存在與否的基本機率公式為P(G/E)=AP(G)×P(E/G)。 其實這是一種特殊的條件機率,其中的P(G/E)代表大自然出現各種現象(E)時上帝存在的機率,等於是上帝存在的假定機率AP(G),乘以上帝存在時出現這些現象的機率P(E/G)。 畢業於英國曼徹斯特大學的昂溫,先假定上帝存在和不存在的機率各為50%,然後以各種支持和反對上帝存在的證據(現象),如超自然現象和祈禱後出現神蹟的 個案為上帝存在的證據,天災人禍和無神論理據則為上帝不存在的證據,來計算上帝存在的各種可能機率,結果得出上帝存在總機率為67%。 Jia-Ying Chen

38 決勝二十一點數學問題 當你上益智節目,主持人有三個門讓你選,其中一個門打開有百萬名車帶回家,另外兩個門是兩隻山羊,假如你隨便選了一個門是 A 門好了,這時候主持人為了節目效果,打開了 C 門,後面空無一物,現在只剩下 A , B 兩個門了,主持人再問你要不要換選擇,這時候到底該選哪一個門? 要記住,主持人一開始就知道哪個門有百萬名車,為了節目效果,不論你一開始選中或是沒中,他都一定會讓你有再選一次的機會!這就是整個機率關鍵的 Scenario! Jia-Ying Chen

39 【凡人都能懂的版】 Solution 選了A之後,A的機率是三分之一,把「B和C」視為一體,加起來的機率是三分之二,當主持人說出C不是之後,他可以完全肯定如果獎在「B和C」這一組,就一定是B,所以這三分之二的機率就完全算在B頭上了。就這樣而已。 Jia-Ying Chen

40 【有簡單機率背景的人的版】 Solution
條件機率問題 用數學來算,就要分為你(妳)選對了門,主持人拿掉C的機率和你(妳)選錯了門時,主持人拿掉C的機率,這兩種情況來算,最後的計算結果,還是會跟上面一樣。 B是對的機率=「A是對的機率」X「B才是對的機率」+「A是錯的機率」X「B才是對的機率」=「1/3」X「0」+「2/3」X「1」=「2/3」) Jia-Ying Chen


Download ppt "Ch 6 實習."

Similar presentations


Ads by Google