qu.1.topic=Ungrouped Questions@

qu.1.1.mode=Multiple Choice@
qu.1.1.name=2A. Modes limit data@
qu.1.1.comment=<p>There must also be $W4 $X4's, since it is also the mode and so must occur as often as $X3 does. Then the maximum number of $X5's allowed is $W5, otherwise it would be a mode also. So the maximum number of data points is $X1+$X2+$X3+$X4+$X5 = $Ans.</p>@
qu.1.1.editing=useHTML@
qu.1.1.solution=@
qu.1.1.algorithm=$Q="2A";
$W=maple('["0","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve"]');
$X1=range(1,4,1);
$X2=range($X1+1,7,1);
$X3=8;
$X4=range(9,11,1);
$X5=12;
$C1=range(3,7,1);
$C2=range(2,6,1);
$C3=range(8,12,1);
$C4=$C3;
$C5=$C4-1;
$Ans=$C1+$C2+$C3+$C4+$C5;
$W1=switch($C1,$W);
$W2=switch($C2,$W);
$W3=switch($C3,$W);
$W4=switch($C4,$W);
$W5=switch($C5,$W);
$Alt1=range($Ans+1,$Ans+7,1);
$Alt2=$C2+$C3+$C5+1;
$Alt3=$Alt1+range(2,7,1);@
qu.1.1.uid=d8e01d84-724b-42d8-a350-1af84d3b33de@
qu.1.1.question=<div title="STAT230/Chapter 7/Other Measures/Q$Q">A population of data consists only of the numbers $X1, $X2, $X3, $X4,and $X5. There are $W1 $X1's, $W2 $X2's, and $W3 $X3's. If this population's modes are $X3 and $X4, what is the maximum allowable number of data?</div>@
qu.1.1.answer=1@
qu.1.1.choice.1=$Ans@
qu.1.1.choice.2=$Alt1@
qu.1.1.choice.3=$Alt2@
qu.1.1.choice.4=$Alt3@
qu.1.1.fixed=@

qu.1.2.question=<div title="Stat230/Chapter 5/Poisson/Q$Q">Pulses arrive at a Geiger counter in accordance with a Poisson process. Assume that &lambda; = $lambda /hour. What is the probability that no pulses arrive at the counter between 8 a.m. and 11 a.m. if it is known that&nbsp;$n pulses have arrived at the counter prior to 8 a.m.? (Please, answer to 4 decimals of accuracy)</div>@
qu.1.2.maple=evalb(abs(($ANSWER)-($RESPONSE))<0.0005);@
qu.1.2.allow2d=1@
qu.1.2.type=formula@
qu.1.2.mode=Maple@
qu.1.2.name=4A. Geiger counter 4 - probability no pulses arrive at the counter@
qu.1.2.comment=<p><strong>The correct answer is $ANSWER</strong></p>
<hr />
<p>By the definition of a Poisson Process, what happens before 8 a.m. has no affect on what happens between 8 and 11 a.m. since these are non-overlapping and independent intervals! The question collapses to a sham, you just need to evaluate the probability function at x = 0. In other words the answer is just e<sup>-3&lambda;</sup> = e<sup>-3($lambda)</sup> = $ANSWER!</p>
<p align="center"><em><font size="1"><br />
</font></em></p>@
qu.1.2.editing=useHTML@
qu.1.2.solution=@
qu.1.2.algorithm=$Q="4A";
$lambda=decimal(1,range(1,2.4,0.1));
$n=range(1,10,1);
$ANSWER=decimal(4,exp(-3*$lambda));@
qu.1.2.uid=6f3018fd-68e3-4cac-b501-594bc5d34aa4@

qu.1.3.question=<div title="Stat230/Chapter 5/Binomial Distribution/Q$Q"><img hspace="4" align="$Align" title="Baseball [IMG:Baseball$Which.gif" alt="Baseball" src="__BASE_URI__Chapter5/BD/Baseball$Which.gif" />A baseball player has a $pp% chance of hitting the ball each time at bat, with succesive times at bat being independent. Calculate the probability that he gets at least 2 hits in&nbsp;$n times at bat. Answer to 3 decimals please.</div>@
qu.1.3.maple=evalb(abs(($ANSWER)-($RESPONSE))<0.001);@
qu.1.3.allow2d=1@
qu.1.3.maple_answer=$ANSWER@
qu.1.3.type=formula@
qu.1.3.mode=Maple@
qu.1.3.name=7. P(>=2 hits|n at bats)@
qu.1.3.comment=<div class="shadedDiv descriptionSpan" style="margin-top: 0px; margin-bottom: 2px">Let X be the number of hits in&nbsp;$n at bats. This is an example of a <span style="font-weight: bold">Binomial</span> distribution with p = $p, n = $n.&nbsp; We want P(X&nbsp;&ge; 2) = 1 - P(X < 2) = 1 - P(X = 0) - P(X = 1) = 1 - <sub>$n</sub>C<sub>0</sub>($p)<sup>0</sup>(1-$p)<sup>$n</sup> - <sub>$n</sub>C<sub>1</sub>($p)<sup>1</sup>(1-$p)<sup>$n-1</sup> = $A which rounds to&nbsp;$ANSWER .</div>@
qu.1.3.editing=useHTML@
qu.1.3.solution=@
qu.1.3.algorithm=$Q=7;
$Which=1+rint(5);
$Align=switch(rint(2),"Left","Right");
$p=decimal(1,range(0.2,0.7,0.1));
$pp=$p*100;
$n=range(5,12,1);
$A=maple("with(Statistics);
X := RandomVariable(Binomial($n, $p));
ProbabilityFunction(X, u);
1-ProbabilityFunction(X, 0)-ProbabilityFunction(X, 1)");
$ANSWER=decimal(3,$A);
condition:lt($A,1);
condition:gt($A,0);@
qu.1.3.uid=15ed4bf4-6eed-46bb-a749-9a99be5353e5@

qu.1.4.mode=Multiple Choice@
qu.1.4.name=13. Mean weight of all the people on the flight@
qu.1.4.comment=<div class="shadedDiv descriptionSpan" style="margin-top: 0px; margin-bottom: 2px">First, how much do all the people weigh? Children + Men + Women =&nbsp;$wc +&nbsp;$wm +&nbsp;$ww =&nbsp;$wt pounds.<br />
How many people on the plane? Let c = number of children, m = # men. The mean of any group is (total weight)/(# in group) so # in group = (total weight)/mean<br />
<br />
Thus c = $wc/$c = $nc, m = $wm/$m =&nbsp;$nm and we are told there are&nbsp;$nw women. So total number of passengers is $nt and their mean weight is $wt/$nt =&nbsp;&nbsp;$mu</div>@
qu.1.4.editing=useHTML@
qu.1.4.solution=@
qu.1.4.algorithm=$c=range(50, 75, 1);
$m=range(150, 190, 1);
$w=range(120, 150, 1);
$nc=range(10, 18,1);
$nm=range(10, 20, 1);
$nw=range(12, 25, 1);
$wc=$nc*$c;
$wm=$nm*$m;
$ww=$nw*$w;
$wt=$wc+$wm+$ww;
$nt=$nc+$nm+$nw;
$mu=decimal(0, $wt/$nt);
$ANSWER=$mu;
$B=decimal(0, $wc/$nc);
$C=decimal(0, $wm/$nm);
$D=decimal(0, ($wc+$ww)/($nc+$nw));@
qu.1.4.uid=cb2270f0-35c1-4d29-8dc9-4e58b75b53f6@
qu.1.4.question=<div title="Stat230/Chapter 7/Expected Value/Q13">On a charter flight, the mean weight of all the children aboard the plane is&nbsp;$c pounds, and their total weight is&nbsp;$wc pounds. The mean weight of all men is&nbsp;$m lbs., and their total weight is&nbsp;$wm lbs. The&nbsp;$nw women on the flight have a total weight of&nbsp;$ww lbs. What is the mean weight of all the people on this flight?</div>@
qu.1.4.answer=1@
qu.1.4.choice.1=$ANSWER@
qu.1.4.choice.2=$B@
qu.1.4.choice.3=$C@
qu.1.4.choice.4=$D@
qu.1.4.choice.5=None of the above@
qu.1.4.fixed=4@

qu.1.5.mode=Multiple Choice@
qu.1.5.name=13A. Three students play a game n times, probability Jimmy does not win any game.@
qu.1.5.comment=<div class="shadedDiv descriptionSpan" style="margin-top: 0px; margin-bottom: 2px">
<div class="shadedDiv descriptionSpan" style="margin-top: 0px; margin-bottom: 2px">The events are independent. The probability that Jimmy does not win any particular game is 1 -&nbsp;$j = $jn, so P(Jim loses all $n) = ($jn)<sup>$n</sup>.</div>
</div>@
qu.1.5.editing=useHTML@
qu.1.5.solution=@
qu.1.5.algorithm=$Q="13A";
$Which=1+rint(7);
$Align=switch(rint(2),"Left","Right");
$j=decimal(2,range(0.05,0.3,0.01));
$r=decimal(2,range(0.05,0.5,0.01));
$t=1-$j-$r;
$jp=$j*100;
$rp=$r*100;
$tp=$t*100;
$n=range(5,15,1);
$nk=$n-2;
$jn=(1-$j);
$rn=1-$r;
$tn=1-$t;
$a='$jn*$r^$nk*$t';
$ANSWER='$jn^$n';
$b='$j^$n';
$c='$jn^$n*$t^$n*$r^$n';@
qu.1.5.uid=32b7922b-2f84-4896-bdad-175615c9c99c@
qu.1.5.question=<p><img align="$Align" src="__BASE_URI__Chapter5/BD/Game$Which.gif" alt="" /></p>
<div title="Stat230/Chapter 5/Binomial Distributions/Q$Q">Three students play a game&nbsp;$n times. The probability of winning a single game for Jimmy is $jp%, for Robert $rp%, and for Tommy $tp%. Assuming the outcomes of the $n games are independent of each, find the probability that Jimmy does not win any game.</div>@
qu.1.5.answer=1@
qu.1.5.choice.1=$jn<sup>$n</sup>@
qu.1.5.choice.2=$jn × $r<sup>$nk</sup> × $t@
qu.1.5.choice.3=$j<sup>$n</sup>@
qu.1.5.choice.4=$jn<sup>$n</sup> × $t<sup>$n</sup> × $r<sup>$n</sup>@
qu.1.5.choice.5=None of the above@
qu.1.5.fixed=4@

qu.1.6.mode=Multiple Choice@
qu.1.6.name=14A. Bank receives x bad cheques a day@
qu.1.6.comment=<p>This is a Poisson process with t = 1 day, &lambda; =&nbsp;$lambda so if X = # bad cheques/day, the probability distribution for X is: <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>f</mi><mfenced open='(' close=')' separators=','><mrow><mi>x</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><msup><mi>&lambda;</mi><mrow><mi>x</mi></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><mi>&lambda;</mi></mrow></mrow></msup></mrow><mrow><mi>x</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac></mrow></mstyle></math>, so f($x) = $ANSWER.</p>@
qu.1.6.editing=useHTML@
qu.1.6.solution=@
qu.1.6.algorithm=$Q="14A";
$lambda=range(2,10,1);
$x=range(2,9,1);
condition:lt($x,$lambda);
$ans=maple("stats[statevalf,pf,poisson[$lambda]]($x);
");
$ANSWER=decimal(4,$ans);
$a=decimal(4,$ANSWER*range(0.3,0.7,0.05));
$b=decimal(4,$ANSWER+range(0.3,0.7,0.05)*(1-$ANSWER));
$c=decimal(4,0.5*($ANSWER+switch(rint(2),$a,$b)));@
qu.1.6.uid=56e2f639-c4f7-42b1-8c1e-25c884b1c0d6@
qu.1.6.question=<div title="Stat230/Chapter 5/Poisson/Q$Q">Using the Poisson distribution and assuming a bank averages&nbsp;$lambda bad checks a day, what is the approximate probability that the bank receives&nbsp;$x bad checks on a given day?</div>@
qu.1.6.answer=1@
qu.1.6.choice.1=$ANSWER@
qu.1.6.choice.2=$a@
qu.1.6.choice.3=$b@
qu.1.6.choice.4=$c@
qu.1.6.choice.5=None of the above@
qu.1.6.fixed=4@

qu.1.7.mode=Multiple Choice@
qu.1.7.name=1A. Breast vs Bottle@
qu.1.7.comment=@
qu.1.7.editing=useHTML@
qu.1.7.solution=@
qu.1.7.algorithm=$Q="1A";
$U1=range(14,15,0.1);
$U2=range(10,13,0.01);
$N1=range(7,11,1);
$N2=range(8,12,1);
$S1=range(1,3,0.1);
$S2=range(1,3,0.01);
$S=sqrt(($S1^2)/$N1+($S2^2)/$N2);
$DF1=(($S1^2)/$N1+($S2^2)/$N2)^2;
$DF2=($S1^4)/(($N1^2)*($N1-1))+($S2^4)/(($N2^2)*($N2-1));
$DF=decimal(0,$DF1/$DF2);
$T=maple("stats[statevalf,icdf,studentst[$DF]](0.99)");
$U=$U1-$U2;
$SE=decimal(3,$T*$S);
$ALT11=$U+range(0.01,0.05,0.001);
$ALT12=$SE+range(0.5,1.0,0.01);
$ALT21=$U;
$ALT22=$SE-range(0.5,1.0,0.01);
$ALT31=$U;
$ALT32=$SE+range(0.5,1.0,0.01);@
qu.1.7.uid=cb55faeb-8475-471a-95fe-24aa98c40288@
qu.1.7.question=<div title="STAT202/Test 7/Inference/Q$Q [2-1]">In a study of iron deficiency among infants, random samples of infants following different feeding programs were compared. One group contained breast-fed infants, while the children in another group were fed by a standard baby formula without any iron supplements. Here are summary results of blood hemoglobin levels at 12 months of age.<br />
<div align="center"><center>
<table id="AutoNumber1" cellspacing="1" cellpadding="3" border="0">
    <tbody>
        <tr>
            <td valign="top" height="40">
            <p align="left"><font face="SFTT1000" size="2"><strong>Group&nbsp;&nbsp; </strong></font></p>
            </td>
            <td valign="top" height="40"><strong><font face="SFTT1000" size="2">Sample <br />
            Size</font></strong></td>
            <td valign="top" height="40"><strong><font face="SFTT1000" size="2">Sample <br />
            Mean</font></strong></td>
            <td valign="top" height="40"><strong><font face="SFTT1000" size="2">Sample <br />
            Std. Deviation</font></strong></td>
        </tr>
        <tr>
            <td height="19"><strong><font face="SFTT1000" size="2">Breast-fed </font></strong></td>
            <td align="center" height="19"><font face="SFTT1000" size="2">$N1&nbsp;</font></td>
            <td align="center" height="19"><font face="SFTT1000" size="2">$U1&nbsp;</font></td>
            <td align="center" height="19"><font face="SFTT1000" size="2">$S1</font></td>
        </tr>
        <tr>
            <td height="19"><strong><font face="SFTT1000" size="2">Formula-fed </font></strong></td>
            <td align="center" height="19"><font face="SFTT1000" size="2">$N2&nbsp;</font></td>
            <td align="center" height="19"><font face="SFTT1000" size="2">$U2&nbsp;</font></td>
            <td align="center" height="19"><font face="SFTT1000" size="2">$S2</font></td>
        </tr>
    </tbody>
</table>
</center></div>
A 98% confidence interval for the mean difference in hemoglobin level between the two populations of infants is:</div>@
qu.1.7.answer=4@
qu.1.7.choice.1=$ALT11 ± $ALT12@
qu.1.7.choice.2=$ALT21 ± $ALT22@
qu.1.7.choice.3=$ALT31 ± $ALT32@
qu.1.7.choice.4=$U ± $SE@
qu.1.7.fixed=@

qu.1.8.mode=Multiple Choice@
qu.1.8.name=9.A business evaluates a proposed venture@
qu.1.8.comment=<p>The expected profit in dollars is ($p1)($x1) + ($p2)($x2) + (($p3)($x3)&nbsp; + ($p4)(-$x4)&nbsp; = $ANSWER</p>@
qu.1.8.editing=useHTML@
qu.1.8.solution=@
qu.1.8.algorithm=$x1=range(5000,15000,1000);
$x2=range(1000,5000, 1000);
$x3=0;
$x4=$x2;
$p1=decimal(2,range(0.05,0.15,0.01));
$p2=decimal(2,range(0.3,0.5,0.01));
$p3=decimal(2,range(0.2,0.3,0.01));
$p4=1-$p1-$p2-$p3;
$ANSWER=$x1*$p1+$x2*$p2+$x3*$p3-$x4*$p4;
$B=$x1*$p1+$x2;
$C=$x2*$p2+$x3*$p3+$x4*$p4;
$D=$x1*$p1-$x4*$p4;@
qu.1.8.uid=82dd2874-ba8e-4b81-85dd-86dcd87f345f@
qu.1.8.question=<div title="Stat230/Chapter7/Expected Value/Q9">A business evaluates a proposed venture as follows. It stands to make a profit of $x1 with probability $p1, to make a profit of&nbsp;$x2 with probability&nbsp;$p2 to break even with probability&nbsp;$p3 and to lose&nbsp;$x4 with probability $p4. The expected profit in dollars is:</div>@
qu.1.8.answer=1@
qu.1.8.choice.1=$ANSWER@
qu.1.8.choice.2=$B@
qu.1.8.choice.3=$C@
qu.1.8.choice.4=$D@
qu.1.8.choice.5=None of the above@
qu.1.8.fixed=4@

qu.1.9.mode=Multiple Choice@
qu.1.9.name=5A. Variance from Table@
qu.1.9.comment=@
qu.1.9.editing=useHTML@
qu.1.9.solution=@
qu.1.9.algorithm=$Q="5A";
$X1=0;
$X2=1;
$X3=2;
$X4=3;
$X5=4;
$X6=5;
$P1=range(0.05,0.15,0.01);
$P5=range(0.05,0.30-$P1,0.01);
$P3=0.33-$P5-$P1;
$P4=range(0.2,0.45,0.01);
$P2=range(0.05,0.60-$P4,0.01);
$P6=0.67-$P2-$P4;
$EX=$X1*$P1+$X2*$P2+$X3*$P3+$X4*$P4+$X5*$P5+$X6*$P6;
$VarX=($X1-$EX)^2*$P1+($X2-$EX)^2*$P2+($X3-$EX)^2*$P3+($X4-$EX)^2*$P4+($X5-$EX)^2*$P5+($X6-$EX)^2*$P6;
$EX2=$X1^2*$P1+$X2^2*$P2+$X3^2*$P3+$X4^2*$P4+$X5^2*$P5+$X6^2*$P6;
$VarAlt=$EX2-($EX)^2;
$Alt1=$EX2;
$Alt2=$VarX-range(0.1,0.7*$VarX,0.01);
$Alt3=decimal(2,0.5*($Alt1+$VarX));@
qu.1.9.uid=882cbc70-c3ae-43c3-bedd-7467f09cef3f@
qu.1.9.question=<div title="STAT230/Chapter 7/Variance and Standard Deviation/Q$Q">Consider the following probability distribution for a random variable X:
<p>&nbsp;</p>
<table cellspacing="3" cellpadding="2" border="1">
    <tbody>
        <tr>
            <td><strong>x</strong></td>
            <td style="text-align: center;">$X1</td>
            <td style="text-align: center;">$X2</td>
            <td style="text-align: center;">$X3</td>
            <td style="text-align: center;">$X4</td>
            <td style="text-align: center;">$X5</td>
            <td style="text-align: center;">$X6</td>
        </tr>
        <tr>
            <td><strong>P(X=x)</strong></td>
            <td align="right">$P1</td>
            <td align="right">$P2</td>
            <td align="right">$P3</td>
            <td align="right">$P4</td>
            <td align="right">$P5</td>
            <td align="right">$P6</td>
        </tr>
    </tbody>
</table>
<p><br />
Which of the following best estimates Var(X)?</p>
</div>@
qu.1.9.answer=1@
qu.1.9.choice.1=$VarX@
qu.1.9.choice.2=$Alt1@
qu.1.9.choice.3=$Alt2@
qu.1.9.choice.4=$Alt3@
qu.1.9.fixed=@

qu.1.10.mode=Multiple Choice@
qu.1.10.name=4A. Given a binomial distribution, find probability of n successes@
qu.1.10.comment=<div class="shadedDiv descriptionSpan" style="margin-top: 0px; margin-bottom: 2px">Use the binomial formula to find and add together P($n) and P($x). Alternately, just use "logic":<br />
<br />
P($n successes) = $p<sup>$n</sup>, P($x successes) = ($n ways to select failure)P(fail)P(success)<sup>$x</sup> = $n($np)$p<sup>$x</sup> . Add these to get $ANSWER.</div>@
qu.1.10.editing=useHTML@
qu.1.10.solution=@
qu.1.10.algorithm=$Q="4A";
$p=decimal(2,range(0.5,0.9,0.2));
$n=range(10,25,1);
$n=17;
$x=$n-1;
$np=1-$p;
$ns=$p^$n;
$xs=$n*(1-$p)*$p^$x;
$ANSWER=decimal(3,$ns+$xs);
$a=decimal(3,range(0.35,0.65,0.01)*$ANSWER);
$b=decimal(3,($ANSWER+1)/2);
$c=decimal(3,($ANSWER+$a)/2);
condition:lt($ANSWER,1);
condition:gt($ANSWER,0);@
qu.1.10.uid=42c51360-4f03-468a-96df-888ecd53fcfe@
qu.1.10.question=<div title="Stat230/Chapter 5/Binomial Distributions/Q$Q">Given a binomial distribution in which the probability of success is&nbsp;$p and the number of trials is $n, what is the approximate probability of getting at least&nbsp;$x successes?</div>@
qu.1.10.answer=1@
qu.1.10.choice.1=$ANSWER@
qu.1.10.choice.2=$c@
qu.1.10.choice.3=$a@
qu.1.10.choice.4=$b@
qu.1.10.choice.5=None of the above@
qu.1.10.fixed=4@

qu.1.11.question=<div title="Stat230/Chapter 5/Poisson/Q$Q"><img hspace="4" border="0" align="left" src="__BASE_URI__Chapter5/Poisson/tape_roll.gif" alt="Roll of tape." title="Tape [IMG:tape_roll.gif]" />Defects occur in a certain manufactured tape on the average of 1 per 1,000 m. Assuming a Poisson distribution for the number of defects in a given length of tape, what is the probability that in a box of five&nbsp;$n m rolls two have just one defect each and three have none? (Answer to 3 decimal accuracy, for example 0.217)</div>@
qu.1.11.maple=evalb(abs(($ans)-($RESPONSE))<=0.001);@
qu.1.11.allow2d=1@
qu.1.11.type=formula@
qu.1.11.mode=Maple@
qu.1.11.name=13.  Probability that in a box of five tapes two have just one defect each and three have none@
qu.1.11.comment=<p><strong>Correct Answer:</strong> $ANSWER</p>
<p>Let X = number of defects in a $n m roll, so X ~ Poisson($lambda).</p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>0</mn></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><msup><mi>$lambda</mi><mrow><mn>0</mn></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>$lambda</mi></mrow></msup></mrow><mrow><mn>0</mn><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>$p0</mi></mrow></mstyle></math></p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><msup><mi>$lambda</mi><mrow><mn>1</mn></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>$lambda</mi></mrow></msup></mrow><mrow><mn>1</mn><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>$p1</mi></mrow></mstyle></math><br />
<br />
Now we can select 3 rolls of the 5 in&nbsp;<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mn mathvariant='italic'>5</mn></mrow></mtd></mtr><mtr><mtd><mrow><mn>3</mn></mrow></mtd></mtr></mtable></mrow></mfenced><mrow><mi mathvariant='normal'></mi></mrow><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi></mi></mrow></mtd></mtr></mtable></mrow></mrow></mstyle></math>ways. Then by an argument similar to that which leads to the binomial distribution, <br />
P(3 rolls with no defects and 2 with one defect in a box of 5 rolls) = <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mn mathvariant='italic'>5</mn></mrow></mtd></mtr><mtr><mtd><mrow><mn>3</mn></mrow></mtd></mtr></mtable></mrow></mfenced><mrow></mrow><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mi>$p0</mi></mrow></mfenced><mrow><mn>3</mn></mrow></msup><msup><mfenced open='(' close=')' separators=','><mrow><mi>$p1</mi></mrow></mfenced><mrow><mn>2</mn></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>$ANSWER</mi></mrow></mtd></mtr></mtable></mrow></mrow></mstyle></math></p>@
qu.1.11.editing=useHTML@
qu.1.11.solution=@
qu.1.11.algorithm=$Q=13;
$n=range(1000,3000,100);
$lambda=$n/1000;
$p0x=maple("stats[statevalf, pf, poisson[$lambda]](0)");
$p1x=maple("stats[statevalf, pf, poisson[$lambda]](1)");
$p0=decimal(4,$p0x);
$p1=decimal(4,$p1x);
$ans=maple("10*$p0^3*$p1^2");
$ANSWER=decimal(3,$ans);@
qu.1.11.uid=eedc639d-7591-4e6a-a5f9-62eb56177cdc@

qu.1.12.mode=Inline@
qu.1.12.name=5A. Binomial viz Normal@
qu.1.12.comment=@
qu.1.12.editing=useHTML@
qu.1.12.solution=@
qu.1.12.algorithm=$Q="5A";@
qu.1.12.uid=b5c708fc-947b-40ae-a635-f246fc468fe3@
qu.1.12.weighting=1@
qu.1.12.numbering=alpha@
qu.1.12.part.1.name=sro_id_1@
qu.1.12.part.1.editing=useHTML@
qu.1.12.part.1.choice.5=0.6320@
qu.1.12.part.1.fixed=@
qu.1.12.part.1.choice.4=0.6201@
qu.1.12.part.1.question=null@
qu.1.12.part.1.choice.3=0.6078@
qu.1.12.part.1.choice.2=0.6429<br>@
qu.1.12.part.1.choice.1=0.6552 <br>@
qu.1.12.part.1.mode=Multiple Choice@
qu.1.12.part.1.display=vertical@
qu.1.12.part.1.answer=3@
qu.1.12.question=<div title="STAT202/Test 6/Normal Approximation/Q$Q [2-5]">If X has a binomial distribution with n = 400 and p = 0.4, the approximate probability of the event {155 <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi></mi></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&lt;</mo></mrow></mstyle></math> X&nbsp;<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi></mi></mrow></mstyle></math><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mo lspace='0.0em' rspace='0.0em'>&lt;</mo></mrow></mstyle></math> 175} is:<br /><span>&nbsp;</span><1><span> </span></div>@

qu.1.13.mode=Multiple Choice@
qu.1.13.name=5. Car Insurance@
qu.1.13.comment=<p>The expected payout is:<br />
<br />
=&sum; P(each payout)Value(each payout)</p>
<p>= \\$($P1($C1) + $P2*($C2) + $P3*($C3) + $P4*($C4) )= \\$$Ans</p>@
qu.1.13.editing=useHTML@
qu.1.13.solution=@
qu.1.13.algorithm=$C4=3200;
$C3=1250;
$C2=500;
$C1=0;
$P1=decimal(2,range(0.55,0.75,0.05));
$P2=decimal(2,range(0.05,0.80-$P1,0.05));
$P3=decimal(2,range(0.05,0.90-$P1-$P2,0.05));
$P4=decimal(2,1-($P1+$P2+$P3));
$Ans=($P1*$C1+$P2*$C2+$P3*$C3+$P4*$C4);
$Ans1=$Ans+$P3*$C3;
$Ans2=$Ans-$P2*$C2;
$Ans3=$Ans1+500+rint(80);@
qu.1.13.uid=069afc65-1d57-4a02-99d6-7f1cc5d6b49f@
qu.1.13.info=  Difficulty=2;
  Keyword=PreQuiz7;
  Keyword=expected value;
  Suggested Value=2;
  QuestionIndex=C72103;
  TopicIndex=C721;
  Section=7.2;
  Section=7.3;
@
qu.1.13.question=<div title="STAT230/Chapter 7/C721 Expected value/Q5">An insurance company has estimated the following cost probabilities for the next year on a particular model of car:  <br />
<br />
<table cellspacing="2" cellpadding="2" border="1">
    <tbody>
        <tr>
            <td>Insurance payout (\\$)</td>
            <td>$C1</td>
            <td>$C2</td>
            <td>$C3</td>
            <td>$C4</td>
        </tr>
        <tr>
            <td>Probability</td>
            <td align="right">$P1</td>
            <td align="right">$P2</td>
            <td align="right">$P3</td>
            <td align="right">$P4</td>
        </tr>
    </tbody>
</table>
<br />
<br />
The expected cash flow for the new model is:</div>@
qu.1.13.answer=1@
qu.1.13.choice.1=\\$$Ans@
qu.1.13.choice.2=\\$$Ans1@
qu.1.13.choice.3=\\$$Ans2@
qu.1.13.choice.4=\\$$Ans3@
qu.1.13.choice.5=Cannot be determined here.@
qu.1.13.fixed=4@

qu.1.14.question=<p><img hspace="4" height="50" width="50" vspace="4" align="right" alt="This question is drawn from a STAT 230 test or exam." title="This question is drawn from a STAT 230 test or exam. [IMG:TestGuy.gif]" src="__BASE_URI__Tools/TestGuy.gif" /></p>
<div title="STAT230/Chapter 5/Poisson Distribution/Q$Q C6A123">Power outages in a particular region follow a Poisson process with an average rate of $Lambda outages per year. For simplicity assume that all months are exactly 1/12 of a year. Find the probability that in a given calendar year, exactly $Period months have no outages. <br />
<p>&nbsp;</p>
<p><em><font size="2">(You may answer numerically (3 decimals) or with an expression. Use "exp(x)" for e<sup>x</sup> and "factorial(n)" for n! To see what Maple TA "thinks" you've typed, use the <font color="#0000ff">Preview</font> key.)<br />
</font></em></p>
</div>@
qu.1.14.maple=evalb(abs($Ans-evalf($RESPONSE))<=0.001);@
qu.1.14.allow2d=0@
qu.1.14.maple_answer=$Ans@
qu.1.14.type=maple@
qu.1.14.mode=Maple@
qu.1.14.name=23A.  Power Outage III@
qu.1.14.comment=<p>With time t in years we have <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>t</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mn>1</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mrow></mstyle></math>. From the question &lambda; = $Lambda and X = # of outages in a t-year period ~ Poisson (&mu; = $Lambda t) so &mu; = $mu.</p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>x</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><mi>&mu;</mi></mrow></mrow></msup><msup><mi>&mu;</mi><mrow><mi>x</mi></mrow></msup></mrow><mrow><mi>x</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac></mrow></mstyle></math><br />
<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>0</mn></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>$mu</mi></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><msup><mi>$mu</mi><mrow><mn>0</mn></mrow></msup></mrow><mrow><mn>0</mn><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>$mu</mi></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>$PXeq0</mi></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow></mstyle></math></p>
<p>Let Y = # months in a year with no outages ~ Bi(n=12,p) where p = P(X=0).</p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>$Period</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo></mrow><mrow><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mn mathvariant='italic'>12</mn></mrow></mtd></mtr><mtr><mtd><mrow><mi>$Period</mi></mrow></mtd></mtr></mtable></mrow></mfenced><msup><mfenced open='(' close=')' separators=','><mrow><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>$mu</mi></mrow></msup></mrow></mfenced><mrow><mi>$Period</mi></mrow></msup><msup><mfenced open='(' close=')' separators=','><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>$mu</mi></mrow></msup></mrow></mfenced><mrow><mfenced open='(' close=')' separators=','><mrow><mn>12</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>$Period</mi></mrow></mfenced></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>$Ans</mi><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow></mrow></mtd></mtr></mtable></mrow></mstyle></math></p>
<p>&nbsp;</p>@
qu.1.14.editing=useHTML@
qu.1.14.solution=@
qu.1.14.algorithm=$Q="23A";
$Lambda=range(2,8,1);
$Period=range(int($Lambda/2),$Lambda-1,1);
$mu=$Lambda*1/12;
$PXeq0=exp(-$mu)*($mu^0)/fact(0);
$PXne0 = 1 - $PXeq0;
$NChooseM =maple(" factorial(12)/(factorial($Period)*factorial(12-$Period))");
$Ans=$NChooseM*($PXeq0^$Period)*($PXne0^(12-$Period));@
qu.1.14.uid=5c720071-25d3-481a-8144-3c2a74c2da20@
qu.1.14.info=  Difficulty=2;
  Keyword=Poisson;
  Keyword=Test;
  TestIs=F03 Quiz 3 Q1;
  Suggested Value=2;
  QuestionIndex=C6A123;
  TopicIndex=C6A1;
  Section=6.7;
  Section=6.8;
@

qu.1.15.mode=Multiple Choice@
qu.1.15.name=2. Hamburger@
qu.1.15.comment=@
qu.1.15.editing=useHTML@
qu.1.15.solution=@
qu.1.15.algorithm=$Q=2;@
qu.1.15.uid=cb7da571-65ff-403b-95dd-c8cc1b060ab8@
qu.1.15.question=<div title="STAT202/Test 7/Inference/Q$Q [2-3]">Samples of hamburger were selected from two different outlets of a large supermarket to measure the percentage of fat present in the meat, with the following summary data.
<div align="center"><center>
<table cellspacing="1" border="0" id="AutoNumber1">
    <tbody>
        <tr>
            <td>&nbsp;</td>
            <td><font face="SFTT1000" size="2">       </font>
            <p align="left"><font face="SFTT1000" size="2"><strong>Outlet 1</strong></font></p>
            </td>
            <td><strong><font face="SFTT1000" size="2">Outlet 2</font></strong></td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td><strong><font face="SFTT1000" size="2">n</font></strong></td>
            <td align="center"><font face="SFTT1000" size="2">5 </font></td>
            <td align="center"><font face="SFTT1000" size="2">10</font></td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td><strong><font face="SFTT1000" size="2">mean</font></strong></td>
            <td align="center"><font face="SFTT1000" size="2">10.3</font></td>
            <td align="center"><font face="SFTT1000" size="2">10.7</font></td>
            <td><font face="SFTT1000" size="2">percent</font></td>
        </tr>
        <tr>
            <td><strong><font face="SFTT1000" size="2">std.dev</font></strong></td>
            <td align="center"><font face="SFTT1000" size="2">1.6</font></td>
            <td align="center"><font face="SFTT1000" size="2">2.3</font></td>
            <td><font face="SFTT1000" size="2">percent</font></td>
        </tr>
    </tbody>
</table>
</center></div>
It is reasonable to believe that both outlets have the same variability. Hence, the pooled standard deviation is:</div>@
qu.1.15.answer=5@
qu.1.15.choice.1=1.95@
qu.1.15.choice.2=2.08@
qu.1.15.choice.3=4.38@
qu.1.15.choice.4=2.09@
qu.1.15.choice.5=2.11@
qu.1.15.fixed=@

qu.1.16.question=<img hspace="4" vspace="4" align="$Align" title="Cake [IMG:Cake$Which.gif]" alt="Cake" src="__BASE_URI__Chapter5/Poisson/Cake$Which.gif" />
<div title="Stat230/Chapter 5/Poisson/Q$Q">A merchant sells on the average&nbsp;$mu cakes on a round of his route. Cakes are packaged two to a box but are sold individually. At the end of the round, the salesman eats any cake left over in a box that has been opened. He only opens a box after emptying the previous box. If the number of cakes sold has a Poisson distribution, then on what proportion of rounds does he have a cake to eat? Answer to three decimals.</div>@
qu.1.16.maple=evalb(abs(($ANSWER)-($RESPONSE))<=0.001);@
qu.1.16.allow2d=0@
qu.1.16.maple_answer=$ANSWER@
qu.1.16.type=maple@
qu.1.16.mode=Maple@
qu.1.16.name=20. Cakes@
qu.1.16.comment=<p>Let &mu; represent the average number of cakes sold in a day. He eats a cake whenever the number of cakes sold is odd so we need to evaluate&nbsp; <br />
P(X = 1) + P(X = 3) + P(X = 5) +&nbsp; &hellip;. = <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mrow><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><mi>&mu;</mi></mrow></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mi>&mu;</mi><mrow><mn>1</mn></mrow></msup></mrow><mrow><mn>1</mn><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mfrac><mrow><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>&mu;</mi></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mi>&mu;</mi><mrow><mn>3</mn></mrow></msup></mrow><mrow><mn>3</mn><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mfrac><mrow><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>&mu;</mi></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mi>&mu;</mi><mrow><mn>5</mn></mrow></msup></mrow><mrow><mn>5</mn><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mo lspace='0.2222222em' rspace='0.0em'>..</mo><mo lspace='0.0em' rspace='0.0em'>&period;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><mi>&mu;</mi></mrow></mrow></msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mrow><msup><mi>&mu;</mi><mrow><mn>1</mn></mrow></msup></mrow><mrow><mn>1</mn><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mfrac><mrow><msup><mi>&mu;</mi><mrow><mn>3</mn></mrow></msup></mrow><mrow><mn>3</mn><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mfrac><mrow><msup><mi>&mu;</mi><mrow><mn>5</mn></mrow></msup></mrow><mrow><mn>5</mn><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mo lspace='0.2222222em' rspace='0.0em'>..</mo><mo lspace='0.0em' rspace='0.0em'>&period;</mo></mrow></mfenced></mrow></mstyle></math></p>
<p>The problem is evaluating this infinite sum! However recall the series expansion for e<sup>x</sup>:</p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>x</mi></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mfrac><msup><mi>x</mi><mrow><mn>1</mn></mrow></msup><mrow><mn>1</mn><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mfrac><msup><mi>x</mi><mrow><mn>2</mn></mrow></msup><mrow><mn>2</mn><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mfrac><msup><mi>x</mi><mrow><mn>3</mn></mrow></msup><mrow><mn>3</mn><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mo lspace='0.2222222em' rspace='0.0em'>..</mo><mo lspace='0.0em' rspace='0.0em'>&period;</mo></mrow></mstyle></math></p>
<p>Now replace x with -x:</p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>x</mi></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mfrac><msup><mi>x</mi><mrow><mn>1</mn></mrow></msup><mrow><mn>1</mn><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mfrac><msup><mi>x</mi><mrow><mn>2</mn></mrow></msup><mrow><mn>2</mn><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mfrac><msup><mi>x</mi><mrow><mn>3</mn></mrow></msup><mrow><mn>3</mn><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mo lspace='0.2222222em' rspace='0.0em'>..</mo><mo lspace='0.0em' rspace='0.0em'>&period;</mo></mrow></mstyle></math></p>
<p>Now subtract the second series from the first, divide through by 2 to get:</p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mrow><msup><mi>e</mi><mrow><mi>x</mi></mrow></msup><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>x</mi></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow><mrow><mn>2</mn></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>x</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mfrac><msup><mi>x</mi><mrow><mn>3</mn></mrow></msup><mrow><mn>3</mn><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mfrac><msup><mi>x</mi><mrow><mn>5</mn></mrow></msup><mrow><mn>5</mn><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mo lspace='0.2222222em' rspace='0.0em'>..</mo><mo lspace='0.0em' rspace='0.0em'>&period;</mo></mrow></mstyle></math></p>
<p>Substitute &mu; for x and the RHS of that equation is just the bracketed part of our expression above, so the proportion is:</p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><mi>&mu;</mi></mrow></mrow></msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mrow><msup><mi>e</mi><mrow><mi>&mu;</mi></mrow></msup><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><mi>&mu;</mi></mrow></mrow></msup></mrow><mrow><mn>2</mn></mrow></mfrac></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mn>1</mn><mrow><mn>2</mn></mrow></mfrac><mfenced open='(' close=')' separators=','><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>2</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi>&mu;</mi></mrow></msup></mrow></mfenced></mrow></mstyle></math></p>
<p>All you have to do now is substitute the question's value for &mu;.</p>@
qu.1.16.editing=useHTML@
qu.1.16.solution=@
qu.1.16.algorithm=$Q=20;
$Align=switch(rint(2),"Left","Right");
$Which=1+rint(4);
$mu=decimal(1,range(1,5,0.1));
$ans=maple("0.5*(1-exp(-2*$mu))");
$ANSWER=decimal(4,$ans);@
qu.1.16.uid=06963e07-25bf-4197-b814-b950ef6745f4@

qu.1.17.mode=Multiple Choice@
qu.1.17.name=3. Geiger counter 3 (expected number of pulses)@
qu.1.17.comment=<div class="shadedDiv descriptionSpan" style="margin-top: 0px; margin-bottom: 2px">Quite easy actually, just multiply the number of hours in a week (168) by the rate given!</div>@
qu.1.17.editing=useHTML@
qu.1.17.solution=@
qu.1.17.algorithm=$Q=3;
$lambda=range(1,20,1);
$ANSWER=$lambda*168;
$a=$lambda*56;
$b=$lambda*7;
$c=$lambda*21;@
qu.1.17.uid=b06eac30-30d4-4158-b09c-6107d06cfe4c@
qu.1.17.info=  Keyword=PQ9;
@
qu.1.17.question=<div title="Stat230/Chapter 5/Poisson/Q$Q">Pulses arrive at a Geiger counter in accordance with a Poisson process. Assuming &lambda; = $lambda / hour, how many pulses are expected to arrive at the counter during a week?</div>@
qu.1.17.answer=1@
qu.1.17.choice.1=$ANSWER@
qu.1.17.choice.2=$a@
qu.1.17.choice.3=$b@
qu.1.17.choice.4=$c@
qu.1.17.choice.5=None of the above@
qu.1.17.fixed=4@

qu.1.18.mode=Multiple Choice@
qu.1.18.name=7A: Penguin in North Pole@
qu.1.18.comment=@
qu.1.18.editing=useHTML@
qu.1.18.solution=@
qu.1.18.algorithm=$U1=range(14,15,0.1);
$U2=range(10,13,0.01);
$N1=range(7,11,1);
$N2=range(8,12,1);
$S1=range(1,3,0.1);
$S2=range(1,3,0.01);
$S=sqrt(($S1^2)/$N1+($S2^2)/$N2);
$DF1=(($S1^2)/$N1+($S2^2)/$N2)^2;
$DF2=($S1^4)/(($N1^2)*($N1-1))+($S2^4)/(($N2^2)*($N2-1));
$DF=decimal(0,$DF1/$DF2);
$T=maple("stats[statevalf,icdf,studentst[$DF]](0.995)");
$U=$U1-$U2;
$SE=decimal(3,$T*$S);
$ALT11=$U+range(0.01,0.05,0.001)-($SE+range(0.5,1.0,0.01));
$ALT12=$U+range(0.01,0.05,0.001)+($SE+range(0.5,1.0,0.01));
$ALT21=$U-($SE-range(0.5,1.0,0.01));
$ALT22=$U+($SE-range(0.5,1.0,0.01));
$ALT31=$U-($SE+range(0.5,1.0,0.01));
$ALT32=$U+($SE+range(0.5,1.0,0.01));
$ANS1=$U-$SE;
$ANS2=$U+$SE;@
qu.1.18.uid=22126b91-96e1-4231-a955-76caed731159@
qu.1.18.question=<p>Suppose you are to compare the average&nbsp;number of penguins&nbsp;at 2 locations in the North Pole&nbsp;. You collected samples from each&nbsp;location and compare their means and variances. The data are given below.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<table id="AutoNumber1" cellspacing="1" cellpadding="3" border="0">
    <tbody>
        <tr>
            <td><strong>Group</strong></td>
            <td align="center"><strong>n</strong></td>
            <td align="center"><strong>mean</strong></td>
            <td align="center"><strong>std. dev</strong></td>
        </tr>
        <tr>
            <td><strong>Location 1</strong></td>
            <td align="center">$N1</td>
            <td align="center">$U1</td>
            <td align="center">$S1</td>
        </tr>
        <tr>
            <td><strong>Location 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </strong></td>
            <td align="center">$N2</td>
            <td align="center">$U2</td>
            <td align="center">$S2</td>
        </tr>
    </tbody>
</table>
</p>
<p>&nbsp;</p>
<p>Calculate the 99% confidence interval&nbsp;of the difference between the means.</p>
<p>&nbsp;</p>@
qu.1.18.answer=2@
qu.1.18.choice.1=($ALT11 , $ALT12)@
qu.1.18.choice.2=($ANS1 , $ANS2)@
qu.1.18.choice.3=($ALT21, $ALT22)@
qu.1.18.choice.4=($ALT31, $ALT32)@
qu.1.18.fixed=@

qu.1.19.mode=Multiple Choice@
qu.1.19.name=12A. P(1 players wins all)@
qu.1.19.comment=<div class="shadedDiv descriptionSpan" style="margin-top: 0px; margin-bottom: 2px">The events are independent. The probability that he wins any particular game is $r, so P(Rob wins all $n games) = ($r)<sup>$n</sup>.</div>@
qu.1.19.editing=useHTML@
qu.1.19.solution=@
qu.1.19.algorithm=$Q="12A";
$j=decimal(2,range(0.05,0.3,0.01));
$r=decimal(2,range(0.05,0.5,0.01));
$r=0.11;
$t=decimal(2,range(0.05,0.8,0.01));
$t=0.59;
$jp=$j*100;
$rp=$r*100;
$tp=$t*100;
$n=range(5,15,1);
$nk=$n-2;
$b=decimal(2,$n*$j);
$nj=(1-$j);
$nt=1-$t;@
qu.1.19.uid=b0440270-56a7-4891-9ac8-711ac5f89e0e@
qu.1.19.question=<div title="Stat230/Chapter 5/Binomial Distributions/Q$Q">Three students play a game&nbsp;$n times. The probability of winning a single game for Jimmy is $jp%, for Robert $rp%, and for Tommy $tp%. Assuming the outcomes of the $n games are independent of each, find the probability that Robert wins all the games.</div>@
qu.1.19.answer=1@
qu.1.19.choice.1=$r<sup>$n</sup>@
qu.1.19.choice.2=$j×$r<sup>$nk</sup>×$t@
qu.1.19.choice.3=$b@
qu.1.19.choice.4=$r<sup>$n</sup>×$nj<sup>$n</sup>×$nt<sup>$n</sup>@
qu.1.19.choice.5=None of the above@
qu.1.19.fixed=4@

qu.1.20.question=<div title="Stat230/Chapter 5/Poisson/Q$Q">Car accidents at a certain intersection are randomly distributed in time according to a Poisson process, with&nbsp;$n accidents per week on average. What is the probability that there&nbsp;are two&nbsp;accidents in the first&nbsp;$w week period and two more in the second $w week period.? (4 decimal accuracy please)</div>@
qu.1.20.maple=evalb(abs(($ANSWER)-($RESPONSE))<=0.0001);@
qu.1.20.allow2d=0@
qu.1.20.maple_answer=$ANSWER@
qu.1.20.type=maple@
qu.1.20.mode=Maple@
qu.1.20.name=17A. Car accidents-probability of x accidents in first n/2 weeks and one more in second n/2 weeks@
qu.1.20.comment=<p>Let X<sub>1</sub> = the number of accidents in the first week ~ Poisson($lambda)<br />
Let X<sub>2</sub> = the number of accidents in the second week ~ Poisson($lambda)<br />
<br />
These events are independent, since the time periods are non-overlapping.</p>
<p>Notice that &lambda; = $n($w) = $lambda</p>
<p>Thus:<br />
<br />
P(X<sub>1</sub> = 1 AND X<sub>2</sub> = 1) = P(X<sub>1</sub> = 1)P(X<sub>2</sub> = 1) = <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mrow><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>$lambda</mi></mrow></msup><msup><mi>$lambda</mi><mrow><mn>2</mn></mrow></msup></mrow><mrow><mn>2</mn><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mrow><mfrac><mrow><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>$lambda</mi></mrow></msup><msup><mi>$lambda</mi><mrow><mn>2</mn></mrow></msup></mrow><mrow><mn>2</mn><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac></mrow></mrow></mstyle></math>= $ANSWER</p>@
qu.1.20.editing=useHTML@
qu.1.20.solution=@
qu.1.20.algorithm=$Q="17A";
$n=range(1,9,1);
$m=range(2,6,2);
$x=range(1,9,1);
$w=$m/2;
$lambda=$n*$w;
$ans=maple("(stats[statevalf, pf, poisson[$lambda]](2))^2");
$ANSWER=decimal(4,$ans);
condition:lt($ans,1);
condition:gt($ans,0.001);@
qu.1.20.uid=e1be32e9-fde6-4658-929e-23221324bfe3@

qu.1.21.mode=Multiple Choice@
qu.1.21.name=10. The average length of stay in a hospital@
qu.1.21.comment=<p>The average length of stay is $p2($x2) +&nbsp;$p3($x3) + $p4($x4) +&nbsp;$p5($x5) + $p6($x6) = $ANSWER</p>@
qu.1.21.editing=useHTML@
qu.1.21.solution=@
qu.1.21.algorithm=$x2=2;
$x3=3;
$x4=4;
$x5=5;
$x6=6;
$p2=decimal(2,range(0.1,0.3,0.01));
$p3=decimal(2,range(0.05,0.4,0.01));
$p4=decimal(2,range(0.1,0.3,0.01));
$p5=decimal(2,range(0.05,0.2,0.01));
$p6=1-$p2-$p3-$p4-$p5;
$ANSWER=$x2*$p2+$x3*$p3+$x4*$p4+$x5*$p5+$x6*$p6;
$B=$x2*$p2+$x3*$p3+$x4*$p4;
$C=$x3*$p3+$x4*$p4+$x5*$p5+$x6*$p6;
$D=$x3*$p3+$x4*$p4+$x5*$p5;
condition:gt($p6,0);@
qu.1.21.uid=38ea4348-0eeb-47ce-99f9-6c0d99860b3f@
qu.1.21.question=<div title="Stat230/Chapter7/Expected Value/Q10">The average length of stay in a hospital is useful for planning purposes. Suppose that the following is the distribution of the length of stay in a hospital after a minor operation: <br />
<br />
<table cellspacing="0" cellpadding="3" border="1">
    <tbody>
        <tr>
            <td>Days&nbsp;</td>
            <td align="right">2</td>
            <td align="right">3</td>
            <td align="right">4</td>
            <td align="right">5</td>
            <td align="right">6</td>
        </tr>
        <tr>
            <td>Probability</td>
            <td align="right">$p2&nbsp;&nbsp;</td>
            <td align="right">$p3&nbsp;&nbsp;</td>
            <td align="right">$p4 &nbsp;</td>
            <td align="right">$p5&nbsp;</td>
            <td align="right">???</td>
        </tr>
    </tbody>
</table>
<br />
The average length of stay is:</div>@
qu.1.21.answer=1@
qu.1.21.choice.1=$ANSWER@
qu.1.21.choice.2=$B@
qu.1.21.choice.3=$C@
qu.1.21.choice.4=$D@
qu.1.21.choice.5=None of the above@
qu.1.21.fixed=4@

qu.1.22.mode=Multiple Choice@
qu.1.22.name=6. SD from 4 numbers@
qu.1.22.comment=<p>Notice that the choices: {4,5,6,7}, {1,2,3,4}, and {7,8,9,10} are all sets of 4 consecutive numbers, thus all of these have the same standard deviation (1.118) and it is the smallest possible SD for a subset of 4 distinct integers. For the other two choices you can actually calculate the SD. For {1,5,6,10} it is&nbsp; 3.201 and for {1,2,9,10} it is 4.031&nbsp; . You also could see this intuitively.</p>@
qu.1.22.editing=useHTML@
qu.1.22.solution=@
qu.1.22.algorithm=$Q=6;@
qu.1.22.uid=cc19dd32-dada-4826-b555-880b1163e4b9@
qu.1.22.info=  Type=MC;
@
qu.1.22.question=<div title="STAT230/Chapter 7/Variance and Standard Deviation/Q$Q">You are allowed to choose four numbers from 1 to 10 (inclusive, without repeats). Which of the following is <span style="font-weight: bold;">NOT</span> correct?</div>@
qu.1.22.answer=3@
qu.1.22.choice.1=The numbers 4, 5, 6, 7 have the smallest possible standard deviation.@
qu.1.22.choice.2=The numbers 1, 2, 3, 4 have the smallest possible standard deviation.@
qu.1.22.choice.3=The numbers 1, 5, 6, 10 have the largest possible standard deviation.@
qu.1.22.choice.4=The numbers 1, 2, 9, 10 have the largest possible standard deviation. @
qu.1.22.choice.5=The numbers 7, 8, 9, 10 have the smallest possible standard deviation. @
qu.1.22.fixed=@

qu.1.23.mode=Multiple Choice@
qu.1.23.name=2. Random selection from a set - P(sum E or O)@
qu.1.23.comment=<p>The sample space only has 10 points! Why not just write it out and count?</p>@
qu.1.23.editing=useHTML@
qu.1.23.solution=@
qu.1.23.algorithm=$n=range(0,1,1);
$par=switch($n,"even","odd");
$Ans=switch($n,0.6,0.4);
$foo=switch($n,0.4,0.6);@
qu.1.23.uid=1ceb1f09-f42e-4ac5-b7e8-e1b8764efb34@
qu.1.23.question=<div title="STAT230/Chapter2/Random Selection/Q2">
<p>Three numbers are chosen from 1,2,3,4,5. What is the probability that their sum is $par? NOTE: The numbers are chosen without replacement.</p>
</div>@
qu.1.23.answer=4@
qu.1.23.choice.1=$foo@
qu.1.23.choice.2=0.3@
qu.1.23.choice.3=0.5@
qu.1.23.choice.4=$Ans@
qu.1.23.choice.5=You cannot determine from the information given@
qu.1.23.fixed=4@

qu.1.24.mode=Multiple Choice@
qu.1.24.name=6A. Stock Market@
qu.1.24.comment=@
qu.1.24.editing=useHTML@
qu.1.24.solution=@
qu.1.24.algorithm=$Q="2A";
$U1=range(10,20,0.1);
$U2=range(15,20,0.01);
$N1=range(5,10,1);
$N2=range(10,15,1);
$S1=range(5,10,0.01);
$S2=range(7,11,0.01);
$ANS1=((($N1-1)*$S1^2)+(($N2-1)*$S2^2))/($N1+$N2-2);
$ANS=decimal(3,sqrt($ANS1));
$ALT1=decimal(3,$ANS+range(1,3,0.1));
$ALT2=decimal(3,$ANS+range(1,3,0.1));
$ALT3=decimal(3,$ANS-range(1,3,0.1));@
qu.1.24.uid=671de530-a8ad-4757-b55a-356cf9b75a45@
qu.1.24.question=<div title="STAT202/Test 7/Inference/Q$Q [2-3]">Samples of&nbsp;embedded securities&nbsp;were selected from two different&nbsp;stock markets (NASDAQ and TSX) &nbsp;to measure the average value of those securities&nbsp;, with the following summary data.
<div align="center">
<p>&nbsp;</p>
<center>
<table id="AutoNumber1" cellspacing="1" border="0">
    <tbody>
        <tr>
            <td>&nbsp;</td>
            <td>
            <p align="left"><font face="SFTT1000" size="2"><strong>&nbsp;&nbsp; TSX</strong></font></p>
            </td>
            <td><strong><font face="SFTT1000" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NASDAQ</font></strong></td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td><strong><font face="SFTT1000" size="2">n</font></strong></td>
            <td align="center"><font face="SFTT1000" size="2">&nbsp;&nbsp;&nbsp; $N1</font></td>
            <td align="center"><font face="SFTT1000" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$N2</font></td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td><strong><font face="SFTT1000" size="2">mean</font></strong></td>
            <td align="center"><font face="SFTT1000" size="2">&nbsp;&nbsp; &nbsp;$U1</font></td>
            <td align="center"><font face="SFTT1000" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$U2</font></td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td><strong><font face="SFTT1000" size="2">std.dev</font></strong></td>
            <td align="center"><font face="SFTT1000" size="2">&nbsp;&nbsp;&nbsp; $S1</font></td>
            <td align="center"><font face="SFTT1000" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$S2</font></td>
            <td>&nbsp;</td>
        </tr>
    </tbody>
</table>
</center>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
It is reasonable to believe that both outlets have the same variability. Hence, the pooled standard deviation is (in millions CAD):</div>@
qu.1.24.answer=4@
qu.1.24.choice.1=$ALT1@
qu.1.24.choice.2=$ALT2@
qu.1.24.choice.3=$ALT3@
qu.1.24.choice.4=$ANS@
qu.1.24.fixed=@

qu.1.25.question=<div title="STAT230/Chapter2/From Tests/Q$Q">A $n digit code number is generated by randomly selecting digits, <strong>with replacement</strong>, from the set {1,2,3,...,9}. Find the probability that the number is even. (Answer with a fraction, or to three decimal accuracy.)<br />
<em><font size="1">STAT 230 F02 Test 1, Q1a</font></em></div>@
qu.1.25.answer.num=4/9@
qu.1.25.answer.units=@
qu.1.25.showUnits=false@
qu.1.25.grading=toler_abs@
qu.1.25.err=.001@
qu.1.25.negStyle=minus@
qu.1.25.numStyle=thousands scientific dollars arithmetic@
qu.1.25.mode=Numeric@
qu.1.25.name=9A. Code Creation I [F02 T1Q1a]@
qu.1.25.comment=Since you are selecting with replacement the only question here is what is the probability of selecting an even digit for the last position in the number. Since 4 of the 9 digits are even, this is just 4/9.@
qu.1.25.editing=useHTML@
qu.1.25.solution=@
qu.1.25.algorithm=$Q="9A";
$n=range(3,7,1);
$a=$n/9;@
qu.1.25.uid=46db5444-4a35-4588-b390-cc022a2036f9@

qu.1.26.mode=Multiple Choice@
qu.1.26.name=12. Minimum grade for the final@
qu.1.26.comment=<div class="shadedDiv descriptionSpan" style="margin-top: 0px; margin-bottom: 2px">This is actually an "expected value" problem, but we don't need to know that to solve it. Your quiz contributes $grq % of&nbsp;$q marks =&nbsp;$qmarks marks. Your midterm adds $grm % of&nbsp;$m marks, or&nbsp;$mmarks more marks for a total of&nbsp;$tm of&nbsp;$t marks. Thus you need&nbsp;$fmarks of the&nbsp;$f marks on the final, that is $fmarks /&nbsp;$f = $ans % so $ANSWER&nbsp;% is the minimum grade needed (of those shown).</div>@
qu.1.26.editing=useHTML@
qu.1.26.solution=@
qu.1.26.algorithm=$q=range(10, 25, 5);
$m=range(20, 35, 5);
$f=100-$q-$m;
$grq=range(80, 95, 1);
$grm=range(60, 75, 1);
$qmarks=decimal(2, $grq*$q/100);
$mmarks=decimal(2, $grm*$m/100);
$tm=$qmarks+$mmarks;
$fmarks=80-$tm;
$ans=$fmarks/$f*100;
$ANSWER=maple("ceil($ans)");
$B=$ANSWER-1;
$C=$ANSWER+5;
$D=$ANSWER-4;@
qu.1.26.uid=afdcc934-3db7-47d0-8088-95f63b72fe27@
qu.1.26.question=<div title="Stat230/Chapter7/Expected ValueQ12">In your first course at UW, the prof bases the course grade on one quiz, one mid-term, and one final. The quiz counts $q % and the midterm counts $m %. If your quiz was $grq% and your midterm was only $grm %, what is the minimum grade you need to score on the final to get an 80% in the class?</div>@
qu.1.26.answer=1@
qu.1.26.choice.1=$ANSWER@
qu.1.26.choice.2=$B@
qu.1.26.choice.3=$C@
qu.1.26.choice.4=$D@
qu.1.26.choice.5=None of the above@
qu.1.26.fixed=4@

qu.1.27.question=Let X have a Binomial distribution with n = $n and p = $p. Then what is  var($B+$A X)? Answer to 2 decimal accuracy&nbsp; please.@
qu.1.27.answer.num=($A)^2*$n*$p*(1-$p)@
qu.1.27.answer.units=@
qu.1.27.showUnits=false@
qu.1.27.grading=toler_abs@
qu.1.27.err=.01@
qu.1.27.negStyle=minus@
qu.1.27.numStyle=thousands scientific dollars arithmetic@
qu.1.27.mode=Numeric@
qu.1.27.name=Var(aX+b) for Bin@
qu.1.27.comment=var($B+$A X) <br>
= var($A X)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>since Var(X 
+ k) = Var(X)<br>
</i>= ($A)<sup>2</sup> var(X)<i>&nbsp;&nbsp;&nbsp; since Var(aX) = a<sup>2</sup>Var(X)
</i><br>
= ($A)<sup>2</sup>$n$p(1-$p)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <i>since Variance of Bi(n,p) 
= np(1 - p)</i><br>
= $VarIs<br>@
qu.1.27.editing=useHTML@
qu.1.27.solution=@
qu.1.27.algorithm=$A=range(-5,5,1);
$B=range(-10,10,1);
$n=range(10,50,2);
$p=decimal(2,range(.02,.75,.01));
$VarIs = $n*$p*(1-$p);
condition:not(eq($A*$B,0));@
qu.1.27.uid=a8ae4ce0-e1bd-48a3-a69f-13d2daaee0ac@
qu.1.27.info=  Difficulty=1;
@

qu.1.28.mode=Multiple Choice@
qu.1.28.name=6A. Babies a day born with one or more teeth@
qu.1.28.comment=<p>This is a Poisson process with t = 1 day, &lambda; =&nbsp;$lambda so if X = # babies born each day with teeth, the probability distribution for X is: <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>f</mi><mfenced open='(' close=')' separators=','><mrow><mi>x</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><msup><mi>&lambda;</mi><mrow><mi>x</mi></mrow></msup><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><mi>&lambda;</mi></mrow></mrow></msup></mrow><mrow><mi>x</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac></mrow></mstyle></math> .&nbsp; To answer this question just substitute in the given value for x and &lambda;.</p>@
qu.1.28.editing=useHTML@
qu.1.28.solution=@
qu.1.28.algorithm=$Q="6A";
$lambda=range(2,6,1);
$x=range(0,6,1);
$ans=maple("stats[statevalf, pf, poisson[$lambda]]($x)");
$ANSWER=decimal(4,$ans);
$a=$ANSWER*0.5;
$b=$ANSWER*0.8;
$c=$ANSWER+0.1;@
qu.1.28.uid=f8d8cc8e-383c-499d-ba3e-1981645146f1@
qu.1.28.question=<div title="Stat230/Chapter 5/Poisson/Q$Q">In a certain hospital on average&nbsp;$lambda babies a day are born with one or more teeth. Assuming such births can be modelled with a Poisson Process, find the probability that in one day&nbsp;$x babies are born with teeth.</div>@
qu.1.28.answer=1@
qu.1.28.choice.1=$ANSWER@
qu.1.28.choice.2=$a@
qu.1.28.choice.3=$b@
qu.1.28.choice.4=$c@
qu.1.28.choice.5=None of the above@
qu.1.28.fixed=4@

qu.1.29.mode=Multiple Choice@
qu.1.29.name=6. X~Bin(?,?) for Dice@
qu.1.29.comment=<div class="shadedDiv descriptionSpan" style="margin-top: 0px; margin-bottom: 2px">n =&nbsp;$n since we are repeating the "experiment" (dice-tossing)&nbsp;$n times. The probability of getting a&nbsp;$x&nbsp; or&nbsp;$y in a toss is p = 1/3, so X ~Bi(n,p) = Bi($n,$p)</div>@
qu.1.29.editing=useHTML@
qu.1.29.solution=@
qu.1.29.algorithm=$Q=6;
$n=range(10,30,5);
$x=range(2,6,1);
$y=range(2,6,1);
$p=maple("convert(evalf(1/3),rational)");
condition:not(eq($y,$x));
$a=maple("convert(evalf(1/2),rational)");
$b=maple("convert(evalf(1/3),rational)");
$c=maple("convert(evalf(1/6),rational)");
$d=6;@
qu.1.29.uid=e1869370-0d21-4263-9a2c-a07750f75f67@
qu.1.29.question=<div title="Stat230/Chapter 5/Binomial Distribution/Q$Q"><img hspace="4" height="46" width="52" align="left" src="__BASE_URI__Chapter5/BD/original21.gif" title="Die [IMG:original21.gif]" alt="Die" />A fair die is tossed $n times and the outcome of each toss is recorded. Let X be the number of $x's and $y's that appear in the $n tosses. Then X has which of the following binomial distributions?&nbsp;</div>@
qu.1.29.answer=2@
qu.1.29.choice.1=Bi($n,$a)@
qu.1.29.choice.2=Bi($n,$b)@
qu.1.29.choice.3=Bi($n,$c)@
qu.1.29.choice.4=Bi($d,$c)@
qu.1.29.choice.5=None of the above@
qu.1.29.fixed=4@

qu.1.30.mode=Multiple Choice@
qu.1.30.name=1. Movie Attendance@
qu.1.30.comment=<p>Mary has a mode of 1.</p>@
qu.1.30.editing=useHTML@
qu.1.30.solution=@
qu.1.30.algorithm=$Q=1;@
qu.1.30.uid=31ae76bf-f3b7-4ed3-836e-e5671753d844@
qu.1.30.question=<div title="STAT230/Chapter 7/Other Measures/Q$Q">You and your friends are comparing the number of times you have been to the movies in the past year.  The following table illustrates how many times each person went to the movie theatre in each month.</p>
<center>
<table border="1">
    <tbody>
        <tr>
            <td>&nbsp;</td>
            <td><strong>Jan.</strong></td>
            <td><strong>Feb.</strong></td>
            <td><strong>Mar.</strong></td>
            <td><strong>Apr</strong>.</td>
            <td><strong>May</strong></td>
            <td><strong>June</strong></td>
            <td><strong>July</strong></td>
            <td><strong>Aug.</strong></td>
            <td><strong>Sept.</strong></td>
            <td><strong>Oct.</strong></td>
            <td><strong>Nov.</strong></td>
            <td><strong>Dec.</strong></td>
        </tr>
        <tr>
            <td><strong>John</strong></td>
            <td>1</td>
            <td>3</td>
            <td>2</td>
            <td>5</td>
            <td>2</td>
            <td>3</td>
            <td>1</td>
            <td>4</td>
            <td>2</td>
            <td>3</td>
            <td>2</td>
            <td>1</td>
        </tr>
        <tr>
            <td><strong>Mary</strong></td>
            <td>1</td>
            <td>2</td>
            <td>1</td>
            <td>1</td>
            <td>1</td>
            <td>3</td>
            <td>3</td>
            <td>2</td>
            <td>2</td>
            <td>4</td>
            <td>1</td>
            <td>2</td>
        </tr>
        <tr>
            <td><strong>Brian</strong></td>
            <td>1</td>
            <td>3</td>
            <td>2</td>
            <td>2</td>
            <td>1</td>
            <td>4</td>
            <td>5</td>
            <td>3</td>
            <td>2</td>
            <td>2</td>
            <td>1</td>
            <td>3</td>
        </tr>
        <tr>
            <td><strong>Kelly</strong></td>
            <td>2</td>
            <td>2</td>
            <td>1</td>
            <td>1</td>
            <td>3</td>
            <td>2</td>
            <td>4</td>
            <td>1</td>
            <td>3</td>
            <td>2</td>
            <td>3</td>
            <td>2</td>
        </tr>
    </tbody>
</table>
</center>
<p>By comparing <span style="font-weight: bold;">modes</span>, which person went to the movies the least per month?</div>@
qu.1.30.answer=2@
qu.1.30.choice.1=Brian@
qu.1.30.choice.2=Mary@
qu.1.30.choice.3=Brian@
qu.1.30.choice.4=Kelly@
qu.1.30.choice.5=Two or more of the above.@
qu.1.30.fixed=4@

qu.1.31.question=<div title="Stat230/Chapter 5/Binomial Distributions/Q$Q">Three students play a game 6 times. The probability of winning a single game for Jimmy is $jp%, for Robert $rp%, and for Tommy $tp%. Assuming the outcomes of the 6 games are independent of each, find the probability that Tommy wins 3 games, Robert wins two and Jimmy wins one game. (Please answer to 3 decimals of accuracy.)</div>@
qu.1.31.maple=evalb(abs(($ANSWER)-($RESPONSE))<0.005);@
qu.1.31.allow2d=0@
qu.1.31.maple_answer=$ANSWER@
qu.1.31.type=maple@
qu.1.31.mode=Maple@
qu.1.31.name=15. P(given win combination)@
qu.1.31.comment=<div class="shadedDiv descriptionSpan" style="margin-top: 0px; margin-bottom: 2px;">Suppose the sequence of winners is (for example) R T T J T R . The probability of this outcome is ($r)($t)($t)($j)($t)($r) = ($t)<sup>3</sup>($r)<sup>2</sup>($j)<br />
<br />
In fact that is the probability of any outcome that awards wins in that 3-2-1 proportion. How many ways can we arrange the sequence of wins? That's the same as asking how many unique strings can you make with the letters TTTRRJ . We've seen this result in the notes, the answer is <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mrow><mn>6</mn><mo lspace='0.1111111em' rspace='0.1111111em'>&amp;excl;</mo></mrow><mrow><mn>3</mn><mo lspace='0.1111111em' rspace='0.1111111em'>&amp;excl;</mo><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mn>2</mn><mo lspace='0.1111111em' rspace='0.1111111em'>&amp;excl;</mo></mrow></mfrac></mrow></mstyle></math>. <br />
<br />
Thus the probability of T-R-J winning 3-2-1 is <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mrow><mn>6</mn><mo lspace='0.1111111em' rspace='0.1111111em'>&amp;excl;</mo></mrow><mrow><mn>3</mn><mo lspace='0.1111111em' rspace='0.1111111em'>&amp;excl;</mo><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mn>2</mn><mo lspace='0.1111111em' rspace='0.1111111em'>&amp;excl;</mo></mrow></mfrac></mrow></mstyle></math>($t)<sup>3</sup>($r)<sup>2</sup>($j) = $ans which rounds to $ANSWER</div>@
qu.1.31.editing=useHTML@
qu.1.31.solution=@
qu.1.31.algorithm=$Q=15;
$j=decimal(2,range(0.1,0.3,0.01));
$j=.20;
$r=decimal(2,range(0.1,0.5,0.01));
$r=0.30;
$t=decimal(2,range(0.1,0.7,0.01));
$t=0.50;
$jp=$j*100;
$rp=$r*100;
$tp=$t*100;
condition:gt($r,$j);
condition:gt($t,$r);
$n=6;
$nk=$n-2;
$jn=(1-$j);
$rn=1-$r;
$tn=1-$t;
$c=maple("6!/(3!*2!)");
$ans=$c*$t^3*$r^2*$j;
$ANSWER=decimal(3,$ans);@
qu.1.31.uid=97e40676-812e-42d9-9700-b2790fc27951@

qu.1.32.question=<p><img hspace="4" height="50" width="50" vspace="4" align="right" alt="This question is drawn from a STAT 230 test or exam." title="This question is drawn from a STAT 230 test or exam. [IMG:TestGuy.gif]" src="__BASE_URI__Tools/TestGuy.gif" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div title="STAT230/Chapter 5/Poisson Distribution/Q2$Q C6A122">Power outages in a particular region follow a Poisson process with an average rate of $Lambda outages per year. For simplicity assume that all months are exactly 1/12 of a year. Find the probability that there is <em>at least  </em>1 outage in a given $Period month period.
<p>&nbsp;</p>
<p><em><font size="2">(You may answer numerically (3 decimals) or with an expression. Use "exp(x)" for e<sup>x</sup> and "factorial(n)" for n! To see what Maple TA "thinks" you've typed, use the <font color="#0000ff">Preview</font> key.)<br />
</font></em></p>
</div>@
qu.1.32.maple=evalb(abs($Ans-evalf($RESPONSE))<=0.01);@
qu.1.32.allow2d=0@
qu.1.32.maple_answer=$Ans@
qu.1.32.type=maple@
qu.1.32.mode=Maple@
qu.1.32.name=22A.  Power Outage II@
qu.1.32.comment=<p>With time t in years we have <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>t</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mi>$Period</mi><mrow><mn>12</mn></mrow></mfrac></mrow></mrow></mstyle></math>. From the question &lambda; = $Lambda and X = # of outages in a t-year period ~ Poisson (&mu; = $Lambda t) so &mu; = $mu.</p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>x</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><mi>&mu;</mi></mrow></mrow></msup><msup><mi>&mu;</mi><mrow><mi>x</mi></mrow></msup></mrow><mrow><mi>x</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac></mrow></mstyle></math><br />
<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&ge;</mo><mn>1</mn></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>0</mn></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mfrac><mrow><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>$mu</mi></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><msup><mi>$mu</mi><mrow><mn>0</mn></mrow></msup></mrow><mrow><mn>0</mn><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>$Ans</mi></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow></mstyle></math></p>
<p>&nbsp;</p>@
qu.1.32.editing=useHTML@
qu.1.32.solution=@
qu.1.32.algorithm=$Q="22A";
$Lambda=range(2,8,1);
$Period=range(1,4,1);
$mu=$Lambda*$Period/12;
$Ans=1-exp(-$mu)*($mu^0)/fact(0);@
qu.1.32.uid=051272c4-bcb5-40eb-bbff-53d1180af31a@
qu.1.32.info=  Difficulty=2;
  Keyword=Poisson;
  Keyword=Test;
  TestIs=F03 Quiz 3 Q1;
  Suggested Value=2;
  QuestionIndex=C6A122;
  TopicIndex=C6A1;
  Section=6.7;
  Section=6.8;
@

qu.1.33.mode=Multiple Choice@
qu.1.33.name=15. Telephone calls arival@
qu.1.33.comment=<p>Let X = number of calls in a&nbsp;$t minute period. Since the average rate is&nbsp;$m per hour the average number per&nbsp;$t&nbsp;minutes is&nbsp;$lambda and thus X ~ Poisson($lambda).<br />
Thus P(X = 0) = e<sup>&minus;$lambda</sup> = $ANSWER</p>@
qu.1.33.editing=useHTML@
qu.1.33.solution=@
qu.1.33.algorithm=$t=range(10,40,10);
$m=range(5,20,1);
$lambda=decimal(2,$t/60*$m);
$ans=maple("stats[statevalf,pf,poisson[$lambda]](0);
");
$ANSWER=decimal(3,$ans);
$a=decimal(3,$ANSWER*0.2);
$b=decimal(3,$ANSWER*0.8);
$c=decimal(3,$ANSWER*0.4);
condition:gt($ans,0.009);@
qu.1.33.uid=ffe40998-521b-433b-bf0c-99a03e3d590d@
qu.1.33.question=<div title="Stat230/Chapter6/Poisson/Q15">Telephone calls arrive at a village exchange at an average rate of&nbsp;$m per hour. Determine the probability that no calls arrive during a $t minute period.</div>@
qu.1.33.answer=1@
qu.1.33.choice.1=$ANSWER@
qu.1.33.choice.2=$a@
qu.1.33.choice.3=$b@
qu.1.33.choice.4=$c@
qu.1.33.choice.5=None of the above@
qu.1.33.fixed=4@

qu.1.34.question=<p><img hspace="4" vspace="4" align="$Align" src="__BASE_URI__Chapter5/Poisson/$WhichName$Which.gif" alt="Car(s)" title="Car(s) [IMG:$WhichName$Which.gif]" /></p>
<div title="Stat230/Chapter 5/Poisson/Q$Q">Car accidents at a certain intersection are randomly distributed in time according to a Poisson process, with&nbsp;$n accidents per week on average. If there were&nbsp;$x accidents in a $m-week period, what is the probability there were&nbsp;$y accidents in the first&nbsp;$w of these $m weeks? (3 decimal accuracy please)</div>@
qu.1.34.maple=evalb(abs(($ANSWER)-($RESPONSE))<=0.001);@
qu.1.34.allow2d=1@
qu.1.34.type=formula@
qu.1.34.mode=Maple@
qu.1.34.name=18A. Car accidents - Conditional probability@
qu.1.34.comment=<p><strong>The correct answer is <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mi>$x</mi><mrow><msup><mn>2</mn><mrow><mi>$x</mi></mrow></msup></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>$ANSWER</mi></mrow></mstyle></math>.</strong></p>
<p>Let A be the event "$y accidents in first&nbsp;$w of the $m weeks", B the event "$x accidents in&nbsp;$m weeks".</p>
<p>Notice that &lambda; = $n*$m = $lambda1</p>
<p>We want <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>P</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lpar;</mo><mi>A</mi><mo lspace='0.1111111em' rspace='0.1111111em' stretchy='true'>&verbar;</mo><mi>B</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&rpar;</mo><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>AB</mi></mrow></mfenced></mrow><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>B</mi></mrow></mfenced></mrow></mfrac></mrow></mstyle></math>.&nbsp;</p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>B</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mrow><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>$lambda1</mi></mrow></msup><msup><mi>$lambda1</mi><mrow><mi>$x</mi></mrow></msup></mrow><mrow><mi>$x</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac></mrow></mrow></mstyle></math>&nbsp;</p>
<p>(<em>leave P(B) like this, our answer will be more accurate if we work with the algebraic expression instead of the numeric evaluation).</em></p>
<p><br />
P(AB) = P($y accidents in first $w week(s))P(1 more accident in the last $w week(s))</p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>$lambda2</mi></mrow></msup><msup><mi>$lambda2</mi><mrow><mi>$y</mi></mrow></msup></mrow><mrow><mi>$y</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mrow><mfrac><mrow><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>$lambda2</mi></mrow></msup><msup><mi>$lambda2</mi><mrow><mn>1</mn></mrow></msup></mrow><mrow><mn>1</mn><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac></mrow></mrow></mstyle></math></p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>2</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi>$lambda2</mi></mrow></msup><msup><mi>$lambda2</mi><mrow><mi>$y</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mn>1</mn></mrow></msup></mrow><mrow><mi>$y</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac></mrow></mstyle></math><br />
<br />
Before doing anything numeric, let's setup the solution and simplify:</p>
<p>P(A|B) =<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mrow><mfrac><mrow><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>$lambda1</mi></mrow></msup><msup><mi>$lambda2</mi><mrow><mi>$x</mi></mrow></msup></mrow><mrow><mi>$y</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac></mrow><mrow><mfrac><mrow><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>$lambda1</mi></mrow></msup><msup><mi>$lambda1</mi><mrow><mi>$x</mi></mrow></msup></mrow><mrow><mi>$x</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac></mrow></mfrac></mrow></mstyle></math><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mi>$x</mi><mrow><msup><mn>2</mn><mrow><mi>$x</mi></mrow></msup></mrow></mfrac></mrow></mrow></mstyle></math>=$ANSWER</p>
<p>In other words, the answer only depends on how many accidents occurred in the time period, not how they were distributed!</p>@
qu.1.34.editing=useHTML@
qu.1.34.solution=@
qu.1.34.algorithm=$Q="18A";
$Which=1+rint(5);
$Align=switch(rint(2),"left","right");
$WhichName=switch(rint(2),"Car","CarAccident");
$n=range(1,9,1);
$m=range(2,6,2);
$x=range(3,9,1);
$lambda1=$n*$m;
$Prep1=maple("stats[statevalf,pf,poisson[$lambda1]]($x)");
$p1=decimal(5,$Prep1);
$w=$m/2;
$y=$x-1;
$lambda2=$w*$n;
$pk=maple("stats[statevalf,pf,poisson[$lambda2]]($y)");
$pz=maple("stats[statevalf,pf,poisson[$lambda2]](1)");
$p2=$pk*$pz;
$ANSWER=decimal(3,$p2/$Prep1);
condition:lt($ANSWER,1);
condition:gt($ANSWER,0.001);@
qu.1.34.uid=c9e0b6a8-be2a-4557-925c-9c1365d6c9b6@

qu.1.35.mode=Multiple Choice@
qu.1.35.name=5A. Tapeworm Drug@
qu.1.35.comment=@
qu.1.35.editing=useHTML@
qu.1.35.solution=@
qu.1.35.algorithm=$Q="5A";
$Which=1+rint(4);
$Align=switch(rint(2),"Left","Right");
$U1=range(14,15,0.1);
$U2=range(10,13,0.01);
$N1=range(7,11,1);
$N2=range(8,12,1);
$S1=range(1,3,0.1);
$S2=range(1,3,0.01);
$S=sqrt(($S1^2)/$N1+($S2^2)/$N2);
$DF1=(($S1^2)/$N1+($S2^2)/$N2)^2;
$DF2=($S1^4)/(($N1^2)*($N1-1))+($S2^4)/(($N2^2)*($N2-1));
$DF=decimal(0,$DF1/$DF2);
$T=maple("stats[statevalf,icdf,studentst[$DF]](0.99)");
$U=$U1-$U2;
$SE=decimal(3,$T*$S);
$ALT11=$U+range(0.01,0.05,0.001);
$ALT12=$SE+range(0.5,1.0,0.01);
$ALT21=$U;
$ALT22=$SE-range(0.5,1.0,0.01);
$ALT31=$U;
$ALT32=$SE+range(0.5,1.0,0.01);@
qu.1.35.uid=49372492-fdb2-4153-b022-6bd4ecb0259e@
qu.1.35.question=<p><img title="Sheep [IMG:sheep$Which.gif]" alt="Sheep" hspace="4" src="__BASE_URI__Test7/Inference/Sheep$Which.gif" /></p>
<div title="STAT202/Test 7/Inference/Q$Q [2-7]">An experiment was conducted to compare the efficacies of two drugs in the prevention of tapeworms in the stomachs of a new breed of sheep. Samples of size&nbsp;$N1 and&nbsp;$N2 from each breed were given the drug and the two sample means were&nbsp;$U1 and&nbsp;$U2 worms/sheep. From previous studies, it is known that the&nbsp;standard deviation&nbsp;in the two groups are&nbsp;$S1 and $S2, respectively, and that the number of worms in the stomachs has an approximate normal distribution. A 95% confidence interval for the the difference in the mean number of worms per sheep is:</div>@
qu.1.35.answer=4@
qu.1.35.choice.1=$ALT11 ± $ALT12@
qu.1.35.choice.2=$ALT21 ± $ALT22@
qu.1.35.choice.3=$ALT31 ± $ALT32@
qu.1.35.choice.4=$U ± $SE@
qu.1.35.fixed=@

qu.1.36.mode=Multiple Choice@
qu.1.36.name=3. No mode means?@
qu.1.36.comment=<p>If any value occurred more often than the others, it would be the mode! Another way to state this question is to say that every data point is a mode.</p>@
qu.1.36.editing=useHTML@
qu.1.36.solution=@
qu.1.36.algorithm=$Q=3;@
qu.1.36.uid=b0d9f0cd-8ffe-4ad9-ab6f-98cc6c9fc5c7@
qu.1.36.question=<div title="STAT230/Chapter 7/Other Measures/Q$Q">If a distribution of data has no mode, which of the following conditions must exist?</div>@
qu.1.36.answer=3@
qu.1.36.choice.1=Each data value must be positive@
qu.1.36.choice.2=The number of positive data equals the number of negative data@
qu.1.36.choice.3=Each data value has the same frequency@
qu.1.36.choice.4=The mean must be zero@
qu.1.36.choice.5=The variance is 1@
qu.1.36.fixed=@

qu.1.37.mode=Multiple Choice@
qu.1.37.name=4A. Cereal@
qu.1.37.comment=@
qu.1.37.editing=useHTML@
qu.1.37.solution=@
qu.1.37.algorithm=$Q="4A";
$U1=range(14,15,0.1);
$U2=range(10,13,0.01);
$N1=range(7,11,1);
$N2=range(8,12,1);
$S1=range(1,3,0.1);
$S2=range(1,3,0.01);
$S=sqrt(($S1^2)/$N1+($S2^2)/$N2);
$DF1=(($S1^2)/$N1+($S2^2)/$N2)^2;
$DF2=($S1^4)/(($N1^2)*($N1-1))+($S2^4)/(($N2^2)*($N2-1));
$DF=decimal(0,$DF1/$DF2);
$T=maple("stats[statevalf,icdf,studentst[$DF]](0.975)");
$U=$U1-$U2;
$SE=decimal(3,$T*$S);
$ALT11=$U+range(0.01,0.05,0.001)-($SE+range(0.5,1.0,0.01));
$ALT12=$U+range(0.01,0.05,0.001)+($SE+range(0.5,1.0,0.01));
$ALT21=$U-($SE-range(0.5,1.0,0.01));
$ALT22=$U+($SE-range(0.5,1.0,0.01));
$ALT31=$U-($SE+range(0.5,1.0,0.01));
$ALT32=$U+($SE+range(0.5,1.0,0.01));
$ANS1=$U-$SE;
$ANS2=$U+$SE;@
qu.1.37.uid=59ca169d-0633-4b05-aec7-0ab9d6f0a130@
qu.1.37.question=<div title="STAT202/Test 7/Inference/Q$Q [2-6]"><img height="44" alt="Cereal" hspace="4" width="50" align="right" src="__BASE_URI__Test7/Inference/Cereal1.gif" />Popular wisdom is that eating pre-sweetened cereal tends to increase the number of dental caries (cavities) in children. A sample of children was (with parental consent) entered into a study and followed for several years. Each child was classified as a sweetened-cereal lover or a non-sweetened cereal lover. At the end of the study, the amount of tooth damage was measured. Here is the summary data:
<p>&nbsp;</p>
<div align="center"><center>
<table id="AutoNumber1" cellspacing="1" cellpadding="3" border="0">
    <tbody>
        <tr>
            <td><strong>Group</strong></td>
            <td align="center"><strong>n</strong></td>
            <td align="center"><strong>mean</strong></td>
            <td align="center"><strong>std. dev</strong></td>
        </tr>
        <tr>
            <td><strong>Sugar Bombed</strong></td>
            <td align="center">$N1</td>
            <td align="center">$U1</td>
            <td align="center">$S1</td>
        </tr>
        <tr>
            <td><strong>No sugar</strong></td>
            <td align="center">$N2</td>
            <td align="center">$U2</td>
            <td align="center">$S2</td>
        </tr>
    </tbody>
</table>
</center></div>
<p>An approximate 95% confidence interval for the difference in the mean tooth damage is:</p>
</div>@
qu.1.37.answer=1@
qu.1.37.choice.1=($ANS1 , $ANS2)@
qu.1.37.choice.2=($ALT11 , $ALT12)@
qu.1.37.choice.3=($ALT21 , $ALT22)@
qu.1.37.choice.4=($ALT31 , $ALT32)@
qu.1.37.fixed=@

qu.1.38.mode=Multiple Choice@
qu.1.38.name=8. Risk assessment before planting a crop@
qu.1.38.comment=<div class="shadedDiv descriptionSpan" style="margin-top: 0px; margin-bottom: 2px">The expected profit is $x1($p1) + $x2($p2)&nbsp; - $x3($p3)&nbsp; =&nbsp; $ANSWER</div>@
qu.1.38.editing=useHTML@
qu.1.38.solution=@
qu.1.38.algorithm=$x1=range(5000,10000,100);
$x2=range(2000,4000,100);
$x3=range(6000,10000,100);
$p1=decimal(1,range(0.3,0.5,0.1));
$p2=decimal(1,range(0.3,0.5,0.1));
$p3=1-$p1-$p2;
$ANSWER=$x1*$p1+$x2*$p2-$x3*$p3;
$B=$x1*$p1+$x2*$p2;
$C=$x2*$p2+$x3*$p3;
$D=$x1*$p1+$x3*$p3;
condition:not(eq($p1,$p2));@
qu.1.38.uid=7deb914e-22c2-4232-885a-714d7c55c655@
qu.1.38.question=<div title="Stat230/Chapter7/Expected Value I/Q8">Before planting a crop for the next year, a producer does a risk assessment. According to her assessment, she concludes that there are three possible net outcomes: a $x1&nbsp;gain, a $x2&nbsp;gain, or a $x3&nbsp;(in&nbsp;dollars )loss with probabilities&nbsp;$p1,&nbsp;$p2 and&nbsp;$p3 respectively. The expected profit is:</div>@
qu.1.38.answer=1@
qu.1.38.choice.1=$ANSWER@
qu.1.38.choice.2=$B@
qu.1.38.choice.3=$C@
qu.1.38.choice.4=$D@
qu.1.38.choice.5=None of the above@
qu.1.38.fixed=4@

qu.1.39.question=<div title="STAT230/Chapter2/Other Problems/Q7">
<p>The digits {1, 2,..,5} are randomly arranged in a row. Find the probability that the even numbers occur consecutively (i.e. side by side). (Please express your answer as a fraction).</p>
</div>@
qu.1.39.maple=evalb(($ANSWER)-($RESPONSE)=0);@
qu.1.39.allow2d=1@
qu.1.39.maple_answer=2/5@
qu.1.39.type=formula@
qu.1.39.mode=Maple@
qu.1.39.name=7. Arranging digits from a list - P(all evens consecutive)@
qu.1.39.comment=<p><span style="font-weight: bold;">Solution 1:</span> denote the two even numbers by E. There are 4! permuations of the symbols 135E and for each of these there are 2 ways of permuting the even numbers 24 within E. Hence:<br />
<br />
(2 x 4!)/5! = 2/5<br />
<br />
<span style="font-weight: bold;">Solution 2:</span> There are two even numbers; they can occupy positions (1,2), (2,3), (3,4) or (4,5). Suppose they occupy (j, j+1), then either (j,j+1) = (2,4) or (j,j+1) = (4,2). Hence altogether 4 x 2 = 8 possible configurations for the two even numbers. For each of the 8 configurations, the remaining three (odd) numbers can take any position, i.e., 3! number of ways. Hence answer = (8 x 3!)/5! = 2/5.</p>@
qu.1.39.editing=useHTML@
qu.1.39.solution=@
qu.1.39.algorithm=@
qu.1.39.uid=ba02dc81-12de-4c4d-a5f6-20a47f51c78e@

qu.1.40.question=<div title="C7C101 STAT230/Chapter 7/Variance and Standard Deviation/Q1 C7C101">X is a discrete random variable that only takes on the values {-1,0,1}. X has a probability function f(x) with f(-1) = $fx1 and f(0) = $fx2. Find the variance of X. (Please answer to 4 decimals of accuracy.)</div>@
qu.1.40.answer.num=$VarIs@
qu.1.40.answer.units=@
qu.1.40.showUnits=false@
qu.1.40.grading=toler_abs@
qu.1.40.err=.0001@
qu.1.40.negStyle=minus@
qu.1.40.numStyle=thousands scientific dollars arithmetic@
qu.1.40.mode=Numeric@
qu.1.40.name=1A. Simple pdf, find Var(X)@
qu.1.40.comment=First, find the value of f(1):<br><br>f(1) = 1 - f(-1) - f(0) = 1 - $fx1 - $fx2 = $fx3.<br><br>Now:<br><br>E(X) = -1($fx1) + 0($fx2) +1($fx3) = $Ex<br>E(X<sup>2</sup>) = (-1)<sup>2</sup>$fx1 + 0 + (1)<sup>2</sup>4fx3 = $Ex2<br><br>Var(X) = E[(X - E(X))<sup>2</sup>] = E(X<sup>2</sup>) - [E(X)]<sup>2</sup> = $Ex2 - ($Ex)<sup>2</sup> = $VarIs<br><br>@
qu.1.40.editing=useHTML@
qu.1.40.solution=@
qu.1.40.algorithm=$Q="1A";
$fx1=decimal(2,range(.01,.75,.01));
$fx2=decimal(2,range(.01,.75,.01));
condition:lt($fx1+$fx2,1);
$fx3=1-$fx1-$fx2;
$Ex = -$fx1 + $fx3;
$Ex2 = $fx1 + $fx3;
$VarIs = $Ex2 - ($Ex)^2;@
qu.1.40.uid=f93bdaa5-a6f7-47a8-b295-74e4e0f3e61c@

qu.1.41.question=<div title="STAT230/Chapter 7/Expected Value/Q$Q">In a game a fair coin is tossed $Toss times. If x Heads occur, you win 2<sup>x</sup> dollars (x = 0, 1..., $Toss). Find your expected winnings (2 decimal accuracy please).</div>@
qu.1.41.answer.num=$Ans@
qu.1.41.answer.units=@
qu.1.41.showUnits=false@
qu.1.41.grading=toler_abs@
qu.1.41.err=.01@
qu.1.41.negStyle=minus@
qu.1.41.numStyle=thousands scientific dollars arithmetic@
qu.1.41.mode=Numeric@
qu.1.41.name=4A. Expected winnings coin toss@
qu.1.41.comment=<p>Notice that if x Heads appear in $Toss rolls, then $Toss-x Tails appear. Let X be the r.v. representing the number of Heads in $Toss tosses. What is f(x) = P(X = x) ?<br />
<br />
Select x of the $Toss tosses in <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi>$Toss</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>x</mi></mrow></mtd></mtr></mtable></mrow></mfenced><mrow><mi mathvariant='normal'></mi></mrow><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'></mi></mrow></mtd></mtr></mtable></mrow></mrow></mstyle></math> ways, then the probability of having all x of those Heads is <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>1</mn><mrow><mn>2</mn></mrow></mfrac></mrow></mfenced><mrow><mi>x</mi></mrow></msup></mrow></mstyle></math> . Now the $Toss-x places for Tails are selected automatically and the probability of all them being Tails is <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>1</mn><mrow><mn>2</mn></mrow></mfrac></mrow></mfenced><mrow><mi>$Toss</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>x</mi></mrow></msup></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow></mstyle></math> so the probability of getting exactly x Heads in $Toss tosses is <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi>$Toss</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>x</mi></mrow></mtd></mtr></mtable></mrow></mfenced><mrow><mi mathvariant='normal'></mi></mrow><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mrow><mi mathvariant='normal'></mi></mrow><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>1</mn><mrow><mn>2</mn></mrow></mfrac></mrow></mfenced><mrow><mi>$Toss</mi></mrow></msup></mrow></mrow></mtd></mtr></mtable></mrow></mrow></mstyle></math>.  We want to find E(2<sup>x</sup>) =</p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><munderover><mo lspace='0.0em' rspace='0.1666667em' stretchy='true' largeop='true' movablelimits='true'>&Sum;</mo><mrow><mi>x</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>0</mn></mrow><mrow><mi>$Toss</mi></mrow></munderover><msup><mn>2</mn><mrow><mi>x</mi></mrow></msup></mrow><mrow><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi>$Toss</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>x</mi></mrow></mtd></mtr></mtable></mrow></mfenced><mrow><mi mathvariant='normal'></mi></mrow><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>1</mn><mrow><mn>2</mn></mrow></mfrac></mrow></mfenced><mrow><mi>$Toss</mi></mrow></msup></mrow></mtd></mtr></mtable></mrow></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow></mstyle></math></p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>1</mn><mrow><mn>2</mn></mrow></mfrac></mrow></mfenced><mrow><mi>$Toss</mi></mrow></msup><munderover><mo lspace='0.0em' rspace='0.1666667em' stretchy='true' largeop='true' movablelimits='true'>&Sum;</mo><mrow><mi>x</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>0</mn></mrow><mrow><mi>$Toss</mi></mrow></munderover><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi>$Toss</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>x</mi></mrow></mtd></mtr></mtable></mrow></mfenced><msup><mn>2</mn><mrow><mi>x</mi></mrow></msup><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'></mi></mrow></mtd></mtr></mtable></mrow></mstyle></math></p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>1</mn><mrow><mn>2</mn></mrow></mfrac></mrow></mfenced><mrow><mi>$Toss</mi></mrow></msup><msup><mfenced open='(' close=')' separators=','><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mn>2</mn></mrow></mfenced><mrow><mi mathvariant='normal'>$Toss</mi></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>3</mn><mrow><mn>2</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$Toss</mi></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>$Ans</mi></mrow></mstyle></math></p>
<p>&nbsp;</p>@
qu.1.41.editing=useHTML@
qu.1.41.solution=@
qu.1.41.algorithm=$Q="4A";
$Toss=2+rint(5);
$Ans=decimal(3,1.5^$Toss);@
qu.1.41.uid=8dc5da0b-9b49-494d-b43b-9bef4766845f@
qu.1.41.info=  Difficulty=2;
  Keyword=game;
  Keyword=expected value;
  Suggested Value=1;
  QuestionIndex=C72104;
  TopicIndex=C721;
  Section=7.2;
  Section=7.3;
@

qu.1.42.question=<img width="50" vspace="4" hspace="4" height="50" align="right" alt="This question is drawn from a STAT 230 test or exam." title="This question is drawn from a STAT 230 test or exam. [IMG:TestGuy.gif]" src="__BASE_URI__Tools/TestGuy.gif" /></p>
<div title="STAT230/Chapter 6/Poisson Distribution/Q21 C6A121">Power outages in a particular region follow a Poisson process with an average rate of $Lambda outages per year. For simplicity assume that all months are exactly 1/12 of a year. Find the probability that there are exactly $x outages in a given $Period month period.
<p>&nbsp;</p>
<p><em><font size="2">(You may answer numerically (3 decimals) or with an expression. Use "exp(x)" for e<sup>x</sup> and "factorial(n)" for n! To see what Maple TA "thinks" you've typed, use the <font color="#0000ff">Preview</font> key.)<br />
</font></em></p>
</div>@
qu.1.42.maple=evalb(abs($Ans-evalf($RESPONSE))<=0.01);@
qu.1.42.allow2d=0@
qu.1.42.maple_answer=$Ans@
qu.1.42.type=maple@
qu.1.42.mode=Maple@
qu.1.42.name=21.  Power Outages@
qu.1.42.comment=<p>With time t in years, &lambda; = $Lambda and X = # of outages in a t-year period ~ Poisson (&mu; = $Lambda t) with t = $Period/12.</p>
<p>&nbsp;<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>x</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><mi>&mu;</mi></mrow></mrow></msup><msup><mi>&mu;</mi><mrow><mi>x</mi></mrow></msup></mrow><mrow><mi>x</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac></mrow></mstyle></math><br />
&nbsp; <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>$x</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>$mu</mi></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><msup><mi>$mu</mi><mrow><mi>$x</mi></mrow></msup></mrow><mrow><mi>$x</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>$Ans</mi></mrow></mstyle></math></p>
<p>&nbsp;</p>@
qu.1.42.editing=useHTML@
qu.1.42.solution=@
qu.1.42.algorithm=$Lambda=range(2,8,1);
$x=range(2,5,1);
$Period=range(2,10,1);
$mu=$Lambda*$Period/12;
$Ans=exp(-$mu)*($mu^$x)/fact($x);@
qu.1.42.uid=de1b9a99-2997-4d19-afb9-2756788efae4@
qu.1.42.info=  Difficulty=2;
  Keyword=Poisson;
  Keyword=Test;
  TestIs=F03 Quiz 3 Q1;
  Suggested Value=2;
  QuestionIndex=C6A121;
  TopicIndex=C6A1;
  Section=6.7;
  Section=6.8;
@

qu.1.43.mode=Multiple Choice@
qu.1.43.name=9. The World Series: probability that the series will terminate at the end of the n-th game?@
qu.1.43.comment=<div class="shadedDiv descriptionSpan" style="margin-top: 0px; margin-bottom: 2px">
<p>We have a binomial situation. Define success as team A winning a game. Then p =&nbsp;$p = 1 - p and n =&nbsp;$n .<br />
<br />
P(Series terminates at the end of 4 games) = P(A wins all 4 or B wins all 4)<br />
Consider the case where B wins all 4. Then x = 0 and:<br />
P(series ends in 4 with B the winner) = P(X = 0; n = 4, p = 0.5) = <img title="4C0 [IMG:4choose0.gif]" alt="4 choose 0" hspace="0" align="middle" border="0" src="https://uwangel.uwaterloo.ca/AngelUploadsuwangel/Content/UW-MCL-C-070730-100751/_assoc/362B2062DA0A4775B342BBDE8A0C6EE7/4choose0.gif?4080" />(1/2)<sup>0</sup>(1/2)<sup>4</sup> = 1/16<br />
By symmetry, P(series ends in 4 with A the winner) = 1/16, so<br />
<br />
P(series ends in 4) = 2(1/16) = 1/8</p>
<p>&nbsp;</p>
<p>P(Series terminates at the end of 5 games) = 2P(A wins in 5)&nbsp;&nbsp; <span style="font-style: italic">by the symmetry of A and B</span><br />
= 2 P(A wins exactly 3 of the first 4, then fifth)<br />
= 2 P(X = 3; n = 4, p = 1/2)P(A wins 5th)<br />
= 2<img title="4C3 [IMG:4choose3.gif]" alt="4 choose 3" hspace="0" align="middle" border="0" src="https://uwangel.uwaterloo.ca/AngelUploadsuwangel/Content/UW-MCL-C-070730-100751/_assoc/362B2062DA0A4775B342BBDE8A0C6EE7/4choose3.gif?7956" />(1/2)<sup>3</sup>(1/2)(1/2) = 8/32 = 1/4.</p>
<p>P(Series ends after 6th game)= P(A wins in 6 OR B wins in 6)= 2P(A wins in 6)&nbsp; <span style="font-style: italic">by the symmetry of A and B</span><br />
= 2P(A wins 3 of the first 5)P(A wins 6th)<br />
= 2 P(X = 3; n = 5, p = 1/2)(1/2)<br />
= 2<img title="5C3 [IMG:5choose3.gif]" alt="5 choose 3" hspace="0" align="middle" border="0" src="https://uwangel.uwaterloo.ca/AngelUploadsuwangel/Content/UW-MCL-C-070730-100751/_assoc/362B2062DA0A4775B342BBDE8A0C6EE7/5choose3.gif?4668" />(1/2)<sup>3</sup>(1/2)<sup>2</sup>(1/2) = 20/64 = 5/16.</p>
<p><br />
P(Series runs 7 games)= P(even after 6 games)<br />
= P(X = 3; n = 6, p = 1/2)<br />
= <img title="6C3 [IMG:6choose3.gif]" alt="6 choose 3" hspace="0" align="middle" border="0" src="https://uwangel.uwaterloo.ca/AngelUploadsuwangel/Content/UW-MCL-C-070730-100751/_assoc/362B2062DA0A4775B342BBDE8A0C6EE7/6choose3.gif?3820" />(1/2)<sup>3</sup>(1/2)<sup>3</sup> = 5/16.</p>
</div>@
qu.1.43.editing=useHTML@
qu.1.43.solution=@
qu.1.43.algorithm=$p=maple("convert(1/2, rational)");
$n=range(4,7,1);
$a=maple(" with(Statistics);
2*ProbabilityFunction(RandomVariable(Binomial($n, $p)),0)");
$b=maple(" with(Statistics);
2*ProbabilityFunction(RandomVariable(Binomial($n-1, $p)),3)*$p;
");
$c=maple(" with(Statistics);
ProbabilityFunction(RandomVariable(Binomial($n-1, $p)),3);
");
$A=maple("if ($n=4) then $a else 0 end if");
$B=maple(" if ($n=5 or $n=6) then $b else 0 end if");
$C=maple("if ($n=7) then $c else 0 end if ");
$ANSWER=maple("convert($A+$B+$C, rational)");@
qu.1.43.uid=62911f6d-2204-4afa-b2ca-78f9fe044f6d@
qu.1.43.question=<div title="Stat230/Chapter6/Binomial Distributions/Q9">The World Series terminates when one team wins its fourth game. Suppose the two teams are evenly matched, so each has probability 1/2 of winning any one game. What is the probability that the series will take&nbsp;$n games?</div>@
qu.1.43.answer=1@
qu.1.43.choice.1=$ANSWER@
qu.1.43.choice.2=3/8@
qu.1.43.choice.3=5/8@
qu.1.43.choice.4=3/16@
qu.1.43.choice.5=None of the Above@
qu.1.43.fixed=4@

qu.1.44.mode=Multiple Choice@
qu.1.44.name=5A. B(?,?) describes dice toss@
qu.1.44.comment=<div class="shadedDiv descriptionSpan" style="margin-top: 0px; margin-bottom: 2px">n =&nbsp;$n since we are repeating the "experiment" (dice-tossing)&nbsp;$n times. The probability of getting a&nbsp;$x&nbsp; or&nbsp;$y or $z in a toss is p = 1/2, so X ~Bi(n,p) = Bi($n,$p)</div>@
qu.1.44.editing=useHTML@
qu.1.44.solution=@
qu.1.44.algorithm=$Q="5A";
$n=range(10,30,5);
$x=range(2,6,1);
$y=range(2,6,1);
$z=range(2,6,1);
$p=maple("convert(evalf(1/2),rational)");
condition:not(eq($y,$x));
condition:not(eq($z,$x));
condition:not(eq($y,$z));
$a=maple("convert(evalf(1/2),rational)");
$b=maple("convert(evalf(1/3),rational)");
$c=maple("convert(evalf(1/6),rational)");
$d=6;
$Align=switch(rint(2),"Left","Right");@
qu.1.44.uid=989edfb0-3d02-4394-b304-5e963faf474c@
qu.1.44.question=<p><img hspace="4" height="53" width="53" vspace="4" align="$Align" title="A die [IMG:original51.gif]" alt="Imagine a die..." src="__BASE_URI__Chapter5/BD/original51.gif" /></p>
<div title="Stat230/Chapter6/Binomial Distribution/Q$Q">A fair die is tossed $n times and the outcome of each toss is recorded. Let X be the number of times the die comes up $x, $y, or $z in the $n tosses. Then X has which of the following binomial distributions?</div>@
qu.1.44.answer=1@
qu.1.44.choice.1=Bi($n,$a)@
qu.1.44.choice.2=Bi($n,$b)@
qu.1.44.choice.3=Bi($n,$c)@
qu.1.44.choice.4=Bi($d,$c)@
qu.1.44.choice.5=None of the above@
qu.1.44.fixed=4@

qu.1.45.mode=Multiple Choice@
qu.1.45.name=9A: Real Estate@
qu.1.45.comment=@
qu.1.45.editing=useHTML@
qu.1.45.solution=@
qu.1.45.algorithm=$U1=range(14,15,0.1);
$U2=range(10,13,0.01);
$N1=range(7,11,1);
$N2=range(8,12,1);
$S1=range(1,3,0.1);
$S2=range(1,3,0.01);
$S=sqrt(($S1^2)/$N1+($S2^2)/$N2);
$DF1=(($S1^2)/$N1+($S2^2)/$N2)^2;
$DF2=($S1^4)/(($N1^2)*($N1-1))+($S2^4)/(($N2^2)*($N2-1));
$DF=decimal(0,$DF1/$DF2);
$T=maple("stats[statevalf,icdf,studentst[$DF]](0.95)");
$U=$U1-$U2;
$SE=decimal(3,$T*$S);
$ALT11=$U+range(0.01,0.05,0.001)-($SE+range(0.5,1.0,0.01));
$ALT12=$U+range(0.01,0.05,0.001)+($SE+range(0.5,1.0,0.01));
$ALT21=$U-($SE-range(0.5,1.0,0.01));
$ALT22=$U+($SE-range(0.5,1.0,0.01));
$ALT31=$U-($SE+range(0.5,1.0,0.01));
$ALT32=$U+($SE+range(0.5,1.0,0.01));
$ANS1=$U-$SE;
$ANS2=$U+$SE;@
qu.1.45.uid=c3f065af-bd6c-4778-ab18-a7759efb7d71@
qu.1.45.question=<p>Suppose you are to compare the average real estate value of houses&nbsp;in 2 cities. You collected samples from each city and compare their mean and variance. The data are given below.</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<table cellspacing="1" cellpadding="3" border="0" id="AutoNumber1">
    <tbody>
        <tr>
            <td><strong>Group</strong></td>
            <td align="center"><strong>n</strong></td>
            <td align="center"><strong>mean</strong></td>
            <td align="center"><strong>std. dev</strong></td>
        </tr>
        <tr>
            <td><strong>City A</strong></td>
            <td align="center">$N1</td>
            <td align="center">$U1</td>
            <td align="center">$S1</td>
        </tr>
        <tr>
            <td><strong>City B&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </strong></td>
            <td align="center">$N2</td>
            <td align="center">$U2</td>
            <td align="center">$S2</td>
        </tr>
    </tbody>
</table>
</p>
<p>&nbsp;</p>
<p>Calculate the 90% confidence interval&nbsp;of the difference between the means.</p>
<p>&nbsp;</p>@
qu.1.45.answer=2@
qu.1.45.choice.1=($ALT11 , $ALT12)@
qu.1.45.choice.2=($ANS1 , $ANS2)@
qu.1.45.choice.3=($ALT21, $ALT22)@
qu.1.45.choice.4=($ALT31, $ALT32)@
qu.1.45.fixed=@

qu.1.46.question=<p><img hspace="4" vspace="4" align="$Align" alt="Fishing" title="Fishing [IMG:Fishing$Which]" src="__BASE_URI__Chapter5/Poisson/Fishing$Which.gif" /></p>
<div title="Stat230/Chapter 5/Poisson/Q$Q">At a particular location on a river the number of fish caught per man hour of fishing has a Poisson distribution with &lambda;=$lambda. If a man fishes there for one hour, what is the probability he will catch exactly $NumFish fish? Answer to 3 decimal accuracy please. <br />
<em>(You can enter an expression for your answer, <a href="__BASE_URI__Tools/MathEntryHelp.htm" target="Popup" onclick="window.open(this.href,this.target, 'height=283, width=578,resizable=yes')">click here</a> for details.)</em></div>@
qu.1.46.maple=evalb(abs(($ANSWER)-($RESPONSE))<0.005);@
qu.1.46.allow2d=0@
qu.1.46.type=maple@
qu.1.46.mode=Maple@
qu.1.46.name=5A. P(n fish /hr)@
qu.1.46.comment=<p><strong>Correct answer: $ANSWER</strong></p>
<hr width="100%" size="2" />
<p>Let X be the r.v. representing the number of fish caught in an hour. Then X ~ Poisson($lambda) and</p>
<p>P(X = $NumFish) =<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mrow><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>$lambda</mi></mrow></msup><msup><mi>$lambda</mi><mrow><mi>$NumFish</mi></mrow></msup></mrow><mrow><mi>$NumFish</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac></mrow></mstyle></math>&nbsp;= $ANSWER&nbsp;</p>
<p align="center"><em><font size="1"><br />
</font></em></p>@
qu.1.46.editing=useHTML@
qu.1.46.solution=@
qu.1.46.algorithm=$Q="5A";
$Which=1+rint(5);
$Align=switch(rint(2),"Left","Right");
$lambda=decimal(1,range(0.2,2.5,0.1));
$NumFish=range(1,5,1);
$ans=exp(-$lambda)*$lambda^$NumFish/fact($NumFish);
$ANSWER=decimal(5,$ans);@
qu.1.46.uid=6d431d79-9728-428c-9380-5ce3c1295a7a@

qu.1.47.question=<div title="STAT230/Chapter 7/Variance and Standard Deviation/Q$Q">Four buses travel to a protest march carrying a total of $B1, $B2, $B3, and $B4 students respectively. A student (call him or her Pat) is chosen at random and X=number of other people on Pat&rsquo;s bus. Find (2 decimals) var(X).</div>@
qu.1.47.answer.num=$VarX@
qu.1.47.answer.units=@
qu.1.47.showUnits=false@
qu.1.47.grading=toler_abs@
qu.1.47.err=0.05@
qu.1.47.negStyle=minus@
qu.1.47.numStyle=thousands scientific dollars arithmetic@
qu.1.47.mode=Numeric@
qu.1.47.name=7A. Var(people on bus)@
qu.1.47.comment=<p>The distribution of X is as follows:</p>
<div align="center"><center>
<table cellspacing="0" cellpadding="3" bordercolor="#111111" border="1" id="AutoNumber1" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td width="20%">x</td>
            <td width="20%" align="center">$X1&nbsp;</td>
            <td width="20%" align="center">$X2</td>
            <td width="20%" align="center">$X3</td>
            <td width="20%" align="center">$X4</td>
        </tr>
        <tr>
            <td width="20%">f(x)</td>
            <td width="20%" align="center"><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mi>$B1</mi><mrow><mi>$Total</mi></mrow></mfrac></mrow></mstyle></math></td>
            <td width="20%" align="center"><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mi>$B2</mi><mrow><mi>$Total</mi></mrow></mfrac></mrow></mstyle></math>&nbsp;</td>
            <td width="20%" align="center"><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mi>$B3</mi><mrow><mi>$Total</mi></mrow></mfrac></mrow></mstyle></math></td>
            <td width="20%" align="center"><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mi>$B4</mi><mrow><mi>$Total</mi></mrow></mfrac></mrow></mstyle></math></td>
        </tr>
    </tbody>
</table>
</center></div>
<p>It is easy to calculate the expected value and the variance of this  distribution. <br />
E(X) = $EX ,&nbsp; Var(X) = $VarX</p>@
qu.1.47.editing=useHTML@
qu.1.47.hint.1=<strong>Beware! </strong>The questions asks about the number of people on the bus BESIDES Pat. Reduce the numbers given by 1!@
qu.1.47.solution=@
qu.1.47.algorithm=$Q="7A";
$B1=range(25,55,5);
$B2=range(25,55,5);
$B3=range(25,55,5);
$B4=range(25,55,5);
$Total=$B1+$B2+$B3+$B4;
$X1=$B1-1;
$X2=$B2-1;
$X3=$B3-1;
$X4=$B4-1;
$P1=$B1/$Total;
$P2=$B2/$Total;
$P3=$B3/$Total;
$P4=$B4/$Total;
$EXw=$X1*$P1+$X2*$P2+$X3*$P3+$X4*$P4;
$EX=decimal(2,$EXw);
$EX2=$X1^2*$P1+$X2^2*$P2+$X3^2*$P3+$X4^2*$P4;
$VarX=decimal(2,$EX2-$EXw^2);@
qu.1.47.uid=38b6f21d-8497-4fef-9d3d-dbb2e4eec237@

qu.1.48.question=<div title="Stat230/Chapter6/Binomial Distributions/Q$Q">A camera's flash mechanism fails on $pAp% of shots. If&nbsp;$n shots are taken using the flash, what is the probability that the flash fails exactly twice? (Please answer to 4 decimals of accuracy.)</div>@
qu.1.48.answer.num=$ANSWER@
qu.1.48.answer.units=@
qu.1.48.showUnits=false@
qu.1.48.grading=toler_perc@
qu.1.48.perc=5.0@
qu.1.48.negStyle=minus@
qu.1.48.numStyle=thousands scientific dollars arithmetic@
qu.1.48.mode=Numeric@
qu.1.48.name=11 P(Camera fails n times)@
qu.1.48.comment=<p title="C6_BINOMIAL_DISTRIBUTIONS_II_2">Let X<sub> </sub>&nbsp;be the number of times the flash fails in n=10 shots. Let <em>p</em> be the probability that the flash fails (divide the given % by 100 to get this).</p>
<p>Then X ~ Bi(n,<em>p</em>) and</p>
<p>P(X = 2) =&nbsp; <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfenced open='(' close=')' separators=','><mrow><munder><mrow><mi>n</mi></mrow><mrow><mn>2</mn></mrow></munder></mrow></mfenced></mrow></mstyle></math>(<em>p</em>)<sup>2</sup>(1 - <em>p</em>)<sup>n-2</sup> = $ans which rounds up to $ANSWER</p>@
qu.1.48.editing=useHTML@
qu.1.48.solution=@
qu.1.48.algorithm=$Q=11;
$pA=decimal(2,range(0.05,0.35,0.01));
$n=range(5,20,5);
$pAp=$pA*100;
$npA=1-$pA;
$nn=$n-2;
$c=maple("with(combinat);
numbcomb($n, 2)");
$ans=$c*$pA^2*$npA^$nn;
$ANSWER=decimal(4,$ans);@
qu.1.48.uid=24157335-0c97-4f3d-b519-d71e4a000b72@

qu.1.49.mode=Multiple Selection@
qu.1.49.name=8. Which are not mgf?@
qu.1.49.comment=<p><br />
In no particular order:</p>
<ul>
    <li>e<sup>t</sup> is actually the mgf for the constant X = 1.</li>
    <li>e<sup>2(t-1)</sup> is the mgf for Poisson(2).</li>
    <li>A Moment generating function must be non-decreasing and M(0)=1. Since M(t)=1-t is decreasing it is not a MGF.</li>
    <li>For M(t) = 1 + t + t<sup>2</sup>/2 we ask the question: is it possible to find a probability distribution for X such that E(e<sup>tX</sup>) = 1 + t + t<sup>2</sup>/2 ? If so: <br />
    <br />
    E(X) = M'(0) = 1 and <br />
    var(X) = M''(0) - [M'(0)]<sup>2</sup> = 1 -1 = 0<br />
    <br />
    Since the variance is 0 and the mean is 1, X must be the constant 1. But if so the mgf is actually M(t) = e<sup>t</sup> &ne; 1 + t + t<sup>2</sup>/2, a contradiction.</li>
</ul>@
qu.1.49.editing=useHTML@
qu.1.49.solution=@
qu.1.49.algorithm=$Q=8;@
qu.1.49.uid=91cd072f-c315-40ce-a299-2a90f6b96235@
qu.1.49.question=<div title="STAT230/Chapter 7/MGF/Q$Q">Which of the following functions cannot be moment generating functions? (NOTE: Select ALL correct choices, there may be more than 1.)</div>@
qu.1.49.answer=2, 4@
qu.1.49.choice.1=M(t) = e<sup>t</sup>@
qu.1.49.choice.2=M(t) = 1 - t@
qu.1.49.choice.3=M(t) = e<sup>2(t-1)</sup>@
qu.1.49.choice.4=M(t) = 1 + t + t<sup>2</sup>/2@
qu.1.49.choice.5=All of the above could be mgf's!@
qu.1.49.fixed=4@

qu.1.50.question=<p><img hspace="4" height="72" align="left" width="100" src="__BASE_URI__Chapter6/Poisson/TapeRoll.gif" alt="" /></p>
<div title="Stat230/Chapter 5/Poisson Distributions/Q$Q">Defects occur in a certain manufactured tape on the average of 1 per 1,000 m. Assuming a Poisson distribution for the number of defects in a given length of tape, what is the probability that a&nbsp;$n m roll will have at most 2 defects? (Answer accurate to 2 decimals, i.e. 0.xx)&nbsp;</div>
<p>&nbsp;</p>@
qu.1.50.maple=evalb(abs(($ANSWER)-($RESPONSE))<=0.01);@
qu.1.50.allow2d=0@
qu.1.50.maple_answer=$ANSWER@
qu.1.50.type=maple@
qu.1.50.mode=Maple@
qu.1.50.name=9. Defects in a certain manufactured tape@
qu.1.50.comment=<div class="shadedDiv descriptionSpan" style="margin-top: 0px; margin-bottom: 2px">
<div class="shadedDiv descriptionSpan" style="margin-top: 0px; margin-bottom: 2px">Let X = number of defects in a&nbsp;$n m roll. The average number of defects in a&nbsp;$n m roll is&nbsp;$lambda and thus X ~ Poisson($lambda). <br />
P(X &le; 2) = P(X = 0) + P(X = 1) + P(X = 2)<br />
=&nbsp;$ans which rounds to $ANSWER.</div>
</div>@
qu.1.50.editing=useHTML@
qu.1.50.solution=@
qu.1.50.algorithm=$Q="9A";
$n=range(1000,4000,100);
$x=2;
$lambda=$n/1000;
$ans=maple("stats[statevalf, pf, poisson[$lambda]](2)+stats[statevalf, pf, poisson[$lambda]](0)+stats[statevalf, pf, poisson[$lambda]](1)");
$ANSWER=decimal(2,$ans);@
qu.1.50.uid=c59933fd-c94d-469f-bb51-60e0f520e4ca@

qu.1.51.mode=True False@
qu.1.51.name=19. Poisson distribution with ï¿ƒï¾¬ = 1@
qu.1.51.comment=@
qu.1.51.editing=useHTML@
qu.1.51.solution=@
qu.1.51.algorithm=@
qu.1.51.uid=a90946a7-0712-40af-9bb1-e54b6ba76b07@
qu.1.51.question=<div title="Poisson III (C6)">Let X<span>&nbsp; </span>have a Poisson distribution with &mu; = 1.<span>&nbsp; </span>Then P(X = 0) = P(X = 1)</div>@
qu.1.51.answer=1@
qu.1.51.choice.1=True@
qu.1.51.choice.2=False@
qu.1.51.fixed=@

qu.1.52.question=<div title="STAT230/Chapter 5/Poisson Distribution/Q$Q">Pulses arrive at a Geiger counter in accordance with a Poisson Process. In any one hour time period, it is known that there is a $P% chance that no pulses arrive to the counter. What is the value of &lambda;, the arrival rate of pulses per hour? (3 decimal accuracy please.)</div>@
qu.1.52.answer.num=$Ans@
qu.1.52.answer.units=@
qu.1.52.showUnits=false@
qu.1.52.grading=toler_abs@
qu.1.52.err=0.001@
qu.1.52.negStyle=minus@
qu.1.52.numStyle=thousands scientific dollars arithmetic@
qu.1.52.mode=Numeric@
qu.1.52.name=2. Geiger Counter 2@
qu.1.52.comment=<p>Let X count the # pulses which arrive during any 1 hour period.&nbsp; Then X ~ Poisson(&lambda;) and we need to determine the <span style="font-style: italic; font-weight: bold;">rate</span> &lambda;. But the question tells you P(X = 0)!&nbsp;</p>
<p>So set <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>0</mn></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><mi>&lambda;</mi></mrow></mrow></msup><mrow><msup><mi>&lambda;</mi><mrow><mn>0</mn></mrow></msup></mrow></mrow><mrow><mn>0</mn><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mi>$P</mi><mrow><mn>100</mn></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>$DecP</mi></mrow></mstyle></math></p>
<p>Solve for  &lambda; to get  &lambda; = -log($DecP) = $Ans</p>@
qu.1.52.editing=useHTML@
qu.1.52.solution=@
qu.1.52.algorithm=$Q=2;
$P=decimal(2,range(1,15,0.01));
$P=3.48;
$DecP=$P/100;
$Ans=-Ln($P/100);@
qu.1.52.uid=3bcf6cbb-3a1f-4661-aa4e-bed792d1a198@
qu.1.52.info=  Keyword=poisson;
@

qu.1.53.mode=Multiple Choice@
qu.1.53.name=7. Arrival of customers in the bank@
qu.1.53.comment=<div class="shadedDiv descriptionSpan" style="margin-top: 0px; margin-bottom: 2px">The trick here is to think of the rate as $mu/minute. Then &mu; = $mu, x = $x and P(X = $x) = f($x) = $mu<sup>$x </sup>+ e<sup>-$mu</sup>/$x! = $ANSWER</div>@
qu.1.53.editing=useHTML@
qu.1.53.solution=@
qu.1.53.algorithm=$x=range(0,4,1);
$lambda=range(60,360,60);
$mu=$lambda/60;
$ans=maple("stats[statevalf, pf, poisson[$mu]]($x)");
$ANSWER=decimal(4,$ans);
$a=$ANSWER*0.5;
$b=$ANSWER*0.8;
$c=$ANSWER*0.3;@
qu.1.53.uid=2418fbc4-9dbf-496c-a29a-eaccd803d97b@
qu.1.53.question=<p>&nbsp;</p>
<div title="Stat230/Chapter6/Poisson/Q7">A bank knows that arrival of customers between 8 a.m. (opening time) and 9 a.m. is a Poisson Process, with on average&nbsp;$lambda customers arriving during that hour. Find the probability that exactly&nbsp;$x customers arrive during a given 1 minute interval during that hour.</div>
<p>&nbsp;</p>@
qu.1.53.answer=1@
qu.1.53.choice.1=$ANSWER@
qu.1.53.choice.2=$a@
qu.1.53.choice.3=$b@
qu.1.53.choice.4=$c@
qu.1.53.choice.5=None of the above@
qu.1.53.fixed=4@

qu.1.54.mode=Restricted Formula@
qu.1.54.name=1. DeriveE[(X+1)<sup>2</sup>]@
qu.1.54.comment=Recall that for X ~ B(n,p) we have E(X) = np and var(x) = np(1-p)<br />
<br />
E[(X+1)<sup>2</sup>] = E[X<sup>2</sup>+2X+1] = E(X<sup>2</sup>)+2E(X)+1ï¿‚ï¾ ï¿‚ï¾  <span style="font-style: italic;">Now recall that var(X) = </span>E(X<sup>2</sup>) - (E(X))<sup>2</sup> <span style="font-style: italic;">so</span>  <br />
= var(X)+(E(X))<sup>2</sup> + 2E(X)+1 <br />
= var(X) + (1+E(X))<sup>2</sup> <br />
= np(1-p) + (1+np)<sup>2</sup>@
qu.1.54.editing=useHTML@
qu.1.54.solution=@
qu.1.54.algorithm=@
qu.1.54.uid=5eb03c09-990f-4c36-bfe3-ba9dbd95e4de@
qu.1.54.info=  Difficulty=2;
  Keyword=binomial;
  Suggested Value=2;
  QuestionIndex=C72101;
  TopicIndex=C721;
  Section=7.2;
  Section=7.3;
@
qu.1.54.question=<div title="STAT230/Chapter 7/C721 Expected Value/Q1">Suppose X ~ B(n,p) is a Binomial Random Variable. Derive (and simplify) a formula for E[(X+1)<sup>2</sup>].</div>@
qu.1.54.answer=np(1-p) + (1+np)^2@

qu.1.55.question=<p>&nbsp;</p>
<p><img alt="Roll of tape" hspace="3" align="left" border="0" src="https://uwangel.uwaterloo.ca/AngelUploadsuwangel/Content/UW-MCL-C-070730-100751/_assoc/1A9870CB02C34F71AC136CC34177CABC/tape_roll.gif?240" /></p>
<div title="Stat230/Chapter 6/Poisson/Q8">Defects occur in a certain manufactured tape on the average of 1 per 1,000 m. Assuming a Poisson distribution for the number of defects in a given length of tape, what is the probability that a&nbsp;$n m roll will have&nbsp;no defects? (Answer accurate to 2 decimals, i.e. 0.xx)<br />
&nbsp;</div>
<p>&nbsp;</p>@
qu.1.55.maple=evalb(abs(($ANSWER)-($RESPONSE))<=0.01);@
qu.1.55.allow2d=0@
qu.1.55.maple_answer=$ANSWER@
qu.1.55.type=maple@
qu.1.55.mode=Maple@
qu.1.55.name=8. Defects in a certain manufactured tape@
qu.1.55.comment=<div class="shadedDiv descriptionSpan" style="margin-top: 0px; margin-bottom: 2px">Let X = number of defects in a&nbsp;$n m roll. X ~ Poisson($lambda). P(X = 0) = ($lambda)<sup>0</sup>e<sup>&minus;$lambda</sup>/0! = $ANSWER.</div>@
qu.1.55.editing=useHTML@
qu.1.55.solution=@
qu.1.55.algorithm=$n=range(1000,4000,100);
$x=0;
$lambda=$n/1000;
$ans=maple("stats[statevalf, pf, poisson[$lambda]](0)");
$ANSWER=decimal(2,$ans);@
qu.1.55.uid=e2f65e89-74b8-48d6-a54e-3ad7e2018b52@

qu.1.56.mode=Multiple Choice@
qu.1.56.name=3. Cash Flow Restaurant@
qu.1.56.comment=<p>The expected cash flow for the new location is:<br />
<br />
Expected Cash Flow =&sum; P(each event)Value(each event)</p>
<p>= \\$1,000*($P1($C1) + $P2*($C2) + $P3*($C3) + $P4*($C4) + $P5*($C5) )= \\$$Ans</p>@
qu.1.56.editing=useHTML@
qu.1.56.solution=@
qu.1.56.algorithm=$C5=10*(rint(40)+10);
$C4=10*int(4*$C5/50)+10*rint($C5/50);
$C3=10*int(3*$C4/40)+10*rint($C4/40);
$C2=10*int(2*$C3/30)+10*rint($C3/30);
$C1=10$int($C2/20)+10*rint($C2/20);
$P1=decimal(2,range(0.05,0.40,0.05));
$P2=decimal(2,range(0.05,0.60-$P1,0.05));
$P3=decimal(2,range(0.05,0.70-$P1-$P2,0.05));
$P4=decimal(2,range(0.05,0.90-$P1-$P2-$P3,0.05));
$P5=decimal(2,1-($P1+$P2+$P3+$P4));
$Ans=1000*($P1*$C1+$P2*$C2+$P3*$C3+$P4*$C4+$P5*$C5);
$Ans1=$Ans+1000*$P1*$C1;
$Ans2=$Ans-1000*$P2*$C2;
$Ans3=$Ans1+5000+1000*rint(80);@
qu.1.56.uid=ddbc8a3f-1191-4869-97e7-9089cc200bdb@
qu.1.56.info=  Difficulty=2;
  Keyword=PreQuiz7;
  Keyword=expected value;
  Suggested Value=2;
  QuestionIndex=C72103;
  TopicIndex=C721;
  Section=7.2;
  Section=7.3;
@
qu.1.56.question=<div title="STAT230/Chapter 7/C721 Expected value/Q3">A restaurant manager is considering a new location for her restaurant. The projected annual cash flow for the new location is: <br />
<br />
<table cellspacing="2" cellpadding="2" border="1">
    <tbody>
        <tr>
            <td>Annual Cash Flow ($000)</td>
            <td>$C1</td>
            <td>$C2</td>
            <td>$C3</td>
            <td>$C4</td>
            <td>$C5</td>
        </tr>
        <tr>
            <td>Probability</td>
            <td align="right">$P1</td>
            <td align="right">$P2</td>
            <td align="right">$P3</td>
            <td align="right">$P4</td>
            <td align="right">?</td>
        </tr>
    </tbody>
</table>
<br />
<br />
The expected cash flow for the new location is:</div>@
qu.1.56.answer=1@
qu.1.56.choice.1=\\$$Ans@
qu.1.56.choice.2=\\$$Ans1@
qu.1.56.choice.3=\\$$Ans2@
qu.1.56.choice.4=\\$$Ans3@
qu.1.56.choice.5=Cannot be determined here.@
qu.1.56.fixed=4@

qu.1.57.mode=Multiple Choice@
qu.1.57.name=15. A crop insurance company establishes loss@
qu.1.57.comment=<div class="shadedDiv descriptionSpan" style="margin-top: 0px; margin-bottom: 2px">First note that P(100% loss) =$p3. If X is policy payout, we can calculate <br />
E(X) = $p( $x0*$p0 + $x1*$p1&nbsp; + $x2*$p2&nbsp; + $x3*$p3&nbsp; )=&nbsp; $ANSWER</div>@
qu.1.57.editing=useHTML@
qu.1.57.solution=@
qu.1.57.algorithm=$p0=decimal(2,range(0.7,0.95,0.05));
$p1=decimal(2,range(0.1,0.2,0.01));
$p2=decimal(2,range(0.01,0.2,0.01));
$p3=1-$p0-$p1-$p2;
$k0=0;
$k1=25;
$k2=50;
$k3=100;
$x0=$k0/100;
$x1=$k1/100;
$x2=$k2/100;
$x3=$k3/100;
$s=range(100, 250, 5);
$ans=$s*($x1*$p1+$x0*$p0+$p2*$x2+$x3*$p3);
$ANSWER=$ans;
$B=$s*($x1*$p1+$x0*$p0);
$C=$s*($x0*$p0+$p2*$x2+$x3*$p3);
$D=$s*($p2*$x2+$x3*$p3);
condition:gt($p3,0);@
qu.1.57.uid=07b54514-a440-4dd9-9732-af7b32e66e60@
qu.1.57.question=<div title="Stat230/Chapter 7/Expected Value/Q15">A crop insurance company establishes the following loss table based upon previous claims <br />
<br />
<table cellspacing="2" cellpadding="2" border="0">
    <tbody>
        <tr>
            <td>percent loss</td>
            <td>|</td>
            <td align="right">0</td>
            <td align="right">25</td>
            <td align="right">50</td>
            <td align="right">100</td>
        </tr>
        <tr>
            <td>probability</td>
            <td>|</td>
            <td align="right">$p0</td>
            <td align="right">$p1</td>
            <td align="right">$p2</td>
            <td align="right">????</td>
        </tr>
    </tbody>
</table>
<br />
If they write policy that pays a maximum of $s&nbsp;/hectare, their expected loss in dollrs/hectare is approximately:</div>@
qu.1.57.answer=1@
qu.1.57.choice.1=$ANSWER@
qu.1.57.choice.2=$B@
qu.1.57.choice.3=$C@
qu.1.57.choice.4=$D@
qu.1.57.choice.5=None of the above@
qu.1.57.fixed=4@

qu.1.58.mode=Multiple Choice@
qu.1.58.name=3. Assignments@
qu.1.58.comment=@
qu.1.58.editing=useHTML@
qu.1.58.solution=@
qu.1.58.algorithm=$Q=3;@
qu.1.58.uid=18e70d0a-05f7-4a7d-a83a-317bf1eb1aa9@
qu.1.58.question=<div title="STAT202/Test 7/Inference/Q$Q [2-5]">A study was conducted to estimate the effectiveness of doing assignments in an introductory statistics course. Students in one section taught by instructor A received no assignments. Students in another section taught by instructor B, received assignments. The final grade of each student was recorded. A 95% confidence interval for the difference in the mean grades (Section A - Section B) was computed to be &minus;3.5 &plusmn; 1.8. This means:</div>@
qu.1.58.answer=3@
qu.1.58.choice.1=There is evidence that doing assignments improves the average grade because the difference in the population means is less than zero.@
qu.1.58.choice.2=There is little evidence that doing assignments improves the average grade because the 95% confidence interval does not cover 0.@
qu.1.58.choice.3=There is evidence that doing assignments improves the average grade because the 95% confidence interval does not cover 0.@
qu.1.58.choice.4=There is evidence that doing assignments does not improve the aver- age grade because the 95% confidence interval does not cover 0.@
qu.1.58.choice.5=There is little evidence that doing assignments does not improve the average grade because the 95% confidence interval does cover 0.@
qu.1.58.fixed=@

qu.1.59.mode=True False@
qu.1.59.name=3. X has a binomial distribution with p=0.5@
qu.1.59.comment=<p>True, since &nbsp;<sub>n</sub>C<sub>r </sub>= <sub>n</sub>C<sub>(n-r)</sub>&nbsp; and p=0.5, so we have<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mrow><mi>n</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&amp;excl;</mo></mrow><mrow><mi>k</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&amp;excl;</mo><mfenced open='(' close=')' separators=','><mrow><mi>n</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>k</mi></mrow></mfenced><mo lspace='0.1111111em' rspace='0.1111111em'>&amp;excl;</mo></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mn>0.5</mn><mrow><mi>k</mi></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mn>0.5</mn><mrow><mi>n</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>k</mi></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&amp;equals;</mo><mo lspace='0.0em' rspace='0.0em'> </mo><mfrac><mrow><mi>n</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&amp;excl;</mo></mrow><mrow><mfenced open='(' close=')' separators=','><mrow><mi>n</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>k</mi></mrow></mfenced><mi>k</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&amp;excl;</mo></mrow></mfrac><msup><mn>0.5</mn><mrow><mi>n</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>k</mi></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mn>0.5</mn><mrow><mi>k</mi></mrow></msup></mrow></mstyle></math></p>
<p>where n=$n, k=$x, and n-k=$y</p>@
qu.1.59.editing=useHTML@
qu.1.59.solution=@
qu.1.59.algorithm=$p=0.5;
$n=range(3,19,2);
$z=($n-1)/2;
$x=range(1,$z,1);
$y=$n-$x;@
qu.1.59.uid=d6a75095-f4fc-48c8-804b-896990da07b5@
qu.1.59.question=<div title="Stat230/Chapter6/Binomial Distributions/Q3">Let X have a binomial distribution with n=$n and p=0.5 . Then (T or F):<br />
P(X=$x) = P(X=$y)</div>@
qu.1.59.answer=1@
qu.1.59.choice.1=True@
qu.1.59.choice.2=False@
qu.1.59.fixed=@

qu.1.60.mode=Multiple Choice@
qu.1.60.name=19A. Gas consumption@
qu.1.60.comment=@
qu.1.60.editing=useHTML@
qu.1.60.solution=@
qu.1.60.algorithm=$Q="19A";
$S = range(0.1,0.2,0.01);
$U = range(8.2,8.3,0.01);
$X1 = range(8.0,8.1,0.01);
$X2 = range(8.4,8.5,0.01);
$Z1 = -($X1-$U)/$S;
$Z2 = ($X2-$U)/$S;
$P1 = maple("(stats[statevalf,cdf,normald])($Z1)");
$P2 = maple("(stats[statevalf,cdf,normald])($Z2)");
$ANS = decimal(4,$P1+$P2-1);
$ALT1  = decimal(4,range(0.1,0.5,0.00001));
$ALT2  = decimal(4,range(0.1,0.5,0.00001));
$ALT3  = decimal(4,range(0.1,0.9,0.00001));@
qu.1.60.uid=8fbd422e-0ee9-4bff-950c-83f69bff15e0@
qu.1.60.question=<div title="STAT202/Test 4/Normal Distribution/Q$Q  [20.]"><a onclick="window.open(this.href,this.target,'height=140,width=340')" href="__BASE_URI__Tools/NormalCalculator.htm" target="Popup"><img border="0" align="right" title="Quick Normal/InvNormal Calculator [IMG:calculator.gif]" alt="Quick Normal/InvNormal Calculator" src="__BASE_URI__Tools/calculator.gif" /></a>The average gas consumption of a certain model car is&nbsp;$U litres/100km. If the gas consumption is normally distributed with a standard deviation of $S litres/100km, find the probability that a car has a gas consumption between&nbsp;$X1 and&nbsp;$X2 litres/100km..</div>@
qu.1.60.answer=1@
qu.1.60.choice.1=$ANS@
qu.1.60.choice.2=$ALT1@
qu.1.60.choice.3=$ALT2@
qu.1.60.choice.4=$ALT3@
qu.1.60.fixed=@

qu.1.61.question=<img hspace="4" vspace="4" align="$Align" src="__BASE_URI__Chapter5/Poisson/$WhichName$Which.gif" alt="Car(s)" title="Car(s) [IMG:$WhichName$Which.gif]" />
<div title="Stat230/Chapter 5/Poisson/Q$Q">Car accidents at a certain intersection are randomly distributed in time according to a Poisson process, with&nbsp;$n $Word per week on average. What is the probability of exactly $x accidents in a $m-week period? (3 decimal accuracy please).</div>@
qu.1.61.maple=evalb(abs(($ANSWER)-($RESPONSE))<=0.001);@
qu.1.61.allow2d=0@
qu.1.61.type=maple@
qu.1.61.mode=Maple@
qu.1.61.name=16. P(x accidents in n-weeks)@
qu.1.61.comment=<p><strong>The correct answer is $ANSWER</strong></p>
<hr />
<p>Let X = the number of accidents in a $m-week period.</p>
<p>Then X ~ Poisson(&lambda;) where &mu; = $n, &lambda;=&mu;t = $n($m)&nbsp; = $lambda.<br />
<br />
P(X = 2) =&nbsp;<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mrow><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><mi>&lambda;</mi></mrow></mrow></msup><mrow><msup><mi>&lambda;</mi><mrow><mi>x</mi></mrow></msup></mrow></mrow><mrow><mi>x</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>$lambda</mi></mrow></msup><msup><mi>$lambda</mi><mrow><mi>$x</mi></mrow></msup></mrow><mrow><mi>$x</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>$ANSWER</mi></mrow></mstyle></math></p>@
qu.1.61.editing=useHTML@
qu.1.61.solution=@
qu.1.61.algorithm=$Q=16;
$n=range(1,9,1);
$Word=if($n-1,"accidents","accident");
$m=range(2,6,1);
$x=range(0,9,1);
$lambda=$n*$m;
$ans=maple("stats[statevalf, pf, poisson[$lambda]]($x)");
$ANSWER=decimal(3,$ans);
condition:lt($ans,1);
condition:gt($ans,0.001);
$Align=switch(rint(2),"Left","Right");
$Which=1+rint(5);
$WhichName=switch(rint(2),"Car","CarAccident");@
qu.1.61.uid=7848cd67-d5b5-4eb5-a990-de31f6888ef6@

qu.1.62.mode=Multiple Choice@
qu.1.62.name=3. P(X>n) Uniform@
qu.1.62.comment=@
qu.1.62.editing=useHTML@
qu.1.62.solution=@
qu.1.62.algorithm=$Q=3;
$n=range(4,15,1);
$GTPoint=range(2,$n-1,1);
$AnsTop=($n-$GTPoint);
$Alt1Top=$AnsTop-1;
$Alt2=1;
$Alt3Bot=$GTPoint;@
qu.1.62.uid=82170b6f-63f4-483d-ae1a-c0979200ebd9@
qu.1.62.info=  Keyword=uniform;
@
qu.1.62.question=<div title="STAT230/Discrete RVs and Probability Models/Uniform Distributions/Q$Q">In a uniform probability distribution for a discrete random variable X the probability function is given by&nbsp; <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>f</mi><mfenced open='(' close=')' separators=','><mrow><mi>x</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfenced open='{' close='}' separators=','><mrow><munderover><mrow><mo mathcolor='#0000ff' lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow><mrow><mn>0</mn><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>otherwise</mi></mrow><mrow><mfrac><mn>1</mn><mrow><mi>$n</mi></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>x</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mn>1</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.2222222em' rspace='0.0em'>..</mo><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>$n</mi></mrow></munderover></mrow></mfenced></mrow></mrow></mstyle></math><br />
Then P(X >$GTPoint) is:</div>@
qu.1.62.answer=1@
qu.1.62.choice.1=$AnsTop/$n@
qu.1.62.choice.2=$Alt1Top/$n@
qu.1.62.choice.3=$Alt2@
qu.1.62.choice.4=$AnsTop/$GTPoint@
qu.1.62.choice.5=None of the above@
qu.1.62.fixed=4@

qu.1.63.question=<img hspace="4" align="$Align" src="__BASE_URI__Chapter5/BD/Camera$Which.gif" alt="Camera" title="Camera [IMG:Camera$Which.gif]" />
<div title="STAT230/Chapter 5/Binomial Distributions/Q$Q">Two identical cameras, call them A and B, have their flashes fail $pAp% and $pBp% of the time respectively. A photographer selects a camera at random and uses it to take $Flashes shots with the flash. If the flash failed exactly $Fails times, what is the probability that the photographer used Camera B? (Please answer to 4 decimals of accuracy.)</div>@
qu.1.63.answer.num=$pBUsed@
qu.1.63.answer.units=@
qu.1.63.showUnits=false@
qu.1.63.grading=toler_perc@
qu.1.63.perc=10.0@
qu.1.63.negStyle=minus@
qu.1.63.numStyle=thousands scientific dollars arithmetic@
qu.1.63.mode=Numeric@
qu.1.63.name=1. Cameras fail rate, which was used?@
qu.1.63.comment=Let A (B) be the event "camera A (B) is chosen".<p>Let X<sub>A</sub>  (X<sub>B</sub>)  be the number of times Camera A's (B's) flash fails in 10 shots.<p>Let p<sub>A</sub> (p<sub>B</sub>) be the probability that Camera A's (B's) flash fails, so we have p<sub>A</sub> = $pA and p<sub>B</sub> = $pB.<p>Then X<sub>A</sub> ~ Bi($Flashes,$pA) and X<sub>B</sub> ~ Bi($Flashes,$pB)<p>Finally, let F be the event "flash fails exactly $Fails times". Then you want :</p><math xmlns='http://www.w3.org/1998/Math/MathML'><mrow><mrow><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='italic' fontfamily='Times New Roman'>P</mi><mo mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman' form='infix' fence='false' separator='false' lspace='0em' rspace='0em' stretchy='false' symmetric='false' maxsize='infinity' minsize='1' largeop='false' movablelimits='false' accent='false'>&ApplyFunction;</mo><mfenced><mrow><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='italic' fontfamily='Times New Roman'>B</mi><mo mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman' form='infix' fence='false' separator='false' lspace='verythinmathspace' rspace='verythinmathspace' stretchy='true' symmetric='false' maxsize='infinity' minsize='1' largeop='false' movablelimits='false' accent='false'>&verbar;</mo><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='italic' fontfamily='Times New Roman'>F</mi></mrow></mfenced></mrow><mo mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman' form='infix' fence='false' separator='false' lspace='thickmathspace' rspace='thickmathspace' stretchy='false' symmetric='false' maxsize='infinity' minsize='1' largeop='false' movablelimits='false' accent='false'>&equals;</mo><mrow><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='italic' fontfamily='Times New Roman'>P</mi><mo mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman' form='infix' fence='false' separator='false' lspace='0em' rspace='0em' stretchy='false' symmetric='false' maxsize='infinity' minsize='1' largeop='false' movablelimits='false' accent='false'>&ApplyFunction;</mo><mfenced><mrow><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='italic' fontfamily='Times New Roman'>F</mi><mo mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman' form='infix' fence='false' separator='false' lspace='verythinmathspace' rspace='verythinmathspace' stretchy='true' symmetric='false' maxsize='infinity' minsize='1' largeop='false' movablelimits='false' accent='false'>&verbar;</mo><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='italic' fontfamily='Times New Roman'>B</mi></mrow></mfenced></mrow><mfrac linethickness='1' denomalign='center' numalign='center' bevelled='false'><mrow><mrow><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='italic' fontfamily='Times New Roman'>P</mi><mo mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman' form='infix' fence='false' separator='false' lspace='0em' rspace='0em' stretchy='false' symmetric='false' maxsize='infinity' minsize='1' largeop='false' movablelimits='false' accent='false'>&ApplyFunction;</mo><mfenced><mrow><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='italic' fontfamily='Times New Roman'>B</mi></mrow></mfenced></mrow></mrow><mrow><mrow><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='italic' fontfamily='Times New Roman'>P</mi><mo mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman' form='infix' fence='false' separator='false' lspace='0em' rspace='0em' stretchy='false' symmetric='false' maxsize='infinity' minsize='1' largeop='false' movablelimits='false' accent='false'>&ApplyFunction;</mo><mfenced><mrow><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='italic' fontfamily='Times New Roman'>F</mi></mrow></mfenced></mrow></mrow></mfrac></mrow></math><br>So first we find P(F) (we'll find P(F|B) as part of this):<br>P(F) = P(F|A)P(A) + P(F|B)P(B)    <i>(this is an example of the Partition rule)</i><br>= P(X<sub>A</sub> = $Fails)(0.5) + P(X<sub>B</sub> = $Fails)(0.5)  <i>(the 0.5 is because the camera is chosen at random)<br><math xmlns='http://www.w3.org/1998/Math/MathML'><mrow><mo mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman' form='infix' fence='false' separator='false' lspace='thickmathspace' rspace='thickmathspace' stretchy='false' symmetric='false' maxsize='infinity' minsize='1' largeop='false' movablelimits='false' accent='false'>&equals;</mo><mrow><mfenced><mrow><mrow><munder accentunder='false'><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$Flashes</mi><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$Fails</mi></munder></mrow></mrow></mfenced><msup superscriptshift='0'><mfenced><mrow><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$pA</mi></mrow></mfenced><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$Fails</mi></msup><msup superscriptshift='0'><mfenced><mrow><mn mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>1</mn><mo mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman' form='infix' fence='false' separator='false' lspace='mediummathspace' rspace='mediummathspace' stretchy='false' symmetric='false' maxsize='infinity' minsize='1' largeop='false' movablelimits='false' accent='false'>&#8722;</mo><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$pA</mi></mrow></mfenced><mrow><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$Successes</mi></mrow></msup><mfenced><mrow><mn mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>0&period;5</mn></mrow></mfenced><mo mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman' form='infix' fence='false' separator='false' lspace='mediummathspace' rspace='mediummathspace' stretchy='false' symmetric='false' maxsize='infinity' minsize='1' largeop='false' movablelimits='false' accent='false'>&plus;</mo><mfenced><mrow><mrow><munder accentunder='false'><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$Flashes</mi><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$Fails</mi></munder></mrow></mrow></mfenced><msup superscriptshift='0'><mfenced><mrow><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$pB</mi></mrow></mfenced><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$Fails</mi></msup><msup superscriptshift='0'><mfenced><mrow><mn mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>1</mn><mo mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman' form='' fence='false' separator='false' lspace='0em' rspace='0em' stretchy='false' symmetric='false' maxsize='infinity' minsize='1' largeop='false' movablelimits='false' accent='false'>&#8722;</mo><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$pB</mi></mrow></mfenced><mrow><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$Successes</mi></mrow></msup><mfenced><mrow><mn mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>0&period;5</mn></mrow></mfenced></mrow></mrow></math><br>So:<br><math xmlns='http://www.w3.org/1998/Math/MathML'><mrow><mrow><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='italic' fontfamily='Times New Roman'>P</mi><mo mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman' form='infix' fence='false' separator='false' lspace='0em' rspace='0em' stretchy='false' symmetric='false' maxsize='infinity' minsize='1' largeop='false' movablelimits='false' accent='false'>&ApplyFunction;</mo><mfenced><mrow><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='italic' fontfamily='Times New Roman'>B</mi><mo mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman' form='infix' fence='false' separator='false' lspace='verythinmathspace' rspace='verythinmathspace' stretchy='true' symmetric='false' maxsize='infinity' minsize='1' largeop='false' movablelimits='false' accent='false'>&verbar;</mo><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='italic' fontfamily='Times New Roman'>F</mi></mrow></mfenced></mrow><mo mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman' form='infix' fence='false' separator='false' lspace='thickmathspace' rspace='thickmathspace' stretchy='false' symmetric='false' maxsize='infinity' minsize='1' largeop='false' movablelimits='false' accent='false'>&equals;</mo><mfrac linethickness='1' denomalign='center' numalign='center' bevelled='false'><mrow><mfenced><mrow><mrow><munder accentunder='false'><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$Flashes</mi><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$Fails</mi></munder></mrow></mrow></mfenced><msup superscriptshift='0'><mfenced><mrow><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$pB</mi></mrow></mfenced><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$Fails</mi></msup><msup superscriptshift='0'><mfenced><mrow><mn mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>1</mn><mo mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman' form='infix' fence='false' separator='false' lspace='mediummathspace' rspace='mediummathspace' stretchy='false' symmetric='false' maxsize='infinity' minsize='1' largeop='false' movablelimits='false' accent='false'>&#8722;</mo><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='italic' fontfamily='Times New Roman'>$pB</mi></mrow></mfenced><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$Successes</mi></msup><mfenced><mrow><mn mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>0&period;5</mn></mrow></mfenced></mrow><mrow><mfenced><mrow><mrow><munder accentunder='false'><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$Flashes</mi><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$Fails</mi></munder></mrow></mrow></mfenced><msup superscriptshift='0'><mfenced><mrow><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$pA</mi></mrow></mfenced><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$Fails</mi></msup><msup superscriptshift='0'><mfenced><mrow><mn mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>1</mn><mo mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman' form='infix' fence='false' separator='false' lspace='mediummathspace' rspace='mediummathspace' stretchy='false' symmetric='false' maxsize='infinity' minsize='1' largeop='false' movablelimits='false' accent='false'>&#8722;</mo><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$pA</mi></mrow></mfenced><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$Successes</mi></msup><mfenced><mrow><mn mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>0&period;5</mn></mrow></mfenced><mo mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman' form='infix' fence='false' separator='false' lspace='mediummathspace' rspace='mediummathspace' stretchy='false' symmetric='false' maxsize='infinity' minsize='1' largeop='false' movablelimits='false' accent='false'>&plus;</mo><mfenced><mrow><mrow><munder accentunder='false'><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$Flashes</mi><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$Fails</mi></munder></mrow></mrow></mfenced><msup superscriptshift='0'><mfenced><mrow><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$pB</mi></mrow></mfenced><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$Fails</mi></msup><msup superscriptshift='0'><mfenced><mrow><mn mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>1</mn><mo mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman' form='infix' fence='false' separator='false' lspace='0em' rspace='0em' stretchy='false' symmetric='false' maxsize='infinity' minsize='1' largeop='false' movablelimits='false' accent='false'>&#8722;</mo><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='italic' fontfamily='Times New Roman'>$pB</mi></mrow></mfenced><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$Successes</mi></msup><mfenced><mrow><mn mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>0&period;5</mn></mrow></mfenced></mrow></mfrac></mrow></math><math xmlns='http://www.w3.org/1998/Math/MathML'><mrow><mo mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman' form='infix' fence='false' separator='false' lspace='thickmathspace' rspace='thickmathspace' stretchy='false' symmetric='false' maxsize='infinity' minsize='1' largeop='false' movablelimits='false' accent='false'>&equals;</mo><mfrac linethickness='1' denomalign='center' numalign='center' bevelled='false'><mrow><msup superscriptshift='0'><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$pB</mi><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$Fails</mi></msup><msup superscriptshift='0'><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$OneMinuspB</mi><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$Successes</mi></msup></mrow><mrow><msup superscriptshift='0'><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$pA</mi><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$Fails</mi></msup><msup superscriptshift='0'><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$OneMinuspA</mi><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$Successes</mi></msup><mo mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman' form='infix' fence='false' separator='false' lspace='mediummathspace' rspace='mediummathspace' stretchy='false' symmetric='false' maxsize='infinity' minsize='1' largeop='false' movablelimits='false' accent='false'>&plus;</mo><msup superscriptshift='0'><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$pB</mi><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$Fails</mi></msup><msup superscriptshift='0'><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$OneMinuspB</mi><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$Successes</mi></msup></mrow></mfrac></mrow></math><br><math xmlns='http://www.w3.org/1998/Math/MathML'><mrow><mo mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman' form='infix' fence='false' separator='false' lspace='thickmathspace' rspace='thickmathspace' stretchy='false' symmetric='false' maxsize='infinity' minsize='1' largeop='false' movablelimits='false' accent='false'>&equals;</mo><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$pBUsed</mi><mo mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman' form='infix' fence='false' separator='false' lspace='0em' rspace='0em' stretchy='false' symmetric='false' maxsize='infinity' minsize='1' largeop='false' movablelimits='false' accent='false'>&period;</mo></mrow></math>@
qu.1.63.editing=useHTML@
qu.1.63.solution=@
qu.1.63.algorithm=$Q=1;
$Which=rint(5)+1;
$Align=switch(rint(2),"Left","Right");
$pA	=	decimal(2,range(0.05,0.25,.01));
$OneMinuspA = 1 - $pA;
$pAp	=	100*$pA;
$pB	=	decimal(2,range(0.05,0.25,.01));
$OneMinuspB = 1 - $pB;
$pBp	=	100*$pB;
$Flashes=	range(5,25,5);
$Holder	=	$Flashes/5;
$Fails	=	range(2,2+$Holder,1);
$Successes = $Flashes - $Fails;
$pA1	=	$pA^$Fails;
$pA2	=	(1-$pA)^($Flashes - $Fails);
$pB1	=	$pB^($Fails);
$pB2	=	(1-$pB)^(($Flashes) - ($Fails));
$pBUsed =	$pB1*$pB2/($pA1*$pA2 + $pB1*$pB2);@
qu.1.63.uid=54578e0f-80e6-44e9-ae8e-1b4b5f7818c6@

qu.1.64.mode=Multiple Choice@
qu.1.64.name=11. Fair cost of a ticket in a lottery drawing@
qu.1.64.comment=<div class="shadedDiv descriptionSpan" style="margin-top: 0px; margin-bottom: 2px">If $n tickets are sold, then for each ticket, the probabilities for winning each of the first five prizes are all 1/$n with a $nt / $n probability of being shut out. The expected winning, then, once a ticket has been bought, are the sum of the products of rewards with their corresponding probabilities. This gives E = ($25, 000)(1/ $n) + ($10, 000)(1/ $n) + ($5, 000)(3/ $n) + ($0)( $nt / $n) = $ANSWER, so $ANSWER seems a fair price for the lottery ticket.</div>@
qu.1.64.editing=useHTML@
qu.1.64.solution=@
qu.1.64.algorithm=$n=range(1000, 100000, 1000);
$nt=$n-5;
$ANSWER=decimal(2, 25000/$n+10000/$n+5000*3/$n);
$B=decimal(2, 25000/$n);
$C=decimal(2, 10000/$n);
$D=decimal(2, 5000*3/$n);@
qu.1.64.uid=1a0b0dbc-6367-42e3-b5a0-9b4b266c8ca6@
qu.1.64.question=<div title="Stat230/Chapter7/Expected Value/Q11">In a lottery drawing five prizes are awarded as follows: a first prize of $25,000, a second prize of $10,000, and three prizes of $5,000 each. What should be the fair cost of a ticket if&nbsp;$n tickets are sold?</div>@
qu.1.64.answer=1@
qu.1.64.choice.1=$ANSWER@
qu.1.64.choice.2=$B@
qu.1.64.choice.3=$C@
qu.1.64.choice.4=$D@
qu.1.64.choice.5=None of the above@
qu.1.64.fixed=4@

qu.1.65.mode=Multiple Choice@
qu.1.65.name=4A. Pop Sales@
qu.1.65.comment=<p>Notice that Y = $Price*X .Thus:</p>
<p>E(Y) = $Price*E(X) = $Price*$EX = $EY</p>
<p>Var(Y) = ($Price)<sup>2</sup>*Var(X) = $Price2*$VarX = $VarY</p>@
qu.1.65.editing=useHTML@
qu.1.65.solution=@
qu.1.65.algorithm=$Q="4A";
$Align=switch(rint(2),"Left","Right");
$Which=1+rint(4);
$Price=range(0.5,0.95,0.05);
$EX=range(70,175,5);
$EY=$Price*$EX;
$Price2=$Price^2;
$VarX=range(25,$EX-40,5);
$VarY=decimal(2,$Price2*$VarX);
$EY1=$EY-range(5,0.8*$EY,1);
$VarY1=$VarY+range(4.3,22.4,0.1);
$EY2=$EY;
$VarY2=$VarY-range(4,0.8*$VarY,0.1);
$EY3=$EY+range(5,0.8*$EY,1);
$VarY3=$VarY1;
$EY4=$EY3;
$VarY4=$VarY;@
qu.1.65.uid=743e463f-fec3-4a07-9a97-2d5216e0b238@
qu.1.65.question=<p><img align="$Align" alt="Pop Can" title="Pop Can [IMG:Can$Which.gif]" src="__BASE_URI__Chapter7/VarianceAndSD/Can$Which.gif" /></p>
<div title="STAT230/Chapter 7/Variance &amp; Standard Deviation/Q$Q">Cans of soft drinks cost \\$$Price in a certain vending machine. What is the expected value and variance of daily revenue (Y) from the machine, if X, the number of cans sold per day has E(X) = $EX, and Var(X) = $VarX?</div>@
qu.1.65.answer=1@
qu.1.65.choice.1=E(Y) = $EY Var(Y) = $VarY@
qu.1.65.choice.2=E(Y) = $EY1 Var(Y) = $VarY1@
qu.1.65.choice.3=E(Y) = $EY2 Var(Y) = $VarY2@
qu.1.65.choice.4=E(Y) = $EY3 Var(Y) = $VarY3@
qu.1.65.choice.5=E(Y) = $EY4 Var(Y) = $VarY4@
qu.1.65.fixed=@

qu.1.66.mode=Multiple Choice@
qu.1.66.name=16. A rock concert producer's estimated profit@
qu.1.66.comment=<div class="shadedDiv descriptionSpan" style="margin-top: 0px; margin-bottom: 2px">Notice that P(cold day) = 1 - (P(warm) + P(cool)) = 1 - ($p1 + $p2) = $p3<br />
<br />
Expected Profit = $x1*$p1 + .$x2*$p2&nbsp;+ (-$x2)*$p3 = $ANSWER</div>@
qu.1.66.editing=useHTML@
qu.1.66.solution=@
qu.1.66.algorithm=$x1= range(15000, 25000, 1000);
$x2=range(3000, 6000, 1000);
$x3=range(5000, 12000, 1000);
$p1=decimal(2,range(0.5,0.8,0.5));
$p2=decimal(2,range(0.1,0.3,0.05));
$p3=1-$p1-$p2;
condition:gt($p3,0);
$ANSWER=$x1*$p1+$x2*$p2-$x3*$p3;
$B=$x1*$p1-$x3*$p3;
$C=$x2*$p2+$x3*$p3;
$D=$x1*$p1+$x2*$p2+$x3*$p3;@
qu.1.66.uid=04084956-3766-42a3-9059-d94ea994701b@
qu.1.66.question=<div title="Stat230/Chapter7/Expected Value/Q16"><img title="It's cold! [IMG:shiver.gif]" alt="Man shivering." hspace="4" align="right" border="0" src="https://uwangel.uwaterloo.ca/AngelUploadsuwangel/Content/UW-MCL-C-070730-100751/_assoc/54BE16B546454ADCBB212EFA0CCD5796/shiver.gif?1469" />A rock concert producer has scheduled an outdoor concert. If it is warm that day, she expects to make a $x1 profit. If it is cool that day, she expects to make a $x2 &nbsp;profit. If it is very cold that day, she expects to suffer a $x3 loss. Based upon historical records, the weather office has estimated the chances of a warm day to be $p1; the chances of a cool day to be $p2. What is the producer's expected profit?</div>@
qu.1.66.answer=1@
qu.1.66.choice.1=$ANSWER@
qu.1.66.choice.2=$B@
qu.1.66.choice.3=$C@
qu.1.66.choice.4=$D@
qu.1.66.fixed=4@

qu.1.67.question=<div title="Stat230/Chapter 5/Binomial Distributions/Q$Q">Two identical cameras, call them A and B, have their flashes fail $pAp% and $pBp% of the time respectively. A photographer selects a camera at random and uses it to take 10 shots with the flash. What is the probability that the flash failed exactly twice?&nbsp; (Please answer to 4 decimals of accuracy.)</div>@
qu.1.67.answer.num=$ANSWER@
qu.1.67.answer.units=@
qu.1.67.showUnits=false@
qu.1.67.grading=toler_perc@
qu.1.67.perc=5.0@
qu.1.67.negStyle=minus@
qu.1.67.numStyle=thousands scientific dollars arithmetic@
qu.1.67.mode=Numeric@
qu.1.67.name=10A. Cameras fail rate, probability that the flash failed exactly twice@
qu.1.67.comment=<p title="C6_BINOMIAL_DISTRIBUTIONS_II_2">Let X<sub>A </sub>&nbsp;(X<sub>B</sub>)&nbsp; be the number of times Camera A's (B's) flash fails in 10 shots.</p>
<p>Let <em>p<sub>A</sub></em> (<em>p<sub>B</sub>) </em>be the probability that Camera A's (B's) flash fails.</p>
<p>Then X<sub>A</sub> ~ Bi(10,<em>p<sub>A</sub></em>) and X<sub>B</sub> ~ Bi(10,<em>p<sub>B</sub></em>)</p>
<p>Finally,&nbsp; let F be the event "flash fails exactly twice". Then:</p>
<p>P(F) = P(F|A)P(A) + P(F|B)P(B)&nbsp;&nbsp;&nbsp; (<em>this is an example of the Partition rule)</em><br />
= P(X<sub>A</sub> = 2)(0.5) + P(X<sub>B</sub> = 2)(0.5)<br />
&nbsp;=&nbsp; <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfenced open='(' close=')' separators=','><mrow><munder><mrow><mn>10</mn></mrow><mrow><mn>2</mn></mrow></munder></mrow></mfenced></mrow></mstyle></math>(<em>p<sub>A</sub></em>)<sup>2</sup>(1 - <em>p<sub>A</sub></em>)<sup>8</sup>(0.5) + <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfenced open='(' close=')' separators=','><mrow><munder><mrow><mn>10</mn></mrow><mrow><mn>2</mn></mrow></munder></mrow></mfenced></mrow></mstyle></math>(<em>p<sub>B</sub></em>)<sup>2</sup>(1 - <em>p<sub>B</sub></em>)<sup>8</sup>(0.5)<br />
=0.5 <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfenced open='(' close=')' separators=','><mrow><munder><mrow><mn>10</mn></mrow><mrow><mn>2</mn></mrow></munder></mrow></mfenced></mrow></mstyle></math>((<em>p<sub>A</sub></em>)<sup>2</sup>(1 - <em>p<sub>A</sub></em>)<sup>8</sup> + (<em>p<sub>B</sub></em>)<sup>2</sup>(1 - <em>p<sub>B</sub></em>)<sup>8</sup>) =$ans which rounds to $ANSWER</p>@
qu.1.67.editing=useHTML@
qu.1.67.solution=@
qu.1.67.algorithm=$Q="10A";
$pA=decimal(2,range(0.05,0.35,0.01));
$pB=decimal(2,range(0.05,0.25,0.01));
$pAp=$pA*100;
$pBp=$pB*100;
$npA=1-$pA;
$npB=1-$pB;
$c=maple("with(combinat);
numbcomb(10, 2)");
$ans=0.5*$c*($pA^2*$npA^8+$pB^2*$npB^8);
$ANSWER=decimal(4,$ans);@
qu.1.67.uid=3592cb38-0ec1-4116-be8e-fd773a03c9bd@

qu.1.68.mode=Restricted Formula@
qu.1.68.name=2. Evaluate  E[(X+1)<sup>2</sup>]@
qu.1.68.comment=First derive an expression for E[(X+1)<sup>2</sup>] . Recall that for X ~ B(n,p) we have E(X) = np and var(x) = np(1-p)<br><br>E[(X+1)<sup>2</sup>] <br>= E[X<sup>2</sup>+2X+1] <br>= E(X<sup>2</sup>)+2E(X)+1&nbsp;&nbsp; <span style="font-style: italic;">Now recall that var(X) = </span>E(X<sup>2</sup>) - (E(X))<sup>2</sup> <span style="font-style: italic;">so</span> <br>= var(X)+(E(X))<sup>2</sup> + 2E(X)+1 <br>= var(X) + (1+E(X))<sup>2</sup> <br>= np(1-p) + (1+np)<sup>2</sup> <br><br>Now substitute in n = $n and p = $p.<br>@
qu.1.68.editing=useHTML@
qu.1.68.solution=@
qu.1.68.algorithm=$n=range(4,20,2);
$p=decimal(2,range(.05,.90,.05));
$Ans=$n*$p*(1-$p) + (1+$n*$p)^2;@
qu.1.68.uid=493574d8-641d-4f1d-8981-70705cf5e8b8@
qu.1.68.info=  Difficulty=2;
  Keyword=binomial;
  Keyword=expected value;
  Suggested Value=2;
  QuestionIndex=C72102;
  TopicIndex=C721;
  Section=7.2;
  Section=7.3;
@
qu.1.68.question=<div title="STAT230/Chapter 7/C721 Expected Value/Q2">Suppose X ~ B($n,$p) is a Binomial Random Variable. Evaluate E[(X+1)<sup>2</sup>].</div>@
qu.1.68.answer=$Ans@

qu.1.69.question=<div title="Stat230/Chapter 5/Binomial Distributions/Q$Q">One third of the persons donating blood at a clinic have O<sup>+</sup> type blood. If&nbsp;$n people all donate at the same time, what is the probability that at least two have O<sup>+</sup> type blood? (4 decimals)</div>@
qu.1.69.maple=evalb(abs(($ANSWER)-($RESPONSE))<0.0005);@
qu.1.69.allow2d=1@
qu.1.69.maple_answer=$ANSWER@
qu.1.69.type=formula@
qu.1.69.mode=Maple@
qu.1.69.name=2. P(2/n donors in a group)@
qu.1.69.comment=<p title="C6_BINOMIAL_DISTRIBUTIONS_I_1">Let<em> d</em> be the number of donors.<em> </em>Define "success" here as a donor having O<sup>+</sup> type blood. Define a r.v. X to be the number of successes amongst <em>d</em> donors. <br />
Then X ~ Bi(<span style="font-style: italic">d,1/3</span>), that is X is Binomial with <span style="font-style: italic"><span style="font-style: italic">n = d=$n </span></span>and <span style="font-style: italic">p = 1/3</span>.<br />
&nbsp;</p>
<p title="C6_BINOMIAL_DISTRIBUTIONS_I_1">P(X &ge; 2) = 1 - P(X &le; 1)<br />
= 1 - P(X = 0) - P(X = 1) =$ANSWER</p>@
qu.1.69.editing=useHTML@
qu.1.69.solution=@
qu.1.69.algorithm=$Q=2;
$n=range(6,16,1);
$x0=maple("evalf((2/3)^$n)");
$x1=maple("evalf($n*(1/3)*(2/3)^($n-1))");
$ANS=maple("1-$x0-$x1");
$ANSWER=decimal(4,$ANS);
condition:lt($ANSWER,1);@
qu.1.69.uid=17e08ec9-fc93-4bce-82eb-779fe120f9e0@

qu.1.70.question=<div title="STAT230/Chapter 7/C721 Expected value/Q6">On a charter flight, the mean weight of all the children aboard the plane is $CW kg, and their total weight is $CTW kg. The mean weight of all men is $MW kg., and their total weight is $MTW kg. The $W women on the flight have a total weight of $WTW kg. What is the mean weight of all the people on this flight? Round your answer to the nearest kilogram.</div>@
qu.1.70.answer.num=$Ans@
qu.1.70.answer.units=@
qu.1.70.showUnits=false@
qu.1.70.grading=toler_abs@
qu.1.70.err=1@
qu.1.70.negStyle=minus@
qu.1.70.numStyle=thousands scientific dollars arithmetic@
qu.1.70.mode=Numeric@
qu.1.70.name=6. Mean weight of a group@
qu.1.70.comment=<p>First, how much do all the people weigh? Children + Men + Women = $CTW + $MTW + $WTW = $TW kg.</p>
<p>How many people on the plane? Let c = number of children, m = # men.</p>
<p>The mean of any group is <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mrow><mi>total</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>weight</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>of</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>group</mi></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&num;</mo><mi> in group</mi></mrow></mfrac></mrow></mstyle></math> so # in group is <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mrow><mi>total</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>weight</mi></mrow><mrow><mi>mean</mi></mrow></mfrac></mrow></mstyle></math><br />
<br />
Thus <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>c</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mi>$CTW</mi><mrow><mi>$CW</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>$C</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>m</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mi>$MTW</mi><mrow><mi>$MW</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>$M</mi></mrow></mstyle></math>and we are told there are $W women. So total number of passengers is $T and their mean weight is <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mi>$TW</mi><mrow><mi>$T</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>$Ans</mi></mrow></mstyle></math> kg.</p>@
qu.1.70.editing=useHTML@
qu.1.70.solution=@
qu.1.70.algorithm=$M=8+rint(12);
$C=8+rint(12);
$W=8+rint(12);
$T=$C+$W+$M;
$MW=85+rint(15);
$CW=18+rint(12);
$WW=55+rint(15);
$MTW=$M*$MW;
$CTW=$C*$CW;
$WTW=$W*$WW;
$TW=$MTW+$CTW+$WTW;
$Ans=decimal(0,$TW/$T);@
qu.1.70.uid=b922d1dd-3fa9-4a55-abab-0e0667d332da@
qu.1.70.info=  Difficulty=2;
  Keyword=expected value;
  Suggested Value=2;
  QuestionIndex=C72106;
  TopicIndex=C721;
  Section=7.2;
  Section=7.3;
@

qu.1.71.mode=Multiple Choice@
qu.1.71.name=11A. Number of accidents at a certain intersection every day@
qu.1.71.comment=<p>Let t be 1 day and so &lambda; = $lambda. Then&nbsp;&mu; = 1($lambda) and our probability distribution is <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>f</mi><mfenced open='(' close=')' separators=','><mrow><mi>x</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><msup><mi mathvariant='normal'>&lambda;</mi><mrow><mi>x</mi></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><mi>&lambda;</mi></mrow></mrow></msup></mrow><mrow><mi>x</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac></mrow></mstyle></math>.&nbsp; Then we want f(2) =&nbsp;$ANSWER to 2 decimals.</p>@
qu.1.71.editing=useHTML@
qu.1.71.solution=@
qu.1.71.algorithm=$Q="11A";
$lambda=decimal(1,range(0.5,4,0.1));
$n=2;
$ans=maple("stats[statevalf, pf, poisson[$lambda]](2)");
$ANSWER=decimal(2,$ans);
condition:lt($ANSWER,0.97);
$b=decimal(2,$ANSWER*0.4);
$c=decimal(2,$ANSWER*0.2);
$d=decimal(2,$ANSWER*0.7);@
qu.1.71.uid=cfc85ce4-3c46-4e21-a080-f6d1c821338f@
qu.1.71.question=<div title="Stat230/Chapter6/Poisson/Q$Q1">Using the Poisson distribution function, if&nbsp;$lambda accidents can be expected at a certain intersection every day, what is approximately the probability that there will be two accidents at that intersection on any given day?</div>@
qu.1.71.answer=1@
qu.1.71.choice.1=$ANSWER@
qu.1.71.choice.2=$b@
qu.1.71.choice.3=$c@
qu.1.71.choice.4=$d@
qu.1.71.choice.5=None of the above@
qu.1.71.fixed=4@

qu.1.72.question=<p><img hspace="4" vspace="4" align="$Align" alt="Baseball picture" title="Baseball picture [IMG:Baseball$PicNum.gif]" src="__BASE_URI__Chapter5/BD/Baseball$PicNum.gif" /></p>
<div title="Stat230/Chapter6/Binomial Distribution/Q$Q">A baseball player has a $pp% chance of hitting the ball each time at bat, with succesive times at bat being independent. Calculate the probability that he gets&nbsp;exactly 2 hits in&nbsp;$n times at bat. Answer to 3 decimals please.</div>@
qu.1.72.maple=evalb(abs(($ANSWER)-($RESPONSE))<0.005);@
qu.1.72.allow2d=0@
qu.1.72.maple_answer=$ANSWER@
qu.1.72.type=maple@
qu.1.72.mode=Maple@
qu.1.72.name=8A. Probability of hitting the ball exactly 2 times in n times at bat@
qu.1.72.comment=<div class="shadedDiv descriptionSpan" style="margin-top: 0px; margin-bottom: 2px">This is an example of a <span style="font-weight: bold">Binomial</span> distribution with p = $p, n = $n.&nbsp; We want P(X&nbsp;= 2) = P(X&nbsp;= 2) =&nbsp; <sub>$n</sub>C<sub>2</sub>($p)<sup>2</sup>(1-$p)<sup>$n-2</sup> = $A which rounds to&nbsp;$ANSWER .</div>@
qu.1.72.editing=useHTML@
qu.1.72.solution=@
qu.1.72.algorithm=$Q="8A";
$Align=switch(rint(2),"Left","Right");
$PicNum=1+rint(4);
$p=decimal(1,range(0.2,0.7,0.1));
$pp=$p*100;
$n=range(5,12,1);
$A=maple("with(Statistics);
X := RandomVariable(Binomial($n, $p));
ProbabilityFunction(X, u);
ProbabilityFunction(X, 2)");
$ANSWER=decimal(3,$A);
condition:lt($A,0.999);
condition:gt($A,0);@
qu.1.72.uid=af653b5b-f0ec-4a46-ab4b-ce5d95776a05@

qu.1.73.question=<div title="Stat230/Chapter 5/Poisson/Q$Q">At a particular location on a river the number of fish caught per man hour of fishing has a Poisson distribution with &lambda;= $lambda. If a man fishes there for one hour, what is the probability he will catch at least one fish? (Please answer to 3 decimals of accuracy.)</div>@
qu.1.73.maple=evalb(abs(($ANSWER)-($RESPONSE))<0.005);@
qu.1.73.allow2d=0@
qu.1.73.maple_answer=$ANSWER@
qu.1.73.type=maple@
qu.1.73.mode=Maple@
qu.1.73.name=12A. probability a man will catch at least one fish@
qu.1.73.comment=<div style="margin-top: 0px; margin-bottom: 2px;" class="shadedDiv descriptionSpan">P(catching at least one) = 1 - P(catching none) = 1 - e<sup>-$lambda</sup> =$ANSWER.</div>@
qu.1.73.editing=useHTML@
qu.1.73.solution=@
qu.1.73.algorithm=$Q="12A";
$lambda=decimal(1,range(0.8,3,0.1));
$ans=maple("1-stats[statevalf, pf, poisson[$lambda]](0)");
$ANSWER=decimal(3, $ans);
condition:lt($ANSWER,0.97);@
qu.1.73.uid=fd22faaf-7ee5-4326-a6d8-71a53f26f124@

qu.1.74.mode=Multiple Choice@
qu.1.74.name=7A. Expected value of random variable@
qu.1.74.comment=<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>E</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><munderover><mo lspace='0.0em' rspace='0.1666667em' stretchy='true' largeop='true' movablelimits='true'>&Sum;</mo><mrow><mi>x</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>0</mn></mrow><mrow><mn>5</mn></mrow></munderover><mi>x</mi><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>x</mi></mrow></mfenced></mrow></mstyle></math> = $x0($p0)&nbsp; + $x1($p1) + $x2($p2)&nbsp; + $x3($p3)&nbsp; + $x4($p4) + $x5($p5)&nbsp; = $ANSWER</p>@
qu.1.74.editing=useHTML@
qu.1.74.solution=@
qu.1.74.algorithm=$Q="7A";
$x0=0;
$x1=1;
$x2=2;
$x3=3;
$x4=4;
$x5=5;
$p0=decimal(2,range(0,0.2,0.01));
$p1=decimal(2,range(0,0.2,0.01));
$p2=decimal(2,range(0,0.2,0.01));
$p3=decimal(2,range(0,0.2,0.01));
$p4=decimal(2,range(0,0.2,0.01));
$p5=1-$p0-$p1-$p2-$p3-$p4;
$ans=$x0($p0)  + $x1($p1) + $x2($p2)  + $x3($p3)  + $x4($p4) + $x5($p5);
$ANSWER=decimal(2, $ans);
$B=$x0($p0)  + $x1($p1) + $x2($p2)  + $x3($p3);
$C=$x4($p4) + $x5($p5);
$D=$ans+1;@
qu.1.74.uid=8c240d63-74c2-4ea7-b117-5e96dd6e2bb0@
qu.1.74.question=<div title="Stat230/Chapter7/Expected Value/Q$Q">Consider the following probability distribution for a random variable X:<br />
<br />
<table cellspacing="3" cellpadding="2" border="1">
    <tbody>
        <tr>
            <td><strong>x</strong></td>
            <td>0</td>
            <td>1</td>
            <td>2</td>
            <td>3</td>
            <td>4</td>
            <td>5</td>
        </tr>
        <tr>
            <td><strong>P(X=x)</strong></td>
            <td align="right">$p0&nbsp;&nbsp;&nbsp;</td>
            <td align="right">$p1&nbsp;&nbsp;</td>
            <td align="right">$p2&nbsp;&nbsp;</td>
            <td align="right">$p3&nbsp;&nbsp;</td>
            <td align="right">$p4&nbsp;&nbsp;</td>
            <td align="right">$p5&nbsp;&nbsp;</td>
        </tr>
    </tbody>
</table>
<br />
Find E(X).</div>@
qu.1.74.answer=1@
qu.1.74.choice.1=$ANSWER@
qu.1.74.choice.2=$B@
qu.1.74.choice.3=$C@
qu.1.74.choice.4=$D@
qu.1.74.choice.5=None of the above@
qu.1.74.fixed=4@

qu.1.75.mode=Multiple Choice@
qu.1.75.name=14. Number of puzzles subjects able to solve while listening to soothing music@
qu.1.75.comment=<p>Just sum up all products of the form xP(X=x): E(X) =&nbsp;$x1*$p1 + $x2*$p2&nbsp; +&nbsp;$x3*$p3 +&nbsp;$x4*$p4 &nbsp;= $ANSWER</p>@
qu.1.75.editing=useHTML@
qu.1.75.solution=@
qu.1.75.algorithm=$p1=decimal(2,range(0.1,0.3,0.05));
$p2=decimal(2,range(0.1,0.2,0.05));
$p3=decimal(2,range(0.3,0.5,0.05));
$p4=1-$p1-$p2-$p3;
$x1=1;
$x2=2;
$x3=3;
$x4=4;
$ANSWER=$x1*$p1+$x2*$p2+$x3*$p3+$x4*$p4;
$B=$x1*$p1+$x2*$p2;
$C=$x2*$p2+$x3*$p3;
$D=$x3*$p3+$x4*$p4;@
qu.1.75.uid=f5fea6d8-e72e-492c-a031-3a1bc6f6e2da@
qu.1.75.question=<p>&nbsp;</p>
<div title="Stat230/Chapter7/Expected Value/Q14">The psychologist studied the number of puzzles subjects were able to solve in a 5 minute period while listening to soothing music. Let X be the number of puzzles completed successfully by a subject. The psychologist found that X had the following probability distribution.</div>
<p>&nbsp;</p>
<table cellspacing="2" cellpadding="2" border="1">
    <tbody>
        <tr>
            <td>x</td>
            <td>1</td>
            <td>2</td>
            <td>3</td>
            <td>4</td>
        </tr>
        <tr>
            <td>P(X=x)</td>
            <td>$p1&nbsp;</td>
            <td>$p2&nbsp;</td>
            <td>$p3&nbsp;</td>
            <td>$p4&nbsp;</td>
        </tr>
    </tbody>
</table>
<div>Using the above data, the mean &micro; of X is what?</div>@
qu.1.75.answer=1@
qu.1.75.choice.1=$ANSWER@
qu.1.75.choice.2=$B@
qu.1.75.choice.3=$C@
qu.1.75.choice.4=$D@
qu.1.75.choice.5=None of the above@
qu.1.75.fixed=4@

qu.1.76.question=<div title="Stat230/Chapter 5/Binomial Distributions/Q$Q">Three students play a game&nbsp;$n times. The probability of winning a single game for Jimmy is $jp%, for Robert $rp%, and for Tommy $tp%. Assuming the outcomes of the&nbsp;$n games are independent of each, find the probability that Tommy wins exactly two games. (Please answer to 3 decimals of accuracy.)</div>@
qu.1.76.maple=evalb(abs(($ANSWER)-($RESPONSE))<0.005);@
qu.1.76.allow2d=0@
qu.1.76.maple_answer=$ANSWER@
qu.1.76.type=maple@
qu.1.76.mode=Maple@
qu.1.76.name=14. Three students play a game n times; probability that Tommy wins exactly two games@
qu.1.76.comment=<div style="margin-top: 0px; margin-bottom: 2px;" class="shadedDiv descriptionSpan">On a single game Tom wins with probability 0.65 and loses with probability 0.35.<br />
<br />
If we ignore the order of wins/losses then, the probability of winning exactly 2 games is ($t)<sup>2</sup>($tn)<sup>$nk</sup>.<br />
<br />
But order does count of course. How many ways can we arrange the&nbsp;$n games so 2 are wins for Tom?&nbsp;<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfenced open='(' close=')' separators=','><mrow><munder><mrow><mi>$n</mi></mrow><mrow><mn>2</mn></mrow></munder></mrow></mfenced></mrow></mstyle></math> !!!<br />
Thus P(Tom wins exactly 2) = <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfenced open='(' close=')' separators=','><mrow><munder><mrow><mi>$n</mi></mrow><mrow><mn>2</mn></mrow></munder></mrow></mfenced></mrow></mstyle></math>($t)<sup>2</sup>($tn)<sup>$nk</sup> = $ans which rounds up to $ANSWER.</div>@
qu.1.76.editing=useHTML@
qu.1.76.solution=@
qu.1.76.algorithm=$Q="14A";
$j=decimal(2,range(0.05,0.4,0.01));
$r=decimal(2,range(0.05,0.5,0.01));
$t=1-$j-$r;
$jp=$j*100;
$rp=$r*100;
$tp=$t*100;
condition:gt($r,$j);
condition:gt($t,$r);
$n=range(5,8,1);
$nk=$n-2;
$jn=(1-$j);
$rn=1-$r;
$tn=1-$t;
$c=maple("with(combinat);
numbcomb($n, 2)");
$ans=$c*$t^2*$tn^$nk;
$ANSWER=decimal(3,$ans);@
qu.1.76.uid=10460846-9679-4c29-8873-41931b3b2e77@

qu.1.77.mode=Inline@
qu.1.77.name=24.  P(at most k calls)@
qu.1.77.comment=<p>P(at most <em>k</em> calls in a shift)</p>
<p>= P(0 calls) + P(1 call) + ... + P(<em>k</em> calls)</p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><msup><mi>$Lambda</mi><mrow><mn>0</mn></mrow></msup><mrow><mn>0</mn><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>$Lambda</mi></mrow></msup><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mfrac><msup><mi>$Lambda</mi><mrow><mn>1</mn></mrow></msup><mrow><mn>1</mn><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>$Lambda</mi></mrow></msup><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mo lspace='0.2222222em' rspace='0.0em'>..</mo><mo lspace='0.0em' rspace='0.0em'>&period;</mo><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mfrac><msup><mi>$Lambda</mi><mrow><mi>k</mi></mrow></msup><mrow><mi>k</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>$Lambda</mi></mrow></msup></mrow></mstyle></math></p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><munderover><mo lspace='0.0em' rspace='0.1666667em' stretchy='true' largeop='true' movablelimits='true'>&Sum;</mo><mrow><mi mathcolor='#800080'>i</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>0</mn></mrow><mrow><mi>k</mi></mrow></munderover><mfrac><mrow><msup><mi>$Lambda</mi><mrow><mi>i</mi></mrow></msup></mrow><mrow><mi>i</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>$Lambda</mi></mrow></msup></mrow></mstyle></math></p>@
qu.1.77.editing=useHTML@
qu.1.77.solution=@
qu.1.77.algorithm=$Lambda=range(2,6,1);@
qu.1.77.uid=59bb29ea-c816-4a3f-8002-9a697fcee3b7@
qu.1.77.info=  Difficulty=3;
  Keyword=poisson;
  Keyword=test;
  TestIs=S04 Quiz 3 Q1a;
  Suggested Value=3;
  QuestionIndex=C6A124;
  TopicIndex=C6A1;
  Section=6.7;
  Section=6.8;
@
qu.1.77.weighting=1@
qu.1.77.numbering=alpha@
qu.1.77.part.1.name=sro_id_1@
qu.1.77.part.1.editing=useHTML@
qu.1.77.part.1.choice.5=None of the above<br>@
qu.1.77.part.1.fixed=4@
qu.1.77.part.1.choice.4=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>$Lambda</mi></mrow></msup><mrow><mi>k</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac><msup><mi>k</mi><mrow><mi>$Lambda</mi></mrow></msup></mrow></mstyle></math><br>@
qu.1.77.part.1.question=null@
qu.1.77.part.1.choice.3=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mfrac><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>k</mi></mrow></msup><mrow><mi>k</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac><msup><mi>$Lambda</mi><mrow><mi>k</mi></mrow></msup></mrow></mstyle></math><br>@
qu.1.77.part.1.choice.2=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><munderover><mo lspace='0.0em' rspace='0.1666667em' stretchy='true' largeop='true' movablelimits='true'>&Sum;</mo><mrow><mi mathcolor='#800080'>i</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn></mrow><mrow><mi>$Lambda</mi></mrow></munderover><mfrac><mrow><msup><mi>k</mi><mrow><mi>i</mi></mrow></msup></mrow><mrow><mi>i</mi><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow></mfrac><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>k</mi></mrow></msup></mrow></mstyle></math><br>@
qu.1.77.part.1.choice.1=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><munderover><mo lspace='0.0em' rspace='0.1666667em' stretchy='true' largeop='true' movablelimits='true'>&Sum;</mo><mrow><mi mathcolor='#800080'>i</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>0</mn></mrow><mrow><mi>k</mi></mrow></munderover><mfrac><msup><mi>$Lambda</mi><mrow><mi>i</mi></mrow></msup><mrow><mi>i</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac><msup><mi>e</mi><mrow><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>$Lambda</mi></mrow></msup></mrow></mstyle></math>@
qu.1.77.part.1.mode=Multiple Choice@
qu.1.77.part.1.display=vertical@
qu.1.77.part.1.answer=1@
qu.1.77.question=<p><img src="__BASE_URI__Tools/TestGuy.gif" _fcksavedurl="__BASE_URI__Tools/TestGuy.gif" title="This question is drawn from a STAT 230 test or exam. [IMG:TestGuy.gif]" alt="This question is drawn from a STAT 230 test or exam." align="right" height="50" hspace="4" vspace="4" width="50"></p><p>&nbsp;</p><div title="STAT230/Chapter 6/Poisson Distribution/Q24 C6A124"><p>Calls arrive at a telephone crisis centre according to the conditions for a Poisson process, at an average rate of $Lambda per hour. Which of the following is an expression for the probability that  there are at most <i>k</i> calls in a one hour shift?</p><p>&nbsp;</p><p><span> </span><1><span> </span></p></div>@

qu.1.78.mode=Multiple Choice@
qu.1.78.name=18A. Dice - 1D6 - P(even)@
qu.1.78.comment=<p>There are 3 odd and 3 even faces on the die, so the probability of the throw being $Parity is <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mn>3</mn><mrow><mn>6</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>or</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfrac><mn>1</mn><mrow><mn>2</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&period;</mo></mrow></mstyle></math></p>@
qu.1.78.editing=useHTML@
qu.1.78.solution=@
qu.1.78.algorithm=$Q="18A";
$Parity=switch(rint(2),"Odd","Even");
$Alt1=switch(rint(2),1,2);
$Alt2=switch(rint(3),4,5,6);@
qu.1.78.uid=c8525533-921b-44a0-9ed4-c26b0c5f3ff8@
qu.1.78.info=  Question Index=C20118;
  Topic Index=C201;
  Suggested Value=1;
  Keyword=dice;
  Difficulty=2;
  Source=SMS;
@
qu.1.78.question=<div title="STAT230/Chapter 2/Balls, Cards &amp; Dice/Q$Q C20118"><img hspace="4" vspace="0" border="0" align="left" alt="A die" title="A Die. [IMG:legit51.gif]" src="__BASE_URI__Chapter2/BCD/legit51.gif" /><img hspace="4" vspace="0" border="0" align="right" alt="Another die." title="A Die. [IMG:legit50.gif]" src="__BASE_URI__Chapter2/BCD/legit51.gif" />In certain cases probabilities can be determined "empirically" from the physical situation. For example, if a fair die is rolled what is the probability that the result is an $Parity number?</div>@
qu.1.78.answer=3@
qu.1.78.choice.1=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mrow><mi>$Alt1</mi></mrow><mrow><mn>6</mn></mrow></mfrac></mrow></mstyle></math>@
qu.1.78.choice.2=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mrow><mi>$Alt2</mi></mrow><mrow><mn>6</mn></mrow></mfrac></mrow></mstyle></math>@
qu.1.78.choice.3=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mn>3</mn><mrow><mn>6</mn></mrow></mfrac></mrow></mstyle></math>@
qu.1.78.choice.4=Cannot be determined with the information given.@
qu.1.78.choice.5=None of the above.@
qu.1.78.fixed=3,4@

