Lack of Fit Test
Lack of Fit Test
Lack of Fit Test
Against
H 1 :there isa presence of lack of fit .
Here as usual
is response variable,
is predictor and is
random error.
Now we want to check that whether the sample data
( y i , x i ) , i=1,2, n .
Fits well to the above linear model or not?
So will use lack of fit F-test for this purpose as follows:
The lack of fit test requires that we have replicate observations on
y
the response
for at least one level of x . These replicates
do need to be truly independent.
E.g. suppose that y is product viscosity and
x
x i , i=1,2, , m.
Let
y ij
denote the
x i , i=1,2, m j=1,2, ni .
There
ni total observations
are n=
i=1
Here
SS res is sum of squares due to residuals
SS pe
SS lof
xi
. Squaring and
ni
ni
( ij ^yi ) = ( y ij y i) + ( y i ^y i)2
j=1
i=1 j=1
i=1 j =1
i=1
y
ni
ni
( ij ^yi ) = ( y ij y i) + ni ( y i ^y i )2
j=1
i=1 j=1
i=1
>
i=1
ni
SS pe = ( y ij y i )
i=1 j=1
'
ys
compute SS pe .
Since there are ni1 degrees of freedom for pure error at each
level x i ,total nos. of d.f. associated with the pure error sum of
squares is
( ni1 )=nm
i=1
SS lof = ni ( y i^
y i)
i=1
y i
at each
values.
If the fitted values ^y i are close to the corresponding average
responses y i , then there is a strong indication that the
^
yi
y i
SS pe from
MS lof
MS pe
SS res
2
The expected value of MS pe is , and the expected value of
MS lof
m
E ( MS lof ) = + ni [ E ( y i ) 0 1 x i ] /(m2)
2
Is
i=1
E ( y i )= 0 1 x i
E ( MS lof ) = 2 .
E ( y i ) 0 1 xi
2
And E ( MS lof ) > . And also when true regression function is linear
F0 > F m2,nm