Anda di halaman 1dari 30

regression.

nb 1

In[2]:= << Statistics`LinearRegression`

In[19]:= << Graphics`MultipleListPlot`

Page 387

ü 1.

ü A

In[27]:= data = 880, 0<, 84, 2<, 86, 3<, 88, 4<, 812, 6<, 814, 7<, 816, 8<, 822, 11<, 826, 11<<;

In[28]:= dplot = ListPlot@dataD;

10

5 10 15 20 25

In[29]:= func = Fit@data, 81, x<, xD

Out[29]= 0.361111 + 0.451389 x

In[30]:= regress = Regress@data, 81, x<, xD

Out[30]= 9ParameterTable → 1
Estimate SE TStat PValue
0.361111 0.33646 1.07327 0.318751 ,
x 0.451389 0.0233293 19.3486 2.45583 × 10−7
RSquared → 0.981645, AdjustedRSquared → 0.979023, EstimatedVariance → 0.313492,
DF SumOfSq MeanSq FRatio PValue

=
Model 1 117.361 117.361 374.367 2.45583 × 10−7
ANOVATable →
Error 7 2.19444 0.313492
Total 8 119.556

regress = Regress@data, 81, x<, x, RegressionReport →


8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion<D;
In[31]:=

In[36]:= 8observed, predicted, se, ci< = Transpose@HSinglePredictionCITable ê. regressL@@1DDD;


regression.nb 2

In[37]:= Hxval = Map@First, dataD;


predicted = Transpose@8xval, predicted<D;
lowerCI = Transpose@8xval, Map@First, ciD<D;
upperCI = Transpose@8xval, Map@Last, ciD<DL;

SymbolShape → 8PlotSymbol@DiamondD, None, None, None<,


In[38]:= MultipleListPlot@data, predicted, lowerCI, upperCI,

PlotJoined → 8False, True, True, True<,


PlotStyle → 8Automatic, Automatic, Dashing@8.05, .05<D, Dashing@8.05, .05<D<D
14

12

10

5 10 15 20 25

Out[38]= Graphics

ü B

In[39]:= data = 880, 0<, 84, 2<, 86, 4<, 88, 3<, 812, 7<, 814, 6<, 816, 8<, 822, 11<, 826, 13<<;

In[40]:= dplot = ListPlot@dataD;

12

10

5 10 15 20 25

In[41]:= func = Fit@data, 81, x<, xD

Out[41]= 0.0833333 + 0.493056 x


regression.nb 3

In[42]:= regress = Regress@data, 81, x<, xD

9ParameterTable → 1
Estimate SE TStat PValue
Out[42]= 0.0833333 0.452677 0.18409 0.859162 ,
x 0.493056 0.0313875 15.7087 1.02564 × 10−6
RSquared → 0.972415, AdjustedRSquared → 0.968474, EstimatedVariance → 0.56746,
DF SumOfSq MeanSq FRatio PValue

=
Model 1 140.028 140.028 246.762 1.02564 × 10−6
ANOVATable →
Error 7 3.97222 0.56746
Total 8 144.

regress = Regress@data, 81, x<, x, RegressionReport →


8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion<D;
In[43]:=

In[44]:= 8observed, predicted, se, ci< = Transpose@HSinglePredictionCITable ê. regressL@@1DDD;

In[45]:= Hxval = Map@First, dataD;


predicted = Transpose@8xval, predicted<D;
lowerCI = Transpose@8xval, Map@First, ciD<D;
upperCI = Transpose@8xval, Map@Last, ciD<DL;

SymbolShape → 8PlotSymbol@DiamondD, None, None, None<,


In[46]:= MultipleListPlot@data, predicted, lowerCI, upperCI,

PlotJoined → 8False, True, True, True<,


PlotStyle → 8Automatic, Automatic, Dashing@8.05, .05<D, Dashing@8.05, .05<D<D

15

12.5

10

7.5

2.5

5 10 15 20 25

Out[46]= Graphics

ü C

In[47]:= data = 880, 2<, 84, 8<, 86, 0<, 88, 6<, 812, 3<, 814, 4<, 816, 13<, 822, 7<, 826, 11<<;
regression.nb 4

In[48]:= dplot = ListPlot@dataD;

12

10

5 10 15 20 25

In[49]:= func = Fit@data, 81, x<, xD

Out[49]= 2.41667 + 0.298611 x

In[50]:= regress = Regress@data, 81, x<, xD

9ParameterTable → 1
Estimate SE TStat PValue
Out[50]= 2.41667 2.18609 1.10547 0.305495 ,
x 0.298611 0.151578 1.97002 0.0894892
RSquared → 0.356674, AdjustedRSquared → 0.264771, EstimatedVariance → 13.2341,
DF SumOfSq MeanSq FRatio PValue
=
Model 1 51.3611 51.3611 3.88096 0.0894892
ANOVATable →
Error 7 92.6389 13.2341
Total 8 144.

regress = Regress@data, 81, x<, x, RegressionReport →


8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion<D;
In[51]:=

In[52]:= 8observed, predicted, se, ci< = Transpose@HSinglePredictionCITable ê. regressL@@1DDD;

In[53]:= Hxval = Map@First, dataD;


predicted = Transpose@8xval, predicted<D;
lowerCI = Transpose@8xval, Map@First, ciD<D;
upperCI = Transpose@8xval, Map@Last, ciD<DL;
regression.nb 5

SymbolShape → 8PlotSymbol@DiamondD, None, None, None<,


In[54]:= MultipleListPlot@data, predicted, lowerCI, upperCI,

PlotJoined → 8False, True, True, True<,


PlotStyle → 8Automatic, Automatic, Dashing@8.05, .05<D, Dashing@8.05, .05<D<D

20

15

10

5 10 15 20 25

-5

Out[54]= Graphics

ü D

In[56]:= data = 880, 4<, 84, 3<, 86, 8<, 88, 6<, 812, 7<, 814, 13<, 816, 2<, 822, 11<, 836, 0<<;

In[57]:= dplot = ListPlot@dataD;

12

10

5 10 15 20 25 30 35

In[58]:= func = Fit@data, 81, x<, xD

Out[58]= 6.83255 − 0.0634995 x

In[59]:= regress = Regress@data, 81, x<, xD

9ParameterTable → 1
Estimate SE TStat PValue
Out[59]= 6.83255 2.42255 2.8204 0.0257584 ,
x −0.0634995 0.145586 −0.436166 0.675852
RSquared → 0.0264581, AdjustedRSquared → −0.112619, EstimatedVariance → 20.0271,
DF SumOfSq MeanSq FRatio PValue
=
Model 1 3.80997 3.80997 0.19024 0.675852
ANOVATable →
Error 7 140.19 20.0271
Total 8 144.
regression.nb 6

regress = Regress@data, 81, x<, x, RegressionReport →


8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion<D;
In[60]:=

In[61]:= 8observed, predicted, se, ci< = Transpose@HSinglePredictionCITable ê. regressL@@1DDD;

In[62]:= Hxval = Map@First, dataD;


predicted = Transpose@8xval, predicted<D;
lowerCI = Transpose@8xval, Map@First, ciD<D;
upperCI = Transpose@8xval, Map@Last, ciD<DL;

SymbolShape → 8PlotSymbol@DiamondD, None, None, None<,


In[63]:= MultipleListPlot@data, predicted, lowerCI, upperCI,

PlotJoined → 8False, True, True, True<,


PlotStyle → 8Automatic, Automatic, Dashing@8.05, .05<D, Dashing@8.05, .05<D<D

15

10

5 10 15 20 25 30 35

-5

Out[63]= Graphics

ü E

In[64]:= data = 880, 8<, 84, 7<, 86, 6<, 88, 13<, 812, 0<, 814, 2<, 816, 11<, 822, 3<, 826, 4<<;

In[65]:= dplot = ListPlot@dataD;

12

10

5 10 15 20 25

In[66]:= func = Fit@data, 81, x<, xD

Out[66]= 8.20833 − 0.184028 x


regression.nb 7

In[67]:= regress = Regress@data, 81, x<, xD

9ParameterTable → 1
Estimate SE TStat PValue
Out[67]= 8.20833 2.53422 3.239 0.0142728 ,
x −0.184028 0.175716 −1.0473 0.329771
RSquared → 0.135465, AdjustedRSquared → 0.0119599, EstimatedVariance → 17.7847,
DF SumOfSq MeanSq FRatio PValue
=
Model 1 19.5069 19.5069 1.09684 0.329771
ANOVATable →
Error 7 124.493 17.7847
Total 8 144.

regress = Regress@data, 81, x<, x, RegressionReport →


8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion<D;
In[68]:=

In[69]:= 8observed, predicted, se, ci< = Transpose@HSinglePredictionCITable ê. regressL@@1DDD;

In[70]:= Hxval = Map@First, dataD;


predicted = Transpose@8xval, predicted<D;
lowerCI = Transpose@8xval, Map@First, ciD<D;
upperCI = Transpose@8xval, Map@Last, ciD<DL;

SymbolShape → 8PlotSymbol@DiamondD, None, None, None<,


In[71]:= MultipleListPlot@data, predicted, lowerCI, upperCI,

PlotJoined → 8False, True, True, True<,


PlotStyle → 8Automatic, Automatic, Dashing@8.05, .05<D, Dashing@8.05, .05<D<D
20

15

10

5 10 15 20 25
-5

Out[71]= Graphics

ü F

In[72]:= data = 880, 12<, 84, 13<, 86, 8<, 88, 4<, 812, 7<, 814, 6<, 816, 3<, 822, 2<, 826, 0<<;
regression.nb 8

In[73]:= dplot = ListPlot@dataD;

12

10

5 10 15 20 25

In[74]:= func = Fit@data, 81, x<, xD

Out[74]= 11.6944 − 0.465278 x

In[75]:= regress = Regress@data, 81, x<, xD

9ParameterTable → 1
Estimate SE TStat PValue
Out[75]= 11.6944 1.24806 9.37011 0.0000327972 ,
x −0.465278 0.0865373 −5.37662 0.00103413
RSquared → 0.805057, AdjustedRSquared → 0.777208, EstimatedVariance → 4.31349,
DF SumOfSq MeanSq FRatio PValue
=
Model 1 124.694 124.694 28.908 0.00103413
ANOVATable →
Error 7 30.1944 4.31349
Total 8 154.889

regress = Regress@data, 81, x<, x, RegressionReport →


8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion<D;
In[76]:=

In[77]:= 8observed, predicted, se, ci< = Transpose@HSinglePredictionCITable ê. regressL@@1DDD;

In[78]:= Hxval = Map@First, dataD;


predicted = Transpose@8xval, predicted<D;
lowerCI = Transpose@8xval, Map@First, ciD<D;
upperCI = Transpose@8xval, Map@Last, ciD<DL;
regression.nb 9

SymbolShape → 8PlotSymbol@DiamondD, None, None, None<,


In[79]:= MultipleListPlot@data, predicted, lowerCI, upperCI,

PlotJoined → 8False, True, True, True<,


PlotStyle → 8Automatic, Automatic, Dashing@8.05, .05<D, Dashing@8.05, .05<D<D

15

10

5 10 15 20 25

-5

Out[79]= Graphics

ü2

In[88]:= data = 8832, 90<, 848, 105<, 864, 112.5<, 880, 105<, 896, 90<<;

In[90]:= dplot = ListPlot@dataD;

110

105

100

95

40 50 60 70 80 90

In[91]:= func = Fit@data, 81, x<, xD

Out[91]= 100.5 + 1.26353 × 10−16 x


regression.nb 10

In[92]:= regress = Regress@data, 81, x<, xD

DesignedRegress::badfit : Warning: unable to find a fit that is better than the mean response.

9ParameterTable → 1
Estimate SE TStat PValue
Out[92]= 100.5 15.5885 6.44708 0.00756816 ,
x 2.64775 × 10−16 0.22964 1.153 × 10−15 1
RSquared → $Failed, AdjustedRSquared → $Failed, EstimatedVariance → 135.,

135. =
DF SumOfSq MeanSq
ANOVATable → Error 3 405.
Total 4 405.

‫هﻤﺒﺴﺘﮕﻲ‬ ‫ﻧﺪارﻧﺪ ﺧﻄﻲ‬

ü3

In[93]:= data = 8820, 22<, 822, 24<, 821, 23<, 818, 20<, 819, 21<, 827, 29<<;

In[94]:= dplot = ListPlot@dataD;

28

26

24

22

20 22 24 26

In[95]:= func = Fit@data, 81, x<, xD

Out[95]= 2. + 1. x

In[96]:= regress = Regress@data, 81, x<, xD

Out[96]= 9ParameterTable → 1
Estimate SE TStat PValue
2. 2.86665 × 10−14 6.97677 × 1013 0. ,
−15
x 1. 1.3417 × 10 7.45324 × 10 14
0.
RSquared → 1., AdjustedRSquared → 1., EstimatedVariance → 9.15079 × 10−29 , ANOVATable →
DF SumOfSq MeanSq FRatio PValue

=
Model 1 50.8333 50.8333 5.55508 × 1029 0.
Error 4 3.66031 × 10−28 9.15079 × 10−29
Total 5 50.8333

regress = Regress@data, 81, x<, x, RegressionReport →


8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion<D;
In[97]:=

In[98]:= 8observed, predicted, se, ci< = Transpose@HSinglePredictionCITable ê. regressL@@1DDD;


regression.nb 11

In[99]:= Hxval = Map@First, dataD;


predicted = Transpose@8xval, predicted<D;
lowerCI = Transpose@8xval, Map@First, ciD<D;
upperCI = Transpose@8xval, Map@Last, ciD<DL;

In[100]:=

SymbolShape → 8PlotSymbol@DiamondD, None, None, None<,


MultipleListPlot@data, predicted, lowerCI, upperCI,

PlotJoined → 8False, True, True, True<,


PlotStyle → 8Automatic, Automatic, Dashing@8.05, .05<D, Dashing@8.05, .05<D<D

28

26

24

22

20 22 24 26
Out[100]=
Graphics

ü4

data = 88−4, 0.5<, 8−4, −.6<, 8−3, −.5<, 83, .5<, 84, .5<, 84, −.6<<;
In[101]:=

In[102]:=
dplot = ListPlot@dataD;

0.4

0.2

-4 -2 2 4

-0.2

-0.4

-0.6

func = Fit@data, 81, x<, xD


In[103]:=

Out[103]=
−0.0333333 + 0.0365854 x
regression.nb 12

regress = Regress@data, 81, x<, xD


In[104]:=

Out[104]=

9ParameterTable → 1
Estimate SE TStat PValue
−0.0333333 0.258487 −0.128955 0.903617,
x 0.0365854 0.0699211 0.523238 0.628456
RSquared → 0.06406, AdjustedRSquared → −0.169925, EstimatedVariance → 0.400894,
DF SumOfSq MeanSq FRatio PValue
=
Model 1 0.109756 0.109756 0.273778 0.628456
ANOVATable →
Error 4 1.60358 0.400894
Total 5 1.71333

regress = Regress@data, 81, x<, x, RegressionReport →


In[105]:=

8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion<D;

8observed, predicted, se, ci< = Transpose@HSinglePredictionCITable ê. regressL@@1DDD;


In[106]:=

Hxval = Map@First, dataD;


In[107]:=

predicted = Transpose@8xval, predicted<D;


lowerCI = Transpose@8xval, Map@First, ciD<D;
upperCI = Transpose@8xval, Map@Last, ciD<DL;

In[108]:=

SymbolShape → 8PlotSymbol@DiamondD, None, None, None<,


MultipleListPlot@data, predicted, lowerCI, upperCI,

PlotJoined → 8False, True, True, True<,


PlotStyle → 8Automatic, Automatic, Dashing@8.05, .05<D, Dashing@8.05, .05<D<D

-4 -2 2 4

-1

-2

Out[108]=
Graphics
regression.nb 13

ü B

In[109]:=
data = data ê. 8x_, y_< → 9
x
, 10 y=
10

99− , 5.=, 9− , −6.=, 9− , −5.=, 9 , 5.=, 9 , 5.=, 9 , −6.==


Out[109]=
2 2 3 3 2 2
5 5 10 10 5 5

In[110]:=
dplot = ListPlot@dataD;

-0.4 -0.2 0.2 0.4

-2

-4

-6

func = Fit@data, 81, x<, xD


In[111]:=

Out[111]=
−0.333333 + 3.65854 x

regress = Regress@data, 81, x<, xD


In[112]:=

Out[112]=

9ParameterTable → 1
Estimate SE TStat PValue
−0.333333 2.58487 −0.128955 0.903617,
x 3.65854 6.99211 0.523238 0.628456
RSquared → 0.06406, AdjustedRSquared → −0.169925, EstimatedVariance → 40.0894,
DF SumOfSq MeanSq FRatio PValue
=
Model 1 10.9756 10.9756 0.273778 0.628456
ANOVATable →
Error 4 160.358 40.0894
Total 5 171.333

regress = Regress@data, 81, x<, x, RegressionReport →


In[113]:=

8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion<D;

8observed, predicted, se, ci< = Transpose@HSinglePredictionCITable ê. regressL@@1DDD;


In[114]:=
regression.nb 14

Hxval = Map@First, dataD;


In[115]:=

predicted = Transpose@8xval, predicted<D;


lowerCI = Transpose@8xval, Map@First, ciD<D;
upperCI = Transpose@8xval, Map@Last, ciD<DL;

In[116]:=

SymbolShape → 8PlotSymbol@DiamondD, None, None, None<,


MultipleListPlot@data, predicted, lowerCI, upperCI,

PlotJoined → 8False, True, True, True<,


PlotStyle → 8Automatic, Automatic, Dashing@8.05, .05<D, Dashing@8.05, .05<D<D

20

10

-0.4 -0.2 0.2 0.4

-10

-20

Out[116]=
Graphics

ü C

r1=0.06405997912119195`
r2 =0.06405997912119195`

‫ﺗﻐﻴﻴﺮهﻤﺎهﻨﮓ ﻃﻮر ﺑﻪ دادﻩهﺎ‬ ‫آﺮدﻩاﻧﺪ‬

ü5

ü A

data = 881.30, 0.11<, 82.40, .38<,


In[131]:=

82.60, .41<, 82.80, .45<, 82.40, .39<, 83.00, .48<, 84.10, .61<<;
regression.nb 15

In[132]:=
dplot = ListPlot@dataD;

0.6

0.5

0.4

0.3

0.2

1.5 2.5 3 3.5 4

func = Fit@data, 81, x<, xD


In[133]:=

Out[133]=
−0.063111 + 0.175902 x

regress = Regress@data, 81, x<, xD


In[134]:=

Out[134]=

9ParameterTable → 1
Estimate SE TStat PValue
−0.063111 0.0530339 −1.19001 0.28746 ,
x 0.175902 0.0191619 9.17977 0.000257308
RSquared → 0.943989, AdjustedRSquared → 0.932787, EstimatedVariance → 0.0015411,
DF SumOfSq MeanSq FRatio PValue
=
Model 1 0.129866 0.129866 84.2682 0.000257308
ANOVATable →
Error 5 0.00770551 0.0015411
Total 6 0.137571

regress = Regress@data, 81, x<, x, RegressionReport →


In[135]:=

8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion<D;

8observed, predicted, se, ci< = Transpose@HSinglePredictionCITable ê. regressL@@1DDD;


In[136]:=

Hxval = Map@First, dataD;


In[137]:=

predicted = Transpose@8xval, predicted<D;


lowerCI = Transpose@8xval, Map@First, ciD<D;
upperCI = Transpose@8xval, Map@Last, ciD<DL;
regression.nb 16

In[138]:=

SymbolShape → 8PlotSymbol@DiamondD, None, None, None<,


MultipleListPlot@data, predicted, lowerCI, upperCI,

PlotJoined → 8False, True, True, True<,


PlotStyle → 8Automatic, Automatic, Dashing@8.05, .05<D, Dashing@8.05, .05<D<D
0.8

0.6

0.4

0.2

1.5 2.5 3 3.5 4


Out[138]=
Graphics

ü B

data = data ê. 8x_, y_< → 8x2 , y<


In[139]:=

881.69, 0.11<, 85.76, 0.38<, 86.76, 0.41<,


Out[139]=

87.84, 0.45<, 85.76, 0.39<, 89., 0.48<, 816.81, 0.61<<

In[140]:=
dplot = ListPlot@dataD;

0.6

0.5

0.4

0.3

0.2

4 6 8 10 12 14 16

func = Fit@data, 81, x<, xD


In[141]:=

Out[141]=
0.178021 + 0.0295385 x
regression.nb 17

regress = Regress@data, 81, x<, xD


In[142]:=

Out[142]=

9ParameterTable → 1
Estimate SE TStat PValue
0.178021 0.0544383 3.27015 0.0221949 ,
x 0.0295385 0.00619835 4.76553 0.00503469
RSquared → 0.819562, AdjustedRSquared → 0.783474, EstimatedVariance → 0.00496463,
DF SumOfSq MeanSq FRatio PValue
=
Model 1 0.112748 0.112748 22.7103 0.00503469
ANOVATable →
Error 5 0.0248232 0.00496463
Total 6 0.137571

regress = Regress@data, 81, x<, x, RegressionReport →


In[143]:=

8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion<D;

8observed, predicted, se, ci< = Transpose@HSinglePredictionCITable ê. regressL@@1DDD;


In[144]:=

Hxval = Map@First, dataD;


In[145]:=

predicted = Transpose@8xval, predicted<D;


lowerCI = Transpose@8xval, Map@First, ciD<D;
upperCI = Transpose@8xval, Map@Last, ciD<DL;

In[146]:=

SymbolShape → 8PlotSymbol@DiamondD, None, None, None<,


MultipleListPlot@data, predicted, lowerCI, upperCI,

PlotJoined → 8False, True, True, True<,


PlotStyle → 8Automatic, Automatic, Dashing@8.05, .05<D, Dashing@8.05, .05<D<D

0.8

0.6

0.4

0.2

2.5 5 7.5 10 12.5 15


Out[146]=
Graphics
regression.nb 18

ü C

data = data ê. 8x_, y_< → 8Log@xD, y<


In[148]:=

880.262364, 0.11<, 80.875469, 0.38<, 80.955511, 0.41<,


Out[148]=

81.02962, 0.45<, 80.875469, 0.39<, 81.09861, 0.48<, 81.41099, 0.61<<

In[149]:=
dplot = ListPlot@dataD;

0.6

0.5

0.4

0.3

0.2

0.4 0.6 0.8 1.2 1.4

func = Fit@data, 81, x<, xD


In[150]:=

Out[150]=
−0.00130688 + 0.436253 x

regress = Regress@data, 81, x<, xD


In[151]:=

Out[151]=

9ParameterTable → 1
Estimate SE TStat PValue
−0.00130688 0.00645851 −0.202349 0.847619 ,
x 0.436253 0.006566 66.4412 1.46239 × 10−8
RSquared → 0.998869, AdjustedRSquared → 0.998642,
EstimatedVariance → 0.0000311288, ANOVATable →
DF SumOfSq MeanSq FRatio PValue

=
Model 1 0.137416 0.137416 4414.43 1.46239 × 10−8
Error 5 0.000155644 0.0000311288
Total 6 0.137571

regress = Regress@data, 81, x<, x, RegressionReport →


In[152]:=

8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion<D;

8observed, predicted, se, ci< = Transpose@HSinglePredictionCITable ê. regressL@@1DDD;


In[153]:=
regression.nb 19

Hxval = Map@First, dataD;


In[154]:=

predicted = Transpose@8xval, predicted<D;


lowerCI = Transpose@8xval, Map@First, ciD<D;
upperCI = Transpose@8xval, Map@Last, ciD<DL;

In[155]:=

SymbolShape → 8PlotSymbol@DiamondD, None, None, None<,


MultipleListPlot@data, predicted, lowerCI, upperCI,

PlotJoined → 8False, True, True, True<,


PlotStyle → 8Automatic, Automatic, Dashing@8.05, .05<D, Dashing@8.05, .05<D<D

0.6

0.5

0.4

0.3

0.2

0.1

0.6 0.8 1.2 1.4


Out[155]=
Graphics

ü D

è!!!!
data = data ê. 8x_, y_< → 9 x , y=
In[157]:=

881.14018, 0.11<, 81.54919, 0.38<, 81.61245, 0.41<,


Out[157]=

81.67332, 0.45<, 81.54919, 0.39<, 81.73205, 0.48<, 82.02485, 0.61<<

In[158]:=
dplot = ListPlot@dataD;

0.6

0.5

0.4

0.3

0.2

1.2 1.4 1.6 1.8


regression.nb 20

func = Fit@data, 81, x<, xD


In[159]:=

Out[159]=
−0.511247 + 0.568088 x

regress = Regress@data, 81, x<, xD


In[160]:=

Out[160]=

9ParameterTable → 1
Estimate SE TStat PValue
−0.511247 0.0541346 −9.44399 0.00022476 ,
x 0.568088 0.0332099 17.106 0.0000124966
RSquared → 0.9832, AdjustedRSquared → 0.97984,
EstimatedVariance → 0.000462247, ANOVATable →
DF SumOfSq MeanSq FRatio PValue
=
Model 1 0.13526 0.13526 292.614 0.0000124966
Error 5 0.00231124 0.000462247
Total 6 0.137571

regress = Regress@data, 81, x<, x, RegressionReport →


In[161]:=

8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion<D;

8observed, predicted, se, ci< = Transpose@HSinglePredictionCITable ê. regressL@@1DDD;


In[162]:=

Hxval = Map@First, dataD;


In[163]:=

predicted = Transpose@8xval, predicted<D;


lowerCI = Transpose@8xval, Map@First, ciD<D;
upperCI = Transpose@8xval, Map@Last, ciD<DL;

In[164]:=

SymbolShape → 8PlotSymbol@DiamondD, None, None, None<,


MultipleListPlot@data, predicted, lowerCI, upperCI,

PlotJoined → 8False, True, True, True<,


PlotStyle → 8Automatic, Automatic, Dashing@8.05, .05<D, Dashing@8.05, .05<D<D
0.7

0.6

0.5

0.4

0.3

0.2

0.1

1.2 1.4 1.6 1.8


Out[164]=
Graphics
regression.nb 21

ü E

In[166]:=

data = data ê. 8x_, y_< → 9


1
, y=
x

880.769231, 0.11<, 80.416667, 0.38<, 80.384615, 0.41<,


Out[166]=

80.357143, 0.45<, 80.416667, 0.39<, 80.333333, 0.48<, 80.243902, 0.61<<

In[167]:=
dplot = ListPlot@dataD;

0.6

0.5

0.4

0.3

0.2

0.4 0.5 0.6 0.7

func = Fit@data, 81, x<, xD


In[168]:=

Out[168]=
0.778439 − 0.896463 x

regress = Regress@data, 81, x<, xD


In[169]:=

Out[169]=

9ParameterTable → 1
Estimate SE TStat PValue
0.778439 0.0325635 23.9053 2.38631 × 10−6 ,
x −0.896463 0.0732069 −12.2456 0.0000642482
RSquared → 0.967733, AdjustedRSquared → 0.961279,
EstimatedVariance → 0.000887815, ANOVATable →
DF SumOfSq MeanSq FRatio PValue
=
Model 1 0.133132 0.133132 149.955 0.0000642482
Error 5 0.00443908 0.000887815
Total 6 0.137571

regress = Regress@data, 81, x<, x, RegressionReport →


In[170]:=

8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion<D;

8observed, predicted, se, ci< = Transpose@HSinglePredictionCITable ê. regressL@@1DDD;


In[171]:=
regression.nb 22

Hxval = Map@First, dataD;


In[172]:=

predicted = Transpose@8xval, predicted<D;


lowerCI = Transpose@8xval, Map@First, ciD<D;
upperCI = Transpose@8xval, Map@Last, ciD<DL;

In[173]:=

SymbolShape → 8PlotSymbol@DiamondD, None, None, None<,


MultipleListPlot@data, predicted, lowerCI, upperCI,

PlotJoined → 8False, True, True, True<,


PlotStyle → 8Automatic, Automatic, Dashing@8.05, .05<D, Dashing@8.05, .05<D<D

0.6

0.5

0.4

0.3

0.2

0.1

0.25 0.35 0.4 0.45 0.5


Out[173]=
Graphics

Page 406

ü7

data = 881, 8.1<, 81.1, 7.5<, 81.2, 8.5<, 81.3, 9.5<, 81.4, 9.5<,
In[175]:=

81.5, 8.9<, 81.6, 8.6<, 81.7, 10.2<, 81.8, 9.3<, 81.9, 9.1<, 82, 10.5<<;
regression.nb 23

ü A

In[167]:=
dplot = ListPlot@dataD;

0.6

0.5

0.4

0.3

0.2

0.4 0.5 0.6 0.7

ü B

func = Fit@data, 81, x<, xD


In[168]:=

Out[168]=
0.778439 − 0.896463 x

ü C

a = 0.778438553758127`
b = −0.8964633841626545`

ü D

0.778438553758127` − 0.8964633841626545` x ê. x → 1.75


In[176]:=

Out[176]=
−0.790372
regression.nb 24

ü E&F

regress = Regress@data, 81, x<, xD


In[177]:=

Out[177]=

9ParameterTable → 1
Estimate SE TStat PValue
6.15909 0.924545 6.66176 0.0000924862 ,
x 1.93636 0.603106 3.21065 0.0106478
RSquared → 0.533879, AdjustedRSquared → 0.482087, EstimatedVariance → 0.400111,
DF SumOfSq MeanSq FRatio PValue
=
Model 1 4.12445 4.12445 10.3083 0.0106478
ANOVATable →
Error 9 3.601 0.400111
Total 10 7.72545

regress = Regress@data, 81, x<, x, RegressionReport →


In[178]:=

8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion<D;

8observed, predicted, se, ci< = Transpose@HSinglePredictionCITable ê. regressL@@1DDD;


In[179]:=

Hxval = Map@First, dataD;


In[180]:=

predicted = Transpose@8xval, predicted<D;


lowerCI = Transpose@8xval, Map@First, ciD<D;
upperCI = Transpose@8xval, Map@Last, ciD<DL;

In[181]:=

SymbolShape → 8PlotSymbol@DiamondD, None, None, None<,


MultipleListPlot@data, predicted, lowerCI, upperCI,

PlotJoined → 8False, True, True, True<,


PlotStyle → 8Automatic, Automatic, Dashing@8.05, .05<D, Dashing@8.05, .05<D<D

11

10

1.2 1.4 1.6 1.8 2

Out[181]=
Graphics
regression.nb 25

ü8

data = 880, 8 + 5 + 8<, 815, 12 + 10 + 14<,


In[182]:=

830, 25 + 21 + 24<, 845, 31 + 33 + 28<, 860, 44 + 39 + 42<, 875, 48 + 51 + 44<<;

In[183]:=
dplot = ListPlot@dataD;

140

120

100

80

60

40

10 20 30 40 50 60 70

ü A

func = Fit@data, 81, x<, xD


In[184]:=

Out[184]=
16.9524 + 1.71238 x

pl = Plot@func, 8x, 0, 75<D


In[186]:=

140

120

100

80

60

40

20

10 20 30 40 50 60 70
Out[186]=
Graphics
regression.nb 26

ü B

In[187]:=
Show@dplot, plD

140

120

100

80

60

40

20

10 20 30 40 50 60 70
Out[187]=
Graphics

ü C

func ê. x → 50
In[188]:=

Out[188]=
102.571

ü D

regress = Regress@data, 81, x<, xD


In[194]:=

Out[194]=

9ParameterTable → 1
Estimate SE TStat PValue
16.9524 3.63867 4.65895 0.00959707 ,
x 1.71238 0.0801208 21.3725 0.0000283413
RSquared → 0.991319, AdjustedRSquared → 0.989149, EstimatedVariance → 25.2762,
DF SumOfSq MeanSq FRatio PValue
=
Model 1 11545.7 11545.7 456.783 0.0000283413
ANOVATable →
Error 4 101.105 25.2762
Total 5 11646.8

regress = Regress@data, 81, x<, x, RegressionReport →


In[195]:=

8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion<D;

8observed, predicted, se, ci< = Transpose@HSinglePredictionCITable ê. regressL@@1DDD;


In[196]:=
regression.nb 27

Hxval = Map@First, dataD;


In[197]:=

predicted = Transpose@8xval, predicted<D;


lowerCI = Transpose@8xval, Map@First, ciD<D;
upperCI = Transpose@8xval, Map@Last, ciD<DL;

In[198]:=

SymbolShape → 8PlotSymbol@DiamondD, None, None, None<,


MultipleListPlot@data, predicted, lowerCI, upperCI,

PlotJoined → 8False, True, True, True<,


PlotStyle → 8Automatic, Automatic, Dashing@8.05, .05<D, Dashing@8.05, .05<D<D

150

125

100

75

50

25

10 20 30 40 50 60 70
Out[198]=
Graphics

ü E

regress = Regress@data, 81, x<, x, RegressionReport → 8AdjustedRSquared<D


In[200]:=

8AdjustedRSquared → 0.989149<
Out[200]=

ü 11

data = 881, 0.1<, 82, 0.2<, 83, 0.25<, 84, 0.4<, 85, 0.4<, 86, 0.5<, 87, 1<, 88, 1<<;
In[203]:=

‫ﺑﻴﻦ راﺑﻄﻪ‬ ln(x) , -ln(y) ‫اﺳﺖ ﺧﻄﻲ‬

data = data ê. 8x_, y_< → 8Log@xD, −Log@yD< êê N


In[204]:=

880., 2.30259<, 80.693147, 1.60944<, 81.09861, 1.38629<, 81.38629, 0.916291<,


Out[204]=

81.60944, 0.916291<, 81.79176, 0.693147<, 81.94591, 0.<, 82.07944, 0.<<


regression.nb 28

In[205]:=
dplot = ListPlot@dataD;

1.5

0.5

0.5 1 1.5 2

func = Fit@data, 81, x<, xD


In[206]:=

Out[206]=
2.41171 − 1.08157 x

regress = Regress@data, 81, x<, xD


In[207]:=

Out[207]=

9ParameterTable → 1
Estimate SE TStat PValue
2.41171 0.168761 14.2907 7.34449 × 10−6 ,
x −1.08157 0.114036 −9.48446 0.0000782631
RSquared → 0.937471, AdjustedRSquared → 0.927049, EstimatedVariance → 0.0450385,
DF SumOfSq MeanSq FRatio PValue
=
Model 1 4.05144 4.05144 89.955 0.0000782631
ANOVATable →
Error 6 0.270231 0.0450385
Total 7 4.32167

regress = Regress@data, 81, x<, x, RegressionReport →


In[208]:=

8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion<D;

8observed, predicted, se, ci< = Transpose@HSinglePredictionCITable ê. regressL@@1DDD;


In[209]:=

Hxval = Map@First, dataD;


In[210]:=

predicted = Transpose@8xval, predicted<D;


lowerCI = Transpose@8xval, Map@First, ciD<D;
upperCI = Transpose@8xval, Map@Last, ciD<DL;
regression.nb 29

In[211]:=

SymbolShape → 8PlotSymbol@DiamondD, None, None, None<,


MultipleListPlot@data, predicted, lowerCI, upperCI,

PlotJoined → 8False, True, True, True<,


PlotStyle → 8Automatic, Automatic, Dashing@8.05, .05<D, Dashing@8.05, .05<D<D

2.5

1.5

0.5

0.5 1 1.5 2
-0.5

Out[211]=
Graphics

ü 12

data = 881280, 5<, 81300, 10<, 81320, 31<, 81340, 31<, 81360, 50<, 81380, 70<<;
In[212]:=

In[213]:=
dplot = ListPlot@dataD;

70

60

50

40

30

20

10
1300 1320 1340 1360 1380

func = Fit@data, 81, x<, xD


In[214]:=

Out[214]=
−812.667 + 0.635714 x
regression.nb 30

regress = Regress@data, 81, x<, xD


In[215]:=

Out[215]=

9ParameterTable → 1
Estimate SE TStat PValue
−812.667 97.3472 −8.34812 0.00112552 ,
x 0.635714 0.0731693 8.68827 0.00096606
RSquared → 0.949677, AdjustedRSquared → 0.937096, EstimatedVariance → 37.4762,
DF SumOfSq MeanSq FRatio PValue
=
Model 1 2828.93 2828.93 75.486 0.00096606
ANOVATable →
Error 4 149.905 37.4762
Total 5 2978.83

regress = Regress@data, 81, x<, x, RegressionReport →


In[216]:=

8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion<D;

8observed, predicted, se, ci< = Transpose@HSinglePredictionCITable ê. regressL@@1DDD;


In[217]:=

Hxval = Map@First, dataD;


In[218]:=

predicted = Transpose@8xval, predicted<D;


lowerCI = Transpose@8xval, Map@First, ciD<D;
upperCI = Transpose@8xval, Map@Last, ciD<DL;

In[219]:=

SymbolShape → 8PlotSymbol@DiamondD, None, None, None<,


MultipleListPlot@data, predicted, lowerCI, upperCI,

PlotJoined → 8False, True, True, True<,


PlotStyle → 8Automatic, Automatic, Dashing@8.05, .05<D, Dashing@8.05, .05<D<D

80

60

40

20

1300 1320 1340 1360 1380

-20

Out[219]=
Graphics

func ê. x → 1400
In[220]:=

Out[220]=
77.3333

Anda mungkin juga menyukai