Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Bernoulli Distribution

Similar presentations


Presentation on theme: "The Bernoulli Distribution"— Presentation transcript:

1 The Bernoulli Distribution
定義 若一隨機試驗只有兩種課能的結果(正面反面、成功失敗),則此試驗稱之為伯弩利試驗。 A random variable X has a Bernoulli distribution with parameter p (0  p  1) if X can take only the values 0 and 1 and the probabilities are P(X = 1) = p P(X = 0) = (1-p) If we let q = 1- p, then the p.f of X can be written as follows: 社會統計(上) ©蘇國賢2006

2 The Bernoulli Distribution
定義 E(X) = 1·p +0·q = p E(X2) =X2 f(x)=12·p+02·q = p Var(X) = E(X2) –[E(X)]2 =p-p2 =p(1-p) = p·q 社會統計(上) ©蘇國賢2006

3 例題 執銅板一次,X為出現正面的數目,其分配為何?其期望值及變異數為何? 社會統計(上) ©蘇國賢2006

4 The Binomial Distribution二項分配
定義 若間斷r.v X的機率分配函數為: n為完全相同且獨立之試驗的次數。 每次試驗只有「成功」「失敗」兩種互斥可能 p為每次試行成功之機率,失敗的機率為q = 1 – p, 其中 0<p<1。 隨機變數X表示n次獨立試驗中成功之次數。 社會統計(上) ©蘇國賢2006

5 The Binomial Distribution二項分配
定義 一個正常20歲的成年人活至65歲的機率為80%,請問三個年輕人中有兩人活到65歲的機率為? 社會統計(上) ©蘇國賢2006

6 社會統計(上) ©蘇國賢2006

7 The Binomial Distribution二項分配
定義 每一個人存活至65的機率為80%,三人中有兩人可以存活至65: (0.8)2 一個死亡的機率: (0.2)1 根據上圖我們知道這種情形共有(ssf)(sfs)(fss)三種: C3,2 = 3!/(2!(3-2)!)=3 社會統計(上) ©蘇國賢2006

8 The Binomial Distribution二項分配
定義 鑽油井的成功機率為.30,某公司找到五處有可能蘊藏石油的地點。求正好兩處挖到石油的機率? p=.3, q=1-.3=.7 n=5 五次中有兩次成功, P(正好挖到兩處)=P(X=2) = (.3)2(.7)3+ (.3)2(.7)3+…(.3)2(.7)3=10 (.3)2(.7)3=.3087 社會統計(上) ©蘇國賢2006

9 The Binomial Distribution二項分配
定義 X為五次獨立的試驗成功的次數,列出X的機率分配: Binomial distribution, n=5 p=.3 社會統計(上) ©蘇國賢2006

10 Figure 社會統計(上) ©蘇國賢2006

11 The Binomial Distribution二項分配
如果p=.5, 則成功失敗的機率各半,此機率分配為對稱(symmetric)。 若p>.5,表示「成功」的機率大於「失敗」,圖形右方的機率會大於左方。 n愈大,機率分配愈接近鐘型(bell shaped) 如果p很接近.5,既使n很小,機率分配也會呈現鐘型狀態。 上圖顯示,隨著p增加,圖形的高峰愈往右邊偏移,且愈接近.5,愈呈現鐘型。 社會統計(上) ©蘇國賢2006

12 The Binomial Distribution二項分配
If the random variable X1, X2,…Xn form n Bernoulli trials with parameter p and if X =X1+X2…+Xn, then X has a binomial distribution with parameter n and p. 社會統計(上) ©蘇國賢2006

13 例題 設X~b(n,p)已知E(X)=3, Var(X)=2,求P(X=7)(中山企研) 社會統計(上) ©蘇國賢2006

14 Cumulative binomial distribution function
累加二項分配機率函數 p =.3, n=5 社會統計(上) ©蘇國賢2006

15 在EXCEL中求解 語法: BINOMDIST(成功次數number_s,實驗次數trials, 成功機率probability_s, 求累積函數cumulative) Number_s   為欲求解的實驗成功次數。 Trials   為獨立實驗的次數。 Probability_s    為每一次實驗的成功機率。 Cumulative   為一邏輯值,主要用來決定函數的型態。如果 cumulative 為 TRUE,則 BINOMDIST 傳回累加分配函數值,其代表最多有 number_s 次成功的機率;如果其值為 FALSE,則傳回機率密度函數的機率值,代表有 number_s 次成功的機率。 社會統計(上) ©蘇國賢2006

16 在EXCEL中求解 社會統計(上) ©蘇國賢2006

17 在EXCEL中求解 社會統計(上) ©蘇國賢2006

18 例題 According to IRS, approximately 20% of all income tax returns contain mathematical errors. (a) find the probability that 3 or fewer returns out of a sample of 10 contain mathematical errors. (b) Find the probability that fewer than three of the returns contain errors. (c) Find the probability that exactly three of the returns contains errors. (d) find the probability that three or more of the returns contain errors. 社會統計(上) ©蘇國賢2006

19 例題 Let X denote the number of errors, then X follows the binomial distribution with n=10 and p=.20 (a) P(X3) = P(X=0) +P(X=1)+P(X=2)+P(X=3) 查表可之n=10, p=.2, c=3 P(X 3) = .879 (b) P(X<3) N=10, p=.2, c=2, P(X<3)= P(X 2)=.678 (c) P(X=3)=P(X 3) – P(X 2)= =.201 (d) P(X3) =1- P(X 2) = =.322 社會統計(上) ©蘇國賢2006

20 例題 生壞血病復原之機率為40%,現有15人患此病,求 (一)至少10人存活的機率 P(X10)=1-P(X9) =.0338
(二)3-8人存活的機率 P(3X 8)=P(X 8)-P(X 2)=.8779 (三)恰巧5人存活的機率 P(X=5) (四)期望值及變異數 E(X)=15(.4)=6 Var(X)=15(.4)(.6)=3.6 社會統計(上) ©蘇國賢2006

21 Sample proportion of successes
Statisticians frequently are more interested in the proportion of successes in a sample than in the number of successes. If we obtain X successes in n trials, then the sample proportion ^p = X/n E(^p)=E(X/n)=np/n=p The sample proportion ^p is an unbiased estimator of population proportion p. Var(^p)=Var(X/n)=(1/n)2Var(X)= npq/n2 = pq/n 社會統計(上) ©蘇國賢2006

22 例題 A councilman claims that at least 30% of the voters of a large city are in favor of increasing taxes on alcoholic beverages. To test this claim, a polling agent obtains a random sample of 500 voters. Suppose that X=100 voters in the sample say they favor the tax. Thus, the sample proportion is ^p=100/500=.2. Is it reasonable to reject the claim that, in the population, p is at least .3? 社會統計(上) ©蘇國賢2006

23 例題 If the claim is true, the the sample proportion ^p has expected value E(^p)=p=.3 Var(^p)=pq/n=(.3)(.7)/500=.00042 S^p=sqrt(.00042)=.02 Empirical rule more than 99.7% of the value of ^p should fall within 3 standard deviation of the mean: (.3-.06, ) = (.24, .36) .02 lies outside this interval, we have strong evidence that, in the population, p does not equal to .3. If p were .3, it would be quite unusual to observe a value as extreme as ^p=.2 in a sample of n=500. 社會統計(上) ©蘇國賢2006


Download ppt "The Bernoulli Distribution"

Similar presentations


Ads by Google