.MCAD 308000000 \  docDocumentMmcObject[ d2_graph_format graphData% axisFormat)L)Ltrace2D&&&&&&&&& & & & & &&& dim_formatTmasslengthtimecharge temperature luminosity substance `w NumericalFormatQdii shpRectV`2mcDocumentObjectState\ mcPageModelK????mcHeaderFooterI@I CHeaderFooterJ@J@J@JMbP?MbP? TextState? TextStyle>@ ArialSerial_ParPropDefaultW?Normalfont_style_listO font_styleP  VariablesTimes New Roman@P  ConstantsTimes New Roman@P TextArial@P Greek VariablesSymbol@P User^1Arial@P User^2 Courier New@P User^3System@P User^4Script@P User^5Roman@P User^6Modern@P User^7Times New Roman@P SymbolsSymbol@P Current Selection FontArial@P Undefined Font@P HeaderArial@P FooterArial@P Rotated Math FontTimes New Roman9 TextRegion* docRegionGshpBoxU=:--6-6 CharacterMap-RangeMap;@NAPPLIED QUANTITATIVE RESEARCH PAD/PDD/UST601 COMPUTER LAB#3: Linear Regression ChrPropMap7N RangeElem<N  ChrPropData8 RangeData=| MathSoftText0,0,128 ParPropMap9--!N <-  ParPropData:@W, `66~6~-AWe perform a Monte Carlo simulation of the linear regression model. N is number of data points, X is the independent (explanatory) variable, Y is the dependent variable, u is the stochastic disturbance, a is the Y intercept and b is the slope. The sample estimates of these parameters are: a and b. We create a vector of random numbers from a normal distribution with a mean m= 0 and standard deviation s.7<8~ MathSoftText0,0,128<8@ Symbol0,0,128<8~ MathSoftText0,0,128<8@ Symbol0,0,128<?:@W,1@@</@A<@B0@NormalArial @CeqRegionB@U@+@Dtree @ p@E@@ @D@F@@d@E\m@G@@@E0@H*@U-Enter the standard deviation s:7@I<@J8@Hl MathSoftText0,0,128@K<@L8@H@ Symbol0,0,128@I@M<@N8@Hl MathSoftText0,0,128@K@M@I9@O<@P:@W,1@Q</@R<@S0@NormalArial @T@B@U? *@U@@ p@V@@ @U@W@@d@V\s@X@@@V6@Y*@U=X(--?-?-@The random deviates from the normal distribution are generated by using the Mathcad function rnorm(N,m,s), where N is the number of data points, m is the population mean and s is the population standard deviation.7e@Z@8@@ MathSoftText0,0,128@@<@8@@ Arial0,0,128@@<@8@@ MathSoftText0,0,128@@@9@<@:@W,1@</@<@0@NormalArial @@B@Up@@@ p@@@ @@@@d@a@@@@@@@d@ intercept@@@p@@@@ @@@@d@X@@@@Y@@B@U@@@ p@@@ @@@@d@b@@@@@@@d@slope@@@p@@@@ @@@@d@X@@@@Y@*@Ux *x(0 -COPYRIGHT @KAUFMAN 19997@<@8@lArial9@<@:@W,1@</@<@0@NormalArial @*@UI6X..?.?-@Enter the number of random deviates N. Then click on N=20 below and click F9 (compute). Type the estimates a and b in two arrays (vectors). Repeat the experiment 15 times. Each time record the estimates. 7r@@@ pA?@@A>A@@@dA?NAA@@A?20AB@B@U$AC@@ pAD@@ACAE@@dADaAF@@ADAG@@+@AFSerial_DisplayNodeXAH@@AF _n_u_l_l_AI@B@UpAJ@@ pAK@@AJAL@@dAKbAM@@AKAN@@+@AM@XAO@@AM _n_u_l_l_AP*@UQ(@III-AThe Pearson correlation coefficient r is a measure of the linear correlation between the X and Y values. A value of r close to zero signifies a low level of correlation or in other words the two sets are not linearly dependent. A value of r close to +1 or -1 signifies a high degree of linear correlation. The correlation coefficient r has the same as the slope b. In MathCAD, the Pearson coefficient is given by the built-in function: corr(X,Y).7|mAQ@@pB<B?@@B>aB@@@B;BA@@dB@StdevBB@@pB@BC@@BBaBD@@B#BE@@@BDBF@@@BEBG@@vBF14.000BH@@BF0.000BI@@BEBJ@@@BIBK@@BIBL@@BDjBM ' )L)\&&&&&&&&&& & & & & &&&BN@B@U(  ( BO@@ pBP@@BOBQ@@@BPBR@@@BQBS@@@BRBT@@vBS2.429BU@@BS1.641BV@@BRBW@@dBV\bBX@@BVBY@@ BQBZ@@ @BYB[@@@BZB\@@dB[bB]@@B[jB^@@BZB_@@@B^B`@@dB_meanBa@@pB_Bb@@BabBc@@B^Bd@@dBcStdevBe@@pBcBf@@BebBg@@BYBh@@@BgBi@@dBhmeanBj@@pBhBk@@BjbBl@@BgBm@@dBlStdevBn@@pBlBo@@BnbBp@@BPBq@@@BpBr@@@BqBs@@vBr14.000Bt@@Br0.000Bu@@BqBv@@@BuBw@@BuBx@@BpjBy & )L)\&&&&&&&&&& & & & & &&&Bz@B@U   B{@@ pB|@@B{B}@@@B|B~@@@B}B@@@B~B@@tB1B@@KBB@@B1B@@B~B@@@BB@@BB@@B}B@@dBbB@@B\bB@@B|B@@@BB@@@BB@@tB10B@@KBB@@B10B@@BB@@@BB@@BB@@BB@@dBaB@@B\aB $ ))&&&&&&&&&& & & & & &&&B*@U 8  -@Note that the deviations of a and b from the population values a and b lie predominantly in the 2'nd and 4'th quadrant. It points to the fact that these estimates are correlated.7?B@@C<iC?@@C7C@@@dC?aCA@@C?9CB@@BCC@@@CBCD@@@CCCE@@dCDbCF@@CD10CG@@CCCH@@dCGXCI@@CGiCJ@@CBCK@@dCJaCL@@CJ10CM@@BCN@@@CMCO@@@CNCP@@dCObCQ@@CO11CR@@CNCS@@dCRXCT@@CRiCU@@CMCV@@dCUaCW@@CU11CX@@BCY@@@CXCZ@@@CYC[@@dCZbC\@@CZ12C]@@CYC^@@dC]XC_@@C]iC`@@CXCa@@dC`aCb@@C`12Cc@@BCd@@@CcCe@@@CdCf@@dCebCg@@Ce13Ch@@CdCi@@dChXCj@@ChiCk@@CcCl@@dCkaCm@@Ck13Cn@@BCo@@@CnCp@@@CoCq@@dCpbCr@@Cp14Cs@@CoCt@@dCsXCu@@CsiCv@@CnCw@@dCvaCx@@Cv14Cy@@BCz@@@CyC{@@@CzC|@@vC{19.000C}@@C{0.000C~@@CzC@@@C~C@@C~ _n_u_l_l_C@@CyC@@dCXC@@CiC 1V )LX)LYY = a + bX Estimates&&&&&&&&& & & & & &&C@B@UX8MfH|C@@ pC@@ CC@@dCrC@@CC@@dCcorrC@@pCC@@ CC@@dCXC@@CYC@B@U8MH{C@@ pC@@CC@@dCrC@@CC@@+@C@XC@@C _n_u_l_l_C@B@U8t3[~C@@ pC@@ CC@@dC\shatC@@{CC@@CC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