Random variable Probability rules Bernoulli distribution Binomial dist
• 隨機變數Random variable; • 機率的規則Probability rules • 常見機率模式Bernoulli distribution; Binomial dist. ; Normal dist. • 抽樣分配Sampling distribution 2
隨機變數Random Variable & 機率模式Probability Model (1/2) • 3
機率的規則Rules for Probability(1/2) • 5
伯努利分配Bernoulli Distribution (1/5)definition & pdf • 丟一次銅板: • Pr(Y=1)=p; Pr(Y=0)=1 -p Y: random variable (隨機變數), here a binary coding • Pr(Y) is called a density function, probability density (mass) function, 機率密度函數, pdf, pmf • Events: {正面}, {反面}, {正或反面}, {紅色面}; {Y=1}, {Y=0 or 1}, {Y≠ 0, 1} • This is Bernoulli distribution伯努利分配 • 畫圖? 7
8
伯努利分配Bernoulli Distribution (2/5)expected value and variance • 9
10
Some Properties of Mean • 期望值, expectation, expected value, mean, population mean 11
Some Properties of Variance (1/3) • 12
Some Properties of Variance (2/3) 2 • Var(Y)=E(Y 2)-�� • Var(a. Y)=E(a 2 Y 2)-[E(a. Y)]2 =a 2 E(Y 2)-[a. E(Y)]2= a 2 Var(Y) Ex: Var(5 Y)=25 Var(Y) Ex: Var(-Y)=Var(Y) 13
Some Properties of Variance (3/3) • 14
很多伯努利分配的資料來估計p Bernoulli Distribution (4/5) – estimate p • 16
Aside: Variance of sample mean • 樣本數n大則p的估計穩! • 將之開根號稱為標準誤 “standard error” (se) • Ex: 正面出現 498次/1000次, se=? • Ex: 估計得病率=64/100, • se 2=(0. 64)(0. 36)/100, se=? 17
二項式分配 Binomial distribution (1/4) - pdf • 若Y是n個Bernoulli的結果的和,則Y=0, 1, …, n • 這是有相同p的n個獨立Bernoulli相加而來 • 稱為二項式分配(Binomial distribution) • Y~Bin(n, p), • E(Y)=np; Var(Y)=npq (n 個 Bernoulli’s) • Compute P(Y)=? 19
二項式分配 Binomial distribution (2/4) - probability • • Y=100人中吳小姐的得票數 Y 是Binomial (100, p) Pr(Y=80)= Pr(Y≥ 80)=? • Bernoulli and Binomial • Bernoulli是指只丟一次銅板 • Binomial是指丟n個銅板的結果總和 20
二項式分配Binomial distribution (3/4) --- computation when n is really large • 21
二項式分配 Binomial distribution (4/4)- plot 22
常態分布 Normal distribution (1/6) - pdf • • • Blood pressure Y~N(110, 100) 期望值, 變異數 standard deviation 1 standard dev. (. 68) 2 std dev(. 95) 3 std dev(. 99) P(Y≥ 110)=? (. 5) P(120≥Y≥ 100)=? (. 68) 23
常態分布 Normal distribution (2/6) - probability • 24
常態分布Normal distribution (3/6) - density of standard normal, Z 25
常態分布Normal distribution (4/6) - Table • • • Table B: (畫圖? ) z: 標準計分的值 cdf: 累計的機率 Pr(Z≤-1. 8)=0. 0359 Pr(Z≤-1)=0. 1587 因對稱 Pr(Z≤-1)=Pr(Z≥ 1) Pr(Z≤ 1)=1 -Pr(Z≥ 1) =1 - Pr(Z≤-1)=0. 8413 26
常態分布 Normal distribution (5/6) - examples • 27
常態分布 Normal distribution (6/6) - examples • 28
抽樣分布Sampling Distribution (1/4) • Sampling distribution of statistics Statistics are functions of data, 統計量是資料的函數, 如sample mean, sample variance, sample median, sample range 如TVAB民意調查中心抽得的20人的y值, y/20, 如蓋普普中心抽得的50人的平均血壓 這個平均值會因不同的50人而不同, why? 這個平均值會因不同的50人而不同,但值應該類似 30
抽樣分布Sampling Distribution (2/4) • 31
抽樣分布Sampling Distribution (3/4) • Ex: X={1, 2, 3, 4, 5}, plot sample means (each of size n) • Central Limit Theorem (CLT) 32
- Slides: 37