######################################################################## ## DESCRIPTION ## A WeBWorK problem that asks students to label raw scores +/- 3 ## standard deviations from the mean of a bell-shaped distribution. ## WeBWorK problem written by JoAnne Taormina, ## ENDDESCRIPTION ## ## KEYWORDS('empirical rule', 'mean', 'standard deviation') ## ## Author('JoAnne Taormina') ## Institution('Nassau Community College') ######################################################################## DOCUMENT(); loadMacros( "PGstandard.pl", "MathObjects.pl", "PGgraphmacros.pl", "weightedGrader.pl", ); # make sure we're in the context we want Context("Numeric"); #mean $xbar = random(120, 150, 1); #standard deviation $stnd_dev = random(12, 30, 0.1); $negxbar3s = $xbar-3*$stnd_dev; $negxbar3s = Formula("$negxbar3s"); $negxbar2s= $xbar - 2*$stnd_dev; $negxbar2s = Formula("$negxbar2s"); $negxbar1s = $xbar - $stnd_dev; $negxbar1s = Formula("$negxbar1s"); $xbar = Formula("$xbar"); $xbar1s = $xbar + $stnd_dev; $xbar1s = Formula("$xbar1s"); $xbar2s = $xbar + 2*$stnd_dev; $xbar2s = Formula("$xbar2s"); $xbar3s = $xbar + 3*$stnd_dev; $xbar3s = Formula("$xbar3s"); TEXT(beginproblem()); Context()->texStrings; BEGIN_TEXT Suppose a distribution is bell shaped and has the following statistics: $BR $BR $BCENTER \( \bar{x} = $xbar \) $BR $BR \( s = $stnd_dev \) $ECENTER $BR Label the bell curve with raw scores from \( \bar{x} - 3s \) to \( \bar{x} + 3s \). Do not round any quantities. $BR $BR $BCENTER \{ image( "bell_curve_image.png" , width=>450, height=>250) \} $BR $BR \{ ans_rule(5) \} $SPACE \{ ans_rule(5) \} $SPACE \{ ans_rule(5) \} $SPACE \{ ans_rule(5) \} $SPACE \{ ans_rule(5) \} $SPACE \{ ans_rule(5) \} $SPACE \{ ans_rule(5) \} $BR$BR $ECENTER END_TEXT Context("Numeric"); Context()->flags->set( tolerance=>0.0001, tolType=>"absolute" ); ANS($negxbar3s->cmp()); ANS($negxbar2s->cmp()); ANS($negxbar1s->cmp()); ANS($xbar->cmp()); ANS($xbar1s->cmp()); ANS($xbar2s->cmp()); ANS($xbar3s->cmp()); ENDDOCUMENT();