Random Variable A variable X is a random
Random Variable隨機變數 定 義 • A variable X is a random variable if the value that X assumes at the conclusion of an experiment is a chance or random occurrence that cannot be predicted with certainty in advance. 社會統計(上) ©蘇國賢 2007 1
Discrete Random Variable 間斷型(不連續)隨機變數 定 義 • A random variable X is discrete if X can assume only a finite or countably infinite number of different values. • 一隨機變數之變量若為有限個或無限 但可數,稱為discrete r. v. • 台北十月份下雨的天數。 • 高速公路一天的死亡人數。 社會統計(上) ©蘇國賢 2007 4
Discrete Random Variable 間斷隨機變數 定 義 • If X is a discrete random variable, the probability function (p. f. )機率函數 of X is defined as the function f such that for each real number x, 社會統計(上) ©蘇國賢 2007 6
Discrete Probability Distributions • P(X = xi)代表隨機變數等於某特定變量的機 率,如P( X = 2)銅板出現兩次反面的機率, 有時候會簡化為P(xi) 或f(xi)。 • A discrete probability distribution is a table, graph, or rule that associates a probability P(X=xi) with each possible value xi that the discrete random variable can assume. • 將一個間斷隨機函數的所有可能變量xi所相 對應的機率P(X=xi)列出,稱為間斷機率分配 (discrete probability distribution)。 社會統計(上) ©蘇國賢 2007 7
例題 • x 1=$0, x 2=$500, x 3=$750, x 4=$1000 • 樣本空間S={$0, $500, $750, $1000} • 與其相對應的機率為. 4, . 3, . 2, . 1 The probability distribution of a random variable is a theoretical model for the relative frequency distribution of a population. 社會統計(上) ©蘇國賢 2007 10
Cumulative Distribution Function • Let X be a discrete or continuous random variable and let x be any real number. The cumulative distribution function (CDF) of X is the function 則稱F(X)為隨機變數X的累加機率 函數 社會統計(上) ©蘇國賢 2007 13
Properties of Cumulative Distribution Function • Let X be a discrete r. v. that can assume the values x 1, x 2, …xn, where x 1<x 2<…<xn. Then F(x) denote the probability that X assumes a value that is less than or equal to xr, and is given by: 社會統計(上) ©蘇國賢 2007 14
Properties of Cumulative Distribution Function 社會統計(上) ©蘇國賢 2007 16
Expected value of a discrete random variable • The expected value, or mean, of a discrete random variable is the weighted average of the possible values of the random variable where the weight assigned to xi is the probability P(X=xi) 社會統計(上) ©蘇國賢 2007 18
Expected value of a function of X • Let X be a discrete random variable, and let Y be any function of X such that Y = g(X). Then the expected value of Y, or the expected value of g(X), is 社會統計(上) ©蘇國賢 2007 21
Properties of Expectations • Property 1: E(c) = c • 若c為任意常數,求E(c) =? 社會統計(上) ©蘇國賢 2007 26
Properties of Expectations • Property 2: if Y=a.X+b, where a and b are constant, then E(Y) = a.E(X) + b =1 E(X) 社會統計(上) ©蘇國賢 2007 27
Properties of Expectations • 例題:若E(X)=5, 求 E(3 X-5)=? • E(3 X-5) = 3 E(X) – 5 = 15 -5 =10 社會統計(上) ©蘇國賢 2007 28
Properties of Expectations • property 3: if X 1, X 2, X 3…Xn are n random variable such that each expectation E(Xi) exists (i = 1, 2, …n), then E(X 1+X 2…+Xn) = E(X 1) +E(X 2) +… E(Xn) 社會統計(上) ©蘇國賢 2007 33
Properties of Expectations • It follows from property 2 and property 3 that for any constant a 1, a 2, …an and b, E(a 1 X 1+a 2 X 2…+an. Xn) = a 1 E(X 1) +a 2 E(X 2) +… +an. E(Xn) 社會統計(上) ©蘇國賢 2007 34
Properties of Expectations • Property 4: • If X 1, …Xn are n independent variables such that each expectation E(Xi) exists, then • E(X 1.X 2.X 3…Xn)=E(X 1)E(X 2)…E(Xn) 社會統計(上) ©蘇國賢 2007 35
Properties of Expectations • Proof • X and Y are independent variables, P(XY)= P(X)P(Y) 社會統計(上) ©蘇國賢 2007 36
Rules for Means • Property 1: c is a constant, then E(c) = c • Property 2: if Y=a.X+b, where a and b are constant, then E(Y) = a.E(X) + b • Property 3: if X 1, X 2, X 3…Xn are n random variable such that each expectation E(Xi) exists (i = 1, 2, …n), then E(X 1+X 2…+Xn) = E(X 1) +E(X 2) +… E(Xn) Property 4: If X 1, …Xn are n independent variables such that each expectation E(Xi) exists, then E(X 1.X 2.X 3…Xn)=E(X 1)E(X 2)…E(Xn) 社會統計(上) ©蘇國賢 2007 37
Variance of Discrete Random Variable • 非連續隨機變數的變異數 社會統計(上) ©蘇國賢 2007 38
Variance of Discrete Random Variable 社會統計(上) ©蘇國賢 2007 39
Variance of Discrete Random Variable = 2. 82 – (1. 44)2 = ΣX 2 f(x) – u 2 社會統計(上) ©蘇國賢 2007 40
Properties of the variance • Var(c)=0, c 為常數項 • 更正式的陳述:Var(X)=0 if and only if there exists a constant c such that P(X=c)=1. 社會統計(上) ©蘇國賢 2007 41
Properties of the variance • • Property 5: Var(a. X+b)=a 2 Var(X) Proof. 因為E(a. X+b)=a. E(X)+b=au+b Var(a. X+b)=E[((a. X+b) – E(a. X+b))2] =E[(a. X+b – au –b)2]=E[(a. X-au)2] =a 2 E[(X-u)2] 社會統計(上) ©蘇國賢 2007 42
Properties of the variance • Property 6: • If X 1, …Xn are independent random variables, then Var(X 1+…+Xn) = Var(X 1)+ …+Var(Xn) 社會統計(上) ©蘇國賢 2007 43
Properties of the variance • • Proof. 以n=2為例,If E(X 1) = u 1 and E(X 2) = u 2 E(X 1+X 2)=u 1+u 2 Var(X 1+X 2)=E[(X 1+X 2 -u 1 -u 2)2] =E[(X 1 -u 1)2+(X 2 -u 2)2+2(X 1 -u 1)(X 2 -u 2)] =Var(X 1) + Var(X 2) +2 E[(X 1 -u 1)(X 2 -u 2)] X 1, X 2 are independent, 根據property 4 E[(X 1 -u 1)(X 2 -u 2)]=E(X 1 -u 1)E(X 2 -u 2)=0 社會統計(上) ©蘇國賢 2007 44
例題 • • • X, Y, Z are independent and E(X)=1, E(Y)=4, E(Z)=3 Var(X)=3, Var(Y)=7, Var(Z)=2 What is the mean and variance of U=3 X+4 Y E(U)=E(3 X+4 Y)=3 E(X) + 4 E(Y) =3· 1+4· 4 = 19 Var(U) = Var(3 X+4 Y) = 9 Var(X) + 16 Var(Y) =9*3+16*7 = 139 社會統計(上) ©蘇國賢 2007 45
例題 • • • E(X)= (x)f(x)=1(. 5)+2(. 3)+3(. 2)=1. 7 E(X 2)= (x 2)f(x)=1(. 5)+4(. 3)+9(. 2)=3. 5 Var(X)=E(X 2)-[E(X)]2 =3. 5 -(1. 7)2=0. 61 令Y= 20000+40000 X E(Y)=20000+40000 E(X)=88000 社會統計(上) ©蘇國賢 2007 47
- Slides: 47