首页 Ch07 Random variable and discrete PD 20071022

Ch07 Random variable and discrete PD 20071022

举报
开通vip

Ch07 Random variable and discrete PD 20071022nullRandom Variables and Discrete probability DistributionsRandom Variables and Discrete probability DistributionsChapter 7OutlineAU*Outline7.1 Random Variables and Probability Distributions 7.2 Bivariate Distributions (7.3 Applications in Finance) 7.4 The Bi...

Ch07 Random variable and discrete PD 20071022
nullRandom Variables and Discrete probability DistributionsRandom Variables and Discrete probability DistributionsChapter 7OutlineAU*Outline7.1 Random Variables and Probability Distributions 7.2 Bivariate Distributions (7.3 Applications in Finance) 7.4 The Binomial Distribution 7.5 Poisson Distribution7.1 Random Variables and Probability Distributions (隨機變數與機率分配)AU*7.1 Random Variables and Probability Distributions (隨機變數與機率分配)介紹隨機變數的原因:有時候, 我們不在意到底那一個事件發生了, 我們有興趣的是能代表事件的一些數值. 例如, 猜兩題是非題的experiment(實驗). 樣本空間為何?S={(right, right), (right, wrong), (wrong, right) (wrong, wrong)}.有時候, 我們感興趣的是 “答對的題數”.Random Variables (r.v.)AU*Random Variables (r.v.)實數.複習: 高中教的函數(function)2 5 10 17In probability:0 1 2實數.Random VariablesAU*Random Variables隨機變數的例子 例1:丟兩個銅板, 對正面出現次數感興趣,故可令隨機變數是「正面的次數」,以 X 表示之 例2:丟兩枚骰子, 玩家對點數和感興趣,故可令隨機變數是「兩枚骰子的點數和」,以Y 表示之。 隨機變數可能值的例子 例1中,X 的可能值為何? 例2中,Y 的可能值為何?0, 1, 22, 3, 4, …, 12Random VariablesAU*Random VariablesA random variable is a function or rule that assigns a numerical value to each outcome in a sample space. A random variable reflects the aspect of a random experiment that is of interest for us. There are two types of random variables: Discrete random variable (離散型隨機變數) Continuous random variable. (連續型隨機變數)Discrete and Continuous Random VariablesAU*A random variable is discrete if it can assume a countable number of values. (隨機變數的可能值是可數的) A random variable is continuous if it can assume an uncountable number of values. (隨機變數的可能值是不可數的)011/21/41/16Continuous random variableAfter the first value is defined the second value, and any value thereafter are known.Therefore, the number of values is countableAfter the first value is defined, any number can be the next oneDiscrete random variableTherefore, the number of values is uncountableDiscrete and Continuous Random Variables釋例AU*釋例課本第216頁, 7.3, 7.4 7.3:發生在一高速公路路段的意外事件是一隨機變數。該隨機變數是離散型或連續型,試解釋之。 7.4:一部車子加滿油箱後可以行駛的距離是一隨機變數。該隨機變數是離散型或連續型,試解釋之。 Probability distribution (機率分配)AU*Probability distribution (機率分配)A probability distribution is a table, formula, or graph that describes the values of a random variable and the probability associated with these values. (p. 211-table, p. 238-formula, p. 265-graph in textbook)Probability Notation (機率符號)AU*Probability Notation (機率符號)An upper-case letter will represent the name of the random variable, usually X. (大寫英文字母表示隨機變數的名字) Its lower-case counterpart will represent the value of the random variable. (小寫英文字母表示隨機變數的數值) The probability that the random variable X will equal x is: P(X=x) or more simply P(x)猜兩題是非題的例子中, r.v.X: 答對的題數 答對0題的機率記為 P(X=0), 簡記為 P(0) 答對1題的機率記為 P(X=1), 簡記為 P(1)nullAU*以下開始介紹的是離散型隨機變數與機率分配的觀念. 連續型機率分配的觀念在第 8 章中介紹!! 離散型機率分配和連續型機率分配兩者的觀念有些不同, 請不要混淆Discrete Probability DistributionAU*Discrete Probability Distribution複習機率分配 (probability distribution): A probability distribution is a table, formula, or graph that describes the values of a random variable and the probability associated with these values. 故求機率分配時, 需知: 隨機變數的可能數值 這些數值發生的機率 之後將兩者對應關係以表, 公式 或圖形表逹出來.Discrete Probability DistributionAU*Discrete Probability Distribution猜兩題是非題的例子, 示範離散型機率分配的推導 令隨機變數 X 為答對的題數 X 的可能值有那些?=1/4=1/4+1/4=1/2=1/4猜對0題的機率:P(X=0)=P(0) 猜對1題的機率:P(X=1)=P(1) 猜對2題的機率:P(X=2)=P(2) 用表格方式表達的機率分配: x P(x) 0 1/4 1 1/2 2 1/4 總計 1(o,x)的機率(x,o)的機率Discrete Probability DistributionAU*To calculate the probability that the random variable X assumes the value x, P(X = x), or simply, P(x) add the probabilities of all the simple events for which X is equal to x, or Apply probability definitions, --- Example 7.1 Use probability calculation tools (tree diagram) --- Example 7.2 Discrete Probability DistributionRequirements for a Discrete DistributionAU*If a random variable can assume values x, then the following must be true:Requirements for a Discrete DistributionDistribution and Relative FrequenciesAU*Distribution and Relative FrequenciesIn practice, often probability distributions are estimated from relative frequencies. Example 7.1 A survey reveals the following frequencies for the number of color TVs per household. 令 r.v. X 為每戶擁有的電視機數 Number of TVs Number of Households x P(x) 0 1,218 0 1218/Total = .012 1 32,379 1 .319 2 37,961 2 .374 3 19,387 3 .191 4 7,714 4 .076 5 2,842 5 .028 Total 101,501 1.000X 的可能值為?X 各可能值發生機率為?Determining Probability of EventsAU*Determining Probability of EventsThe probability distribution can be used to calculate the probability of different events (機率分配可用來算機率) 例如猜兩題是非題例子. 若答對一題的分數都是50分, 則不及格的機率為何? 如何計算? Example 7.1 – continued Calculate the probability of the following events: P(The number of color TVs is 3) = P(X=3) = 0.191 P(The number of color TVs is two or more) = P(X³2)=P(X=2)+P(X=3)+P(X=4)+P(X=5)= 0.374 +0.191 +0.076 +0.028 = 0.669答:P(X1)= P(X=0)+P(X=1)=1/4+1/2Developing a Probability DistributionAU*Probability calculation techniques can be used to develop probability distributions Example 7.2 A mutual fund sales person knows that there is 20% chance of closing a sale on each call she makes. What is the probability distribution of the number of sales if she plans to call three customers?Developing a Probability DistributionDeveloping a Probability DistributionAU*Solution Use probability rules and trees Define S 表示成交的事件.Developing a Probability DistributionS S S S S SC S SC S S SC SC SC S S SC S SC SC SC S SC SC SCX P(x) 0.23 = 0.008 3(0.032)=0.096 3(0.128)=0.384 0 0.83 = 0.512(0.2)(0.2)(0.8)= 0.032Probability DistributionFinding Probability/ Probability DistributionPopulation/Probability Distribution…AU*Population/Probability Distribution…The discrete probability distribution represents a population Example 7.1 the population of number of TVs per household Example 7.2 the population of sales call outcomes We’re interested in describing the population by computing various parameters. E.g. the population mean and population variance.Population Mean (Expected Value)AU*Population Mean (Expected Value)Given a discrete random variable X with values x, that occur with probabilities P(x), the population mean of X is.Population Mean (Expected Value)AU*Population Mean (Expected Value)Example 1-丟一個骰子. Let r.v. X: 骰子出現的點數. Computes the expected value of X. X的機率分配表為何? E(X) = m = Sx*P(x) = 1*P(1)+2*P(2)+…+6*P(6) =1(1/6)+2(1/6)+…+6(1/6) Example 2- 丟一個骰子60次, 求出現點數的平均數 Example 1 & 2 的公式的格式是一樣的, 所以 Sx*P(x) 這個公式是求加權平均數, 權數是機率(相對次數) Population VarianceAU*Let X be a discrete random variable with possible values x that occur with probabilities P(x), and let E(X) = m. The variance of X is defined byPopulation VarianceWhyAU*WhyE(X) 是 X 的平均數V(X) = E(X-m)2 是(X-m)2的平均數是Xi與平均數離差平方的平均數 所以也是 “平均距離” 的觀念Additionally, based on theorem:We obtain:The Mean and the VarianceAU*The Mean and the VarianceExample 7.3 Find the mean the variance and the standard deviation for the population of the number of color television per household in example 7.1 Solution E(X) = m = Sx*P(x) = 0*P(0)+1*P(1)+2*P(2)+…= 0(.012)+1(.319)+2(.374)+… = 2.084 V(X) = s2 = S(x - m)2P(x) = (0-2.084)2P(0)+(1-2.084)2P(1) + (2-2.084)2P(2)+… =1.107 s = 1.1071/2 = 1.052Using a shortcut formula for the variance The Mean and the VarianceAU*Solution – continued The variance can also be calculated as follows: The Mean and the VarianceLaws of Expected Value and VarianceAU*Laws of Expected Value E(c) = c E(X + c) = E(X) + c E(cX) = cE(X) E(aX+b) = aE(X)+b Where a, b, c are constantLaws of Variance V(c) = 0 V(X + c) = V(X) V(cX) = c2V(X) V(aX+b) = a2V(X)Laws of Expected Value and VarianceLaws of Expected Value VarianceAU*Example 7.4 The monthly sales at a computer store have a mean of $25,000 and a standard deviation of $4,000. Profits are 30% of the sales less fixed costs of $6,000. Find the mean and standard deviation of the monthly profit.Laws of Expected Value VarianceLaws of Expected Value and VarianceAU*V(Profit) = V(0.30(Sales) – 6,000] = V[(0.30)(Sales)] = (0.30)2V(Sales) = 1,440,000 Profit = 0.30(Sales) – 6,000 E(Profit) = E[0.30(Sales) – 6,000] = E[0.30(Sales)] – 6,000 = 0.30E(Sales) – 6,000 = 0.30(25,000) – 6,000 = 1,500Laws of Expected Value and Variances = [1,440,000]1/2 = 1,200 SolutionLaws of Expected Value and Variance7.2 Bivariate Distributions (雙變量分配)AU*Up to now, we have looked at univariate distributions (單變量分配), i.e. probability distributions in one variable. As you might guess, bivariate distributions (雙變量分配) are probabilities of combinations of two variables.7.2 Bivariate Distributions (雙變量分配)7.2 Bivariate DistributionsAU*The bivariate (or joint) distribution is used when the relationship between two random variables is studied. The probability that X assumes the value x, and Y assumes the value y is denoted P(x, y) = P(X=x and Y = y)7.2 Bivariate Distributions延伸自例7.1 r.v. X: 每戶擁有彩色電視機的數目. r.v. Y: 每戶擁有電冰箱的數目. P(4, 1)=P(X=4 and Y=1) =每戶擁有4台彩色電視機且擁有1台電冰箱的機率Bivariate DistributionsAU*Bivariate DistributionsBivariate DistributionsAU*Example 7.5 Xavier and Yvette are two real estate agents. Let X and Y denote the number of houses that Xavier and Yvette will sell next week, respectively. The bivariate probability distribution is presented next.Bivariate DistributionsBivariate DistributionsAU*p(x,y)Bivariate DistributionsXYX=0X=2X=1y=1y=2y=00.420.120.210.070.060.020.060.030.01Example 7.5 – continued X Y 0 1 2 0 .12 .42 .06 1 .21 .06 .03 2 .07 .02 .01 Marginal ProbabilitiesAU*Marginal ProbabilitiesExample 7.5 – continued Sum across rows and down columnsP(0,0)P(0,1)P(0,2)The marginal probability P(X=0)Marginal ProbabilitiesAU*Marginal ProbabilitiesExample 7.5 – continued Sum across rows and down columnsX的邊際機率分配:y的邊際機率分配:Describing the Bivariate DistributionAU*Describing the Bivariate DistributionThe joint distribution can be described by the mean, variance, and standard deviation of each variable. This is done using the marginal distributions.x P(x) y P(y) 0 0.4 0 0.6 1 0.5 1 0.3 2 0.1 2 0.1 E(X) = 0.7 E(Y) = 0.5 V(X) = 0.41 V(Y) = 0.45 sx = 0.64 sy = 0.67期望值與變異數的算法和單變量相同(同第7.1節)Describing the Bivariate Distribution AU*r =Describing the Bivariate Distribution To describe the relationship between the two variables we compute the covariance and the coefficient of correlation Covariance: COV(X,Y) = SS (X – mx)(Y- my)P(x,y) Coefficient of Correlation COV(X,Y) sxsyDescribing the Bivariate DistributionAU*Example 7.6 Calculate the covariance and coefficient of correlation between the number of houses sold by the two agents in Example 7.5 Solution COV(X,Y) = S(x-mx)(y-my)P(x,y) = (0-0.7)(0-0.5)P(0,0)+…(2-0.7)(2-0.5)P(2,2) = -0.15 r=COV(X,Y)/sxsy = - 0.15/(0.64)(0.67) = -0.35Describing the Bivariate Distribution兩變數存在微弱的負相關Sum of Two VariablesAU*Sum of Two Variables The probability distribution of X + Y is determined by Determining all the possible values that X+Y can assume For every possible value C of X+Y, adding the probabilities of all the combinations of X and Y for which X+Y = C Example 7.5 - continued Find the probability distribution of the total number of houses sold per week by Xavier and Yvette. Solution X+Y is the total number of houses sold. X+Y can have the values 0, 1, 2, 3, 4.The Probability Distribution of X+YAU*The probabilities P(X+Y)=3 and P(X+Y) =4 are calculated the same way. The distribution followsThe Probability Distribution of X+YThe Expected Value and Variance of X+YAU*The distribution of X+Y The expected value and variance of X+Y can be calculated from the distribution of X+Y. E(X+Y)=0(.12)+ 1(63)+2(.19)+3(.05)+4(.01)=1.2 V(X+Y)=(0-1.2)2(.12)+(1-1.2)2(.63)+… =.56The Expected Value and Variance of X+YThe Expected Value and Variance of X+YAU*The following relationship can assist in calculating E(X+Y) and V(X+Y) E(X+Y) =E(X) + E(Y); E(X-Y) =E(X) - E(Y); V(X+Y) = V(X) +V(Y) +2COV(X,Y) V(X-Y) = V(X) +V(Y) -2COV(X,Y) When X and Y are independent COV(X,Y) = 0, and V(X+Y) = V(X)+V(Y). V(X-Y) = V(X) +V(Y)The Expected Value and Variance of X+YThe Expected Value and Variance of X+YAU*The Expected Value and Variance of X+YExample 7.7 用X+Y分配計算: E(X+Y)=0(.12)+ 1(63)+2(.19)+3(.05)+4(.01)=1.2 V(X+Y)=(0-1.2)2(.12)+(1-1.2)2(.63)+… =.56 用法則計算: E(X+Y)= E(X) + E(Y) = 0.7 + 0.5 = 1.2 V(X+Y) = V(X) +V(Y) +2COV(X,Y) = 0.41+0.45+2(-0.15) = 0.56 兩者相同7.4 The Binomial Distribution (二項分配)AU*7.4 The Binomial Distribution (二項分配)The binomial experiment can result in only one of two possible outcomes. Typical cases where the binomial experiment applies: A coin flipped results in heads or tails An election candidate wins or loses An employee is male or femaleBinomial ExperimentAU*Binomial experiment There are n trials (試行, 試驗) (n is finite and fixed, n>1). Each trial can result in a success or a failure. The probability p of success is the same for all the trials. All the trials of the experiment are independent. Binomial Random Variable The binomial random variable counts the number of successes in n trials of the binomial experiment. (二項實驗中成功發生的次數) By definition, this is a discrete random variable.Binomial ExperimentDeveloping the Binomial Probability Distribution (n = 3)AU*S1S2S2F2F1F2P(SSS)=p3P(SSF)=p2(1-p)P(SFS)=p(1-p)pP(SFF)=p(1-p)2P(FSS)=(1-p)p2P(FSF)=(1-p)p(1-p)P(FFS)=(1-p)2pP(FFF)=(1-p)3P(S1)=pP(S2|S1)P(F1)=1-pP(F2|S1)P(S2|F1)P(F2|F1)P(S2)=pP(F2)=1-pP(S3)=pP(S3)=pP(S3)=pP(S3)=pP(F3)=1-pP(F3)=1-pP(F3)=1-pP(F3)=1-pSince the outcome of each trial is independent of the previous outcomes, we can replace the conditional probabilities with the marginal probabilities.Developing the Binomial Probability Distribution (n = 3)Developing the Binomial Probability Distribution (n = 3)AU*P(SSS)=p3P(SSF)=p2(1-p)P(SFS)=p(1-p)pP(SFF)=p(1-p)2P(FSS)=(1-p)p2P(FSF)=(1-p)p(1-p)P(FFS)=(1-p)2pP(FFF)=(1-p)3Let X be the number of successes in three trials. Then, X = 3 X =2 X = 1 X = 0P(X = 3) = p3P(X = 2) = 3p2(1-p)P(X = 1) = 3p(1-p)2P(X = 0) = (1- p)3This multiplier is calculated in the following formulaSSSSSS SSSDeveloping the Binomial Probability Distribution (n = 3)Calculating the Binomial ProbabilityAU*Calculating the Binomial ProbabilityIn general, The binomial probability is calculated by:for x=0, 1,…, n當r.v. X的機率分配為n次試行, 成功機率為p的二項分配時, 簡記為 X~Bin(n,p), 唸成X服從二項分配, 參數為 n, p.Calculating the Binomial ProbabilityAU*Example 7.9 & 7.10 Pat Statsdud is registered in a statistics course and intends to rely on luck to pass the next quiz. The quiz consists on 10 multiple choice questions with 5 possible choices for each question, only one of which is the correct answer. Pat will guess the answer to each question Find the following probabilities Pat gets no answer correct Pat gets two answer correct? Pat fails the quizCalculating the Binomial ProbabilityCalculating the Binomial ProbabilityAU*Solution Checking the conditions An answer can be either correct or incorrect. (“猜對” 稱為成功) There is a fixed finite number of trials (n=10) Each answer is independent of the others. The probability p of a correct answer (.20) does not change from question to question. Calculating the Binomial ProbabilityCalculating the Binomial ProbabilityAU*Solution – Continued Determining the binomial probabilities: Let X = the number of correct answers (猜對的題數)Calculating the Binomial ProbabilityProbability distributionAU*Probability distribution0 1 2R.Cumulative ProbabilityAU* = P(0) + P(1) + P(2) + P(3) + P(4) = .1074 + .2684 + .3020 + .2013 + .0881 =.9672Example 7.10 Determining the probabilities that Pat fails the quiz. A mark is considered a failure if it is less than 50%. Solution Pat fails the test if the number of correct answers is less than 5, which means less than or equal to 4.Cumulative ProbabilityP(X£4)二項機率表AU*二項機率表不教二項機率表. 用計算機來算機率, 取代查表求機率 Mean and Variance of Binomial VariableAU*E(X) = m = np V(X) = s2 = np(1-p) Example 7.11 If all the students in Pat’s class intend to guess the answers to the quiz, what is the mean and the standard deviation of the quiz mark? Solution m = np = 10(0.2) = 2. s = [np(1-p)]1/2 = [10(0.2)(0.8)]1/2 = 1.26.Mean and Variance of Binomial VariableBinomial Distribution- summary加分題加分題7.72 7.79AU*7.5 Poisson Distribution AU*The Poisson experiment typically fits cases of rare events that occur over a fixed amount of time or within a specified region Typical cases The number of errors a typist makes per page. The number of cars arriving at a service station in 1 hour. (The interval of time is 1 hour.) The number of flaws in a bolt of cloth. (The specific region is a bolt of cloth.) The number of accidents in 1 day on a particular stretch of highway. (The interval is defined by both time, 1 day, and space, the particular stretch of highway.)7.5 Poisson Distribution Properties of the Poisson ExperimentAU*The number of successes (events) that occur in a certain time interval is independent of the number of successes that occur in another time interval. The probability of a success in a certain time interval is the same for all time intervals of the same size, proportional to the size of the interval. The probability that two or more successes will occur in an interval approaches zero as the interval becomes smaller.Properties of the Poisson ExperimentThe Poisson Variable and DistributionAU*The Poisson Random Variable The Poisson variable indicates the number of successes that occur during a given time interval or in a specific region in a Poisson experiment Probability Distribution of the Poisson Random Variable. The Poisson Variable and DistributionThe Poisson Variable and DistributionAU*The Poisson Variable and Distribution課本245頁block 當r.v. X的機率分配為平均數為m的卜瓦松分配時, 簡記為 X~Po(m), 唸成X服從卜瓦松分配, 參數為m.Poisson Distributions (Graphs)AU*Poisson Distributions (Graphs) 0 1 2 3 4 5 Poisson probability distribution with m =1Poisson Distributions (Graphs)AU*Poisson Distributions (Graphs)Poisson probability distribution with m =2Poisson probability distribution with m =5Poisson probability distribution with m =7 0 1 2 3 4 5 6 0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Poisson DistributionAU*Poisson DistributionExample 7.12 The number of Typographical errors in new editions of textbooks is Poisson distributed with a mean of 1.5 per 100 pages. 100 pages of a new book are randomly selected. What is the probability that there are no typos? Solution Let r.v. X 為書中印刷錯誤的次數 由題意, m=1.5, 求 X=0 的機率 P(X=0)=.2231==Poisson Distribution…AU*Poisson Distribution…As mentioned on the Poisson experiment slide: The probability of a success is proportional to the size of the interval Thus, knowing an error rate of 1.5 typos per 100 pages, we can determine a mean value for a 400 page book as: m =1.5(4) = 6 typos / 400 pages.Poisson DistributionAU*Poisson DistributionExample 7.13 For a 400 page book calculate the following probabilities There are no typos There are five or fewer typos Solution P(X=0)= P(X£5)=P(0) +P(1) +P(2) +P(3) +P(4) +P(5) = 0.4457Important! A mean of 1.5 typos per100 pages, is equivalent to 6 typos per 400 pages.Finding Poisson ProbabilitiesThere is a very small chance there are no typos.卜瓦松表AU*卜瓦松表不教卜瓦松表. 用計算機來算機率, 取代查表求機率 加分題
本文档为【Ch07 Random variable and discrete PD 20071022】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_725133
暂无简介~
格式:ppt
大小:1MB
软件:PowerPoint
页数:0
分类:
上传时间:2010-08-08
浏览量:28