## WeBWorK Problems

### Duplication of phrase selections in draggableProof.pl problems

by tim Payer -
Number of replies: 3
Greetings,

For those interested in using the draggableProof.pl macro there seems to be a small glitch in that phrase segments are duplicated upon revisiting the problem after the initial attempt.

We are using an MAA subscription Version 2.13.

Specifically:

When a draggable proof problem is attempted, the chosen phrase segments from the left column are dragged to the right column where the complete "Proof" is formed. Regardless of whether the answer is correct or incorrect, and regardless of whether the phrase segments chosen come from the pool of "correct" phrases or from the pool of "false" phrases, duplication will result in all phrase segments that have been left in the right hand column.

To recreate the duplication error you must leave phrase segments in place in the right hand column, then leave the problem and perhaps open another problem and then return to the draggableProof problem. Upon your return one should find all the chosen selections on the right column duplicated in the left column. It is as if the problem needs to be "reset" upon re-opening and not hold the previous efforts.

One can continue with this duplication scheme and create triples and quadriples of singular phrases. But of course this is not the intention of the problem.

Tim

### Re: Duplication of phrase selections in draggableProof.pl problems

by tim Payer -
A small revision to my last description of the duplication error for phrase segments in a draggableProof problem.

As long as one returns all the draggable statements to the left column and then submit for scoring, then leaving the problem and then reopening the problem will not result in a duplication of draggable statements.

Tim

### Re: Duplication of phrase selections in draggableProof.pl problems

by tim Payer -
Greetings,

I am getting a new error in the draggableProof problem. The warning message claims that "choose" isn't numeric in array slice. The "choose" reference is likely due to the "choose" prompt in the pop-up questions that precede the draggable proof problem.

Are these two problem types not compatible within the same problem?
I have declared "Context()->normalStrings;" throughout this problem. And the line code of 213 is beyond the length of my code block.

Any help would be most appreciated.
But I understand that this feature is not yet an official option for the version 2.13 release.

I have included the error and associated code block below:
Best, Tim

### Warning messages

• Argument "choose" isn't numeric in array slice at line 213 of [TMPL]/Library/macros/MC/draggableProof.pl

# DESCRIPTION Interpretation of the Confidence Interval
# Translate descriptions of critical points and function
# into correct notation.
# WeBWorK problem written by TimPayer <tsp1@humboldt.edu>
# ENDDESCRIPTION

## DBsubject(Calculus-single variable)
## DBchapter(Differentiation)
## DBsection(Conceptual understanding of derivatives)
## Institution(Humboldt State University)
## Author(Tim Payer)
## KEYWORDS(derivative, translate, notation)
DOCUMENT();

"PGstandard.pl",
"PGunion.pl",
"MathObjects.pl",
"parserPopUp.pl",
"unionTables.pl",
"niceTables.pl",
"PGML.pl",
"PGcourse.pl",
"draggableProof.pl",
);

TEXT(beginproblem());

$showPartialCorrectAnswers = 1; #Context("Numeric"); Context()->texStrings;$popup1 = PopUp(
["choose", "A", "B", "C"
],"C");

$popup2 = PopUp( ["choose", "D", "E", "F", "G" ],"F");$popup3 = PopUp(
["choose", "H", "I", "J", "K", "L"
],"H");

$CorrectProof = DraggableProof([ "95% confidence means that", "95% of all guinea pig brain cells", "sampled will form", "confidence intervals that", "contain ", "the true mean count of ", "the dendritic branch segments emanating from the brain cell." ], [ "there is a 95% chance that", "the sample mean count of the", "will exist within", "we have calculated." ], SourceLabel => "Choose phrases from here...", TargetLabel => "...to create the correct interpretation of confidence here.", ); BEGIN_PGML *Drawn from the Lecture Notes: Week 6 Day 1, Quiz 5 Prep.* *11.3)* A dendritic tree is a branched structure that emanates from the body of a nerve cell. In a study of brain development, researchers examined brain tissue from seven adult guinea pigs. The investigators randomly selected nerve cells from a certain region of the brain and counted the number of dendritic branch segments emanating from each selected cell. A total of 36 cells were selected, and the resulting counts are given in the table below. [@ DataTable( [ [["38 25 35 48 17 26$BR 47 24 38 38 49 41 $BR 35 44 45 31 32 59$BR 42
35
33
53
24
26 $BR 28 35 26 29 26 26$BR 38
25
28
46
39
53 ", ], ],
],
caption => ' The number of dendritic branches for 36 nerve cells. ',
midrules => 1,
align => '|p{1.3in}|',
);
@]***

Using [\bar x = 35.67], and [sd = 9.99] gives us [SE_{\overline x} = \frac{9.99}{\sqrt{36}}=1.67]

Then we obtain the confidence interval of [35.67 \pm (2.042)(1.67)]

or: [32.3 < \mu < 39.1]

*11.3a)* Choose the letter that best describes why the preceding analysis might be criticized. (Hint: Are the observations independent?) [___]{$popup1} *A.)* The data is not large enough to ensure that we have a normal distribution. *B.)* Seven rodents and 36 brain cells cannot form an even grouping of data. At least one rodent is over represented in the sample. *C.)* The count of branch segments emanating from a nerve cell will vary over the rodents life. A single snap shot of a count of cells will not give a reliable comparison unless the specific age of the rodent is considered. *11.3b)* Create 2 histograms of the sample data with R. Does the shape of these histograms support the criticism made in part a? [@ DataTable( [ [["Web Page Access: ", headerrow => 1], "Or the URL link: "], [[" \$$\\rightarrow\$$ users.humboldt.edu/tpayer$BR
\$$\\rightarrow\$$ Stat_109 $BR \$$\\rightarrow\$$ Data Files$BR
\$$\\rightarrow\$$ HW11.csv" ], htmlLink( "http://users.humboldt.edu/tpayer/Stat_109/Data%20Files/HW11.csv","HW11_Nerves_data_set" ) ],
],
caption => ' Access the HW11.csv MS Excel file at either location:',
midrules => 1,
align => '|p{2in}|p{2in}|',
);
@]***

This document uses the HW 10 data set as an example.
Look in the folder:
*users.humboldt.edu/tpayer* [\rightarrow]
[\rightarrow] Stat 109 [\rightarrow] Loading_CSV_Files_in_R_Studio.pdf
[@
DataTable(
[
[["Create two histogram plots $BR with different bin widths." ], " Hints for R code: " ], [["1.) The default display.$BR $BR 2.) The histogram bin span set to 1.5." ], "$BBOLD > attach(HW11) $BR > hist(Nerves)$BR > bins = seq(16.5, 61.5, by = 1.5 $BR > hist(Nerves, breaks = bins)$EBOLD" ],
],
caption => "Compare the distributions of two BR histograms drawn from the same data set. ", midrules => 1, align => '|p{2.5in}|p{2.5in}|', ); @]*** * Based on the comparison of your two histograms, select one of the four statements below that best explains the criticism made in part a above: [___]{popup2}

*D.)* The data set does not pass normality, it is skewed left.
*E.)* The data set does not pass normality it is skewed right.
*F.)* The distribution shows 2 or perhaps 3 modes which may reflect the hierarchical structure in the data. That is, the different modes may represent different age classes of kinds of guinea pigs.
*G.)* There is always variation in a random selection of data. With such a small data set it is not unusual to see what looks like a blending of 2 or 3 modes within one normal distribution.

*11.3c)* Interpret the meaning of the confidence interval in the context of this problem. If we have 95% confidence then 95% of what must be true? Choose the one correct interpretation within the following list below: [___]{$popup3} *H.)* 95% confidence means that 95% of all guinea pig brain cells sampled will form confidence intervals that bracket the true mean count of dendritic branch segments emanating from a guinea pig's brain cell. *I.)* 95% confidence means that 95% of all guinea pigs will have a mean number of dendritic branch segments emanating from each selected brain cell that falls within the confidence interval that we have calculated. *J.)* 95% confidence means that 95% of all dendritic branch segments emanating from each selected guinea pig brain cell will exist within the confidence interval that we have calculated. *K.)* 95% confidence means that 95% of all sample means of the count of dendritic branch segments emanating from each selected guinea pig brain cell will exist within the confidence interval that we have calculated. *L.)* 95% confidence means that 95% of all guinea pig brain cells sampled will form confidence intervals that bracket the sample mean count of dendritic branch segments emanating from a guinea pig's brain cell. END_PGML BEGIN_TEXT$BBOLD 11.3c) $EBOLD Interpret the meaning of the confidence interval in the context of this problem. If we have 95% confidence then 95% of what must be true?$BR
$BR Click and drag \{$CorrectProof->numNeeded\} sentence framents from the left column to form a correct interpretation of the meaning of 95% confidence in the right column.

$PAR \{$CorrectProof->Print \}

END_TEXT
Context()->normalStrings;

ANS($CorrectProof->cmp); BEGIN_PGML_SOLUTION The correct answers are: 1. [@$popup1->correct_ans("g'(12) = 0") @]*.
2. [@ $popup2->correct_ans("g'(14) < 0") @]*. 3. [@$popup3->correct_ans("g'(15) = 0") @]*.

END_PGML_SOLUTION

ENDDOCUMENT();