Stochastic Relationships and Scatter Diagrams 0 2 2007

  • Slides: 87
Download presentation

Stochastic Relationships and Scatter Diagrams 截距 0 2 ©蘇國賢 2007

Stochastic Relationships and Scatter Diagrams 截距 0 2 ©蘇國賢 2007

Deterministic Relationship and Stochastic Relationships 在Y=f(X)的函數關係中,若每一個x值僅對應於單 一的y值,則X, Y之間的關係為完全決定的函數關 係,稱為確定模型(deterministic) Deterministic Relationships 電腦每台$960元,X為電腦台數,Y為總收益 4 ©蘇國賢

Deterministic Relationship and Stochastic Relationships 在Y=f(X)的函數關係中,若每一個x值僅對應於單 一的y值,則X, Y之間的關係為完全決定的函數關 係,稱為確定模型(deterministic) Deterministic Relationships 電腦每台$960元,X為電腦台數,Y為總收益 4 ©蘇國賢 2007

Deterministic Relationship and Stochastic Relationships 華氏與攝氏的關係為確定模型(deterministic) 所有的資料點都 剛好落在線上 5 ©蘇國賢 2007

Deterministic Relationship and Stochastic Relationships 華氏與攝氏的關係為確定模型(deterministic) 所有的資料點都 剛好落在線上 5 ©蘇國賢 2007

Deterministic Relationship and Stochastic Relationships ei的來源: (1)行為的隨機性(human indeterminacy) (2)測量的誤差(measurement error) (3)其他無法觀察到影響Y的因素(omission of the influence

Deterministic Relationship and Stochastic Relationships ei的來源: (1)行為的隨機性(human indeterminacy) (2)測量的誤差(measurement error) (3)其他無法觀察到影響Y的因素(omission of the influence of innumerable chance events) 8 ©蘇國賢 2007

F(Y|X) Y E(y 1) E(y 2) x 1 E(y 3) x 2 x 3

F(Y|X) Y E(y 1) E(y 2) x 1 E(y 3) x 2 x 3 12 ©蘇國賢 2007

Method of Least Squares 尋求迴歸係數的估計式有許多種方法,最常用 的為 普通最小平方法(ordinary least squares method)及最大概似法(Maximum likelihood method) 21 ©蘇國賢

Method of Least Squares 尋求迴歸係數的估計式有許多種方法,最常用 的為 普通最小平方法(ordinary least squares method)及最大概似法(Maximum likelihood method) 21 ©蘇國賢 2007

Method of Least Squares 24 ©蘇國賢 2007

Method of Least Squares 24 ©蘇國賢 2007

Residual Sum of Squares 當b 0=? b 1 =? 時SSE會是最小值? 26 ©蘇國賢 2007

Residual Sum of Squares 當b 0=? b 1 =? 時SSE會是最小值? 26 ©蘇國賢 2007

Stochastic Relationships and Scatter Diagrams 直線上任兩 點P 1 P 2,從P 1 移至P 2,x軸 座標移動

Stochastic Relationships and Scatter Diagrams 直線上任兩 點P 1 P 2,從P 1 移至P 2,x軸 座標移動 △x = x 2 - x 1 觀 念 依 變 項y y軸座標移動 △y = y 2 - y 1 自變項x 27 ©蘇國賢 2007

Stochastic Relationships and Scatter Diagrams 直線上任兩 點P 1 P 2,此線 的斜率定義 為: 觀 念

Stochastic Relationships and Scatter Diagrams 直線上任兩 點P 1 P 2,此線 的斜率定義 為: 觀 念 依 變 項y 自變項x 28 ©蘇國賢 2007

微分(derivative)簡介 Secant line 割線 34 ©蘇國賢 2007

微分(derivative)簡介 Secant line 割線 34 ©蘇國賢 2007

微分(derivative)簡介 Secant line 割線 35 ©蘇國賢 2007

微分(derivative)簡介 Secant line 割線 35 ©蘇國賢 2007

微分(derivative)簡介 Secant line 割線 36 ©蘇國賢 2007

微分(derivative)簡介 Secant line 割線 36 ©蘇國賢 2007

微分(derivative)簡介 Tangent line 切線 37 ©蘇國賢 2007

微分(derivative)簡介 Tangent line 切線 37 ©蘇國賢 2007

Slope of the Tangent Line Tangent lin 切線 38 ©蘇國賢 2007

Slope of the Tangent Line Tangent lin 切線 38 ©蘇國賢 2007

Slope of the Tangent Line Tangent lin 切線 39 ©蘇國賢 2007

Slope of the Tangent Line Tangent lin 切線 39 ©蘇國賢 2007

Slope of the Tangent Line 40 ©蘇國賢 2007

Slope of the Tangent Line 40 ©蘇國賢 2007

Slope of the Tangent Line Tangent lin 切線 41 ©蘇國賢 2007

Slope of the Tangent Line Tangent lin 切線 41 ©蘇國賢 2007

Slope of the Tangent Line Tangent lin 切線 m = -4 m=2 42 ©蘇國賢

Slope of the Tangent Line Tangent lin 切線 m = -4 m=2 42 ©蘇國賢 2007

Derivative • The derivative of function f with respect to x is the function

Derivative • The derivative of function f with respect to x is the function f ' defined by 43 ©蘇國賢 2007

Notation for the derivative • f ' (x) 讀做�"f prime of x" • y

Notation for the derivative • f ' (x) 讀做�"f prime of x" • y ' 讀做 "y prime" • "the derivative of y with respect to x" "dee y dee x" • "the derivative of f(x) with respect to x" "dee f(x) dee x" 44 ©蘇國賢 2007

Let f(x) = x 3, Find the derivative 45 ©蘇國賢 2007

Let f(x) = x 3, Find the derivative 45 ©蘇國賢 2007

Let f(x) = x 2 -5 x+1, Find the derivative 46 ©蘇國賢 2007

Let f(x) = x 2 -5 x+1, Find the derivative 46 ©蘇國賢 2007

Basic Rules for Differentiation • Rule 1: the derivative of a constant is zero

Basic Rules for Differentiation • Rule 1: the derivative of a constant is zero 47 ©蘇國賢 2007

Basic Rules for Differentiation • Rule 2: the derivative of a linear function 48

Basic Rules for Differentiation • Rule 2: the derivative of a linear function 48 ©蘇國賢 2007

Basic Rules for Differentiation • Rule 3: the derivative of a power function 49

Basic Rules for Differentiation • Rule 3: the derivative of a power function 49 ©蘇國賢 2007

Residual Sum of Squares 當b 0=? b 1 =? 時SSE會是最小值? 51 ©蘇國賢 2007

Residual Sum of Squares 當b 0=? b 1 =? 時SSE會是最小值? 51 ©蘇國賢 2007

Residual Sum of Squares SSE會有最小值 52 ©蘇國賢 2007

Residual Sum of Squares SSE會有最小值 52 ©蘇國賢 2007

Residual Sum of Squares 53 ©蘇國賢 2007

Residual Sum of Squares 53 ©蘇國賢 2007

Residual Sum of Squares Normal Equation 將(1)式兩邊除以n 54 ©蘇國賢 2007

Residual Sum of Squares Normal Equation 將(1)式兩邊除以n 54 ©蘇國賢 2007

Residual Sum of Squares 將(1)式乘以Σxi 將(2)式乘以n 55 ©蘇國賢 2007

Residual Sum of Squares 將(1)式乘以Σxi 將(2)式乘以n 55 ©蘇國賢 2007

Residual Sum of Squares 將(5)-(4) 56 ©蘇國賢 2007

Residual Sum of Squares 將(5)-(4) 56 ©蘇國賢 2007

Residual Sum of Squares 上下同除n 57 ©蘇國賢 2007

Residual Sum of Squares 上下同除n 57 ©蘇國賢 2007

Residual Sum of Squares 58 ©蘇國賢 2007

Residual Sum of Squares 58 ©蘇國賢 2007

Residual Sum of Squares 59 ©蘇國賢 2007

Residual Sum of Squares 59 ©蘇國賢 2007

Sample Correlation Coefficient, r 樣本相關係數 • 樣本相關係數: 60 ©蘇國賢 2007

Sample Correlation Coefficient, r 樣本相關係數 • 樣本相關係數: 60 ©蘇國賢 2007

STATA 64 ©蘇國賢 2007

STATA 64 ©蘇國賢 2007

例題 求x與y的correlation? 65 ©蘇國賢 2007

例題 求x與y的correlation? 65 ©蘇國賢 2007

變異數的分解 總變異量 Sum of Square Total 解釋變異量 Regression Sum of Square 未解釋變異量 Sum of

變異數的分解 總變異量 Sum of Square Total 解釋變異量 Regression Sum of Square 未解釋變異量 Sum of Square Error 75 ©蘇國賢 2007

r=0. 994 r 2=0. 989 83 ©蘇國賢 2007

r=0. 994 r 2=0. 989 83 ©蘇國賢 2007

r=0. 921 r 2=0. 849 84 ©蘇國賢 2007

r=0. 921 r 2=0. 849 84 ©蘇國賢 2007

Page 136 85 ©蘇國賢 2007

Page 136 85 ©蘇國賢 2007

r 2 Variance of value y = 5. 30091 Variance of predicted y= 5.

r 2 Variance of value y = 5. 30091 Variance of predicted y= 5. 24135 86 ©蘇國賢 2007