## DESCRIPTION ## Statistics: Sampling Distributions ## ENDDESCRIPTION ##DESCRIPTION ##KEYWORDS('statistics','hypothesis testing') ## ## naw tagged this problem ## DBchapter('Hypothesis Testing') ## DBsection('Common Large-Sample Tests') ## Date('7/8/2005') ## Author('Nolan A. Wages') ## Institution('University of Virgnia') ## TitleText1('Mathematical Statistics') ## EditionText1('4') ## AuthorText1('Wackerly, Mendenhall, Scheaffer') ## Section1('10.3') ## Problem1('20') ##ENDDESCRIPTION DOCUMENT(); # This should be the first executable line in the problem. loadMacros( "PG.pl", "PGbasicmacros.pl", "PGchoicemacros.pl", "PGanswermacros.pl", "PGgraphmacros.pl", "PGnumericalmacros.pl", "PGstatisticsmacros.pl", "PGauxiliaryFunctions.pl", "extraAnswerEvaluators.pl" ); TEXT(beginproblem()); $showPartialCorrectAnswers = 0; install_problem_grader(~~&std_problem_grader); $x[1] = random(-3,-1,1); $x[2] = random(0,3,1); $x[3] = random(4,6,1); $y[1] = 3 + random(-3,-1,1); $y[2] = 6 + random(0,3,1); $y[3] = 9 + random(4,6,1); $xbar = ($x[1]+$x[2]+$x[3])/3; $ybar = ($y[1]+$y[2]+$y[3])/3; $sx = sqrt( (($x[1]-$xbar)**2 + ($x[2]-$xbar)**2 + ($x[3]-$xbar)**2)/2 ); $sy = sqrt( (($y[1]-$ybar)**2 + ($y[2]-$ybar)**2 + ($y[3]-$ybar)**2)/2 ); $cov = ( ($x[1]-$xbar)*($y[1]-$ybar) + ($x[2]-$xbar)*($y[2]-$ybar) + ($x[3]-$xbar)*($y[3]-$ybar) )/2; $b1 = round($cov/$sx**2); $b0 = round($ybar - $b1*$xbar); $sse = ($y[1] - ($b0+$b1*$x[1]))**2 + ($y[2] - ($b0+$b1*$x[2]))**2 + ($y[3] - ($b0+$b1*$x[3]))**2; BEGIN_TEXT Suppose that the line \(\hat{y} = $b0 + $b1 x\) is fitted to the data points ($x[1],$y[1]), ($x[2],$y[2]), and ($x[3],$y[3]). Determine the sum of the squared residuals. $PAR Sum of the Squared Residuals = \{ ans_rule(15) \} $PAR END_TEXT ANS(num_cmp($sse)); ENDDOCUMENT(); # This should be the last executable line in the problem.