• 沒有找到結果。

# y: soft drink delivery time (minutes)

N/A
N/A
Protected

Academic year: 2022

Share "y: soft drink delivery time (minutes)"

Copied!
52
0
0

(1)

(2)

### 25 obs.

(3)

Coefficients:

Estimate Std. Error t value Pr(>|t|) (Intercept) 3.321 1.371 2.422 0.0237 * x1 2.176 0.124 17.546 ***

Residual standard error: 4.181 on 23 degrees of freedom Multiple R-Squared: 0.9305, Adjusted R-squared: 0.9275 F-statistic: 307.8 on 1 and 23 DF, p-value: 8.22e-15

fm2=lm(formula = y ~ x2) Coefficients:

Estimate Std. Error t value Pr(>|t|) (Intercept) 4.961 2.337360 2.123 0.0448 x2 0.042569 0.004506 9.447 ***

Residual standard error: 7.179 on 23 degrees of freedom Multiple R-Squared: 0.7951, Adjusted R-squared: 0.7862 F-statistic: 89.24 on 1 and 23 DF, p-value: 2.214e-09

(4)
(5)

### Cook's distance

Cook's distance is a measurement of the influence of the ith

data point on all the other data points. In other words, it tells how much influence the ith case has upon the

model. The formula to find Cook's distance, Di, is

where

is the predicted (fitted) value of the ith observation;

is the predicted value of the jth observation using a new regression equation found by deleting the ith case;

p is the number of parameters in the model MSE is the Mean Square Error

(6)

plot(fm1)

(7)

plot(fm1)

(8)

(9)

0

i

0

i

0

1 1

2 2

k k

j

0

1

1j

2

2j

k

kj

j

0

1

1j

2

2j

k

kj

(10)

2 2 2

2 1 1 2

0 2

2 1 2 2

1 1 1

0 1

2 2

1 1 0

0

1

2

0

1

2

(11)

### The Matrix Approach to Regression Analysis

The population regression

y y y

y

x x x x

x x x x

x x x x

x x x x

k

k

k

k

n n n nk

. . . ..

model:

. . .

...

...

...

. . . . .

. . . . .

. . . . .

.

1

2

3

11 12 13 1

21 22 23 2

31 32 33 3

1 2 3

1

2

1 1 1

1

=

β β β

β

ε ε ε

ε β ε

3

1

2

3

. . .

. . .

k k

Y X

The estimated regression

+

= +

model:

Y = Xb + e

(12)

1

1

2 1

2 1

(13)

2

1

## } }

### a Multiple Regression Model

(14)

A statistical test for the existence of a linear relationship between Y and any or all of the independent variables X1, x2, ..., Xk:

H0: β1 = β2 = ...= βk=0

H1: Not all the βi (i=1,2,...,k) are 0

A statistical test for the existence of a linear relationship between Y and any or all of the independent variables X1, x2, ..., Xk:

H0: β1 = β2 = ...= βk=0

H1: Not all the βi (i=1,2,...,k) are 0

Source of Variation

Sum of Squares

Degrees of

Freedom Mean Square

F Ratio Regression SSR k

Error SSE n - (k+1)

Total SST n-1

MSR SSR

= k

MSE SSE

n k

= ( ( + 1))

MST SST

= n

( 1)

### Regression Model

(15)

The multiple coefficient of determination, R2

, measures the proportion of the variation in the dependent variable that is explained by the combination of the independent variables in the multiple regression model:

### SST R

2

The is an unbiased

estimator of the variance of the population errors, denoted by 2

:

### =

mean square error

Standard error of estimate

ε, σ :

( ( ))

( \$) ( ( ))

MSE SSE

n k

y y n k

= + =

+ 1

2 1

2

1

Errors: y - y\$

### How Good is the Regression

(16)

The , R2 , is the coefficient of

determination with the SSE and SST divided by their respective degrees of freedom:

= 1 -

SSE (n - (k + 1))

SST (n - 1)

adjusted multiple coefficient of determination

R 2

### SSE SSR

= SSR

SST = 1 - SSE R2 SST

Example 11-1: s = 1.911 R-sq = 96.1% R-sq(adj) = 95.0%

Example 11-1: s = 1.911 R-sq = 96.1% R-sq(adj) = 95.0%

### Adjusted Coefficient of Determination

(17)

Source of Variation

Sum of Squares

Degrees of

Freedom Mean Square F Ratio Regression SSR (k)

Error SSE (n-(k+1))

=(n-k-1)

Total SST (n-1)

MSR SSR

= k

MSE SSE

n k

= ( ( +1))

MST SST

= n

( 1)

F MSR

= MSE

=

SSR SST

= 1 - SSE SST R2

= 1 -

SSE (n - (k + 1))

SST (n - 1)

= MSE MST R2

F

R R

n k k

=

+

2

1 2

1

( )

( ( ))

( )

(18)

0

1

1

1

0

2

1

2

0

k

1

k

0

1

1

1

0

2

1

2

0

k

1

k

n k

i

i

( ( + )

1

### Individual Regression Parameters

(19)

pairs(soft drink)

(20)

x1 0.965 1.000 0.824 x2 0.892 0.824 1.000 Call: lm( y ~ x1 + x2) Coefficients:

(Intercept) 2.341 x1 1.616 x2 0.0144

Source of Variation

Sum of Squares

Degrees of

Freedom Mean Square

F Ratio

Regression 5550 2 2775 261.2

Error 233.7 22 10.62

Total SST 24

(21)

Estimate Std. Error t value Pr(>|t|) (Int) 2.341231 1.096730 2.135 *

x1 1.615907 0.170735 9.464 ***

x2 0.014385 0.003613 3.981 ***

Residual standard error: 3.259 on 22 degrees of freedom Multiple R-Squared: 0.9596, Adjusted R-squared: 0.9559 F-statistic: 261.2 on 2 and 22 DF, p-value: 4.687e-16

Confint(model)

2.5 % 97.5 %

x1 1.261824662 1.96998976 x2 0.006891745 0.02187791

### 95% C.I. on the delivery time?

fitted= 19.22432 CI. [17.65 20.79] PI. [12.285 26.16]

(22)

2 11.50 3 220 10.35 1.15 0.36 0.07 3 12.03 3 340 12.08 -0.05 -0.02 0.10 4 14.88 4 80 9.96 4.92 1.64 0.09 5 13.75 6 150 14.19 -0.44 -0.14 0.08 6 18.11 7 330 18.40 -0.29 -0.09 0.04 7 8.00 2 110 7.16 0.84 0.26 0.08 8 17.83 7 210 16.67 1.16 0.36 0.06 9 79.24 30 1460 71.82 7.42 4.31 0.50 10 21.50 5 605 19.12 2.38 0.81 0.20 11 40.33 16 688 38.09 2.24 0.71 0.09 12 21.00 10 215 21.59 -0.59 -0.19 0.11 13 13.50 4 255 12.47 1.03 0.32 0.06 14 19.75 6 462 18.68 1.07 0.33 0.08 15 24.00 9 448 23.33 0.67 0.21 0.04 16 29.00 10 776 29.66 -0.66 -0.22 0.17 17 15.35 6 200 14.91 0.44 0.13 0.06 18 19.00 7 132 15.55 3.45 1.12 0.10 19 9.50 3 36 7.71 1.79 0.57 0.10 20 35.10 17 770 40.89 -5.79 -2.00 0.10 21 17.90 10 140 20.51 -2.61 -0.87 0.17 22 52.32 26 810 56.01 -3.69 -1.49 0.39 23 18.75 9 450 23.36 -4.61 -1.48 0.04 24 19.83 8 635 24.40 -4.57 -1.54 0.12 25 10.75 4 150 10.96 -0.21 -0.07 0.07

residual analysis

(23)
(24)

### An autocorrelation is a correlation of the values of a variable with values of the same variable lagged one or more periods back. Consequences of autocorrelation include inaccurate estimates of variances and inaccurate predictions.

Lagged Residuals

i εi εi-1 εi-2 εi-3 εi-4

1 1.0 * * * *

2 0.0 1.0 * * *

3 -1.0 0.0 1.0 * *

4 2.0 -1.0 0.0 1.0 *

5 3.0 2.0 -1.0 0.0 1.0

6 -2.0 3.0 2.0 -1.0 0.0

7 1.0 -2.0 3.0 2.0 -1.0

8 1.5 1.0 -2.0 3.0 2.0

9 1.0 1.5 1.0 -2.0 3.0

10 -2.5 1.0 1.5 1.0 -2.0

Lagged Residuals

i εi εi-1 εi-2 εi-3 εi-4

1 1.0 * * * *

2 0.0 1.0 * * *

3 -1.0 0.0 1.0 * *

4 2.0 -1.0 0.0 1.0 *

5 3.0 2.0 -1.0 0.0 1.0

6 -2.0 3.0 2.0 -1.0 0.0

7 1.0 -2.0 3.0 2.0 -1.0

8 1.5 1.0 -2.0 3.0 2.0

9 1.0 1.5 1.0 -2.0 3.0

10 -2.5 1.0 1.5 1.0 -2.0

The Durbin-Watson test (first-order autocorrelation):

H0: ρ1 = 0 H1: ρ1≠ 0

The Durbin-Watson test statistic:

The Durbin-Watson test (first-order autocorrelation):

H0: ρ1 = 0 H1: ρ1≠ 0

The Durbin-Watson test statistic:

d i ei ei

n

i ei

= =∑ n− −

∑=

( )

1 2 2

2 1

(25)

(26)

(27)

### selection

(28)
(29)

X2 0.924 1.000 0.085 0.878 X3 0.458 0.085 1.000 0.142 Y 0.843 0.878 0.142 1.000

(30)

(31)

(32)

(33)

(34)
(35)
(36)

(37)

(38)

(39)
(40)

(41)
(42)

(43)

(44)

(45)

(46)

(47)

### •

Add one variable at a time to the model, on the basis of its F statistic

### •

Remove one variable at a time, on the basis of its F statistic

### •

Adds variables to the model and subtracts variables from the model, on the basis of the F statistic

### •

Add one variable at a time to the model, on the basis of its F statistic

### •

Remove one variable at a time, on the basis of its F statistic

### •

Adds variables to the model and subtracts variables from the model, on the basis of the F statistic

(48)

Compute F statistic for each variable not in the model

Enter most significant (smallest p-value) variable into model

Calculate partial F for all variables in the model

Is there a variable with p-value > Pout? Remove variable Stop

Yes

Is there at least one variable with p-value > Pin? No

No

(49)

y j i

j j ij

ij s

y y y

s x

Z x

− =

= , 0

*

1 i1

k ik

i

− =

= −

= − ( )2

1

* 1 , 1

1

j ij

jj y

j i

j j ij

ij s x x

s y y

y n s

x x

z n

(50)

### (7.46b)

(51)

1.0 0.5

0.0 100

50

0

Rh2 VIF

Relationship between VIF and Rh2

h

2 2

h

h

h

2

(52)

### Problem

Animal or vegetable fats and oils and their fractiors, boiled, oxidised, dehydrated, sulphurised, blown, polymerised by heat in vacuum or in inert gas or otherwise chemically

Milk and cream, in powder, granule or other solid form, of a fat content, by weight, exceeding 1.5%, not containing added sugar or other sweetening matter.

Estimated resident population by age and sex in statistical local areas, New South Wales, June 1990 (No. Canberra, Australian Capital

This is a reflection of the fact that the method enforces the equation element- by-element and of the use of the numerical trace.. In our simple setting, this

zero-coupon bond prices, forward rates, or the short rate.. • Bond price and forward rate models are usually non-Markovian

• P u is the price of the i-period zero-coupon bond one period from now if the short rate makes an up move. • P d is the price of the i-period zero-coupon bond one period from now

• Extension risk is due to the slowdown of prepayments when interest rates climb, making the investor earn the security’s lower coupon rate rather than the market’s higher rate.

• A delta-gamma hedge is a delta hedge that maintains zero portfolio gamma; it is gamma neutral.. • To meet this extra condition, one more security needs to be

O.K., let’s study chiral phase transition. Quark

◆ Understand the time evolutions of the matrix model to reveal the time evolution of string/gravity. ◆ Study the GGE and consider the application to string and

y A stochastic process is a collection of &#34;similar&#34; random variables ordered over time.. variables ordered

Microphone and 600 ohm line conduits shall be mechanically and electrically connected to receptacle boxes and electrically grounded to the audio system ground point.. Lines in

Teacher then briefly explains the answers on Teachers’ Reference: Appendix 1 [Suggested Answers for Worksheet 1 (Understanding of Happy Life among Different Jewish Sects in

We showed that the BCDM is a unifying model in that conceptual instances could be mapped into instances of five existing bitemporal representational data models: a first normal

The Hull-White Model: Calibration with Irregular Trinomial Trees (concluded).. • Recall that the algorithm ﬁgured out θ(t i ) that matches the spot rate r(0, t i+2 ) in order

The Hull-White Model: Calibration with Irregular Trinomial Trees (concluded).. • Recall that the algorithm ﬁgured out θ(t i ) that matches the spot rate r(0, t i+2 ) in order

First, when the premise variables in the fuzzy plant model are available, an H ∞ fuzzy dynamic output feedback controller, which uses the same premise variables as the T-S

This research uses 28 ITHs as the DMUs of DEA to assessment relative operating efficiency of model 1 (input variables are full time employees, cost of labor,

Based on the Technology Acceptance Model (TAM), the study was undertaken to understand whether the characteristics of social networking, which are defined as external variables

The purpose of the study is to explore the relationship among variables of hypermarkets consumers’ flow experience and the trust, the external variables, and the internal variables

In this thesis, the prediction model for bankruptcy is studied, which includes the extraction of fincial variables and the establish of prediction model.In the variable extraction,

The lead-time model will assist the estimation of the time to market product and the effective utilization of resources in the R&amp;D procedures.. To achieve the expected time

By reviewing literature and integrating experts’ opinion on this issue, a systematic recruitment and selection model on the basis of competency is proposed, and applied to