Вы находитесь на странице: 1из 48

!

"#$%&'()*+%*,,-%*+
./0%*,#-(123,$4(5 6#-&(#
!"#$%#&'#("#&)*+*,"-*.&/01
2"#$%#-#("#3%*+*,"-*45*+"-"3"6

!"#$%&'()*)%+,-.&$ /)012,3 4)%+,-.&$ 56) 0--17&8 !.,.7'.7%' ,38)9$":,:717.; <"$)=3>73&&$' ?@ABA)


C"3.>"D&$;),38)EABA)F#3>&$ G H"+3)I71&; J)!"3' K38)&87.7"3
How can we decide whether the standard model is
appropriate?

!"#$%&'()(*%'(%* 4'0'<"*)1*,.('*$=*
Assumptions +%$*,&',-*%&'* >)$7.%)$1
.((/0#%)$12

3?.##)1?
“independence” 3 4/1(*%'(% 3@.%,&)1?
(random pattern)
3 5.6%7'%%8(*%'(% 3+9)1'.62*6'?6'(()$1
3 95:8(*%'(% 3A)0'*('6)'(*+B4CDB2

Normal
distribution
;$60.7)%"*%'(%* A6.1(=$60*<.%.

Quality Engineering- BM Colosimo


Gapping
A first (trivial) method to deal with autocorrelated data consists of
reducing the sampling frequency
! With reference to previous data – let’s take one data out of 10.

Quality Engineering- BM Colosimo


!
Batching

A second approach to “remove” the autocorrelation is batching *:


! This is a model-free approach.
! The sequence of data is organized in sequential batches (not
overlapped) and it is considered the average of values in each
batch.

! #
" ! = ! "' ! "!&# + $ %%%%%%%%%%%%%% ! = !"#"$$$
# $ =!

"#$%&'$()'*%&+,)(#$-.%/$01#-+(12%3,(&+%41,$%5/34%6'$()'*%&+,)(%7889:
Quality Engineering- BM Colosimo
!
Batching
Ex:
1000 data from a chemical process

b = 10

5
Batching

The main disadvantage of batching is the difficulty to define the


appropriate value of b (batch size).

Some empirical approaches have been proposed.

Ex:
1. Initialize b=1
2. Compute the autocorrelation coefficient at the first lag
3. If the coefficient is smaller than 0.1 go to step 5
4. Set b=2*b, go to step 2
5. end

Quality Engineering- BM Colosimo


!
Gapping/Batching

1: Both the approaches are applicable to stationary processes (constant


mean)

2: Both the approaches induce loss of information

These are approaches aimed at avoiding to deal with the autocorrelation issue
instead of facing it.
How can we identify the appropriate model in case of nonrandom data?
-Regression
-ARIMA

Quality Engineering- BM Colosimo


!
Process model

Basic model: "! = µ! + ! !


with !µ! = µ'''!"#$%& # ! + ) #$%&'("" !* !

"##$%& '#(!!

Quality Engineering- BM Colosimo


!
Linear regression

We can look for the model/coefficients to minimize the Sum of Squared Errors
(Minimum Mean Squared Error – MSE – approach)

"! = µ! + ! ! From this model, we take new data

#"$ $$$$$$$" = !"###" !

! " !
$$% = ! $ #" " µ" # = ! # " "
" =! " =!
Observed data Deterministic (assumed known)

Quality Engineering- BM Colosimo


!
In order to identify the model:
1. we have to assume the model “structure”

ex : µt = cost, µt = at + b,
µt = at 2 + bt + c, µt = a ln t,
(! "2 = cost)
For the sake of simplicity che can assume models linear with reference
to the unnown parameters: LINEAR REGRESSION

ex: non linear : µt = at + bt c


if it were µt = bt c ! ln µt = ln b + c ln t (linear)

Quality Engineering- BM Colosimo


!"
2. We have to estimate the unknown parameters by minimizing SSE

! " !
$$% = ! $ #" " µ" # = ! # " "
" =! " =!
Observed data Unknow mean (deterministic)

ex : µ̂t = côst, µ̂t = ât + b̂, µ̂t = ât 2 + b̂t + ĉ, µ̂t = â ln t
324'/5
"! = µ! + ! ! "! ! = µ! ! "#$%&'$()*+)$,()-($(.&%/%#$%0
1'.$)*+)$,()&*-(2

Quality Engineering- BM Colosimo


!!
It is a general model, whereµt = µ (cost) is a special case:
Assume the “true” model is µt = b 0
– From this model we observe datayt t = 1,..., n

Assumed model: Yt = µ + e t = b 0 + e t
n 2 n
Let find bˆ0 = b0 so to minimize SSE: SSE = å ( yt - µt ) = å e t 2
t =1 t =1

12
Regression

observed
n assumed
SSE = å ( yt - b 0 )2
t =1
¶SSE n n
= -2 å ( yt - b0 ) = 0 å yt - nb0 = 0
¶b 0 t =1 t =1
1 n n n
Þ b0 = å yt = y = = - ˆ 2
= - 2
n t =1 SSE ( b0 ) SSE å t( y y ) å t 0
( y b )
t =1 t =1

Difference:
S(b0) function to be minimized yˆ = y
SSE = min S ( b0 )
b0

13
TREND
50 sequentially produced items: elongation of a spring subject to a
force of 20 g
(Deming 1986: deming.dat)
! "#$%&'( ! "#$%&'( ! "#$%&'( ! "#$%&'( ! "#$%&'(
) *+**),-, )) *+**).., /) *+**)/*0 .) *+**))*1 ,) *+***1-,
/ *+**),21 )/ *+**)*0. // *+**)/), ./ *+***33- ,/ *+**))*)
. *+**)./ ). *+**)/*0 /. *+**)*10 .. *+***311 ,. *+***1,
, *+**).). ), *+**))*) /, *+**)//) ., *+***31) ,, *+***1-,
- *+**)/*0 )- *+**))*) /- *+**).., .- *+***30, ,- *+***0/
2 *+**).., )2 *+***30, /2 *+**)*3, .2 *+**)*3, ,2 *+***30,
0 *+**)//) )0 *+**)/ /0 *+***30, .0 *+***31) ,0 *+***1-,
1 *+**),-, )1 *+**)/ /1 *+**)))- .1 *+***12) ,1 *+***30,
3 *+**)/ )3 *+**)*0. /3 *+***30, .3 *+**)*10 ,3 *+***1,0
)* *+**)/), /* *+**)/ .* *+**))*) ,* *+***31) -* *+***2/)

"'""!&

34
#!
2034/3567

-./012

"'""!"
$

0-,*12
!
"'"""&
!"!!!+!"!!!*!"!!!)!"!!!(!"!!#!!"!!##!"!!#'!"!!#&!"!!#%!"!!#$ ()*+, !" #" $" %" &"
,-./01
Quality Engineering- BM Colosimo
!"#$%&'()*+%*,,-%*+ ./
Trend
Trend? “True” model Yt = b 0 + b1xt + e t (1)
– In the example :
xt = t regressor or predictor
– Observations: yt t = 1,...,n

Estimated model yˆt = b0 + b1xt


where b0 = β̂0 b1 = β̂1
n
2
Find b0 ,b1 to minimize (
SSE = ∑ yt − β0 − β1xt )
t=1
& ∂SSE
n
( =0
2 ( ∂β0 β̂0 = b0
( )
SSE = ∑ yt − β0 − β1xt → '
( ∂SSE

β̂1 = b1
t=1 =0
( ∂β1
)
n
∂SSE
∂β0
( )
= −2∑ yt − b0 − b1xt = 0 ny − nb0 − nb1x = 0 ⇒ b0 = y − b1x
15
t=1
!
&&' = ! ( $" " % # " %! #" )" "" = # # "!!
" =!
$&&'
$%!
= #$$$$$$$
$&&'
$%!
! !
(
= "" ! #" ( $" " %# " %! #" ) = "" ! #" $" " #" $ + %! #" # " %! #" " = #
" =! " =! observe that
)
!

" =!
!

" =!
( )
"
! (#" $" " #" $ ) + %! ! #" # " #" = #$$$ # # "
n

( xt ! x ) =
n

"( y ! y ) = 0
t
t=1 t=1
! !
(! " ) !
! (#" $" " #" $ ) " # ! ( $" " $ ) + %! ! #" # " #" + %! # ! (#" " # ) = #
" =! " =! " =! " =!
!
(
! " "
! (#" $" " #" $ " # $" + # $ ) + %! ! #" # " #" + # #" " # = #
" =! " =!
)
! ! "
! (#" " # )( $" " $ ) " %! ! (#" " # ) = #
" =! " =!
!
! (#" " # )( $" " $ )
# %! = " =!
!
! (#" " # )
" $%&$
" =! !"

Quality Engineering- BM Colosimo


Cont.

Therefore Yt = !0 + !1 xt + !t ! ŷt = b0 + b1 xt
$ n
& # t=1
(xt " x )(yt " y )
&& b1 = n

min SSE ! % # t=1


(x t " x ) 2

&
&
&' b0 = y " b1 x

n
Sxx = " (xt ! x )2 Sxy
t=1
define n
# b1 =
Sxy = " (xt ! x )(yt ! y ) Sxx
t=1
!"

Quality Engineering- BM Colosimo


Observe that

! !"#$%& #$%&'()(&*(&++$,%
#$%&'()(&*(&++$,%' -$(+.),(/&()0,/&#
1.)$+)-2%3.$,%),-),%&)+$%*#&)(&*(&++,( 4#$%&'()-2%3.$,%),-)!"#"5

! 6'7)'..&%.$,%8
!0 , !1 deterministic values (unknown)
b = !ˆ , b = !ˆ random variable (they are function of observed data)
0 0 1 1
! 1-).9&).(2&)0,/&#)$+)&:2'#).,).9&)'++20&/),%&8
! ;%<$'+&/)&+.$0'.,(+8) "$!" # = ! " %%%"$!!# = !!
! =$%)>'($'%3&)&+.$0'.,(+)4'0,%*)'##).9&)2%<$'+&/)&+.$0'.,(+5
! 6'7)'..&%.$,%).,)3,00,%)&((,(+ $%)(&*(&++$,%8
? @.(,%*)(&#'.$,%+9$A)'0,%*)>'($'<#&+)/,&+)%,.)0&'%)3'+2'#)
(&#'.$,%+9$A
? B9&)$/&%.$-$&/)(&#'.$,%+9$A)$+)>'#$/),%#7)$%).9&)&CA#,(&/)$%.&(>'#),-)!
B9&)$/&%.$-$&/)(&#'.$,%+9$A)$+)>'#$/),%#7)$%).9&)&CA#,(&/)$%.&(>'#),-)
A'7)'..&%.$,%).,)
A'7)'..&%.$,%).,)!"#$%&'(%#)'* !"

Quality Engineering- BM Colosimo


deming.dat

$#! = #" + #!"!

!"

Quality Engineering- BM Colosimo


Multiple linear regression

Sometimes we have more than one regressors: multiple linear regression

often a matrix-form notation is used:

! y $ ! 1 x11 ! x1k $! ! ! $
$ # i &
# 1 & # & !0
# & # ! ! " ! &# & # &
& # !
# &=# &# !1 &
# yi 1 xi1 ! xik &# & + # !i &
#
& #
& # ! ! " ! &#
# ! !!!!!!!!!!!
& # & ! ! = "! + "
# & # &" !k & # ! &
#" yn &% #" 1 xn1 ! xnk & % #! &
% " n %
n '1 n'k k '1 n '1 !"

Quality Engineering- BM Colosimo


! !ˆ = ( X ' X )!1 X ' y
( X ' X )!1 exists if the regressors are linearly independent
(no column of X is linear combination of the other columns)

E(!ˆ ) = ! Cov(!ˆ ) = ! 2 ( X ' X )!1


orthogonal columns: X 2 ' X1 = 0

! ŷ = X !ˆ = X ( X ' X )!1 X ' y = Hy

! $ !"# #" ! ! ! % "! #!"# !"#$ ! $%"" ! ! $

!"

Quality Engineering- BM Colosimo


Trend: regression output

!"#$"%%&'( )(*+,%&%-./&%0$*.1"$%0%.2 "#$%#&&'() #*+,-'()


The regression equation is ./0(-1#&'& -#&-
misura = 0.00137 -0.000011 t

Predictor Coef SE Coef T P


Constant 0.00136522 0.00002914 46.84 0.000
t -0.00001066 0.00000099 -10.72 0.000
2(#33'4'#)- (35
S = 0.0001015 R-Sq = 70.5% R-Sq(adj) = 69.9%
6#-#%7'),-'()
8&-'7,-#5(3 "! "!
Analysis of Variance
Source DF SS MS F P
Regression 1 1.18428E-06 1.18428E-06 114.96 0.000
Residual Error 48 4.94479E-07 1.03017E-08
Total 49 1.67876E-06 !!

Quality Engineering- BM Colosimo


Test of hypothesis

misura = 0.00137 -0.000011 t


!#$%
#$%&'
&' ()&' *%
*%+,*-
+,*- (+,./0%1
(+,./0%1'-23,
'-23, &' '2%
'2%4-2',
4-2', (2%#5
%& ,%%' +*./29%C*+&*:-,'$
DEFGE%>
H 0 : !i = 0 H1 : ! i ! 0 for a given i

DEFGE%!$ H : !1 = !2 = .... = ! K!1 = 0


0

H1 : ! j " 0 for at least one j


67.89:,+ 2;%+,<+,''2+' 1!5=>
?*@%*((,.(&2.$
A2+%(),',%(,'('%B,%.,,/%(2%*''89,%.2+9*-&(@% *
;2+%(),%""#$ !! ) #$%&'("" ! ! !"

Quality Engineering- BM Colosimo


TEST 1 " " # "! = "!!!!!!!!!"$ # "! ! "!

!) # $%&'"( & %# & $$$') = ' " + '!!) + % ) # $%&' ' " + '!!) ( & %# &
")(=! ' !) ! ! &' #) ! # &
"! = $$$%$$$"" = # ! "!! #$%&'()%*$&+,-.()*/(,)&,0&1*/*&!"#$
#
")(=! ' !) ! ! &

! "! (-! = )*+,((!"#$%&'

2% +*)&34,5&/4*/6

(' ! 7'%*3%&),/%6
% & )(# $ = % &$# $ = )#''''''''''''%&$# $ =
" !!
x
&# ! # ! Cov( !ˆ0 , !ˆ1) = !! "2
% & )(" $ = % &$" $ = ) " ''''''''''%&$" $ = ( ' $ + S xx
!
!
$% # " !! !"
!"

Quality Engineering- BM Colosimo


! !
"" # = #
& =%
!
%& = #
& =%
$ $& ! $" & # !
#$$%$&'()&%*&'+(,$-.
! ! "" #
# $ "" # # = $! ! !#% $ " %" $ =
!!!
•S = 0.0001015 R-Sq = 70.5% R-Sq(adj) = 69.9%

#./0),/-1&./,21,$1&1-30,/0%2&4-./0),/-1&./,21,$1&-$$%$56

"! ! !$" #
%&"" ' = %& #$" ' = !"%#$!& = !# =
# !! ! $ %%
$ " !
!
%
$
%&"# ' = %&# # ' = " ! & +
!
' $! %# %
#
!"%#$" & = !# = !$" & + '
&( $ # !! ') " & & $ %% '
( )
Predictor Coef SE Coef T P
Constant 0.00136522 0.00002914 46.84 0.000
t -0.00001066 0.00000099 -10.72 0.000 !"

Quality Engineering- BM Colosimo


Comments on
! = "! !
S is the standard deviation of residuals: it is an estimate of the standard
deviation of the random component of the model.
Therefore, the error variance is the expected value of the squared
errors:
! "2 = E(!t ! µ! )2 recall the assumption µ! = 0 ! ! "2 = E (!t2 )
!
! $$ #
"
$$ # =
!
!
" =!
% %" " %$ " # " =
!

But this estimator is a biased estimator – the unbiased estimator is:

! ## ' ## '
#" " = &# ' = = Mean
n Squared
d Errorr (MS
S E)
$% ' " ! !
with K=number of regressors+1
!"

Quality Engineering- BM Colosimo


TEST 1 " " # "! = "!!!!!!!!!"$ # "! ! "!

! bi (i = 0,1) normally distributed with estimated standard deviation given by sbi

Predictor Coef SE Coef T P


Constant 0.00136522 0.00002914 46.84 0.000 (1)
t -0.00001066 0.00000099 -10.72 0.000

bi ! !i
t0 = ~tn-K t Student n - K degree of freedom (dof)
sbi

K = number of regressors +1 -in the example 1! regressor (xt = t) ! K = 2


!"

Quality Engineering- BM Colosimo


TEST 1
#$%&' ()%*+,-.
bi ! 0
" " # !! = "! t0 = ~tn-K t Student n - K dof
sbi
In the ex:
Predictor Coef SE Coef T P
Constant 0.00136522 0.00002914 46.84 0.000 (1)
t -0.00001066 0.00000099 -10.72 0.000
-0.00001066-0
b1 = !10.77
0.00000099
(in mtb -10.72 because of the larger number of digits)

!"#"$%&'()*+',&-'."&'/0*1"02&'/0
Student's t distribution with 48 DF
x P( X <= x )
-10.7700 0.0000
p-value=2(0.0000)

Quality Engineering- BM Colosimo


!"
Confidence interval (approx) for coefficients

bi ! !i
t0 = ~tn-K
sbi
$% $ " %
$ &! $ #"!"# # # &! $ #"!"# !!
'$%

"! $ '! $ #"#$% &"! # "! # "! + '! $ #"#$% &"! !


!#! !#!

for !1 :
" = 5% ! t0.025,48 = 2.0106
-1.066 "10 -5 - 2.0106(0.099 "10 -5 ) # !1 # -1.066 "10 -5 + 2.0106(0.099 "10 -5 )
-1.265 "10 -5 # !1 # $0.867 "10 -5
Quality Engineering- BM Colosimo
!"
Confidence interval for the mean

# $" " !! # = µ" " !!


For a given xt=x0
! && % !" ' ! $ ! #
µ$" # !! = !$! + !$" !! % % µ' " # !" $ = ) ( $ + !
% $ # !! "
Point estimate µ$! ! "" # µ! ! ""
$ %%#$ #
% #&
( & " # " '
"$! # ' + " (
') # & "" (*

" 2%
ˆ 2 $ 1 (x0 ! x ) '
µ̂Y |x ! t! /2,n-2 !" +
0 $n
# S xx '&

Quality Engineering- BM Colosimo


!"
(#!!)*+,#-)+./0!
@:9A82=B=="'""&$+!=.="'""""&&=C
"'""&! -678699:;<
(!0=>?
"'""&#
, "'"""&"&!
"'""&$ -.,/ *"'!0
-.,/12345 +('(0
"'""&%

"'""&&
"#$%&'

"'""&"

"'"""(

"'""")

"'"""*

"'"""+
" &" %" $" #" !"
!

!"

Quality Engineering- BM Colosimo


Prediction of future data

Ex next data (at time 51):

Point prediction
0.001362 -0.00001066 t
using t=51 we obtain 0.00082156

Prediction with confidence interval:


First approx we use S = 0.0001015= "! !
at t=51: interval 0.00082156 t !/2,n-K S : (0.000616924, 0.001025076)

!"

Quality Engineering- BM Colosimo


Minitab:
Predicted Values for New Observations

NewObs Fit SE Fit 95.0% CI 95.0% PI


1 0.000821 0.000029 (0.000763,0.000880)(0.000609,0.001034)

D;.-4.1':34-./-19:3'+&(9+,E
# "
# = µ ! + ! ! # " $ µ# ! " + " !!
"$ %&'(&)(*(+,-./-0&+&-&).1+-+23-34+(5&+30-5.03*-6!7
#$ 89:3'+&(9+,-./-+23-34+(5&+30-5.03*-;(+2-'34<3:+-+.-+23-+'13-.93
=.'-9-'3&4.9&)*,-*&'>3-69?@!A7B-+23-43:.90-4.1':3-./-C&'(&)(*(+,-(4-45&**
!!

Quality Engineering- BM Colosimo


Prediction of a new observation

Prediction of a future observation Y0

"#! = !#! + !#" !! Y0 ! Yˆ0 = prediction error

!
& ! & % $ ! ' ! # #
% $$ ' $" # = ) ( $% + + "
!
% # " !! "
!
! & & % ! ' ! $ #
#$%&'' %()*+,$)%$ +)-$./&' *(.0-1$02$&) % % µ' " # !" $ = ) ( $ + "
!
% $ # !! "
" 2%
2$ 1 (x ! x ) '
ŷ0 ! t! /2,n-2 ! " 1+ + 0
ˆ
$ n S xx
'
# &
!"

Quality Engineering- BM Colosimo


(#!!)*+,#-)+./0!
@98A7/<B<<"'""&$3!<+<"'""""&&<C
*5675889:;
4!-<=>
"'""&!"
4!-<?>

) "'"""&"&!
*+), ("'!-
"'""&%! *+),./012 34'4-
"#$%&'

"'""&""

"'"""(!

"'"""!"
" &" %" $" #" !"
!

./

Quality Engineering- BM Colosimo


!"#$%&'()*+%*,,-%*+
TEST 2:H 0 : β1 = β2 = .... = β K−1 = 0 NB:
- K=number of regressors (p)+1=2
H1 : β j ≠ 0 for at least one j - The constant b0 is excluded

Based on AnOVa (Analysis of Variance) test


n 2
0.0015
å ( yt - y ) =
t =1
n n
= å ( yt - yˆ t ) + å ( yˆ t - y ) 2
2
0.001

t =1 t =1
0.0005
0 10 20 30 40 50

DIM
0.0015 0.0015

0.001 0.001

0.0005 0.0005
0 10 20 30 40 50
0 10 20 30 40 50
Quality Engineering 36
n 2 n 2 n 2
å ( yt - y ) = å ( yt - yˆ t ) + å ( yˆ t - y )
t =1 t =1 t =1

SST = SSE + SSR


Degree of freedom n

df R = K -1 Variability explained by the regression


model
SS R = å
i =1
( yˆ i - y ) 2
n

df E = n - K Variability not explained by the regression SS E = å ( yi - yˆ i ) 2


model i =1
n
dfT = n - 1 Total variability SST = å
i =1
( yi - y ) 2

Analysis of Variance
Source DF SS MS F P
Regression 1 1.18428E-06 1.18428E-06 114.96 0.000
Residual Error 48 4.94479E-07 1.03017E-08
Total 49 1.67876E-06

Quality Engineering 37
SS R SS E
MS R = MS E =
df R df E
MS R
se H 0 è vera, allora ~ F ( K - 1, n - K )
MS E
Analysis of Variance
Source DF SS MS F P
Regression 1 1.18428E-06 1.18428E-06 114.96 0.000
Residual Error 48 4.94479E-07 1.03017E-08
Total 49 1.67876E-06 1-1.0000

Cumulative Distribution Function


F(K-1,n-K) F distribution with 1 DF
in numerator and 48 DF in
p-value denominator

0 x P( X <= x )
MSR/MSE 114.9600 1.0000
Quality Engineering
38
!" #$%&'()*+,(-./$'0$$*.1231.!.&*4.123156.7(',.)*$.+(*8%$.9)$::(9($*'
! ! #""""$ = !
!$ #"""" "$ ! !

01,(&23(&,4&4(#-,(%5,*&%6#$7(8,(6#*(4132(&1#&9
*
&* ' ( & &* ' ( #
'( = )' ' !+, ))()$'( " = $
* ! = #$ ) ' " $%& ! # !"
%&* $ %& ! #$ (
% * "
: ;9 <3-(0)=0(>9(?*(3-5,-
3-5,- &3("4,(&1,(&,4&(3*(
&3("4,(&1,(&,4&(3*(! 63,<<%6%,*&4 #& &1,(4#@,
&%@,A(63*4%5,- &1,(<#@%$'(,--3- -#&,(! B%& %4 #6&"#$$' C,&&,- "4%*+ #(
63*4%5,- &1,(<#@%$'(,--3-
5%<<,-,*& #DD-3#61 E &1,(,F&-#(4"@(3<(4G"#-,4H
! !!"#
!% = %%%%%%%%$% = $"###" $ # ! ! " %! % = ! !!"#
$ % =$"##" $

: .9 01,-, ,F%4& #*3&1,- &,4&(B$#6I 3<(<%&H(&1#& -,G"%-,4 @3-,(&1#* 3*,


-,D$%6#&,(<3-(,#61 J#$", 3<(&1,(-,+-,443-4
!"#$%&'()*+%*,,-%*+ ./
Coefficient of determination R2
S = 0.0001015 R-Sq = 70.5% R-Sq(adj) = 69.9%

n
SS R = å
i =1
( yˆ i - y ) 2 Variability explained by the regression model

n
SS E = å
i =1
( yi - yˆ i ) 2 Variability not explained by the regression model

n
SST = å
i =1
( yi - y ) 2 = SS R + SS E

2SS R It is a measure of the percentage of variability observed in the


R = data that is explained by the estimated regression model
SST

Quality Engineering 40
Comments on R2

Pay attention to use R2 as a measure of adequacy of the estimated model


(check of residuals)
Please note that R2 does never decrease when new regressors are included

"$$ # $$! ! $$ " $$ "


# = = =!!
$$! $$! $$!

"" &
"
$'() = ! ! !!# #$%&'()**+,'#-''. $'&/0#1). )*+
""% #2'+334+%.&+$&/0#1). )*+.(!
! !!

Quality Engineering- BM Colosimo


!"
$"! = #$ + ##"! !!!!!!!!#"$%&'()
#"*+,$-.'.)

$" % = #% + #$ "% + ## "%# !!!!!!!!

#"$%&'-)
#"*+,$-.'/)

Quality Engineering- BM Colosimo


!"
)#!!'(*+#$'*,-.!
6789:;<83=>==!#,&+=?=&,#+'=:
%"" ) *+,*$'#
-(). $+,/0
-().12345 $+,$0
'""
)#!!'(*+#$'*,-.!
6789:;<83=>==#,&&=?=',%$%=:
&"" (=",""*#**=:@@&
"#$%!&'$(

%"" ) *+,$-""
.()/ $#,!0
.()/12345 $+,*0
!""
'""
)#!!'(*+#$'*,-.!
56789:;72<=<<!>,&&<?<&,!#><9
" &""
"#$%!&'$(

?<","&***<9@@&<(<","""&"+<9@@'
%"" ) *+,#*!#

(!"" !"" -(). $#,'/


-().01234 $+,'/
" &" %" $"
'"" #" !""
!
"
&""
"#$%!&'$(

(!""
" &" %"
!"" $" #" !""
!

"

(!""
" &" %" $" #" !""
Quality Engineering- BM Colosimo
!
!"
Residual check

#! = " " + "! "! + ! !

! If the assumed model:

Is not appropiate? Diagnostic ckeck of residuals

1. Observed data = deterministic component + random error


2. Observed data = estimated model + residuals

Compare 1 and 2 by checking if residuals look like causal


errors (iid and normal data)
Quality Engineering- BM Colosimo
!!
Trend: diagnostic check

Randomness (before checking normality):


• Time series plot: to identify apparent systematic pattern,
constant variability, outliers

"'"""%

"'"""&
./0)&

"'""""

("'"""&

("'"""%

)*+,- &" %" $" #" !"

Quality Engineering- BM Colosimo


!"
! Runs test
!"#$ %&$'()!*+,-
RESI1
K = -0.0000
The observed number of runs = 28
The expected number of runs = 25.9600
24 Observations above K 26 below
The test is significant at 0.5593
Cannot reject at alpha = 0.05

! ACF ± $ # !"
ACF of RESI1

-1.0 -0.8 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0
+----+----+----+----+----+----+----+----+----+----+
1 -0.062 XXX
2 -0.006 X
3 0.068 XXX
4 -0.047 XX
5 0.000 X
6 0.040 XX
7 0.084 XXX
8 -0.272 XXXXXXXX
9 -0.031 XX
10 -0.136 XXXX
11 0.012 X
12 0.015 X

Quality Engineering- BM Colosimo !"


*+,-.-//012,3-45?+4.,3-45@-/5ABCD#
#%&
&%'
*+,-.-//012,3-4
&%(
&%)
&%!
&%&
$&%!
$&%)
$&%(
$&%'
$#%&

! " #!

92: ;-// < 9=> 92: ;-// < 9=>

5# $&%&( $&%)) &%!# 5' $&%!" $#%'8 7%('


5! $&%&# $&%&) &%!# 58 $&%&6 $&%!& 7%"7
56 5&%&" 5&%)' &%)( #& $&%#) $&%'' (%8(
5) $&%&7 $&%66 &%78 ## 5&%&# 5&%&' (%8(
57 5&%&& 5&%&& &%78 #! 5&%&# 5&%&8 (%8'
5( 5&%&) 5&%!' &%(8
5" 5&%&' 5&%7' #%##

Quality Engineering- BM Colosimo


!"
2. Normality

15$8%6(?$5E%E767-9(?65-

+AAA
+AA
+A0
?$5E%E767-9

+D*
+0*
+C*
+*0
+*/
+**/

)*+***C )*+***/ *+**** *+***/ *+***C


FG,H/
!"#$%&#'()*+******* !23#$452).%$672&(15$8%67-9(:#4-
,-.#"'(*+***/**0 !),;<%$#3'(*+/=>
1'(0* ?)@%6<#'(((*+AB>

Quality Engineering- BM Colosimo


!"

Вам также может понравиться