I am trying to permit partial credit in some of my homework problems.
My understanding is that if I have included the following lines of code that partial credit would be permitted:
install_problem_grader(~~&std_problem_grader);
$showPartialCorrectAnswers = 1;
Unfortunately, this is not the case.
The problem still carries the following note to the student:
"Note: In order to get credit for this problem all answers must be correct."
What am I missing?
An example problem is pasted below.
Thanks for any guidance, Tim
# DESCRIPTION
# Data type identification
# WeBWorK problem written by TimPayer <tsp1@humboldt.edu>
# ENDDESCRIPTION
## DBsubject(Statistics)
## DBchapter(Exploratory data analysis/descriptive statistics)
## DBsection(Summary statistics)
## Institution(Humboldt State University)
## Author(Tim Payer)
## KEYWORDS(summations, mean, sd)
DOCUMENT();
loadMacros(
"PGstandard.pl",
"niceTables.pl",
"unionTables.pl",
"PGunion.pl",
"MathObjects.pl",
"PGML.pl",
"parserPopUp.pl",
"parserFormulaUpToConstant.pl"
);
Context("Numeric");
install_problem_grader(~~&std_problem_grader);
$showPartialCorrectAnswers = 1;
Context()->flags->set(
tolerance => 0.0001,
tolType => "absolute",
);
$popup1 = PopUp(
["choose", "Discrete", "Continuous", "Nominal", "Ordinal"],"Continuous");
$p0 = random(0.02, 0.13, 0.01);
$p1 = random(0.38, 0.48, 0.01);
$p3 = random(0.07, 0.21, 0.01);
$p2 = 1-$p0-$p1-$p3;
$mean = 0*$p0+1*$p1 +2*$p2+3*$p3;
$sd = sqrt(0**2*$p0 +1**2*$p1 +2**2*$p2 +3**2*$p3 -$mean**2);
$lb = $mean -$sd;
$ub = $mean +$sd;
##$column2 =$BCENTER.image($graph, width=>789, height=>793, tex_size=>500).$BR." ".$ECENTER;
$column1 = PGML::Format(<<END_PGML);
*Drawn From Lecture Notes: Week 4 Day 1.*
*5.1)* The California buttercup, _Ranunculus californicus_, is a native perennial herb that ranges in moist climates from Baja California to Oregon. A graduate student sampled a few hundred plant quadrants from the Arcata bottoms during the month of May and found the following probability distribution for [``x``], the number of buttercup plants per quadrant. Calculate the mean and standard deviation for the expected number of buttercups per quadrant. Then determine the first standard deviation window for the buttercup count per quadrant.
END_PGML
$column2 =$BCENTER.image("Buttercup1.jpg", width=>500, height=>358, tex_size=>700).$BR."photos by cosmicsailor".image("Buttercup2.png", width=>735, height=>850, tex_size=>700).$BR."The California Buttercup ".$BR.$ECENTER;
TEXT(ColumnTable($column1,$column2));
BEGIN_TEXT
\[
\begin{array}{|c|c|}
\hline
\text{x, buttercups/quadrant} & \text{P(x)} \\
\hline
\text{0} & \text{$p0} \\
\text{1} & \text{$p1} \\
\text{2} & \text{$p2} \\
\text{3} & \text{$p3} \\
\hline
\end{array}
\]
$BR
END_TEXT
BEGIN_PGML
*5.1a)* Find the expected number of buttercups per quadrant: [``\Large{\mu_x}``] = [_____]{$mean}
*5.1b)* Find the expected standard deviation of buttercups per quadrant using fourth decimal accuracy: [``\Large{\sigma_x}``] = [_____]{$sd}
*5.1c)* Determine the first standard deviation window for a count of buttercups per quadrant using fourth decimal accuracy:
Lower sd window bound = [_____]{$lb}
Upper sd window bound = [_____]{$ub}
END_PGML
BEGIN_PGML_SOLUTION
*SOLUTION*
1b.) Since the Richter scale is logarithmic, decimal values still have meaning. Therefore the data type of the Richter scale is Continuous.
END_PGML_SOLUTION
ENDDOCUMENT();