######################################################################## ## DESCRIPTION ## A WeBWorK problem that asks students to find z-scores given the area under the ## normal curve ## WeBWorK problem written by JoAnne Taormina, ## ENDDESCRIPTION ## ## KEYWORDS('normal curve', 'area', 'z-score', 'inverse', 'invnorm') ## ## 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", ); install_weighted_grader(); TEXT(beginproblem()); $showPartialCorrectAnswers = 1; $a = random(55,90,.01); $b = random(55,90,.01); $ans1 = normal_distr(($a-50)/100); # round $ans1 to 2 decimal places $ans1 = int(100*$ans1+.5*($ans1 <=> 0))/100; $diagram1 = DrawNormalDist( -INF, $ans1, "", "z"); $ans2 = normal_distr(($b-50)/100)*(-1); # round $ans2 to 2 decimal places $ans2 = int(100*$ans2+.5*($ans2 <=> 0))/100; $diagram2 = DrawNormalDist( $ans2, INF, "z", ""); $ans1 = Compute($ans1); $ans2 = Compute($ans2); BEGIN_TEXT $BCENTER \{Plot($diagram1, tex_size=>900);\} $ECENTER $BR (a) For a normal distribution, find the z-score that cuts off the bottom $a% of all the z-scores. $BITALIC Round to 2 decimal places after the decimal point.$EITALIC $BR answer: \{ans_rule(10)\} $PAR $HR $BCENTER \{Plot($diagram2, tex_size=>900);\} $ECENTER $BR (b) For a normal distribution, find the z-score that cuts off the top $b% of area. $BITALIC Round to 2 decimal places after the decimal point.$EITALIC $BR answer: \{ans_rule(10)\} $PAR END_TEXT Context("Numeric"); Context()->flags->set( tolerance=>0.001, tolType=>"absolute" ); WEIGHTED_ANS($ans1->cmp(),40); WEIGHTED_ANS($ans2->cmp(),60); ENDDOCUMENT(); # This should be the last executable line in the problem.