######################################################################## ## DESCRIPTION ## A WeBWorK problem that asks students to find the area under the normal curve ## based on given z-scores. ## WeBWorK problem written by JoAnne Taormina, ## ENDDESCRIPTION ## ## KEYWORDS('normal curve', 'area', 'z-score') ## ## Author('JoAnne Taormina') ## Institution('Nassau Community College') ######################################################################## DOCUMENT(); # This should be the first executable line in the problem. loadMacros( "PG.pl", "PGbasicmacros.pl", "PGchoicemacros.pl", "PGanswermacros.pl", "PGauxiliaryFunctions.pl", "PGasu.pl", "PGnumericalmacros.pl", "PGstatisticsmacros.pl", "PGnauGraphics.pl", "PGnauStats.pl", "PGstandard.pl", "MathObjects.pl", "PGgraphmacros.pl", "weightedGrader.pl", "PGnauGraphics.pl", ); install_weighted_grader(); TEXT(beginproblem()); $showPartialCorrectAnswers = 1; $a = random(-2.3,-.01,.01); $b = random(0,2.3,.01); $c = random(-2.3,-.01,.01); $d = random(0,2.3,.01); $e = random(0,2.3,.01); $f = random(-2.3,-.01,.01); $g = random(-2.3,-.01,.01); $h = random(0,2.3,.01); $diagram1 = DrawNormalDist( $a, $b, $a, $b); $ans1 = normal_prob($a, $b); # round $ans1 to 4 decimal places $ans1 = int(10000*$ans1+.5*($ans1 <=> 0))/10000; $diagram2 = DrawNormalDist( $c, $d, $c, $d); $ans2 = normal_prob($c, $d); # round $ans2 to 4 decimal places $ans2 = int(10000*$ans2+.5*($ans2 <=> 0))/10000; $diagram3 = DrawNormalDist( -INF, $e, "", $e); $ans3 = normal_prob(-"infty", $e); # round $ans3 to 4 decimal places $ans3 = int(10000*$ans3+.5*($ans3 <=> 0))/10000; $diagram4 = DrawNormalDist( -INF, $f, "", $f); $ans4 = normal_prob(-"infty", $f); # round $ans4 to 4 decimal places $ans4 = int(10000*$ans4+.5*($ans4 <=> 0))/10000; $diagram5 = DrawNormalDist( $g, INF, $g, ""); $ans5 = normal_prob($g, "infty"); # round $ans5 to 4 decimal places $ans5 = int(10000*$ans5+.5*($ans1 <=> 0))/10000; $diagram6 = DrawNormalDist( $h, INF, $h, ""); $ans6 = normal_prob($h, "infty"); # round $ans6 to 4 decimal places $ans6 = int(10000*$ans6+.5*($ans6 <=> 0))/10000; $ans1 = Compute($ans1); $ans2 = Compute($ans2); $ans3 = Compute($ans3); $ans4 = Compute($ans4); $ans5 = Compute($ans5); $ans6 = Compute($ans6); BEGIN_TEXT $BCENTER \{Plot($diagram1, tex_size=>900);\} $ECENTER $BR (a) Find the area under the normal curve between z= $a and z= $b. $BITALIC Express your answer as a decimal. Round to 4 decimal places after the decimal point.$EITALIC $BR answer: \{ans_rule(10)\} $PAR $HR $BCENTER \{Plot($diagram2, tex_size=>900);\} $ECENTER $BR (b) Find the area under the normal curve between z= $c and z= $d. $BITALIC Express your answer as a decimal. Round to 4 decimal places after the decimal point.$EITALIC $BR answer: \{ans_rule(10)\} $PAR $HR $BCENTER \{Plot($diagram3, tex_size=>900);\} $ECENTER $BR (c) Find the area under the normal curve that lies to the left of z= $e. $BITALIC Express your answer as a decimal. Round to 4 decimal places after the decimal point.$EITALIC $BR answer: \{ans_rule(10)\} $PAR $HR $BCENTER \{Plot($diagram4, tex_size=>900);\} $ECENTER $BR (d) Find the area under the normal curve that lies to the left of z= $f. $BITALIC Express your answer as a decimal. Round to 4 decimal places after the decimal point.$EITALIC $BR answer: \{ans_rule(10)\} $PAR $HR $BCENTER \{Plot($diagram5, tex_size=>900);\} $ECENTER $BR (e) Find the area under the normal curve that lies to the right of z= $g. $BITALIC Express your answer as a decimal. Round to 4 decimal places after the decimal point.$EITALIC $BR answer: \{ans_rule(10)\} $PAR $HR $BCENTER \{Plot($diagram6, tex_size=>900);\} $ECENTER $BR (f) Find the area under the normal curve that lies to the right of z= $h. $BITALIC Express your answer as a decimal. Round to 4 decimal places after the decimal point.$EITALIC $BR answer: \{ans_rule(10)\} $PAR $HR END_TEXT Context("Numeric"); Context()->flags->set( tolerance=>0.00001, tolType=>"absolute" ); WEIGHTED_ANS($ans1->cmp(),14); WEIGHTED_ANS($ans2->cmp(),14); WEIGHTED_ANS($ans3->cmp(),18); WEIGHTED_ANS($ans4->cmp(),18); WEIGHTED_ANS($ans5->cmp(),18); WEIGHTED_ANS($ans6->cmp(),18); ENDDOCUMENT(); # This should be the last executable line in the problem.