WeBWorK Problems

Can't Convert Matrix Element as a real number?

Can't Convert Matrix Element as a real number?

by tim Payer -
Number of replies: 0
Greetings,

I am getting an error that states that a matrix element cant be converted as Real. But this error is dependent upon a particular seed value: 675
I have been unable to trace its source.

Why would this matrix element pass in some cases but not others?

Any help would be most appreciated, and I plan on taking the Problem authoring course Again this June just for issues like this one.

Thanks, Tim

##DESCRIPTION
##  One way ANOVA
##ENDDESCRIPTION

##KEYWORDS('ANOVA')

## DBsubject('Statisitics')
## DBchapter('confidence intervals')
## DBsection('Real Numbers')
## Date('11/7/2016')
## Author('Tim Payer')
# DESCRIPTION  t-tests, two sample-t
# Use correct notation.
# WeBWorK problem written by TimPayer <tsp1@humboldt.edu>
# ENDDESCRIPTION

## DBsubject(Probability)
## DBchapter(Random variables)
## DBsection(Expectation)
## Institution(Humboldt State University)
## Author(Tim Payer)
## KEYWORDS(probability, translate, notation)
DOCUMENT();

loadMacros(
"PGstandard.pl",
"PGunion.pl",
"PGnumericalmacros.pl",
"PGstatisticsmacros.pl",
"MathObjects.pl",
"parserPopUp.pl",
"PGML.pl",
"unionTables.pl",
"niceTables.pl",
"PGcourse.pl",
"PGchoicemacros.pl",
  "answerHints.pl",
"weightedGrader.pl"
);

install_weighted_grader();

#Text(beginproblem());   #uncomment

#install_problem_grader(~~&std_problem_grader);
$showPartialCorrectAnswers = 1;

Context("Numeric");
Context()->flags->set(
  tolerance => 0.01,
  tolType => "absolute",
);


############ Start Problem 25.1  ##################

### Summarized Data table values:
@nn =();
$nn[0] = "Control";
$nn[1] = "Flea beetle";
$nn[2] = "CO potato beetle";
$nn[3] = "Wireworm";
$nn[4] = "Psyllid";

@nr =();
$nr[0] = random(15,22,1);
$nr[1] = random(19,27,1);
$nr[2] = random(23,29,1);
$nr[3] = random(9,14,1);
$nr[4] = random(16,24,1);

@sr =();
$sr[0] = random(2.7,2.9,0.01);
$sr[1] = random(3.7,3.9,0.01);
$sr[2] = random(2.9,3.2,0.01);
$sr[3] = random(3.3,3.6,0.01);
$sr[4] = random(2.5,2.7,0.01);

@xr =();
$xr[0] = random(9,9.5,0.01);
$xr[1] = random(28,32,0.01);
$xr[2] = random(27,29.5,0.01);
$xr[3] = random(16,18.5,0.1);
$xr[4] = random(21,23.5,0.1);

$jnn = join("$BR ",@nn);
$jn = join("$BR ",@nr);
$jx = join("$BR ",@xr,);
$js = join("$BR ",@sr);

## Preliminary Checks:  Step 1 ####

$popup1 = PopUp(
["Choose:", 'independent', 'dependent'], 'independent');

$popup2 = PopUp(
["Choose:", 'pass', 'fail'], 'pass');

## Preliminary Checks:  Step 1b, Equal variances ####

$nprime = Compute("4/(1/$nr[0]+1/$nr[1]+1/$nr[2]+1/$nr[3]+1/$nr[4])");
$npff =floor($nprime);
$npf = Compute("$npff");  ## n-prime-1: the harmonic mean of sample size
$npc = Compute("$npff+1");

$dfhn =Compute("5");  ## df Hartley's for numerator: # of Groups
$dfhd =Compute("$npf"); ## df Hartley's for denominator: # n' - 1.

$popup5 = PopUp(
["Choose:", 'Reject', 'Do Not Reject'], 'Do Not Reject');

$popup6 = PopUp(
["Choose:", 'Reject', 'Do Not Reject'], 'Reject');

$popup7 = PopUp(
["??", '40%','20%','10%', '5%','2.5%', '2%', '1%', '0.1%', '0.01%'], '5%');

$popup8 = PopUp(
["Choose:", 'Reject', 'Do Not Reject'], 'Do Not Reject');


## Using a matrix to determine F-critical for Hartleys test, alpha = 0.05
##  Listing the F-Critical values for Hartley's with df = (5, 13:22)



$M1 = Matrix([1.72, 2.35, 3.03, 4.02, 4.86, 8.35, 13.29], [1.70, 2.31, 2.96, 3.90, 4.69, 7.92, 12.37], [1.68, 2.27, 2.90, 3.81, 4.56, 7.57, 11.62], [1.67, 2.24, 2.85, 3.72, 4.44, 7.27, 11.01], [1.65, 2.22, 2.81, 3.65, 4.34, 7.02, 10.50], [1.64, 2.20, 2.77, 3.59, 4.25, 6.81, 10.07], [1.63, 2.18, 2.74, 3.53, 4.17, 6.62, 9.71], [1.62, 2.16, 2.71, 3.48, 4.10, 6.46, 9.39], [1.61, 2.14, 2.68, 3.44, 4.04, 6.32, 9.11], [1.61, 2.13, 2.66, 3.40, 3.99, 6.19, 8.87] );

$fsamh = Compute("$sr[1]**2/$sr[4]**2");  ## F-sample for Hartleys
$rw =$npf-12;  ## Letting dfw reset from rows 13-22 to rows 1-10
$fcrth = $M1->element($rw, 3);  ## Hartleys F-Critical for 5% 

##Trouble shooting for  error, until then $pp = "(p > 0.20)";    #####
$mr1 =$M1->element($rw, 1);
$mr2 = $M1->element($rw, 2);
$mr3 = $M1->element($rw, 3);
$mr4 = $M1->element($rw, 4);
$mr5 = $M1->element($rw, 5);
$mr6 = $M1->element($rw, 6);
$mr7 = $M1->element($rw, 7);

$pp = "(p > 0.20)";
$fsmh = Compute("2.2");  ## Delete when done
$ph = "(0.0001 < p < 0.001)";
######################################
########################################################
if($fsamh < $mr1){
      $pp = "(p > 0.20)";
    } elsif(($mr1 < $fsamh) and ($fsamh < $mr2) ) {
      $pp = "(0.10 < p < 0.20)";
    } elsif(($mr2 < $fsamh) and ($fsamh < $mr3) ) {
      $pp = "(0.05 < p < 0.10)";
    } elsif(($mr3 < $fsamh) and ($fsamh < $mr4) ) {
      $pp = "(0.02 < p < 0.05)";
    } elsif(($mr4 < $fsamh) and ($fsamh < $mr5) ) {
      $pp = "(0.01 < p < 0.02)";
    } elsif(($mr5 < $fsamh) and ($fsamh < $mr6) ) {
      $pp = "(0.001 < p < 0.01)";
    } elsif(($mr7 < $fsamh) and ($fsamh < $mr7) ) {
      $pp = "(0.0001 < p < 0.001)";
     } else{
     $pp = "(p < 0.0001)";
}






#########################################
$popup9 = PopUp(
["??", '<', '>', '=', '< or =', '> or ='], '<');

$popup99 = PopUp(
["??", '<', '>', '=', '< or =', '> or ='], '<');

$popup19 = PopUp(
["??", '<', '>', '=', '< or =', '> or ='], '>');

$popup29 = PopUp(
["??", '<', '>', '=', '< or =', '> or ='], '>');

$popupph = PopUp(
["which bracketed p-value?",
"(p > 0.40)", "(p > 0.20)","(0.20 < p < 0.40)","(0.10 < p < 0.20)", "(0.05 < p < 0.10)", "(0.025 < p < 0.05)", "(0.02 < p < 0.05)", "(0.01 < p < 0.025)","(0.01 < p < 0.02)",  "(0.005 < p < 0.01)",  "(0.001 < p < 0.01)", "(0.0001 < p < 0.001)",  "(p < 0.0001)"], $pp );

$popup10 = PopUp(
["alpha",  '0.20','0.10', '0.05', '0.02', '0.01', '0.001', '0.0001'], '0.05');

$popup11 = PopUp(
["??", 'all met, we can proceed', 'not met, we can not proceed', 'mostly met, we can proceed'], 'all met, we can proceed');





### Declaration of Variables: Step 2  ####

$popup3 = PopUp(
["Choose:",   'x-bar-i', 'mu-i', 'x-tilde-i', 'eta-i'], 'mu-i');

$popup4 = PopUp(
["Choose:", 'mean', 'median','standard deviation of', 'proportion of'], 'mean');

### Declaration of Hypothesis: Step 3  ####

$popup30 = PopUp(
["??", 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'], 'D');

$popup31 = PopUp(
["??", 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'], 'C');

$r = list_random(0, 1, 2, 3, 4, 5, 6);  ## permits random selections of a specified range.
@alfa = ( '0.20','0.10', '0.05','0.02', '0.01', '0.001', '0.0001');
@alfap = ( '20%','10%', '5%','2%', '1%', '0.1%', '0.01%');
$alfp = "$alfap[$r]";

$LOS =Compute("100*$alfa[$r]");
$poplos = PopUp(
["alpha", '0.40', '0.20','0.10', '0.05','0.025', '0.02', '0.01', '0.001', '0.0001'], $alfa[$r]);

###  Calculate values for ANOVA Table: Step 4

$h1=0;
foreach my $i (0..4) {
   $sm1 =Compute("$h1 + $nr[$i]");   ## Summing all sample sizes
   $h1 = $sm1;
}

$h2=0;
foreach my $i (0..4) {
   $sm2 =Compute("$h2 + $nr[$i]*$xr[$i]");   ## Summing all n*xbars 
   $h2 = $sm2;
}

$gm2 =Compute("$sm2/$sm1");   ## the grand mean

$h3=0;
foreach my $i (0..4) {
   $sm3 =Compute("$h3 + $nr[$i]*($xr[$i]-$gm2)**2");   ## Summing to ssb 
   $h3 = $sm3;
}

$h4=0;
foreach my $i (0..4) {
   $sm4 =Compute("$h4 + ($nr[$i]-1)*($sr[$i])**2");   ## Summing to SSW
   $h4 = $sm4;
}

$ssb=Compute("$sm3");
$ssw2 =Compute("$sm4");
$ssw1 =sprintf("%0.2f",$ssw2);
$ssw =Compute("$ssw1");
$sst = Compute("$ssb+$ssw");
$dfb = Compute("4");
$dfw = Compute("$sm1-5");
$dft = Compute("$dfb+$dfw");
$msb = Compute("$ssb/$dfb");
$msw2 = Compute("$ssw/$dfw");
$msw1 = sprintf("%0.2f",$msw2);
$msw = Compute("$msw1");
$fsam = Compute("$msb/$msw");

### A 2x7 matrix to find f-critical and bracket -p for the ANOVA test.  ####

$M2 = Matrix([1.55, 2.04, 2.53, 3.16, 3.65, 5.31, 7.06], [1.53, 2.00, 2.46, 3.06, 3.51, 5.02, 6.55]);

if(($dfw >= 60) &&($dfw < 100)){
      $ra =1;
     @fcrit =('1.55','2.04', '2.53', '3.16', '3.65', '5.31', '7.06');
      } else{
      $ra =2;
     @fcrit =('1.53','2.00', '2.46', '3.06', '3.51', '5.02', '6.55');
}

$fcrt =Compute("$fcrit[$r]");

if($fsam < $M2->element($ra, 1)){
      $pa = "(p > 0.20)";
    } elsif(($M2->element($ra,1) < $fsam) and ($fsam < $M2->element($ra,2)) ) {
      $pa = "(0.10 < p < 0.20)";
    } elsif(($M2->element($ra,2) < $fsam) and ($fsam < $M2->element($ra,3)) ) {
      $pa = "(0.05 < p < 0.10)";
    } elsif(($M2->element($ra,3) < $fsam) and ($fsam < $M2->element($ra,4)) ) {
      $pa = "(0.02 < p < 0.05)";
    } elsif(($M2->element($ra,4) < $fsam) and ($fsam < $M2->element($ra,5)) ) {
      $pa = "(0.01 < p < 0.02)";
    } elsif(($M2->element($ra,5) < $fsam) and ($fsam < $M2->element($ra,6)) ) {
      $pa = "(0.001 < p < 0.01)";
     } elsif(($M2->element($ra,6) < $fsam) and ($fsam < $M2->element($ra,7)) ) {
      $pa = "(0.0001 < p < 0.001)";
     } else{
     $pa = "(p < 0.0001)";
}

$pop21 = PopUp(
["which bracketed p-value?",
"(p > 0.40)", "(p > 0.20)","(0.20 < p < 0.40)","(0.10 < p < 0.20)", "(0.05 < p < 0.10)", "(0.025 < p < 0.05)", "(0.02 < p < 0.05)", "(0.01 < p < 0.025)","(0.01 < p < 0.02)",  "(0.005 < p < 0.01)",  "(0.001 < p < 0.01)", "(0.0005 < p < 0.005)",  "(p < 0.001)", "(p < 0.0001)"], $pa );

#### Write a Statistical conclusion to the ANOVA hypothesis.

$popup40 = PopUp(
["??", '40%','20%','10%', '5%','2.5%', '2%', '1%', '0.1%', '0.01%'], $alfp);

if($fsam < $fcrt){
      $inf = "<";
      $inp = ">";
      $rj = "Do Not Reject";
      $conc = "does not vary";
      } else{
        $inf = ">";
$inp = "<";
$rj = "Reject";
        $conc = "varies";
}

$popup41 = PopUp(
["Choose:", 'Reject', 'Do Not Reject'], $rj);

$popup33 = PopUp(
["??", '<', '>', '=', '< or =', '> or ='], $inf);

$popup34 = PopUp(
["??", '<', '>', '=', '< or =', '> or ='], $inf);

$popup44 = PopUp(
["??", '<', '>'], $inp);

$popup45 = PopUp(
["which bracketed p-value?",
"(p > 0.40)", "(p > 0.20)","(0.20 < p < 0.40)","(0.10 < p < 0.20)", "(0.05 < p < 0.10)", "(0.025 < p < 0.05)", "(0.02 < p < 0.05)", "(0.01 < p < 0.025)","(0.01 < p < 0.02)",  "(0.005 < p < 0.01)",  "(0.001 < p < 0.01)", "(0.0005 < p < 0.005)",  "(p < 0.001)", "(p < 0.0001)"], $pa );

$popup46 = PopUp(
["??", '<', '>'], $inp);

$popup47 = PopUp(
["alpha", '0.40', '0.20','0.10', '0.05','0.025', '0.02', '0.01', '0.001', '0.0001'], $alfa[$r] );

$popup48 = PopUp(
["Choose:", 'varies', 'does not vary'], 'varies');


####  Begin Problem...

 
BEGIN_PGML 
   *Drawn from Lecture Notes: Week 11 Day 2 and Week 12 Day 2.*   
 
*25.2)* When plants are attacked by insects they release chemical compounds that attract other insects that prey on the attacking insects. The protective compounds that were released by the potato plant, _Solanum tuberosumin,_ in response to attacks from various pests were examined in an experiment in Arizona. The investigators compared the amount of defensive compounds released by the potato plant while under the attack of four insects and a control plot that was unmolested by insect pests. The mean emissions of defensive compounds released by the potato plants in response to each treatment were measured over a period of 24 hours. The results are summarized in the table below. Use a one way ANOVA hypothesis at a [$LOS]%  LOS with preliminary checks to determine if the mean rate of the compounds released in nanograms per hour (ng/hr) is significantly different for at least one of the attacking insects.
END_PGML 
BEGIN_TEXT
$PAR
$PAR
\{
DataTable(
[
['Potato psyllid,  $BITALIC Paratrioza cockerelli $EITALIC'.$BR.image( "psyllid.png", width=>848, height=>544, tex_size=>700 ).$BR.'Colorado potato beetles feeding: $BR $BITALIC Leptinotarsa decemlineata $EITALIC'.$BR.image( "CO_potatobug.png", width=>301, height=>301, tex_size=>700 ),'  ',['Flea beetles: $BITALIC Coleoptera Chrysomelidae $EITALIC'.$BR.image( "fleabeetle.png", width=>1113, height=>624, tex_size=>700 ).$BR.'Wire worms feed on a potato piece: $BR $BITALIC Melanotus communis $EITALIC'.$BR.image( "wireworm.png", width=>477, height=>293, tex_size=>700 ) ]]], 
  caption => 'Four Common Pests of the Potato Plant, $BITALIC Solanum tuberosumin $EITALIC',
  midrules=>0, 
  align => 'p{3in} p{0.1in} p{4.2in}'
);
\}
$PAR

$BR
*Image sources: $BR
*Colorado potato beetle image source: Chalotte Glen, Pender County NC, Cooperative Extension: http://pendergardener.blogspot.com/2011_04_01_archive.html \{ htmlLink( "http://pendergardener.blogspot.com/2011_04_01_archive.html","pendergardener.blogspot" ) \} $BR
*wire worm image source: wollygreen.com:   http://www.woollygreen.com/useful-info/bad-bad-beasties/how-to-get-rid-of-wire-worms/ \{ htmlLink( "http://www.woollygreen.com/useful-info/bad-bad-beasties/how-to-get-rid-of-wire-worms/","wireworms" ) \} $BR
*flea beetle and potato psyllid image source: amdro.com:   http://www.amdro.com/learn/regional-pests/common-summer-pests-of-the-southwest \{ htmlLink( "http://www.amdro.com/learn/regional-pests/common-summer-pests-of-the-southwest","psyllid and flea beetles" ) \} $BR

$BR
$PAR
\{
DataTable(
[
[['Treatment ', headerrow => 1],'N','\(\bar x\) compound $BR emission rate $BR (ng/hour)', 'Standard $BR deviation',],
[[$jnn ], $jn, $jx, $js],
], 
caption => ' ',
midrules => 1,
align => '|p{1.2in}|p{0.3in}|p{1.1in}|p{0.8in}|',
);
\}
$BR
END_TEXT
BEGIN_PGML 
*25.2) Step 1a:  Preliminary Checks*  
* The data sets are collected from [$popup1->menu]* and random samples.
* With summarized data, we assume that all data sets [$popup2->menu]* a normality test by the Anderson-Darling normality test, as we are using mean values.  

*25.2)  Step 1b:*   Check for Homoscedastity (equal variances):
END_PGML
BEGIN_TEXT
\{
DataTable(
[
[['Because of unequal sample sizes we must first calculate a harmonic mean for the grouped sample size, \(n^{\prime}.\) '],' ','\(\displaystyle{n^{\prime} = \frac{k}{\frac{1}{n_1}+\frac{1}{n_2}+...+\frac{1}{n_k}}}\) '],
], 
caption => ' ',
midrules => 0,
align => 'p{3.8in}p{0.3in}p{3in}',
);
\}
END_TEXT
BEGIN_PGML 
 [`n'`] = [_____]  Use at least second decimal accuracy  
 [`n'`] = [_____]  Rounded up to the next integer for f-table use.  
 
Establish the decision line for Hartley's Equal variance test. Recognize that this is NOT the decision line for the ANOVA test, rather it is the decision line for the preliminary check of equal variances, without which we can not proceed with the ANOVA test.  
For Hartley's test: df = (k, [`n'`]-1) = [`\Large{(}`] [____] [`\Large{,}`][____] [`\Large{)}`]
 
 [`\hspace{50pt}`] [$popup5->menu]* [`\hspace{120pt}`] [$popup6->menu]* 
END_PGML 
BEGIN_TEXT
\{ image( "DecisionLine2.png", width=>690, height=>25, tex_size=>700, extra_html_tags=>'alt="A decision for the hypothesis on equal variances." ' ) \} 
END_TEXT
BEGIN_PGML
[`\hspace{120pt} \Large{F_{critical} =}`] [____]

*25.2) Step 1c:*  The statistical conclusion for Hartley's F test is:  

At the [$popup7->menu]*  LOS we [$popup8->menu]*  the null hypothesis of  [``\large{H_o  }``], because:

END_PGML
BEGIN_TEXT
$PAR
  \{
DataTable(
[
[' \(\large{F}\)-Notational $BR Support: $BR $BR Numeric $BR Validation: ',' \(\hspace{10pt}\)  \(\large{F_{sample}}\) \(\hspace{2pt}\) '.$popup9->menu.' \(\hspace{2pt}\) \(\large{F _{critical}}\) $BR $BR '.$fsmh->ans_rule(5).' '.$popup99->menu. ' '.$fcrth->ans_rule(5). ' '],
  ], 
  caption => '  ',
  midrules=>0, 
  align => 'p{1.2in}p{7in}'
);
\}

\{
DataTable(
[
['p-Notational $BR Support: $BR $BR Numeric $BR Validation: ',' \(\hspace{115pt}\) \(\Large{p} \hspace{2pt}\) '.$popup19->menu.'\(\hspace{2pt} \Large{\alpha}\) $BR $BR '.$popupph->menu.''.$popup29->menu.''.$popup10->menu.'' ],
  ], 
  caption => '  ',
  midrules=>0, 
  align => 'p{1.2in}p{7in}'
);
\}
$BR
$BR
END_TEXT 
BEGIN_PGML

With the preliminary checks of independent and random samples, a normal distribution and equal variances, [$popup11->menu]* with a one-way ANOVA test.


*25.2)  Step 2:*   Declare the variables for this hypothesis test:  

END_PGML 
BEGIN_TEXT
$PAR
\{
DataTable(
[
['$BBOLD Note! $EBOLD Because of the limitations in software most special characters cannot be included in a "pop-up" answer format and yet they are needed for the hypothesis formation. The pop-up selections will be in the text-form for the special characters embedded within the pop-up answer. Use the table at the right as a guide if needed.','  ',[image( "musubi.png", width=>189, height=>198, tex_size=>700 )],[image( "muby4.png", width=>258, height=>266, tex_size=>700 ) ] ] 
  ], 
  caption => 'English text equivalence for the Variable and Hypothesis Options: ',
  midrules=>0, 
  align => 'p{2.5in} p{0.1in} p{2in}p{2.5in}'
);
\}
$PAR
END_TEXT

BEGIN_PGML
*25.2)  Step 2:*   Declare the variables for this hypothesis test:  
 
[$popup3->menu]* = The [$popup4->menu]* emission rate in (ng/hour) for a potato plant responding to an attack from the [`i^{th}`] insect.
.  


*25.2)  Step 3)*  Choose the correct hypothesis statement to test the claim that the mean emission rate in (ng/hour) for a potato plant varies depending upon the type of attacking insect. Test the hypothesis at a [$LOS]%  LOS.  

 
[``\Large{H_o:}``] [$popup30->menu]*  
 
[``\Large{H_a:}``] [$popup31->menu]* 
 
[``\Large{\alpha =}``] [$poplos->menu]*

 
*25.2)  Step 4)*  Complete the partially filled ANOVA table as an aid in forming the  conclusion for the ANOVA hypothesis.  
END_PGML
BEGIN_TEXT
\{
DataTable(
[
[['Source ', headerrow => 1],'Sum of Squares $BR (SS)', 'Degrees of $BR  freedom: df','Mean Squares $BR (MS)','F-sample'],
[['Between $BR Groups'], 'SSB = $ssb',  '\(df_b\) ='.$dfb->ans_rule(1).'', 'MSB ='.$msb->ans_rule(4).'', '\(F_{Sample}\) ='.$fsam->ans_rule(4).''],
[['Within $BR Groups'], 'SSW ='.$ssw->ans_rule(4).'' , '\(df_w\) ='.$dfw->ans_rule(1).'', 'MSW = $msw' , '$BBOLD Bracketed p-value: $EBOLD'],
[['Total'], 'SST ='.$sst->ans_rule(4).'', '\(df_t\) ='.$dft->ans_rule(1).'', '', ' '.$pop21->menu.''],
], 
caption => 'ANOVA TABLE ',
midrules => 1,
align => '|p{0.6in}|p{1.3in}|p{1.1in}||p{1.4in}|p{2in}|',
);
\}
$BR
$BR
END_TEXT

BEGIN_PGML

 
*25.2),  Step 5)*  Write a statistical conclusion for the ANOVA hypothesis.  
 
 
At the [$popup40->menu]*  LOS we [$popup41->menu]*  the null hypothesis of  [``\large{H_o  }``], because:  

END_PGML 

BEGIN_TEXT
$PAR
\{
DataTable(
[
[' df and \(\large{F}\) $BR Notation $BR Support: $BR $BR Numeric $BR Validation: ',' \(\hspace{2pt}\) \(df = (df_B , df_W\)) = \(\large{(}\) '.$dfb->ans_rule(1).'\(\large{,}\)'.$dfw->ans_rule(1).'\(\large{)}\) $BR $BR \(\hspace{11pt}\) \(\large{F_{sample}}\) \(\hspace{1pt}\) '.$popup33->menu.' \(\hspace{1pt}\) \(\large{F_{critical}}\)   $BR $BR '.$fsam->ans_rule(5).' '.$popup34->menu.''.$fcrt->ans_rule(5).'' ],
  ], 
  caption => '  ',
  midrules=>0, 
  align => 'p{1.2in}p{7in}'

);
\}

$PAR
\{
DataTable(
[
['p-Notational $BR Support: $BR $BR Numeric $BR Validation: ',' \(\hspace{65pt}\) \(\Large{p} \hspace{2pt}\) '.$popup44->menu.'\(\hspace{2pt} \Large{\alpha}\) $BR $BR \(\Large{p} = \hspace{2pt}\)'.$popup45->menu.''.$popup46->menu.''.$popup47->menu.'' ],
  ], 
  caption => '  ',
  midrules=>0, 
  align => 'p{1.2in}p{7in}'
);
\}

$PAR
$BR



END_TEXT

BEGIN_PGML

*25.2),  Step 6)*   Write an English sentence conclusion.  
 
The evidence supports the case that mean rate of emissions in (ng/hour) for the potato plant [$popup48->menu]* according to which insect is attacking the plant.
 
 
END_PGML

#Adapted weighted answers values:  

## Problems 25.3 ##

##Preliminary checks:

WEIGHTED_ANS( ($popup1)->cmp, 1 );
WEIGHTED_ANS( ($popup2)->cmp, 1 );

## Check for Equal Variances: 

WEIGHTED_ANS( ($nprime)->cmp, 5 );
WEIGHTED_ANS( ($npc)->cmp, 1 );

WEIGHTED_ANS( ($dfhn)->cmp, 2 );
WEIGHTED_ANS( ($dfhd)->cmp, 2 );
WEIGHTED_ANS( ($popup5)->cmp, 1 );
WEIGHTED_ANS( ($popup6)->cmp, 1 );
WEIGHTED_ANS( ($fcrth)->cmp, 3 );
WEIGHTED_ANS( ($popup7)->cmp, 1 );
WEIGHTED_ANS( ($popup8)->cmp, 1 );
WEIGHTED_ANS( ($popup9)->cmp, 1 );
WEIGHTED_ANS( ($fsmh)->cmp, 7 );
WEIGHTED_ANS( ($popup99)->cmp, 1 );
WEIGHTED_ANS( ($fcrth)->cmp, 5 );
WEIGHTED_ANS( ($popup19)->cmp, 1 );
WEIGHTED_ANS( ($popupph)->cmp, 4 );
WEIGHTED_ANS( ($popup29)->cmp, 1 );
WEIGHTED_ANS( ($popup10)->cmp, 2 );
WEIGHTED_ANS( ($popup11)->cmp, 1 );
## Declare Variables:

WEIGHTED_ANS( ($popup3)->cmp, 2 );
WEIGHTED_ANS( ($popup4)->cmp, 2 );

##Declare Hypothesis and LOS:

WEIGHTED_ANS( ($popup30)->cmp, 2 );
WEIGHTED_ANS( ($popup31)->cmp, 2 );

WEIGHTED_ANS( ($poplos)->cmp, 2 );

### ANOVA Table Entries: 
#WEIGHTED_ANS( ($ssb)->cmp, 2 );
WEIGHTED_ANS( ($ssw)->cmp, 2 );
WEIGHTED_ANS( ($sst)->cmp, 2 );
WEIGHTED_ANS( ($dfb)->cmp, 2 );
WEIGHTED_ANS( ($dfw)->cmp, 3 );
WEIGHTED_ANS( ($dft)->cmp, 1 );
WEIGHTED_ANS( ($msb)->cmp, 3 );
#WEIGHTED_ANS( ($msw)->cmp, 3 );
WEIGHTED_ANS( ($fsam)->cmp, 4 );
WEIGHTED_ANS( ($pop21)->cmp, 2 );


##### ANOVA Statistical Conclusion:  Step 5

WEIGHTED_ANS( ($popup40)->cmp, 2 );
WEIGHTED_ANS( ($popup41)->cmp, 2 );
WEIGHTED_ANS( ($dfb)->cmp, 2 );
WEIGHTED_ANS( ($dfw)->cmp, 2 );
WEIGHTED_ANS( ($popup33)->cmp, 1 );
WEIGHTED_ANS( ($fsam)->cmp, 3 );
WEIGHTED_ANS( ($popup34)->cmp, 1 );
WEIGHTED_ANS( $fcrt->cmp() ->withPostFilter(AnswerHints(
$fcrt => "Yes!",
$fin => "No, We should never round a df up to infinity",  
)),4 );


WEIGHTED_ANS( ($popup44)->cmp, 1 );
WEIGHTED_ANS( ($popup45)->cmp, 3 );
WEIGHTED_ANS( ($popup46)->cmp, 1 );
WEIGHTED_ANS( ($popup47)->cmp, 1 );
WEIGHTED_ANS( ($popup48)->cmp, 1 );

###############################




BEGIN_PGML_SOLUTION


The correct answers are coming....in 2017, Hah!

Hartley's F-critical = [$fcrth]  
Hartley's F-sample = [$fsmh]  
Hartley's bracketed p-value = [$ph]  
 
SSB = [$ssb]  
SSW = [$ssw]  
SST = [$sst]  
dfb = [$dfb]  
dfw = [$dfw]  
rw = [$rw]  
dft = [$dft]  
msb = [$msb]  
msw = [$msw]  
fcrt = [$fcrt]  
fsam = [$fsam]  
mr1 = [$mr1]  
fsamh = [$fsamh]  
pp = [$pp]  
fsmh = [$fsmh]    
 

END_PGML_SOLUTION

ENDDOCUMENT();