Regression With Mathematica

  • Uploaded by: Amir Masoud Abdol
  • 0
  • 0
  • December 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Regression With Mathematica as PDF for free.

More details

  • Words: 3,677
  • Pages: 30
1

regression.nb

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 8 6 4 2

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 x

Estimate 0.361111

SE 0.33646

TStat 1.07327

PValue 0.318751

0.451389

0.0233293

19.3486

2.45583 × 10−7

,

RSquared → 0.981645, AdjustedRSquared → 0.979023, EstimatedVariance → 0.313492, Model ANOVATable → Error Total In[31]:=

In[36]:=

DF 1 7 8

SumOfSq 117.361 2.19444 119.556

MeanSq 117.361 0.313492

FRatio 374.367

PValue 2.45583 × 10−7

regress = Regress@data, 81, x<, x, RegressionReport → 8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion
8observed, predicted, se, ci< = Transpose@HSinglePredictionCITable ê. regressL@@1DDD;

=

2

regression.nb Hxval = Map@First, dataD; predicted = Transpose@8xval, predicted
In[37]:=

MultipleListPlot@data, predicted, lowerCI, upperCI, SymbolShape → 8PlotSymbol@DiamondD, None, None, None<, PlotJoined → 8False, True, True, True<, PlotStyle → 8Automatic, Automatic, [email protected], .05
In[38]:=

14 12 10 8 6 4 2 5

10

15

20

25

Graphics

Out[38]=

ü 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 8 6 4 2

5

10

15

In[41]:=

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

Out[41]=

0.0833333 + 0.493056 x

20

25

3

regression.nb

In[42]:=

Out[42]=

regress = Regress@data, 81, x<, xD 9ParameterTable → 1 x

Estimate 0.0833333

SE 0.452677

TStat 0.18409

PValue 0.859162

0.493056

0.0313875

15.7087

1.02564 × 10−6

,

RSquared → 0.972415, AdjustedRSquared → 0.968474, EstimatedVariance → 0.56746,

ANOVATable →

In[43]:=

In[44]:= In[45]:=

In[46]:=

Model Error Total

DF 1 7 8

SumOfSq 140.028 3.97222 144.

MeanSq 140.028 0.56746

FRatio 246.762

PValue 1.02564 × 10−6

regress = Regress@data, 81, x<, x, RegressionReport → 8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion
8observed, predicted, se, ci< = Transpose@HSinglePredictionCITable ê. regressL@@1DDD; Hxval = Map@First, dataD; predicted = Transpose@8xval, predicted
MultipleListPlot@data, predicted, lowerCI, upperCI, SymbolShape → 8PlotSymbol@DiamondD, None, None, None<, PlotJoined → 8False, True, True, True<, PlotStyle → 8Automatic, Automatic, [email protected], .05
12.5 10 7.5 5 2.5 5

Out[46]=

10

15

20

25

Graphics

ü C In[47]:=

=

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

4

regression.nb

In[48]:=

dplot = ListPlot@dataD;

12 10 8 6 4 2

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

Out[50]=

9ParameterTable → 1 x

Estimate 2.41667 0.298611

SE 2.18609 0.151578

TStat 1.10547 1.97002

PValue 0.305495 , 0.0894892

RSquared → 0.356674, AdjustedRSquared → 0.264771, EstimatedVariance → 13.2341, Model ANOVATable → Error Total In[51]:=

In[52]:= In[53]:=

DF 1 7 8

SumOfSq 51.3611 92.6389 144.

MeanSq 51.3611 13.2341

FRatio 3.88096

PValue 0.0894892

regress = Regress@data, 81, x<, x, RegressionReport → 8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion
=

8observed, predicted, se, ci< = Transpose@HSinglePredictionCITable ê. regressL@@1DDD; Hxval = Map@First, dataD; predicted = Transpose@8xval, predicted
5

regression.nb

MultipleListPlot@data, predicted, lowerCI, upperCI, SymbolShape → 8PlotSymbol@DiamondD, None, None, None<, PlotJoined → 8False, True, True, True<, PlotStyle → 8Automatic, Automatic, [email protected], .05
In[54]:=

20 15 10 5

5

10

15

20

25

-5

Graphics

Out[54]=

ü 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 8 6 4 2

5

10

15

20

25

30

In[58]:=

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

Out[58]=

6.83255 − 0.0634995 x

In[59]:=

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

Out[59]=

9ParameterTable → 1 x

35

Estimate 6.83255 −0.0634995

SE 2.42255 0.145586

TStat 2.8204 −0.436166

PValue 0.0257584 , 0.675852

RSquared → 0.0264581, AdjustedRSquared → −0.112619, EstimatedVariance → 20.0271, Model ANOVATable → Error Total

DF 1 7 8

SumOfSq 3.80997 140.19 144.

MeanSq 3.80997 20.0271

FRatio 0.19024

PValue 0.675852

=

6

regression.nb regress = Regress@data, 81, x<, x, RegressionReport → 8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion
In[60]:=

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

In[61]:=

Hxval = Map@First, dataD; predicted = Transpose@8xval, predicted
In[62]:=

MultipleListPlot@data, predicted, lowerCI, upperCI, SymbolShape → 8PlotSymbol@DiamondD, None, None, None<, PlotJoined → 8False, True, True, True<, PlotStyle → 8Automatic, Automatic, [email protected], .05
In[63]:=

15 10 5

5

10

15

20

25

30

35

-5

Graphics

Out[63]=

ü 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 8 6 4 2

5

10

15

In[66]:=

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

Out[66]=

8.20833 − 0.184028 x

20

25

7

regression.nb regress = Regress@data, 81, x<, xD

In[67]:=

9ParameterTable → 1 x

Out[67]=

SE 2.53422 0.175716

Estimate 8.20833 −0.184028

TStat 3.239 −1.0473

PValue 0.0142728 , 0.329771

RSquared → 0.135465, AdjustedRSquared → 0.0119599, EstimatedVariance → 17.7847, DF 1 7 8

Model ANOVATable → Error Total

SumOfSq 19.5069 124.493 144.

MeanSq 19.5069 17.7847

FRatio 1.09684

PValue 0.329771

=

regress = Regress@data, 81, x<, x, RegressionReport → 8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion
In[68]:=

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

In[69]:=

Hxval = Map@First, dataD; predicted = Transpose@8xval, predicted
In[70]:=

MultipleListPlot@data, predicted, lowerCI, upperCI, SymbolShape → 8PlotSymbol@DiamondD, None, None, None<, PlotJoined → 8False, True, True, True<, PlotStyle → 8Automatic, Automatic, [email protected], .05
In[71]:=

20 15 10 5

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<<;

8

regression.nb

In[73]:=

dplot = ListPlot@dataD;

12 10 8 6 4 2

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

Out[75]=

9ParameterTable → 1 x

Estimate 11.6944 −0.465278

SE 1.24806 0.0865373

TStat 9.37011 −5.37662

PValue 0.0000327972 , 0.00103413

RSquared → 0.805057, AdjustedRSquared → 0.777208, EstimatedVariance → 4.31349, Model ANOVATable → Error Total In[76]:=

In[77]:= In[78]:=

DF 1 7 8

SumOfSq 124.694 30.1944 154.889

MeanSq 124.694 4.31349

FRatio 28.908

PValue 0.00103413

regress = Regress@data, 81, x<, x, RegressionReport → 8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion
=

8observed, predicted, se, ci< = Transpose@HSinglePredictionCITable ê. regressL@@1DDD; Hxval = Map@First, dataD; predicted = Transpose@8xval, predicted
9

regression.nb

MultipleListPlot@data, predicted, lowerCI, upperCI, SymbolShape → 8PlotSymbol@DiamondD, None, None, None<, PlotJoined → 8False, True, True, True<, PlotStyle → 8Automatic, Automatic, [email protected], .05
In[79]:=

15

10

5

5

10

15

20

25

-5

Graphics

Out[79]=

ü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

In[91]:=

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

Out[91]=

100.5 + 1.26353 × 10−16 x

80

90

10

regression.nb

In[92]:=

regress = Regress@data, 81, x<, xD DesignedRegress::badfit : Warning: unable to find a fit that is better than the mean response.

Out[92]=

9ParameterTable → 1 x

Estimate 100.5

SE 15.5885

TStat 6.44708

PValue 0.00756816 ,

2.64775 × 10−16

0.22964

1.153 × 10−15

1

RSquared → $Failed, AdjustedRSquared → $Failed, EstimatedVariance → 135., DF SumOfSq MeanSq 3 405. 135. = ANOVATable → Error 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

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 x

26

Estimate

SE

TStat

2.

2.86665 × 10−14

6.97677 × 1013

0.

7.45324 × 10

0.

1.

−15

1.3417 × 10

PValue 14

,

RSquared → 1., AdjustedRSquared → 1., EstimatedVariance → 9.15079 × 10−29 , ANOVATable →

In[97]:=

In[98]:=

Model

DF 1

SumOfSq 50.8333

MeanSq 50.8333

Error Total

4 5

3.66031 × 10−28 50.8333

9.15079 × 10−29

FRatio 5.55508 × 1029

regress = Regress@data, 81, x<, x, RegressionReport → 8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion
PValue 0.

=

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

11

regression.nb Hxval = Map@First, dataD; predicted = Transpose@8xval, predicted
In[99]:=

In[100]:=

MultipleListPlot@data, predicted, lowerCI, upperCI, SymbolShape → 8PlotSymbol@DiamondD, None, None, None<, PlotJoined → 8False, True, True, True<, PlotStyle → 8Automatic, Automatic, [email protected], .05
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 -0.2 -0.4 -0.6

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

In[103]:=

Out[103]=

−0.0333333 + 0.0365854 x

4

12

regression.nb

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

In[104]:=

Out[104]=

9ParameterTable → 1 x

Estimate −0.0333333 0.0365854

SE 0.258487 0.0699211

TStat −0.128955 0.523238

PValue 0.903617, 0.628456

RSquared → 0.06406, AdjustedRSquared → −0.169925, EstimatedVariance → 0.400894, DF 1 4 5

Model ANOVATable → Error Total

SumOfSq 0.109756 1.60358 1.71333

MeanSq 0.109756 0.400894

FRatio 0.273778

PValue 0.628456

=

regress = Regress@data, 81, x<, x, RegressionReport → 8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion
In[105]:=

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

In[106]:=

Hxval = Map@First, dataD; predicted = Transpose@8xval, predicted
In[107]:=

In[108]:=

MultipleListPlot@data, predicted, lowerCI, upperCI, SymbolShape → 8PlotSymbol@DiamondD, None, None, None<, PlotJoined → 8False, True, True, True<, PlotStyle → 8Automatic, Automatic, [email protected], .05
1

-4

-2

2 -1

-2 Out[108]=

Graphics

4

13

regression.nb

ü B In[109]:=

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

Out[109]=

x 10

, 10 y=

2 2 3 3 2 2 , 5.=, 9− , −6.=, 9− , −5.=, 9 , 5.=, 9 , 5.=, 9 , −6.== 5 5 10 10 5 5

In[110]:=

dplot = ListPlot@dataD;

4 2

-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 x

Estimate −0.333333 3.65854

SE 2.58487 6.99211

TStat −0.128955 0.523238

PValue 0.903617, 0.628456

RSquared → 0.06406, AdjustedRSquared → −0.169925, EstimatedVariance → 40.0894, Model ANOVATable → Error Total

DF 1 4 5

SumOfSq 10.9756 160.358 171.333

MeanSq 10.9756 40.0894

FRatio 0.273778

PValue 0.628456

=

regress = Regress@data, 81, x<, x, RegressionReport → 8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion
In[113]:=

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

In[114]:=

14

regression.nb

Hxval = Map@First, dataD; predicted = Transpose@8xval, predicted
In[115]:=

In[116]:=

MultipleListPlot@data, predicted, lowerCI, upperCI, SymbolShape → 8PlotSymbol@DiamondD, None, None, None<, PlotJoined → 8False, True, True, True<, PlotStyle → 8Automatic, Automatic, [email protected], .05
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<, 82.60, .41<, 82.80, .45<, 82.40, .39<, 83.00, .48<, 84.10, .61<<;

In[131]:=

15

regression.nb

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 x

Estimate −0.063111 0.175902

SE 0.0530339 0.0191619

TStat −1.19001 9.17977

PValue 0.28746 , 0.000257308

RSquared → 0.943989, AdjustedRSquared → 0.932787, EstimatedVariance → 0.0015411, Model ANOVATable → Error Total

DF 1 5 6

SumOfSq 0.129866 0.00770551 0.137571

MeanSq 0.129866 0.0015411

FRatio 84.2682

PValue 0.000257308

regress = Regress@data, 81, x<, x, RegressionReport → 8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion
In[135]:=

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

In[136]:=

Hxval = Map@First, dataD; predicted = Transpose@8xval, predicted
In[137]:=

=

16

regression.nb

In[138]:=

MultipleListPlot@data, predicted, lowerCI, upperCI, SymbolShape → 8PlotSymbol@DiamondD, None, None, None<, PlotJoined → 8False, True, True, True<, PlotStyle → 8Automatic, Automatic, [email protected], .05
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<, 87.84, 0.45<, 85.76, 0.39<, 89., 0.48<, 816.81, 0.61<<

Out[139]=

In[140]:=

dplot = ListPlot@dataD; 0.6 0.5 0.4 0.3 0.2

4

6

8

10

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

In[141]:=

Out[141]=

0.178021 + 0.0295385 x

12

14

16

17

regression.nb

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

In[142]:=

Out[142]=

9ParameterTable → 1 x

SE 0.0544383 0.00619835

Estimate 0.178021 0.0295385

TStat 3.27015 4.76553

PValue 0.0221949 , 0.00503469

RSquared → 0.819562, AdjustedRSquared → 0.783474, EstimatedVariance → 0.00496463, Model ANOVATable → Error Total

DF 1 5 6

SumOfSq 0.112748 0.0248232 0.137571

MeanSq 0.112748 0.00496463

FRatio 22.7103

PValue 0.00503469

regress = Regress@data, 81, x<, x, RegressionReport → 8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion
In[143]:=

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

In[144]:=

Hxval = Map@First, dataD; predicted = Transpose@8xval, predicted
In[145]:=

In[146]:=

MultipleListPlot@data, predicted, lowerCI, upperCI, SymbolShape → 8PlotSymbol@DiamondD, None, None, None<, PlotJoined → 8False, True, True, True<, PlotStyle → 8Automatic, Automatic, [email protected], .05
0.8

0.6

0.4

0.2

2.5 Out[146]=

Graphics

5

7.5

10

12.5

15

=

18

regression.nb

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

In[148]:=

880.262364, 0.11<, 80.875469, 0.38<, 80.955511, 0.41<, 81.02962, 0.45<, 80.875469, 0.39<, 81.09861, 0.48<, 81.41099, 0.61<<

Out[148]=

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 x

Estimate −0.00130688

SE 0.00645851

TStat −0.202349

PValue 0.847619

0.436253

0.006566

66.4412

1.46239 × 10−8

,

RSquared → 0.998869, AdjustedRSquared → 0.998642, EstimatedVariance → 0.0000311288, ANOVATable → Model Error Total

DF 1 5 6

SumOfSq 0.137416 0.000155644 0.137571

MeanSq 0.137416 0.0000311288

FRatio 4414.43

PValue 1.46239 × 10−8

=

regress = Regress@data, 81, x<, x, RegressionReport → 8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion
In[152]:=

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

In[153]:=

19

regression.nb

Hxval = Map@First, dataD; predicted = Transpose@8xval, predicted
In[154]:=

In[155]:=

MultipleListPlot@data, predicted, lowerCI, upperCI, SymbolShape → 8PlotSymbol@DiamondD, None, None, None<, PlotJoined → 8False, True, True, True<, PlotStyle → 8Automatic, Automatic, [email protected], .05
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<, 81.67332, 0.45<, 81.54919, 0.39<, 81.73205, 0.48<, 82.02485, 0.61<<

Out[157]=

In[158]:=

dplot = ListPlot@dataD; 0.6 0.5 0.4 0.3 0.2

1.2

1.4

1.6

1.8

20

regression.nb

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 x

SE 0.0541346 0.0332099

Estimate −0.511247 0.568088

TStat −9.44399 17.106

PValue 0.00022476 , 0.0000124966

RSquared → 0.9832, AdjustedRSquared → 0.97984, EstimatedVariance → 0.000462247, ANOVATable → Model Error Total

DF 1 5 6

SumOfSq 0.13526 0.00231124 0.137571

MeanSq 0.13526 0.000462247

FRatio 292.614

PValue 0.0000124966

=

regress = Regress@data, 81, x<, x, RegressionReport → 8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion
In[161]:=

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

In[162]:=

Hxval = Map@First, dataD; predicted = Transpose@8xval, predicted
In[163]:=

In[164]:=

MultipleListPlot@data, predicted, lowerCI, upperCI, SymbolShape → 8PlotSymbol@DiamondD, None, None, None<, PlotJoined → 8False, True, True, True<, PlotStyle → 8Automatic, Automatic, [email protected], .05
Graphics

1.4

1.6

1.8

21

regression.nb

ü E In[166]:=

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

1 x

, y=

880.769231, 0.11<, 80.416667, 0.38<, 80.384615, 0.41<, 80.357143, 0.45<, 80.416667, 0.39<, 80.333333, 0.48<, 80.243902, 0.61<<

Out[166]=

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 x

Estimate 0.778439 −0.896463

SE 0.0325635 0.0732069

TStat 23.9053 −12.2456

PValue 2.38631 × 10−6 , 0.0000642482

RSquared → 0.967733, AdjustedRSquared → 0.961279, EstimatedVariance → 0.000887815, ANOVATable → Model Error Total

DF 1 5 6

SumOfSq 0.133132 0.00443908 0.137571

MeanSq 0.133132 0.000887815

FRatio 149.955

PValue 0.0000642482

=

regress = Regress@data, 81, x<, x, RegressionReport → 8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion
In[170]:=

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

In[171]:=

22

regression.nb

Hxval = Map@First, dataD; predicted = Transpose@8xval, predicted
In[172]:=

In[173]:=

MultipleListPlot@data, predicted, lowerCI, upperCI, SymbolShape → 8PlotSymbol@DiamondD, None, None, None<, PlotJoined → 8False, True, True, True<, PlotStyle → 8Automatic, Automatic, [email protected], .05
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<, 81.5, 8.9<, 81.6, 8.6<, 81.7, 10.2<, 81.8, 9.3<, 81.9, 9.1<, 82, 10.5<<;

In[175]:=

23

regression.nb

ü 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

24

regression.nb

ü E&F regress = Regress@data, 81, x<, xD

In[177]:=

Out[177]=

9ParameterTable → 1 x

Estimate 6.15909 1.93636

SE 0.924545 0.603106

TStat 6.66176 3.21065

PValue 0.0000924862 , 0.0106478

RSquared → 0.533879, AdjustedRSquared → 0.482087, EstimatedVariance → 0.400111, Model ANOVATable → Error Total

DF 1 9 10

SumOfSq 4.12445 3.601 7.72545

MeanSq 4.12445 0.400111

FRatio 10.3083

PValue 0.0106478

=

regress = Regress@data, 81, x<, x, RegressionReport → 8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion
In[178]:=

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

In[179]:=

Hxval = Map@First, dataD; predicted = Transpose@8xval, predicted
In[180]:=

In[181]:=

MultipleListPlot@data, predicted, lowerCI, upperCI, SymbolShape → 8PlotSymbol@DiamondD, None, None, None<, PlotJoined → 8False, True, True, True<, PlotStyle → 8Automatic, Automatic, [email protected], .05
11 10 9 8

1.2 Out[181]=

Graphics

1.4

1.6

1.8

2

25

regression.nb

ü8 data = 880, 8 + 5 + 8<, 815, 12 + 10 + 14<, 830, 25 + 21 + 24<, 845, 31 + 33 + 28<, 860, 44 + 39 + 42<, 875, 48 + 51 + 44<<;

In[182]:=

In[183]:=

dplot = ListPlot@dataD; 140 120 100 80 60 40

10

20

30

40

50

60

70

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
In[186]:=

140 120 100 80 60 40 20 10 Out[186]=

Graphics

20

30

40

26

regression.nb

ü 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 x

Estimate 16.9524 1.71238

SE 3.63867 0.0801208

TStat 4.65895 21.3725

PValue 0.00959707 , 0.0000283413

RSquared → 0.991319, AdjustedRSquared → 0.989149, EstimatedVariance → 25.2762, Model ANOVATable → Error Total

DF 1 4 5

SumOfSq 11545.7 101.105 11646.8

MeanSq 11545.7 25.2762

FRatio 456.783

PValue 0.0000283413

=

regress = Regress@data, 81, x<, x, RegressionReport → 8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion
In[195]:=

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

In[196]:=

27

regression.nb

Hxval = Map@First, dataD; predicted = Transpose@8xval, predicted
In[197]:=

In[198]:=

MultipleListPlot@data, predicted, lowerCI, upperCI, SymbolShape → 8PlotSymbol@DiamondD, None, None, None<, PlotJoined → 8False, True, True, True<, PlotStyle → 8Automatic, Automatic, [email protected], .05
10

20

30

40

50

60

70

Out[198]=

Graphics

ü E regress = Regress@data, 81, x<, x, RegressionReport → 8AdjustedRSquared
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<, 81.60944, 0.916291<, 81.79176, 0.693147<, 81.94591, 0.<, 82.07944, 0.<<

Out[204]=

28

regression.nb

In[205]:=

dplot = ListPlot@dataD;

2

1.5

1

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 x

Estimate 2.41171 −1.08157

SE 0.168761 0.114036

TStat 14.2907 −9.48446

PValue 7.34449 × 10−6 , 0.0000782631

RSquared → 0.937471, AdjustedRSquared → 0.927049, EstimatedVariance → 0.0450385, Model ANOVATable → Error Total

DF 1 6 7

SumOfSq 4.05144 0.270231 4.32167

MeanSq 4.05144 0.0450385

FRatio 89.955

PValue 0.0000782631

regress = Regress@data, 81, x<, x, RegressionReport → 8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion
In[208]:=

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

In[209]:=

Hxval = Map@First, dataD; predicted = Transpose@8xval, predicted
In[210]:=

=

29

regression.nb

In[211]:=

MultipleListPlot@data, predicted, lowerCI, upperCI, SymbolShape → 8PlotSymbol@DiamondD, None, None, None<, PlotJoined → 8False, True, True, True<, PlotStyle → 8Automatic, Automatic, [email protected], .05
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

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

In[214]:=

Out[214]=

−812.667 + 0.635714 x

1360

1380

30

regression.nb

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

In[215]:=

Out[215]=

9ParameterTable → 1 x

Estimate −812.667 0.635714

SE 97.3472 0.0731693

TStat −8.34812 8.68827

PValue 0.00112552 , 0.00096606

RSquared → 0.949677, AdjustedRSquared → 0.937096, EstimatedVariance → 37.4762, Model ANOVATable → Error Total

DF 1 4 5

SumOfSq 2828.93 149.905 2978.83

MeanSq 2828.93 37.4762

FRatio 75.486

PValue 0.00096606

=

regress = Regress@data, 81, x<, x, RegressionReport → 8FitResiduals, SinglePredictionCITable, ParameterConfidenceRegion
In[216]:=

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

In[217]:=

Hxval = Map@First, dataD; predicted = Transpose@8xval, predicted
In[218]:=

In[219]:=

MultipleListPlot@data, predicted, lowerCI, upperCI, SymbolShape → 8PlotSymbol@DiamondD, None, None, None<, PlotJoined → 8False, True, True, True<, PlotStyle → 8Automatic, Automatic, [email protected], .05
1300 -20 Out[219]=

Graphics func ê. x → 1400

In[220]:=

Out[220]=

77.3333

1320

1340

1360

1380

Related Documents


More Documents from ""

May 2020 7
December 2019 24
April 2020 2
Weierstrass Function
December 2019 9