qu.1.topic=Conditional Probability@

qu.1.1.mode=Multiple Choice@
qu.1.1.name=14. P(F student goes out)@
qu.1.1.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 mathvariant='normal'>P</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lpar;</mo><mi>Female</mi><mo lspace='0.1111111em' rspace='0.1111111em' stretchy='true'>&verbar;</mo><mi>Student</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>goes</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>out</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 mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>F</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo mathvariant='bold' fontweight='bold' lspace='0.0em' rspace='0.0em'>and</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>Goes</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>Out</mi></mrow></mfenced></mrow><mrow><mi mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>Goes</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>out</mi></mrow></mfenced></mrow></mfrac></mrow></mstyle></math></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><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mfenced open='(' close=')' separators=','><mrow><mfrac><mrow><mo lspace='0.0em' rspace='0.0em'>&num;</mo><mi>F</mi></mrow><mrow><mi>Total</mi><mo lspace='0.0em' rspace='0.0em'>&num;</mo></mrow></mfrac></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>F</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>goes</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>out</mi></mrow></mfenced></mrow><mrow><mfrac><mrow><mo lspace='0.0em' rspace='0.0em'>&num;</mo><mi>Out</mi></mrow><mrow><mi>Total</mi><mo lspace='0.0em' rspace='0.0em'>&num;</mo></mrow></mfrac></mrow></mfrac></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><mo lspace='0.1111111em' rspace='0.1111111em'>&num;</mo><mi>F&sdot;P(F out)</mi></mrow><mrow><mo lspace='0.1111111em' rspace='0.1111111em'>&num;</mo><mi>M&sdot;P(M out)+#F&sdot;P(F out)</mi></mrow></mfrac></mrow></mstyle></math></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><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mi mathvariant='normal'>$F</mi><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi mathvariant='normal'>$GF</mi></mrow><mrow><mi mathvariant='normal'>$M</mi><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi mathvariant='normal'>$GM</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi mathvariant='normal'>$F</mi><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi mathvariant='normal'>$GF</mi></mrow></mfrac></mrow></mstyle></math>= <font size="3" face="Times New Roman">$Ans</font></p>@
qu.1.1.editing=useHTML@
qu.1.1.solution=@
qu.1.1.algorithm=$Q=14;
$Venue=switch(rint(3),"pizza","dinner","a movie");
$M = range(5,15,1);
$F = range(5,15,1);
$S = $M+$F;
$PM = $M/$S;
$PF = $F/$S;
$GM = range(0.1,0.95,0.01);
$GF = range(0.1,0.95,0.01);
$GM100=100*$GM;
$GF100=100*$GF;
$Ans = decimal(4,($GF*$PF)/(($GF*$PF)+($GM*$PM)));
$Alt1=decimal(4,range(0.4,0.8,0.05)*$Ans);
$Alt2=decimal(4,$Ans+range(0.4,0.8,0.05)*(1-$Ans));
$Alt3=decimal(4,0.5*($Ans+switch(rint(2),$Alt1,$Alt2)));@
qu.1.1.uid=086ba36e-6984-449a-b608-2923a7f1de64@
qu.1.1.info=  Course=202;
  Course=230;
  Type=MC;
@
qu.1.1.question=<div title="UW Statistics Bank/Probability/Pr/Q$Q">Throughout the school year a group of $M male and $F female students go out for $Venue whenever possible. If <u>on average</u> $GM100 % of the male students go and $GF100 % of the female students go, find the probability that a random student who goes out for $Venue is female.</div>@
qu.1.1.answer=3@
qu.1.1.choice.1=$Alt1@
qu.1.1.choice.2=$Alt2@
qu.1.1.choice.3=$Ans@
qu.1.1.choice.4=$Alt3@
qu.1.1.fixed=@

qu.1.2.mode=Multiple Choice@
qu.1.2.name=03. Picking children.@
qu.1.2.comment=<p>First find the total number of students: <font size="3" face="Times New Roman">$C1 + $C2 + $C3 = $Total</font> . Then let <em><font size="3" face="Times New Roman">Gn</font></em> represent the event "student is in Grade <em><font size="3" face="Times New Roman">n </font></em>" .&nbsp; Then<font size="3" face="Times New Roman"> P(<em>Gn</em></font><font size="3" face="Times New Roman">)</font> = <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><mo lspace='0.1111111em' rspace='0.1111111em'>&num;</mo><mi mathvariant='normal'>students in Grade</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>n</mi></mrow><mrow><mi mathvariant='normal'>$Total</mi></mrow></mfrac></mrow></mstyle></math>.</p>
<p>We want: <font size="3" face="Times New Roman">P(<em>G2</em> | <em>G1</em> U <em>G2</em></font>)</p>
<p>apply the rule for conditional probability:</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><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfrac><mrow><mi mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>G2</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>G1</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&cup;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>G2</mi></mrow></mfenced></mrow></mfenced></mrow><mrow><mi mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>G1</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mrow><mo lspace='0.0em' rspace='0.0em'>&cup;</mo></mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>G2</mi></mrow></mfenced></mrow></mfrac></mrow></mstyle></math></p>
<p>Now&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>G2</mi><mfenced open='(' close=')' separators=','><mrow><mi>G1</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&cup;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>G2</mi></mrow></mfenced><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><mi>G2</mi></mrow></mstyle></math>so we need to calculate <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 mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>G2</mi></mrow></mfenced></mrow><mrow><mi mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>G1</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&cup;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>G2</mi></mrow></mfenced></mrow></mfrac></mrow></mstyle></math></p>
<p>Looking at our derivation of P(Gn) above we see the denomiantors all cancel out and all we need is :<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><mfrac><mrow><mo lspace='0.1111111em' rspace='0.1111111em'>&num;</mo><mi mathvariant='normal'>grade 2s</mi></mrow><mrow><mo lspace='0.1111111em' rspace='0.1111111em'>&num;</mo><mi mathvariant='normal'>grade 1s plus # grade 2s</mi></mrow></mfrac></mrow><mrow><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mi mathvariant='normal'>$C2</mi><mrow><mi mathvariant='normal'>$C1</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi mathvariant='normal'>$C2</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math></p>@
qu.1.2.editing=useHTML@
qu.1.2.solution=@
qu.1.2.algorithm=$Q=3;
$C1=range(20,50,5);
$C2=range(20,60,5);
$C3=range(15,45,5);
$Total=$C1+$C2+$C3;
$TotC1C2=$C1+$C2;
$Ans=decimal(3,$C2/($C2+$C1));
$Alt1=decimal(3,$Ans/2);
$Alt2=decimal(3,($Ans+$Alt1)/2);
$Alt3=$Ans+range(0.01,(1-$Ans),0.05);@
qu.1.2.uid=91d1b4a4-da49-4ecb-816e-fee68762f6eb@
qu.1.2.info=  Course=202;
  Type=MC;
  Difficulty=2;
@
qu.1.2.question=<div title="UW Statistics Bank/Probability/Conditional Probability/Q$Q">There are $C1 first grade children, $C2 second grade children, and $C3 third grade children in a school. What is the conditional probability of choosing a second grade child, given that either a first grade or a second grade child was chosen?</div>@
qu.1.2.answer=1@
qu.1.2.choice.1=$Ans@
qu.1.2.choice.2=$Alt1@
qu.1.2.choice.3=$Alt2@
qu.1.2.choice.4=$Alt3@
qu.1.2.fixed=@

qu.1.3.mode=Multiple Choice@
qu.1.3.name=09. How many coin tosses?@
qu.1.3.comment=<p>Each level of nodes represent one toss. Here we have two levels, so the coin was tossed twice.</p>@
qu.1.3.editing=useHTML@
qu.1.3.solution=@
qu.1.3.algorithm=$Q=9;@
qu.1.3.uid=7d75085e-0d45-40f3-be5e-3d648b26f8b5@
qu.1.3.info=  Algorithmic=no;
@
qu.1.3.question=<div title="UW Statistics Bank/Probability/Conditional Probability/Q$Q">How many times was the coin tossed in the figure below?&nbsp;
<p>&nbsp;</p>
<p><img width="333" height="245" title="Binary Tree [IMG:BinaryTree.gif]" alt="Binary Tree" src="__BASE_URI__Probability/CP/BinaryTree.gif" /></p>
</div>@
qu.1.3.answer=4@
qu.1.3.choice.1=3@
qu.1.3.choice.2=6@
qu.1.3.choice.3=4@
qu.1.3.choice.4=2@
qu.1.3.fixed=@

qu.1.4.mode=Multiple Choice@
qu.1.4.name=05. P(Blue ball | ~White ball)@
qu.1.4.comment=<p>Let B, R, and W represent the different coloured balls being drawn. By ~W we mean a non-white ball is drawn. Then we are asked for P(B | ~W) and:</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 mathvariant='normal'>P</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lpar;</mo><mi>B</mi><mo lspace='0.1111111em' rspace='0.1111111em' stretchy='true'>&verbar;</mo><mi>~W</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 mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>B</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo mathvariant='bold' fontweight='bold' lspace='0.0em' rspace='0.0em'>and</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>~W</mi></mrow></mfenced></mrow><mrow><mi mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>~W</mi></mrow></mfenced></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mi mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>B</mi></mrow></mfenced></mrow><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>W</mi></mrow></mfenced></mrow></mfrac></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><mfenced open='(' close=')' separators=','><mrow><mfrac><mrow><mo lspace='0.0em' rspace='0.0em'>&num;</mo><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>Blue</mi></mrow></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&num;</mo><mi> balls</mi></mrow></mfrac></mrow></mfenced><mrow><mfenced open='(' close=')' separators=','><mrow><mo lspace='0.0em' rspace='0.0em'>&num;</mo><mfrac><mrow><mi>non</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>white</mi></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&num;</mo><mi>balls</mi></mrow></mfrac></mrow></mfenced></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mo lspace='0.0em' rspace='0.0em'>&num;</mo><mrow><mi>blue</mi></mrow></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&num;</mo><mi>balls-#white</mi></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><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mi mathvariant='normal'>$NBlue</mi><mrow><mi mathvariant='normal'>$NumTotal</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi mathvariant='normal'>$NWhite</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow></mstyle></math></p>@
qu.1.4.editing=useHTML@
qu.1.4.solution=@
qu.1.4.algorithm=$Q=5;
$Which=1+rint(5);
$Align=switch(rint(2),"Left","Right");
$NRed=range(20,60,10);
$NBlue=range(20,50,10);
$NWhite=range(20,70,10);
$NumTotal=$NRed+$NBlue+$NWhite;
$Ans=decimal(2,$NBlue/($NumTotal-$NWhite));
$Alt1=2*$Ans+range(0.05,0.2,0.01);
$Alt2=decimal(2,$Ans/2)+range(0.01,0.1,0.01);
$Alt3=decimal(2,($Alt2+$Ans)/2);@
qu.1.4.uid=78dcbec5-c163-4146-b5d1-1444d2b044db@
qu.1.4.info=  Course=202;
  Type=MC;
@
qu.1.4.question=<div title="UW Statistics Bank/Probability/Conditional Probability/Q$Q"><img hspace="4" align="$Align" title="Ball [IMG:Ball$Which.gif]" alt="Ball" src="__BASE_URI__Probability/CP/Ball$Which.gif" />There are $NBlue blue balls, $NRed red balls, and $NWhite white balls in a bag of balls. What is the conditional probability of choosing a blue ball, given that a white ball was not chosen?</div>@
qu.1.4.answer=1@
qu.1.4.choice.1=$Ans@
qu.1.4.choice.2=$Alt1@
qu.1.4.choice.3=$Alt2@
qu.1.4.choice.4=$Alt3@
qu.1.4.fixed=@

qu.1.5.mode=True False@
qu.1.5.name=10. Coin Game@
qu.1.5.comment=<p>The probability of winning on the first toss 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>1</mn><mrow><mn>2</mn></mrow></mfrac></mrow></mstyle></math>. For the half of the time the probability that the second toss is a winner is also <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>1</mn><mrow><mn>2</mn></mrow></mfrac></mrow></mstyle></math>, so the probabilty that there will be a second toss and that you win on it 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>1</mn><mrow><mn>2</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>1</mn><mrow><mn>2</mn></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mn>1</mn><mrow><mn>4</mn></mrow></mfrac></mrow></mrow></mstyle></math>. So your overall probability of winning 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>1</mn><mrow><mn>2</mn></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mfrac><mn>1</mn><mrow><mn>4</mn></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mn>3</mn><mrow><mn>4</mn></mrow></mfrac></mrow></mrow></mstyle></math>.</p>@
qu.1.5.editing=useHTML@
qu.1.5.solution=@
qu.1.5.algorithm=$Q=10;
$Which=rint(4);
$Align=switch(rint(2),"Left","Right");
$Top=range(1,4,1);
$Bot=range($Top+1,$Top+5,1);
condition:ne($Top/$Bot,3/4);
$Display=mathml("$Top/$Bot");@
qu.1.5.uid=ae6d8b2e-882a-499b-a4b5-a479adc3030c@
qu.1.5.info=  Course=230;
  Course=202;
@
qu.1.5.question=<div title="UW Statistics Bank/Probability/Conditional Probability/Q$Q"><img hspace="4" align="$Align" src="__BASE_URI__Probability/CP/CanCoin$Which.gif" alt="Coin" title="Coin [IMG:coin$Which.gif]" />A fair coin is tossed. If it turns up heads you win the game. Otherwise you toss the coin a second time. If this toss turns up heads you win, otherwise the game is over and you have lost!

<p>The probability of winning the game is $Display.</p>
</div>@
qu.1.5.answer=2@
qu.1.5.choice.1=True@
qu.1.5.choice.2=False@
qu.1.5.fixed=@

qu.1.6.mode=Inline@
qu.1.6.name=11. Marital Status Vs Age@
qu.1.6.comment=<p><br />
a) The number of young women is $Tage1, since the total number of women in the study is $Total the probability that a women is young 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 mathvariant='normal'>$Tage1</mi><mrow><mi mathvariant='normal'>$Total</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>$ans1</mi></mrow></mstyle></math></p>
<p>b) There are $married1 women between the ages of 18 and 29 who are married. Thus the probability of selecting one of these 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 mathvariant='normal'>$married1</mi><mrow><mi mathvariant='normal'>$Total</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$ans2</mi></mrow></mstyle></math></p>
<p>c) <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 mathvariant='normal'>P</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lpar;</mo><mi>married</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.1111111em' rspace='0.1111111em' stretchy='true'>&verbar;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>young</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 mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>married</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo mathvariant='bold' fontweight='bold' lspace='0.0em' rspace='0.0em'>and</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>young</mi></mrow></mfenced></mrow><mrow><mi mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>young</mi></mrow></mfenced></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><mfrac><mfrac><mfenced open='(' close=')' separators=','><mrow><mo lspace='0.1111111em' rspace='0.1111111em'>&num;</mo><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>married</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo mathvariant='bold' fontweight='bold' lspace='0.0em' rspace='0.0em'>and</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>young</mi></mrow></mrow></mfenced><mrow><mi>Total</mi></mrow></mfrac><mrow><mfrac><mrow><mo lspace='0.0em' rspace='0.0em'>&num;</mo><mi>young</mi></mrow><mrow><mi>Total</mi></mrow></mfrac></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mo lspace='0.1111111em' rspace='0.1111111em'>&num;</mo><mi>married and young</mi></mrow><mrow><mo lspace='0.1111111em' rspace='0.1111111em'>&num;</mo><mi>young</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mi mathvariant='normal'>$married1</mi></mrow><mrow><mi mathvariant='normal'>$Tage1</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$ans3</mi></mrow></mstyle></math></p>
<p>d) <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 mathvariant='normal'>P</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lpar;</mo><mi>widow</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.1111111em' rspace='0.1111111em' stretchy='true'>&verbar;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mn>65</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><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 mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>widow</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&amp;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mn>65</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo></mrow></mfenced></mrow><mrow><mi mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mn>65</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo></mrow></mfenced></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mi mathvariant='normal'>$wid3</mi><mrow><mi mathvariant='normal'>$Tage3</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$ans4</mi></mrow></mstyle></math>.</p>
<p>&nbsp;</p>@
qu.1.6.editing=useHTML@
qu.1.6.solution=@
qu.1.6.algorithm=$Q=11;
$married1=range(7500,7800,50);
$married2=range(40000,43500,150);
$married3=range(8000,8300,50);
$Nmarried1=range(13000,14000,150);
$Nmarried2=range(7000,7200,40);
$Nmarried3=range(700,800,25);
$wid1=range(30,50,3);
$wid2=range(2500,3500,150);
$wid3=range(8000,8400,50);
$div1=range(650,730,40);
$div2=range(9000,9300,150);
$div3=range(1000,1350,50);
$Tmarried=$married1+$married2+$married3;
$TNmarried=$Nmarried1+$Nmarried2+$Nmarried3;
$Twid=$wid1+$wid2+$wid3;
$Tdiv=$div1+$div2+$div3;
$Tage1=$married1+$Nmarried1+$wid1+$div1;
$Tage2=$married2+$Nmarried2+$wid2+$div2;
$Tage3=$married3+$Nmarried3+$wid3+$div3;
$Total=$Tmarried+$TNmarried+$Twid+$Tdiv;
$ans1=decimal(4,$Tage1/$Total);
$ans2=decimal(4,$married1/$Total);
$ans3=decimal(4,$married1/$Tage1);
$ans4=decimal(4,$wid3/$Tage3);@
qu.1.6.uid=d604cf0b-cbb0-474e-9a8f-bca3479a0b4e@
qu.1.6.info=  Course=202;
  Difficulty=4;
  Course=230;
@
qu.1.6.weighting=1,1,1,1@
qu.1.6.numbering=alpha@
qu.1.6.part.1.name=sro_id_1@
qu.1.6.part.1.answer.units=@
qu.1.6.part.1.numStyle=   arithmetic@
qu.1.6.part.1.editing=useHTML@
qu.1.6.part.1.showUnits=false@
qu.1.6.part.1.err=0.01@
qu.1.6.part.1.question=(Unset)@
qu.1.6.part.1.mode=Numeric@
qu.1.6.part.1.grading=toler_abs@
qu.1.6.part.1.negStyle=minus@
qu.1.6.part.1.answer.num=$ans1@
qu.1.6.part.2.name=sro_id_2@
qu.1.6.part.2.answer.units=@
qu.1.6.part.2.numStyle=   arithmetic@
qu.1.6.part.2.editing=useHTML@
qu.1.6.part.2.showUnits=false@
qu.1.6.part.2.err=0.01@
qu.1.6.part.2.question=(Unset)@
qu.1.6.part.2.mode=Numeric@
qu.1.6.part.2.grading=toler_abs@
qu.1.6.part.2.negStyle=minus@
qu.1.6.part.2.answer.num=$ans2@
qu.1.6.part.3.name=sro_id_3@
qu.1.6.part.3.answer.units=@
qu.1.6.part.3.numStyle=   arithmetic@
qu.1.6.part.3.editing=useHTML@
qu.1.6.part.3.showUnits=false@
qu.1.6.part.3.err=0.01@
qu.1.6.part.3.question=(Unset)@
qu.1.6.part.3.mode=Numeric@
qu.1.6.part.3.grading=toler_abs@
qu.1.6.part.3.negStyle=minus@
qu.1.6.part.3.answer.num=$ans3@
qu.1.6.part.4.name=sro_id_4@
qu.1.6.part.4.answer.units=@
qu.1.6.part.4.numStyle=   arithmetic@
qu.1.6.part.4.editing=useHTML@
qu.1.6.part.4.showUnits=false@
qu.1.6.part.4.err=0.01@
qu.1.6.part.4.question=(Unset)@
qu.1.6.part.4.mode=Numeric@
qu.1.6.part.4.grading=toler_abs@
qu.1.6.part.4.negStyle=minus@
qu.1.6.part.4.answer.num=$ans4@
qu.1.6.question=<div title="UW Statistics Bank/Probability/Conditional Probability/Q$Q">The following table shows the marital status of adult women broken down by age group.<p><table width="200" height="119" cellspacing="1" cellpadding="1" border="1">    <tbody>        <tr>            <td>&nbsp;</td>            <td align="center" colspan="3">Age</td>            <td>&nbsp;</td>        </tr>        <tr>            <td>&nbsp;</td>            <td align="center">18-29</td>            <td align="center">30-64</td>            <td align="center">65+</td>            <td align="center">Total</td>        </tr>        <tr>            <td>Married</td>            <td align="center">$married1</td>            <td align="center">$married2</td>            <td align="center">$married3</td>            <td align="center">$Tmarried</td>        </tr>        <tr>            <td>Never married</td>            <td align="center">$Nmarried1</td>            <td align="center">$Nmarried2</td>            <td align="center">$Nmarried3</td>            <td align="center">$TNmarried</td>        </tr>        <tr>            <td>Widowed</td>            <td align="center">$wid1</td>            <td align="center">$wid2</td>            <td align="center">$wid3</td>            <td align="center">$Twid</td>        </tr>        <tr>            <td>Divorced</td>            <td align="center">$div1</td>            <td align="center">$div2</td>            <td align="center">$div3</td>            <td align="center">$Tdiv</td>        </tr>        <tr>            <td>Total</td>            <td align="center">$Tage1</td>            <td align="center">$Tage2</td>            <td align="center">$Tage3</td>            <td align="center">$Total</td>        </tr>    </tbody></table></p><p>&nbsp;</p><p>Please answer with a three decimal accuracy:</p><p>a) What is the probability that the woman chosen is young, ages 18 to 29? <1><span>&nbsp;</span></p><p>b) What is the probability that the woman chosen is between ages 18 to 29 and is married? <span>&nbsp;</span><2><span>&nbsp;</span></p><p>c) What is the probability that&nbsp; a woman is married given the information that she is in the age group of 18-29? <span>&nbsp;</span><3><span>&nbsp;</span></p><p>d) What is the probability that a woman is a widow, given that she is at least 65 years old? <span>&nbsp;</span><4><span>&nbsp;</span></p></div>@

qu.1.7.mode=Multiple Choice@
qu.1.7.name=2A. Gameshow@
qu.1.7.comment=<p>Let A and B represent the events "chose door A" and "cose door B" respectively. Let Q be the event "won a prize". We are given P(A), P(B), P(Q|A) and P(Q|B) and are being asked for P(A|Q).</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><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>Q</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>A</mi><mo lspace='0.0em' rspace='0.0em'>&cap;</mo><mi>Q</mi></mrow></mfenced></mrow><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>Q</mi></mrow></mfenced></mrow></mfrac></mrow></mstyle></math></p>
<p>Now rewrite the basic conditional probability formula:</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><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lpar;</mo><mi>X</mi><mo lspace='0.1111111em' rspace='0.1111111em' stretchy='true'>&verbar;</mo><mi>Y</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>X</mi><mo lspace='0.0em' rspace='0.0em'>&cap;</mo><mi>Y</mi></mrow></mfenced></mrow><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>Y</mi></mrow></mfenced></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>so</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mrow><mo lspace='0.0em' rspace='0.0em'>&cap;</mo></mrow><mi>Y</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>Y</mi></mrow></mfenced><mi>P</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lpar;</mo><mi>X</mi><mo lspace='0.1111111em' rspace='0.1111111em' stretchy='true'>&verbar;</mo><mi>Y</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&rpar;</mo></mrow></mstyle></math></p>
<p>also since the events A and B make up the entire set of events,</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>Q</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>Q</mi><mo lspace='0.0em' rspace='0.0em'>&cap;</mo><mi>A</mi></mrow></mfenced><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>Q</mi><mo lspace='0.0em' rspace='0.0em'>&cap;</mo><mi>B</mi></mrow></mfenced></mrow></mstyle></math></p>
<p>so</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><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>Q</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>A</mi><mo lspace='0.0em' rspace='0.0em'>&cap;</mo><mi>Q</mi></mrow></mfenced></mrow><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>Q</mi><mo lspace='0.0em' rspace='0.0em'>&cap;</mo><mi>A</mi></mrow></mfenced><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>Q</mi><mo lspace='0.0em' rspace='0.0em'>&cap;</mo><mi>B</mi></mrow></mfenced></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>A</mi></mrow></mfenced><mi>P</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lpar;</mo><mi>Q</mi><mo lspace='0.1111111em' rspace='0.1111111em' stretchy='true'>&verbar;</mo><mi>A</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&rpar;</mo></mrow><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>A</mi></mrow></mfenced><mi>P</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lpar;</mo><mi>Q</mi><mo lspace='0.1111111em' rspace='0.1111111em' stretchy='true'>&verbar;</mo><mi>A</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&rpar;</mo><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>B</mi></mrow></mfenced><mi>P</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lpar;</mo><mi>Q</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></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mi>$PA</mi><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi>$PQgA</mi></mrow><mrow><mi>$PA</mi><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi>$PQgA</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>$PB</mi><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi>$PQgB</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>$Ans</mi></mrow></mstyle></math></p>@
qu.1.7.editing=useHTML@
qu.1.7.solution=@
qu.1.7.algorithm=$Q="2A";
$PA=range(0.35,0.65,0.05);
$PB=1-$PA;
$PQgA=range(0.25,0.75,0.05);
$PQgB=range(0.20,0.65,0.05);
$Ans=decimal(3,$PA*$PQgA/($PA*$PQgA+$PB*$PQgB));
$Alt1=decimal(3,$Ans/2);
$Alt2=decimal(3,($Ans+$Alt1)/2);
$Alt3=decimal(3,(1+$Ans)/2);@
qu.1.7.uid=16905f86-35f5-484f-96b0-986502e3a272@
qu.1.7.info=  Use=Yes;
@
qu.1.7.question=<p>A contestant in a game show selects either door A (with probability $PA) or door B (with probability $PB). If door A is chosen, the probability of winning a prize is $PQgA. If door B is chosen, the probability of winning a prize is $PQgB. Given that a contestant has won a prize, what is the probability that door A was selected?</p>@
qu.1.7.answer=1@
qu.1.7.choice.1=$Ans@
qu.1.7.choice.2=$Alt1@
qu.1.7.choice.3=$Alt2@
qu.1.7.choice.4=$Alt3@
qu.1.7.fixed=@

qu.1.8.mode=Multiple Choice@
qu.1.8.name=04. Coin toss@
qu.1.8.comment=<div title="UW Statistics Bank/Probability/Conditional Probability/Q$Q"><img width="80" vspace="4" hspace="4" height="56" align="right" src="__BASE_URI__Probability/CP/RedHerring.gif" title="Red Herring [IMG:RedHerring.gif]" alt="Red Herring" />What a red herring! It doesn't matter how many times in a row a tossed coin comes up heads or tails, the next toss is an independent event and has the same probability for heads and tails as does any toss - <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>1</mn><mrow><mn>2</mn></mrow></mfrac></mrow></mstyle></math>.</div>@
qu.1.8.editing=useHTML@
qu.1.8.solution=@
qu.1.8.algorithm=$Q=4;
$NumTosses=range(3,7,1);
$Ans=mathml("1/2");
$Alt1=mathml("3/5");
$Alt2=mathml("$NumTosses/($NumTosses+1)");
$Alt3=switch(rint(3),mathml("3/7"),mathml("2/5"),mathml("1/3"));
$Alt4=mathml("4/9");@
qu.1.8.uid=31f3a5d3-4fc5-41e6-bbd8-924386c6bdc4@
qu.1.8.info=  Course=202;
  Course=230;
@
qu.1.8.question=<div title="UW Statistics Bank/Probability/Pr/Q$Q">A coin is tossed $NumTosses times. Find the probability that the next toss is a tail, given that the first $NumTosses tosses were all tails.</div>@
qu.1.8.answer=1@
qu.1.8.choice.1=$Ans@
qu.1.8.choice.2=$Alt1@
qu.1.8.choice.3=$Alt2@
qu.1.8.choice.4=$Alt3@
qu.1.8.choice.5=$Alt4@
qu.1.8.fixed=@

qu.1.9.mode=Multiple Choice@
qu.1.9.name=02. Gameshow@
qu.1.9.comment=<p>Let A and B represent the events "chose door A" and "cose door B" respectively. Let Q be the event "won a prize". We are given P(A), P(B), P(Q|A) and P(Q|B) and are being asked for P(A|Q).</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 mathvariant='normal'>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>Q</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 mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>A</mi><mo lspace='0.0em' rspace='0.0em'>&cap;</mo><mi>Q</mi></mrow></mfenced></mrow><mrow><mi mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>Q</mi></mrow></mfenced></mrow></mfrac></mrow></mstyle></math></p>
<p>Now rewrite the basic conditional probability formula:</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 mathvariant='normal'>P</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lpar;</mo><mi>X</mi><mo lspace='0.1111111em' rspace='0.1111111em' stretchy='true'>&verbar;</mo><mi>Y</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 mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.0em' rspace='0.0em'>&cap;</mo><mi>Y</mi></mrow></mfenced></mrow><mrow><mi mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>Y</mi></mrow></mfenced></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>so</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mrow><mo lspace='0.0em' rspace='0.0em'>&cap;</mo></mrow><mi>Y</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>Y</mi></mrow></mfenced><mi>P</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lpar;</mo><mi>X</mi><mo lspace='0.1111111em' rspace='0.1111111em' stretchy='true'>&verbar;</mo><mi>Y</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&rpar;</mo></mrow></mstyle></math></p>
<p>also since the events A and B make up the entire set of events,</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 mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>Q</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>Q</mi><mo lspace='0.0em' rspace='0.0em'>&cap;</mo><mi>A</mi></mrow></mfenced><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>Q</mi><mo lspace='0.0em' rspace='0.0em'>&cap;</mo><mi>B</mi></mrow></mfenced></mrow></mstyle></math></p>
<p>so</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 mathvariant='normal'>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>Q</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 mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>A</mi><mo lspace='0.0em' rspace='0.0em'>&cap;</mo><mi>Q</mi></mrow></mfenced></mrow><mrow><mi mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>Q</mi><mo lspace='0.0em' rspace='0.0em'>&cap;</mo><mi>A</mi></mrow></mfenced><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>Q</mi><mo lspace='0.0em' rspace='0.0em'>&cap;</mo><mi>B</mi></mrow></mfenced></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mi mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>A</mi></mrow></mfenced><mi mathvariant='normal'>P</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lpar;</mo><mi>Q</mi><mo lspace='0.1111111em' rspace='0.1111111em' stretchy='true'>&verbar;</mo><mi>A</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&rpar;</mo></mrow><mrow><mi mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>A</mi></mrow></mfenced><mi mathvariant='normal'>P</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lpar;</mo><mi>Q</mi><mo lspace='0.1111111em' rspace='0.1111111em' stretchy='true'>&verbar;</mo><mi>A</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&rpar;</mo><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>B</mi></mrow></mfenced><mi mathvariant='normal'>P</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lpar;</mo><mi>Q</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></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mi mathvariant='normal'>$PA</mi><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi mathvariant='normal'>$PQgA</mi></mrow><mrow><mi mathvariant='normal'>$PA</mi><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi mathvariant='normal'>$PQgA</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi mathvariant='normal'>$PB</mi><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi mathvariant='normal'>$PQgB</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math></p>@
qu.1.9.editing=useHTML@
qu.1.9.solution=@
qu.1.9.algorithm=$Q=2;
$Which=1+rint(4);
$Align=switch(rint(2),"Left","Right");
$PA=range(0.35,0.65,0.05);
$PB=1-$PA;
$PQgA=range(0.25,0.75,0.05);
$PQgB=range(0.20,0.65,0.05);
$Ans=decimal(3,$PA*$PQgA/($PA*$PQgA+$PB*$PQgB));
$Alt1=decimal(3,$Ans/2);
$Alt2=decimal(3,($Ans+$Alt1)/2);
$Alt3=decimal(3,(1+$Ans)/2);@
qu.1.9.uid=3a581aa8-7d3c-492f-b407-bccdc4e41fbd@
qu.1.9.info=  Difficulty=3;
  Type=MC;
@
qu.1.9.question=<div title="UW Statistics Bank/Probability/Conditional Probability/Q$Q"><img hspace="4" align="$Align" src="__BASE_URI__Probability/CP/Door$Which.gif" alt="Door" title="Door [IMG:Door$Which.gif]" />A contestant in a game show selects either door A (with probability $PA) or door B (with probability $PB). If door A is chosen, the probability of winning a prize is $PQgA. If door B is chosen, the probability of winning a prize is $PQgB. Given that a contestant has won a prize, what is the probability that door A was selected?</div>@
qu.1.9.answer=1@
qu.1.9.choice.1=$Ans@
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=9A. P(Poker|Garden)@
qu.1.10.comment=<p>Let K, S, and G represent the events "a resident plays poker/shuffleboard/gardening" respectively.</p>
<p>We want P(K|G) while we are given P(S), P(K), P(G), P(KG), P(SK) . So let's manipulate P(K|G) to get an expression in terms of what we have:</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><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lpar;</mo><mi>K</mi><mo lspace='0.1111111em' rspace='0.1111111em' stretchy='true'>&verbar;</mo><mi>G</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>KG</mi></mrow></mfenced></mrow><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>G</mi></mrow></mfenced></mrow></mfrac></mrow></mstyle></math> !&nbsp; That was easy!</p>
<p>&nbsp;</p>@
qu.1.10.editing=useHTML@
qu.1.10.solution=@
qu.1.10.algorithm=$Q="9A";
$PK=range(40,60,5);
$PS=range($PK,80,5);
$PG=range($PK+5,80,5);
$PKG=range(30,$PK-5,5);
$PKS=range(30,$PK-5,5);
$Ans=100*decimal(2,$PKG/$PG);
$Alt1=int($Ans/2);
$Alt2=$Alt1+range(2,$Ans-$Alt1-1);
$Alt3=$Ans+range(2,100-$Ans-2);@
qu.1.10.uid=64786b0d-a66d-4c06-99b9-f93eb44adbc9@
qu.1.10.info=  Use=Yes;
@
qu.1.10.question=<div title="STAT202/Test 3/Conditional Probability/Q$Q  [12.]"><img hspace="4" height="58" width="70" vspace="4" align="left" alt="Shuffleboard" src="__BASE_URI__Test3/CP/ShuffleBoard.gif" />In the Happy Hilltop Health Home, $PS% of the residents play shuffleboard, $PK% of the residents play poker, and $PG% of the residents garden. If $PKG% of the residents play poker and garden and $PKS% of the residents play both shuffleboard and poker, then find the probability that a resident plays poker, given that they garden.</div>@
qu.1.10.answer=1@
qu.1.10.choice.1=$Ans%@
qu.1.10.choice.2=$Alt1%@
qu.1.10.choice.3=$Alt2%@
qu.1.10.choice.4=$Alt3%@
qu.1.10.fixed=@

qu.1.11.mode=Multiple Choice@
qu.1.11.name=12. Boys & Girls@
qu.1.11.comment=<p>Represent the event "girl chosen first" by G1 and "boy chosen second" by B2. Then <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 mathvariant='normal'>P</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lpar;</mo><mi>B2</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.1111111em' rspace='0.1111111em' stretchy='true'>&verbar;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>G1</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&rpar;</mo><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><mfrac><mrow><mi mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>B2</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&amp;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>G1</mi></mrow></mfenced></mrow><mrow><mi mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>G1</mi></mrow></mfenced></mrow></mfrac></mrow></mstyle></math></p>
<p>&nbsp;</p>@
qu.1.11.editing=useHTML@
qu.1.11.solution=@
qu.1.11.algorithm=$Q=12;
$NG = range(10,20,1);
$NB = range(2,10,1);
$NGPNB=$NG+$NB;
$Ans = decimal(4,$NB/($NGPNB-1));
$Alt1=decimal(4,range(0.4,0.8,0.05)*$Ans);
$Alt2=decimal(4,$Ans+range(0.4,0.8,0.05)*(1-$Ans));
$Alt3=decimal(4,0.5*($Ans+switch(rint(2),$Alt1,$Alt2)));@
qu.1.11.uid=2d1e43ad-dbf6-4b86-9fad-ef3aec46662e@
qu.1.11.info=  Course=202;
  Course=230;
  Type=MC;
@
qu.1.11.question=<div title="UW Statistics Bank/Probability/Conditional Probability/Q$Q">In a second grade class containing $NG girls and $NB boys, 2 students are selected at random to give out the math papers. What is the probability that the second student chosen is a boy, given that the first one was a girl?</div>@
qu.1.11.answer=1@
qu.1.11.choice.1=$Ans@
qu.1.11.choice.2=$Alt1@
qu.1.11.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><mfenced open='(' close=')' separators=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi>$NG</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>1</mn></mrow></mtd></mtr></mtable></mfenced><mrow><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi>$NGPNB</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>$NG</mi></mrow></mtd></mtr></mtable></mrow></mfenced></mrow></mfrac></mrow></mstyle></math>@
qu.1.11.choice.4=$Alt3@
qu.1.11.fixed=@

qu.1.12.mode=Multiple Choice@
qu.1.12.name=4A. Coin toss@
qu.1.12.comment=<p><img hspace="4" height="56" width="80" vspace="4" align="right" alt="Red Herring" src="__BASE_URI__Test3/CP/RedHerring.gif" />What a red herring! It doesn't matter how many times in a row a tossed coin comes up heads or tails, the next toss is an independent event and has the same probability for heads and tails as does any toss - <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>1</mn><mrow><mn>2</mn></mrow></mfrac></mrow></mstyle></math>.</p>@
qu.1.12.editing=useHTML@
qu.1.12.solution=@
qu.1.12.algorithm=$Q="4A";
$NumTosses=range(3,7,1);@
qu.1.12.uid=122315f2-977a-4fe6-86af-7ea8496584f8@
qu.1.12.info=  Use=Yes;
@
qu.1.12.question=<div title="STAT202/Test 3/Probability/Q$Q  [11.]">A coin is tossed $NumTosses times. Find the probability that the next toss is a tail, given that the first $NumTosses tosses were all tails.</div>@
qu.1.12.answer=1@
qu.1.12.choice.1=1/2@
qu.1.12.choice.2=1/5@
qu.1.12.choice.3=1/10@
qu.1.12.choice.4=1/4@
qu.1.12.fixed=@

qu.1.13.mode=Multiple Choice@
qu.1.13.name=08. Card problem@
qu.1.13.comment=<p>Let B1 be the event "up side of the card is blue", B2 the event "down side of the card is blue". You want:</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 mathvariant='normal'>P</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lpar;</mo><mi>B2</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.1111111em' rspace='0.1111111em' stretchy='true'>&verbar;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>B1</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&rpar;</mo><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><mfrac><mrow><mi mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>B1</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&amp;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>B2</mi></mrow></mfenced></mrow><mrow><mi mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>B1</mi></mrow></mfenced></mrow></mfrac></mrow></mstyle></math></p>
<p>Now 3 of the six card sides available are blue, so P(B1) = <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>1</mn><mrow><mn>2</mn></mrow></mfrac></mrow></mstyle></math>. Only one of the three cards has two blue sides, so <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 mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>B1</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&amp;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>B2</mi></mrow></mfenced><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><mrow><mfrac><mn>1</mn><mrow><mn>3</mn></mrow></mfrac></mrow></mrow></mstyle></math>. So P(B1 | B1) =&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><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfrac><mrow><mfrac><mn>1</mn><mrow><mn>3</mn></mrow></mfrac></mrow><mrow><mfrac><mn>1</mn><mrow><mn>2</mn></mrow></mfrac></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mn>2</mn><mrow><mn>3</mn></mrow></mfrac></mrow></mstyle></math></p>@
qu.1.13.editing=useHTML@
qu.1.13.solution=@
qu.1.13.algorithm=$Q=8;@
qu.1.13.uid=060f9901-3967-4e87-a2a2-eb6254823c4f@
qu.1.13.info=  Course=202;
  Type=MC;
  Algorithmic=no;
@
qu.1.13.question=<div title="UW Statistics Bank/Probability/Conditional Probability/Q$Q">Suppose you have 3 cards:
<p>1. A red card is red on both sides.</p>
<p>2. A blue card is blue on both sides.</p>
<p>3. A mixed card is red on one side and blue on the other.</p>
<p>You gather the cards and toss them into a hat. You then select one randomly from the hat and place it on the table. Given that the side facing up is blue, what is the probability that the other side is also a blue?</p>
</div>@
qu.1.13.answer=1@
qu.1.13.choice.1=2/3@
qu.1.13.choice.2=1/3@
qu.1.13.choice.3=1/2@
qu.1.13.choice.4=1/4@
qu.1.13.fixed=@

qu.1.14.mode=Multiple Choice@
qu.1.14.name=13. P(Poker|Garden)@
qu.1.14.comment=<p>Let K, S, and G represent the events "a resident plays poker/shuffleboard/gardening" respectively.</p>
<p>We want P(K|G) while we are given P(S), P(K), P(G), P(KG), P(SK) . So let's manipulate P(K|G) to get an expression in terms of what we have:</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 mathvariant='normal'>P</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lpar;</mo><mi>K</mi><mo lspace='0.1111111em' rspace='0.1111111em' stretchy='true'>&verbar;</mo><mi>G</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 mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>KG</mi></mrow></mfenced></mrow><mrow><mi mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>G</mi></mrow></mfenced></mrow></mfrac></mrow><mrow><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mi mathvariant='normal'>$PKG</mi><mrow><mi mathvariant='normal'>$PG</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$AnsPC</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo mathvariant='bold' fontweight='bold' lspace='0.0em' rspace='0.0em'>or</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>$Ans</mi></mrow><mrow><mi>%</mi></mrow></mstyle></math> !&nbsp; That was easy!</p>
<p>&nbsp;</p>@
qu.1.14.editing=useHTML@
qu.1.14.solution=@
qu.1.14.algorithm=$Q=13;
$Align=switch(rint(2),"Left","Right");
$PK=range(40,60,5);
$PS=range($PK,80,5);
$PG=range($PK+5,80,5);
$PKG=range(30,$PK-5,5);
$PKS=range(30,$PK-5,5);
$Ans=100*decimal(2,$PKG/$PG);
$AnsPC=decimal(2,$PKG/$PG);
$Alt1=int($Ans/2);
$Alt2=$Alt1+range(2,$Ans-$Alt1-1);
$Alt3=$Ans+range(2,100-$Ans-2);@
qu.1.14.uid=16f2685f-7025-4df0-ae94-6fa6f2c5ba05@
qu.1.14.info=  Difficulty=2;
  Course=230;
  Type=MC;
@
qu.1.14.question=<div title="UW Statistics Bank/Probability/Conditional Probability/Q$Q"><img width="70" vspace="4" hspace="4" height="58" align="$Align" title="Shuffleboard [IMG:Shuffleboard.gif]" src="__BASE_URI__Probability/CP/ShuffleBoard.gif" alt="Shuffleboard" />In the Happy Hilltop Health Home, $PS% of the residents play shuffleboard, $PK% of the residents play poker, and $PG% of the residents garden. If $PKG% of the residents play poker and garden and $PKS% of the residents play both shuffleboard and poker, then find the probability that a resident plays poker, given that they garden.</div>@
qu.1.14.answer=1@
qu.1.14.choice.1=$Ans%@
qu.1.14.choice.2=$Alt1%@
qu.1.14.choice.3=$Alt2%@
qu.1.14.choice.4=$Alt3%@
qu.1.14.fixed=@

qu.1.15.mode=Multiple Choice@
qu.1.15.name=3A. Picking children.@
qu.1.15.comment=@
qu.1.15.editing=useHTML@
qu.1.15.solution=@
qu.1.15.algorithm=$Q="3A";
$C1=range(20,50,5);
$C2=range(20,60,5);
$C3=range(15,45,5);
$Total=$C1+$C2+$C3;
$Ans=decimal(3,$C2/($C2+$C1));
$Alt1=decimal(3,$Ans/2);
$Alt2=decimal(3,($Ans+$Alt1)/2);
$Alt3=$Ans+range(0.01,(1-$Ans),0.05);@
qu.1.15.uid=fa14e0dd-2905-4401-9bf7-0a9efa1b8ce4@
qu.1.15.info=  Use=Yes;
@
qu.1.15.question=<div title="STAT202/Test 3/Conditional Probability/Q$Q  [10.]">There are $C1 first grade children, $C2 second grade children, and $C3 third grade children in a school. What is the conditional probability of choosing a second grade child, given that either a first grade or a second grade child was chosen?
<p>&nbsp;</p>
</div>@
qu.1.15.answer=1@
qu.1.15.choice.1=$Ans@
qu.1.15.choice.2=$Alt1@
qu.1.15.choice.3=$Alt2@
qu.1.15.choice.4=$Alt3@
qu.1.15.fixed=@

qu.1.16.mode=Multiple Choice@
qu.1.16.name=5A. P(B|~W)@
qu.1.16.comment=<p>Let B, R, and W represent the different coloured balls being drawn. By ~W we mean a non-white ball is drawn. Then we are asked for P(B | ~W) and:</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><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lpar;</mo><mi>B</mi><mo lspace='0.1111111em' rspace='0.1111111em' stretchy='true'>&verbar;</mo><mi>~W</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>B</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo mathvariant='bold' fontweight='bold' lspace='0.0em' rspace='0.0em'>and</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>~W</mi></mrow></mfenced></mrow><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>~W</mi></mrow></mfenced></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>B</mi></mrow></mfenced></mrow><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>W</mi></mrow></mfenced></mrow></mfrac></mrow></mstyle></math></p>@
qu.1.16.editing=useHTML@
qu.1.16.solution=@
qu.1.16.algorithm=$Q="5A";
$NRed=range(20,60,10);
$NBlue=range(20,50,10);
$NWhite=range(20,70,10);
$NumTotal=$NRed+$NBlue+$NWhite;
$Ans=decimal(2,$NBlue/($NumTotal-$NWhite));
$Alt1=2*$Ans+range(0.05,0.2,0.01);
$Alt2=decimal(2,$Ans/2)+range(0.01,0.1,0.01);
$Alt3=decimal(2,($Alt2+$Ans)/2);@
qu.1.16.uid=4ff659ab-6fe8-49e7-9f43-cca2f1534ade@
qu.1.16.info=  Use=Yes;
@
qu.1.16.question=<div title="STAT202/Test 3/Conditional Probability/Q$Q  [15.]">There are $NBlue blue balls, $NRed red balls, and $NWhite white balls in a bag of balls. What is the conditional probability of choosing a blue ball, given that a white ball was not chosen?</div>@
qu.1.16.answer=1@
qu.1.16.choice.1=$Ans@
qu.1.16.choice.2=$Alt1@
qu.1.16.choice.3=$Alt2@
qu.1.16.choice.4=$Alt3@
qu.1.16.fixed=@

qu.1.17.mode=Multiple Choice@
qu.1.17.name=15. Tree Diagrams are useful for.@
qu.1.17.comment=<p>A tree diagram shows us all possible outcomes of the experiment, that is the only thing of those listed it can do.</p>@
qu.1.17.editing=useHTML@
qu.1.17.solution=@
qu.1.17.algorithm=$Q=15;
$Alt1=switch(rint(2),"Illustrating the law of large numbers.","Determining outliers.");
$Ans="Finding all possible outcomes in a probability experiment";
$Alt2=switch(rint(2),"Showing that the outcome is the set of all possible sample spaces","Determining the sample space Power Set.");
$Alt3="All the above";@
qu.1.17.uid=e5d5b496-025f-4438-bbe8-29cc382e081a@
qu.1.17.info=  Course=202;
  Type=MC;
@
qu.1.17.question=<div title="UW Statistics Bank/Probability/Conditional Probability/Q$Q">Tree diagrams are useful for:</div>@
qu.1.17.answer=1@
qu.1.17.choice.1=$Ans@
qu.1.17.choice.2=$Alt1@
qu.1.17.choice.3=$Alt2@
qu.1.17.choice.4=$Alt3@
qu.1.17.fixed=3@

qu.1.18.mode=Multiple Choice@
qu.1.18.name=07. Coin in drawer problem@
qu.1.18.comment=<p>Let G1 be the event "first drawer opened has a gold coin", S2 be the event "second drawer of box has a silver coin". Notice that 3 of the 6 drawers have gold coins, so P(G1) =&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><mn>1</mn><mrow><mn>2</mn></mrow></mfrac></mrow></mstyle></math> . Of the six possible drawers you could open first, only one has a Gold coin and a Silver coin in the other drawer, so P(G1 &amp; S2) = <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>1</mn><mrow><mn>6</mn></mrow></mfrac></mrow></mstyle></math>. 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 mathvariant='normal'>P</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lpar;</mo><mi>S2</mi><mo lspace='0.1111111em' rspace='0.1111111em' stretchy='true'>&verbar;</mo><mi>G1</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&rpar;</mo></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><mfrac><mrow><mi mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>G1</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.2777778em' rspace='0.2777778em'>&amp;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>S2</mi></mrow></mfenced></mrow><mrow><mi mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>G1</mi></mrow></mfenced></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mfrac><mn>1</mn><mrow><mn>6</mn></mrow></mfrac></mrow><mrow><mfrac><mn>1</mn><mrow><mn>2</mn></mrow></mfrac></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mn>1</mn><mrow><mn>3</mn></mrow></mfrac></mrow></mstyle></math></p>
<p>&nbsp;</p>@
qu.1.18.editing=useHTML@
qu.1.18.solution=@
qu.1.18.algorithm=$Q=7;@
qu.1.18.uid=b2aae984-8ce4-4d70-9ef9-ef283c5c9bde@
qu.1.18.info=  Course=202;
  Type=MC;
  Algorithmic=no;
@
qu.1.18.question=<div title="UW Statistics Bank/Probability/Conditional Probability/Q$Q">Suppose you are given 3 boxes, each box has 1 drawer on each of the 2 sides. Each drawer contains a coin. One box has a gold coin on both drawers, one box has silver coin on both drawers, and the third box has one gold coin in one drawer and a silver in the other. You choose a box randomly, open a drawer, and you see a gold coin. What is the probability the other drawer in the same box contains a silver coin?</div>@
qu.1.18.answer=1@
qu.1.18.choice.1=1/3@
qu.1.18.choice.2=1/2@
qu.1.18.choice.3=2/3@
qu.1.18.choice.4=Cannot be determined@
qu.1.18.fixed=3@

qu.1.19.mode=Multiple Choice@
qu.1.19.name=06.  P(Gender|have other gender)@
qu.1.19.comment=<p>Consider the 4 <em>equally likely </em>outcomes of having two children:</p>
<p>BB, BG, GB, GG</p>
<p>Since at least one child is a $Got, the $Reject outcome did not occur. The other three are still equally likely. Notice that in 2 of the 3 outcomes, the other child is a $NotGot!</p>@
qu.1.19.editing=useHTML@
qu.1.19.solution=@
qu.1.19.algorithm=$Q = 6;
$Pick=rint(2);
$Got=switch($Pick,"boy","girl");
$NotGot=switch(1-$Pick,"boy","girl");
$Reject=switch($Pick,"GG","BB");
$Ans=mathml("2/3");
$Alt1=mathml("1/2");
$Alt2=mathml("1/4");
$Alt3=switch(rint(3),mathml("1/7"),mathml("3/7"),mathml("5/7"));
$Alt4=mathml("3/4");@
qu.1.19.uid=4f004325-3642-43cd-a081-cfe3b0f4d297@
qu.1.19.info=  Course=202;
@
qu.1.19.question=<div title="UW Statistics Bank/Probability/Conditional Probability/Q$Q">Given that a randomly selected family has two chidren and at least one of them is a $Got, what is the probability of the other child being a $NotGot?. (Assume that the probability of either gender being born is 0.50 .)</div>@
qu.1.19.answer=1@
qu.1.19.choice.1=$Ans@
qu.1.19.choice.2=$Alt1@
qu.1.19.choice.3=$Alt2@
qu.1.19.choice.4=$Alt3@
qu.1.19.choice.5=Cannot be determined@
qu.1.19.fixed=4@

qu.1.20.mode=Multiple Choice@
qu.1.20.name=7A: Coin problem@
qu.1.20.comment=@
qu.1.20.editing=useHTML@
qu.1.20.solution=@
qu.1.20.algorithm=@
qu.1.20.uid=a32765b8-2c28-4a87-9d32-315d621ac412@
qu.1.20.info=  Use=Yes;
@
qu.1.20.question=<p>Suppose you are given 3 boxes, each box has 1 drawer on each of the 2 sides. Each drawer contains a coin. One box has a gold coin on both drawers, one box has silver coin on both drawers, and the third box has one gold coin in one drawer and a silver in the other. You choose a box randomly, open a drawer, and you see a gold coin. What is the probability the other drawer in the same box contains a silver coin?</p>@
qu.1.20.answer=1@
qu.1.20.choice.1=1/3@
qu.1.20.choice.2=1/2@
qu.1.20.choice.3=2/3@
qu.1.20.choice.4=Cannot be determined@
qu.1.20.fixed=@

qu.1.21.mode=Multiple Choice@
qu.1.21.name=1A. Picking Chips@
qu.1.21.comment=@
qu.1.21.editing=useHTML@
qu.1.21.solution=@
qu.1.21.algorithm=$Q="1A";
$PBRTop=range(16,64,8);
$PBTop=range(3,7,2);
condition:gt(8*$PBTop,$PBRTop);
$AnsTop=$PBRTop;
$AnsBot=8*$PBTop;
$Alt1Top=$AnsTop;
$Alt1Bot=8*$PBTop+24;
$Alt2Top=$AnsTop+3;
$Alt2Bot=$AnsBot;
$Alt3Top=($PBTop+1)/2;
$Alt3Bot=$PBTop*2+1;@
qu.1.21.uid=329ff51c-013d-4034-9662-2adbc4db2155@
qu.1.21.info=  Use=Yes;
@
qu.1.21.question=<div title="STAT202/Test 3/Conditional Probability/Q$Q  [1.]">A box contains blue chips and red chips. A person selects two chips without replacement. If the probability of selecting a blue chip and then a red chip 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>$PBRTop</mi><mrow><mn>128</mn></mrow></mfrac></mrow></mstyle></math> , and the probability of selecting a blue chip on the first draw 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>$PBTop</mi><mrow><mn>16</mn></mrow></mfrac></mrow></mstyle></math> , find the probability of selecting the red chip on the second draw, given that the first chip selected was a blue chip.
<p>&nbsp;</p>
</div>@
qu.1.21.answer=1@
qu.1.21.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><mi>$AnsTop</mi><mrow><mi>$AnsBot</mi></mrow></mfrac></mrow></mstyle></math>@
qu.1.21.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><mi>$Alt1Top</mi><mrow><mi>$Alt1Bot</mi></mrow></mfrac></mrow></mstyle></math>@
qu.1.21.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><mi>$Alt2Top</mi><mrow><mi>$Alt2Bot</mi></mrow></mfrac></mrow></mstyle></math>@
qu.1.21.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><mi>$Alt3Top</mi><mrow><mi>$Alt3Bot</mi></mrow></mfrac></mrow></mstyle></math>@
qu.1.21.fixed=@

qu.1.22.mode=Multiple Choice@
qu.1.22.name=8A: Card problem@
qu.1.22.comment=@
qu.1.22.editing=useHTML@
qu.1.22.solution=@
qu.1.22.algorithm=@
qu.1.22.uid=d8fca7b4-39e0-4599-a18c-401cdb9009c6@
qu.1.22.info=  Use=Yes;
@
qu.1.22.question=<p>Suppose you have 3 cards:</p>
<p>1. A red card is red on both sides.</p>
<p>2. A blue card is blue on both sides.</p>
<p>3. A mixed card is red on one side and blue on the other.</p>
<p>You gather the cards and toss them into a hat. You then select one randomly from the hat and place it on the table. Given that the side facing up is blue, what is the probability that the other side is also a blue?</p>@
qu.1.22.answer=1@
qu.1.22.choice.1=2/3@
qu.1.22.choice.2=1/3@
qu.1.22.choice.3=1/2@
qu.1.22.choice.4=1/4@
qu.1.22.fixed=@

qu.1.23.mode=Multiple Choice@
qu.1.23.name=6A: Child problem@
qu.1.23.comment=@
qu.1.23.editing=useHTML@
qu.1.23.solution=@
qu.1.23.algorithm=$Q1 = "6A";@
qu.1.23.uid=dd020bb2-ae46-4497-859b-ee633e9c3384@
qu.1.23.info=  Use=Yes;
@
qu.1.23.question=<p>Given that a randomly selected family has two chidren and at least one of them is a boy, what is the probability of the other child being a girl?.</p>
<p>&nbsp;</p>@
qu.1.23.answer=1@
qu.1.23.choice.1=2/3@
qu.1.23.choice.2=1/2@
qu.1.23.choice.3=1/3@
qu.1.23.choice.4=Cannot be determined@
qu.1.23.fixed=@

qu.1.24.mode=Multiple Choice@
qu.1.24.name=01. Picking Chips@
qu.1.24.comment=<p>Let B1 be the event "select a blue chip on the first draw", R2 the event "select a red chip on the second draw". Then the question gives us:</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 mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>B1</mi><mo lspace='0.0em' rspace='0.0em'>&cap;</mo><mi>R2</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mi mathvariant='normal'>$PBRTop</mi><mrow><mn>128</mn></mrow></mfrac></mrow></mrow></mstyle></math>&nbsp;&nbsp; and&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 mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>B1</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mi mathvariant='normal'>$PBTop</mi><mrow><mn>16</mn></mrow></mfrac></mrow></mrow></mstyle></math></p>
<p>Using the conditional probability rule we 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><mi mathvariant='normal'>P</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lpar;</mo><mi>R2</mi><mo lspace='0.1111111em' rspace='0.1111111em' stretchy='true'>&verbar;</mo><mi>B1</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 mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>B1</mi><mo lspace='0.0em' rspace='0.0em'>&cap;</mo><mi>R2</mi></mrow></mfenced></mrow><mrow><mi mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>B1</mi></mrow></mfenced></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mi mathvariant='normal'>$PBRTop</mi><mrow><mn>128</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>16</mn><mrow><mi mathvariant='normal'>$PBTop</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo></mrow><mrow><mfrac><mrow><mi mathvariant='normal'>$AnsTop</mi></mrow><mrow><mi mathvariant='normal'>$AnsBot</mi></mrow></mfrac></mrow></mstyle></math></p>@
qu.1.24.editing=useHTML@
qu.1.24.solution=@
qu.1.24.algorithm=$Q=1;
$PBRTop=range(16,64,8);
$PBTop=range(3,7,2);
condition:gt(8*$PBTop,$PBRTop);
$AnsTop=$PBRTop;
$AnsBot=8*$PBTop;
$Alt1Top=$AnsTop;
$Alt1Bot=8*$PBTop+24;
$Alt2Top=$AnsTop+3;
$Alt2Bot=$AnsBot;
$Alt3Top=($PBTop+1)/2;
$Alt3Bot=$PBTop*2+1;@
qu.1.24.uid=47318b73-80ba-4905-bbff-b050dae23330@
qu.1.24.info=  Difficulty=2;
  Type=MC;
@
qu.1.24.question=<div title="UW Statistics Bank/Probability/Conditional Probability/Q$Q">A box contains blue chips and red chips. A person selects two chips without replacement. If the probability of selecting a blue chip and then a red chip 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 mathvariant='normal'>$PBRTop</mi><mrow><mn>128</mn></mrow></mfrac></mrow></mstyle></math> , and the probability of selecting a blue chip on the first draw 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 mathvariant='normal'>$PBTop</mi><mrow><mn>16</mn></mrow></mfrac></mrow></mstyle></math> , find the probability of selecting the red chip on the second draw, given that the first chip selected was a blue chip.</div>@
qu.1.24.answer=1@
qu.1.24.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><mi mathvariant='normal'>$AnsTop</mi><mrow><mi mathvariant='normal'>$AnsBot</mi></mrow></mfrac></mrow></mstyle></math>@
qu.1.24.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><mi mathvariant='normal'>$Alt1Top</mi><mrow><mi mathvariant='normal'>$Alt1Bot</mi></mrow></mfrac></mrow></mstyle></math>@
qu.1.24.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><mi mathvariant='normal'>$Alt2Top</mi><mrow><mi mathvariant='normal'>$Alt2Bot</mi></mrow></mfrac></mrow></mstyle></math>@
qu.1.24.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><mi mathvariant='normal'>$Alt3Top</mi><mrow><mi mathvariant='normal'>$Alt3Bot</mi></mrow></mfrac></mrow></mstyle></math>@
qu.1.24.fixed=@

qu.2.topic=Sample Spaces@

qu.2.1.mode=Multiple Choice@
qu.2.1.name=10. Arrange numbers@
qu.2.1.comment=<div title="STAT240/Mathematical Probability Models (C2)/From Tests/Q$Q">The sample space consists of all permutations of the set {1,2,...,$n}. There are $n! such permutations.</div>@
qu.2.1.editing=useHTML@
qu.2.1.solution=@
qu.2.1.algorithm=$Q=10;
$n=range(4,9,1);
$Ans=fact($n);@
qu.2.1.uid=302f5226-4ea1-4d8f-9af3-640fc32e8f58@
qu.2.1.info=  Course=230;
  Origin=quiz;
  Difficulty=1;
  Type=MC;
@
qu.2.1.question=<div title="UW Statistics Bank/Probability/Sample Spaces/Q$Q">
<img width="50" hspace="4" height="50" align="right" src="__BASE_URI__Tools/TestGuy.gif" alt="This question is from a quiz W06, Test 1/Version 1 Q1a" title="This question is from a quiz W06, Test 1/Version 1 Q1a [IMG:TestGuy.gif]" />The digits {1,2,...,$n} are randomly arranged in a row. How many elements are in the Sample Space?</div>@
qu.2.1.answer=3@
qu.2.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><mfenced open='(' close=')' separators=','><mrow><munderover><mrow><mo mathcolor='#0000ff' lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow><mrow><mn>2</mn></mrow><mrow><mi mathvariant='normal'>$n</mi></mrow></munderover></mrow></mfenced></mrow></mstyle></math>@
qu.2.1.choice.2=$n@
qu.2.1.choice.3=$n!@
qu.2.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><mrow><mi mathvariant='normal'>$n</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow><mrow><mn>2</mn><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac></mrow></mstyle></math>@
qu.2.1.choice.5=10@
qu.2.1.fixed=@

qu.2.2.mode=Multiple Choice@
qu.2.2.name=07. Random select from sequence@
qu.2.2.comment=<p>How many ways can you permute <em>n</em> distinct digits? Pick the first in <em>n</em> ways, the second in <em>n-1</em> ways, etc. The total number of permutations is just <em>n x n-1 x n-2 x ... x 1</em> or <em>n!</em></p>@
qu.2.2.editing=useHTML@
qu.2.2.solution=@
qu.2.2.algorithm=$Q=7;
$n=range(5,12,1);@
qu.2.2.uid=14fd8e37-1248-4642-a6bc-a94b156a7b1b@
qu.2.2.info=  Course=202;
  Difficulty=1;
  Type=MC;
@
qu.2.2.question=<div title="UW Statistics Bank/Probability/Sample Spaces/Q$Q">The digits {1, 2,...,$n} are randomly arranged in a row. The sample space is a set with ____ elements that is best described by _____ .</div>@
qu.2.2.answer=4@
qu.2.2.choice.1=$n elements; {1},{2},{3}, ... ,{$n}@
qu.2.2.choice.2=$n elements;  {1},{1,2},{1,2,3}, ..., {1,2,3,...,$n}@
qu.2.2.choice.3=1+2+6+...+$n! elements;  all permutations of the following sets: {1},{1,2},{1,2,3}, ...,{1,2,3...,$n}@
qu.2.2.choice.4=$n! elements;  all permutations of the digits (1,2,3,...,$n) .@
qu.2.2.choice.5=You cannot describe this sample space in finite terms.@
qu.2.2.fixed=@

qu.2.3.mode=Multiple Choice@
qu.2.3.name=04. 5 letter combinations@
qu.2.3.comment=<p>There are 5 ways to select the first letter. Then, because repetition is not allowed, there are 4 ways to select the second and so on. Multiply these together to get the total number of ways.</p>@
qu.2.3.editing=useHTML@
qu.2.3.solution=@
qu.2.3.algorithm=$Q=4;
$L1=switch(rint(3),"A","B","D");
$L2=switch(rint(4),"E","F","G","H");
$L3=switch(rint(3),"J","L","N");
$L4=switch(rint(5),"O","P","Q","R","S");
$L5=switch(rint(3),"U","W","X");
$N = range(2,4,1);
$Ans = fact(5)/fact(5-$N);
$Alt1 =int(range(1.1,1.65,0.01)*$Ans);
$Alt2 = int(range(0.3,0.8,0.1)*$Ans);
$Alt3 = switch(rint(2),int(0.5*($Ans+$Alt1)),int(0.5*($Ans+$Alt2)));@
qu.2.3.uid=d32cbaac-a72a-4ccb-b03a-8a2c89a62b35@
qu.2.3.info=  Course=202;
  Type=MC;
@
qu.2.3.question=<div title="UW Statistics Bank/Probability/Sample Spaces/Q$Q">If the letters $L1, $L2, $L3, $L4, and $L5 are to be used in a $N-letter code, how many different codes are possible if repetitions are <em>not</em> permitted?</div>@
qu.2.3.answer=1@
qu.2.3.choice.1=$Ans@
qu.2.3.choice.2=$Alt1@
qu.2.3.choice.3=$Alt2@
qu.2.3.choice.4=$Alt3@
qu.2.3.fixed=@

qu.2.4.question=<div title="UW Statistics Bank/Probability/Sample Spaces/Q$Q"><img hspace="4" align="$Align" alt="A die" src="__BASE_URI__Probability/SS/Die$Which.gif" title="A die [IMG:Die$Which.gif]" />When a 6-sided die is rolled $Text, there are __________ possible outcomes.</div>@
qu.2.4.answer.num=$Ans@
qu.2.4.answer.units=@
qu.2.4.showUnits=false@
qu.2.4.grading=exact_value@
qu.2.4.negStyle=minus@
qu.2.4.numStyle=thousands scientific dollars arithmetic@
qu.2.4.mode=Numeric@
qu.2.4.name=02. Dice sample space@
qu.2.4.comment=<p>Each roll has 6 possible outcomes, so just multiply 6 times itself $NumRolls times = 6<sup>$NumRolls</sup> = $Ans.</p>@
qu.2.4.editing=useHTML@
qu.2.4.solution=@
qu.2.4.algorithm=$Q=2;
$Which=rint(4);
$Align=switch(rint(2),"Left","Right");
$NumRolls=rint(3)+1;
$Align=switch(rint(2),"Left","Right");
$Text=switch($NumRolls-1,"once", "twice","three times");
$Ans=6^$NumRolls;@
qu.2.4.uid=2a3b9cd9-4a4a-4eeb-8a8c-1bcac6272458@
qu.2.4.info=  Course=202;
  Course=230;
  Type=numeric;
@

qu.2.5.mode=Multiple Choice@
qu.2.5.name=05. Password@
qu.2.5.comment=<p>For each digit there are 10 choices, since you are allowing repitition. So there are 10<sup>$N</sup> possible passwords.</p>@
qu.2.5.editing=useHTML@
qu.2.5.solution=@
qu.2.5.algorithm=$Q = 5;
$N = range(2,5,1);
$Ans = 10^($N);
$Alt1 = fact(10)/fact(10-$N);
$Alt2 = $N*10;
$Alt3 = fact($N);
$Alt4=int(range(1.1,1.9,0.1)*$Ans);@
qu.2.5.uid=0d87c878-bf93-47a0-99b9-c035cf6b4cac@
qu.2.5.info=  Course=202;
  Type=MC;
@
qu.2.5.question=<div title="UW Statistics Bank/Probability/Sample Spaces/Q$Q">Suppose you use 0,1,2,..., 9 to create a $N-digit password, how many possible combination of passwords are you able to create? (Repetitions are allowed)</div>@
qu.2.5.answer=1@
qu.2.5.choice.1=$Ans@
qu.2.5.choice.2=$Alt1@
qu.2.5.choice.3=$Alt2@
qu.2.5.choice.4=$Alt3@
qu.2.5.choice.5=$Alt4@
qu.2.5.fixed=@

qu.2.6.mode=Multiple Choice@
qu.2.6.name=03. Ways to take courses@
qu.2.6.comment=<p>Just multiply the number of courses available in each discipline:</p>
<p>$Math*$Science*$History = $Ans</p>@
qu.2.6.editing=useHTML@
qu.2.6.solution=@
qu.2.6.algorithm=$Q=3;
$Math=range(2,6,1);
$Science=range(2,5,1);
$History=range(3,7,1);
$Ans=$Math*$Science*$History;
$Alt1=$Math+$Science+$History;
$Alt2=$Ans+$Alt1;
$Alt3=int(range(0.4,0.7,0.1)*$Ans);@
qu.2.6.uid=1706c320-ba11-4c76-b045-3b5150cbfbeb@
qu.2.6.info=  Course=202;
  Type=MC;
@
qu.2.6.question=<div title="UW Statistics Bank/Probability/Sample Spaces/Q$Q"><img width="65" hspace="4" height="58" align="right" src="__BASE_URI__Probability/SS/Student.gif" alt="Study" title="Study [IMG:Student.gif]" />There are $Math different mathematics courses, $Science different science courses, and $History different history courses. If a student must take one of each, how many different ways can this be done?</div>@
qu.2.6.answer=3@
qu.2.6.choice.1=$Alt1@
qu.2.6.choice.2=$Alt2@
qu.2.6.choice.3=$Ans@
qu.2.6.choice.4=$Alt3@
qu.2.6.fixed=@

qu.2.7.mode=Multiple Choice@
qu.2.7.name=09. Sample Space - Random selection of 2 numbers from set@
qu.2.7.comment=<p>Be careful! There ARE 14 possible outcomes for this experiment - look at this table of possible outcomes:</p>
<table cellspacing="0" cellpadding="0" bordercolor="#111111" border="1" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td>&nbsp;</td>
            <td colspan="5">2nd draw</td>
        </tr>
        <tr>
            <td>1st draw</td>
            <td align="right">1</td>
            <td align="right">2</td>
            <td align="right">3</td>
            <td align="right">4</td>
            <td align="right">5</td>
        </tr>
        <tr>
            <td align="right">1</td>
            <td align="center">x</td>
            <td align="center">&nbsp;</td>
            <td align="center">x</td>
            <td align="center">&nbsp;</td>
            <td align="center">&nbsp;</td>
        </tr>
        <tr>
            <td align="right">2</td>
            <td align="center">&nbsp;</td>
            <td align="center">x</td>
            <td align="center">&nbsp;</td>
            <td align="center">x</td>
            <td align="center">&nbsp;</td>
        </tr>
        <tr>
            <td align="right">3</td>
            <td align="center">x</td>
            <td align="center">&nbsp;</td>
            <td align="center">x</td>
            <td align="center">&nbsp;</td>
            <td align="center">x</td>
        </tr>
        <tr>
            <td align="right">4</td>
            <td align="center">&nbsp;</td>
            <td align="center">x</td>
            <td align="center">&nbsp;</td>
            <td align="center">x</td>
            <td align="center">&nbsp;</td>
        </tr>
        <tr>
            <td align="right">5</td>
            <td align="center">&nbsp;</td>
            <td align="center">&nbsp;</td>
            <td align="center">x</td>
            <td align="center">&nbsp;</td>
            <td align="center">x</td>
        </tr>
    </tbody>
</table>
<p>where "x" shows impossible outcomes. (Note that these outcomes are NOT  equally likely, but you weren't asked that.)</p>@
qu.2.7.editing=useHTML@
qu.2.7.solution=@
qu.2.7.algorithm=@
qu.2.7.uid=2f51449a-0508-4221-a233-6647b12e7fc0@
qu.2.7.info=  Course=230;
  Difficulty=2;
  Type=MC;
@
qu.2.7.question=<div title="UW Statistics Bank/Probability/Sample Spaces/Q9">Two numbers are selected from the set {1,2,3,4,5} as follows:
<p>&nbsp;</p>
<ul>
    <li>The first number is selected at random. Call it x.</li>
    <li>x, x+2 and x-2 (if both exist) are removed from the set and the second number is selected at random from what is left.</li>
</ul>
<p>For example if x = 2 then the second number is selected from {1,3,5} since 2 and 4 are removed. <br />
<br />
How large is the sample space for this experiment? As an example, (1,2) and (1,4) are in the sample space, but (1,3) or (1,1) are not.</p>
</div>@
qu.2.7.answer=2@
qu.2.7.choice.1=10@
qu.2.7.choice.2=14@
qu.2.7.choice.3=12@
qu.2.7.choice.4=9@
qu.2.7.choice.5=None of the above.@
qu.2.7.fixed=4@

qu.2.8.mode=Multiple Choice@
qu.2.8.name=08. Die-coin experiment@
qu.2.8.comment=<p>Notice that the fact that the coin is weighted is irrelevant, we only care about possible outcomes - not their probability of ocurring!</p>
<p>Let's find how many points have the die value <span style="font-style: italic;">n</span> where <span style="font-style: italic;">n</span> is from {1,2,3,4,5,6}. Each element for this roll will have the form {<span style="font-style: italic;">n</span>,C<sub>1</sub>C<sub>2</sub>...C<sub>n</sub>} where each C<sub>i</sub> is H or T. There are 2<sup>n</sup> ways to have a sequence of <span style="font-style: italic;">n</span> H's and T's. Thus there are 2<span style="font-style: italic;"><sup>n</sup></span> elements in the sample space associated with die roll <span style="font-style: italic;">n</span>. In total then we have 2<sup>1</sup> + 2<sup>2</sup> + .. + 2<sup>6</sup> =&nbsp; 126 elements.</p>@
qu.2.8.editing=useHTML@
qu.2.8.solution=@
qu.2.8.algorithm=$Q=8;
$PB=range(3,6);
$PT=range(1,$PB-1);
$PML=mathml("$PT/$PB");
$Which1=rint(4);
$Align1=switch(rint(2),"Left","Right");
$Which2=rint(4);
$Align2=switch(rint(2),"Left","Right");@
qu.2.8.uid=4daed87d-daf3-4a8b-acbc-6cb64b124b42@
qu.2.8.info=  Difficulty=2;
  Algorithmic=no;
  Course=230;
@
qu.2.8.question=<div title="UW Statistics Bank/Probability/Sample Spaces/Q$Q"><img hspace="4" align="$Align1" src="__BASE_URI__Probability/SS/CanCoin$Which1.gif" alt="Coin" title="Coin [IMG:CanCoin$Which1.gif]" /><img hspace="4" align="$Align2" title="Die [IMG:Die$Which.gif]" src="__BASE_URI__Probability/SS/Die$Which2.gif" alt="Die" />An experiment generates events as follows:<br />
<ul>
    <li>First a 6-sided die is tossed.</li>
    <li>Next as many coins as the number on the die face are tossed.</li>
</ul>
<p>For example possible elements of this experiments Sample Space are {2,TT}, {4,HTHT}, {1,T}, {1,H}.</p>
<p>However in this experiment a weighted coin is used that has a probability of $PML of a Head coming up.<br />
<br />
How many elements are in the Sample Space?</p>
</div>@
qu.2.8.answer=4@
qu.2.8.choice.1=6@
qu.2.8.choice.2=6!@
qu.2.8.choice.3=1!+2!+...+5!+6!@
qu.2.8.choice.4=126@
qu.2.8.choice.5=64@
qu.2.8.fixed=@

qu.2.9.mode=Multiple Choice@
qu.2.9.name=01. Sample Space for a Menu@
qu.2.9.comment=<p>Number of possible dinners is (# Appetizers)(#Main Courses)(#Desserts) = $Apps * $Main *&nbsp; $Dess</p>@
qu.2.9.editing=useHTML@
qu.2.9.solution=@
qu.2.9.algorithm=$Q=1;
$Which=rint(4);
$Align=switch(rint(2),"Left","Right");
$Apps=range(3,5,1);
$Main=range(3,7,1);
$Dess=range(3,5,1);
$Ans=$Apps*$Main*$Dess;
$Alt1=$Apps+$Main+$Dess;
$Alt2=int(($Ans+$Alt1)/2);
$Alt3=$Ans+$Alt1+rint(12);@
qu.2.9.uid=771eb3cd-504d-4079-b7d7-78360d9f79fa@
qu.2.9.info=  Difficulty=1;
  Course=230;
  Course=202;
@
qu.2.9.question=<div title="UW Statistics Bank/Probability/Sample Spaces/Q$Q"><img hspace="4" align="$Align" src="__BASE_URI__Probability/SS/Dinner$Which.gif" alt="Dinner" title="Dinner [IMG:Dinner$Which.gif]" />If a menu has a choice of $Apps appetizers, $Main main courses, and $Dess desserts, then the sample space for all possible dinners has how many outcomes?</div>@
qu.2.9.answer=1@
qu.2.9.choice.1=$Ans@
qu.2.9.choice.2=$Alt1@
qu.2.9.choice.3=$Alt2@
qu.2.9.choice.4=$Alt3@
qu.2.9.fixed=@

qu.2.10.question=<div title="UW Statistics Bank/Probability/Sample Spaces/Q$Q"><img width="100" height="51" align="$Align" title="Two dice [IMG:Dice4n8Sided.gif]" src="__BASE_URI__Probability/SS/Dice4n8Sided.gif" alt="Two dice" />There are two unusual dice: one has $a faces and the other has $b. The first is labelled from 1 to $a and the other is from 1 to $b. Assume faces are equally likely to occur for both dice. Consider the experiment when both dice are tossed once. How large is the Sample Space?</div>@
qu.2.10.answer.num=$a*$b@
qu.2.10.answer.units=@
qu.2.10.showUnits=false@
qu.2.10.grading=exact_value@
qu.2.10.negStyle=minus@
qu.2.10.numStyle=thousands scientific dollars arithmetic@
qu.2.10.mode=Numeric@
qu.2.10.name=11. 2 unusual dice, SS size?@
qu.2.10.comment=<p>The total number of different outcomes is just the product of the number of faces, or <font size="3" face="Times New Roman">$a*$b = $Ans</font>.</p>@
qu.2.10.editing=useHTML@
qu.2.10.solution=@
qu.2.10.algorithm=$Q=10;
$a=range(4,12,2);
$b=range(5,11,1);
$Ans=$a*$b;
$Align=switch(rint(2),"Left","Right");@
qu.2.10.uid=33d16aaf-bc4f-4747-bd33-68eac6d0c8e3@
qu.2.10.info=  Course=230;
  Difficulty=0;
  Type=numeric;
@

qu.3.topic=Complement, Mutually Exclusive & Independence@

qu.3.1.mode=True False@
qu.3.1.name=03. Independence@
qu.3.1.comment=@
qu.3.1.editing=useHTML@
qu.3.1.solution=@
qu.3.1.algorithm=$Q="03";
$PA=range(0.1,0.8,0.1);
$PB=range(0.2,0.7,0.1);
$PAORB=range(0.2,0.7,0.1);
condition:ne($PAORB,$PA+$PB);@
qu.3.1.uid=d60affc5-1f30-4bb1-bd53-0165906e7245@
qu.3.1.info=  Use=Yes;
@
qu.3.1.question=<div title="STAT202/Test 3/Other Questions/Q$Q  [21.]">Suppose that P(A) =$PA, P(B)=$PB, and P(A or B) =$PAORB. Are A and B independent?</div>@
qu.3.1.answer=2@
qu.3.1.choice.1=True@
qu.3.1.choice.2=False@
qu.3.1.fixed=@

qu.3.2.mode=True False@
qu.3.2.name=02. Independence@
qu.3.2.comment=@
qu.3.2.editing=useHTML@
qu.3.2.solution=@
qu.3.2.algorithm=$Q="02";
$PA=range(0.1,0.8,0.1);
$PB=range(0.2,0.7,0.1);
$PAB=$PA*$PB;@
qu.3.2.uid=536105dc-01dd-4dc2-97f1-38475e75a8bb@
qu.3.2.info=  Use=Yes;
@
qu.3.2.question=<div title="STAT202/Test 3/Other Questions/Q$Q  [18.]">Suppose that P(A) =$PA, P(B)=$PB, and P(AB) =$PAB. Are A and B independent?</div>@
qu.3.2.answer=1@
qu.3.2.choice.1=True@
qu.3.2.choice.2=False@
qu.3.2.fixed=@

qu.3.3.mode=Multiple Choice@
qu.3.3.name=33. Grades for large class - P(C OR M)@
qu.3.3.comment=<p>P(C OR M) = P(C) + P(M) - P(C AND M)</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><mi>$Ctotal</mi><mrow><mi>$TOTAL</mi></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mfrac><mi>$Mtotal</mi><mrow><mi>$TOTAL</mi></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><mfrac><mi>$CM</mi><mrow><mi>$TOTAL</mi></mrow></mfrac></mrow></mrow></mstyle></math></p>
<p>= $ANSWER</p>@
qu.3.3.editing=useHTML@
qu.3.3.solution=@
qu.3.3.algorithm=$Q=33;
$AM=range(5,30,1);
$BM=range(5,30,1);
$CM=range(5,30,1);
$DM=range(5,30,1);
$FM=range(5,30,1);
$AW=range(5,30,1);
$BW=range(5,30,1);
$CW=range(5,30,1);
$DW=range(5,30,1);
$FW=range(5,30,1);
$Mtotal=$AM+$BM+$CM+$DM+$FM;
$Wtotal=$AW+$BW+$CW+$DW+$FW;
$TOTAL=$Mtotal+$Wtotal;
$Atotal=$AM+$AW;
$Btotal=$BM+$BW;
$Ctotal=$CM+$CW;
$Dtotal=$DM+$DW;
$Ftotal=$FM+$FW;
$ANSWER=decimal(4,$Ctotal/$TOTAL+$Mtotal/$TOTAL-$CM/$TOTAL);
$wrong1=decimal(4,$Ctotal/$TOTAL+$Mtotal/$TOTAL);
$wrong2=decimal(4,$Mtotal/$TOTAL);
$wrong3=decimal(4,$Ctotal/$TOTAL);
$wrong4=decimal(4,$Ctotal/$Mtotal);@
qu.3.3.uid=431daafd-a79b-49c4-970e-3e89e17abccc@
qu.3.3.info=  Course=230;
@
qu.3.3.question=<div title="UW Statistics Bank/Probability/Pr/Q$Q">The following table shows the final marks, as letter grades, for a class of $TOTAL students:
<p>&nbsp;</p>
<p>
<table width="200" cellspacing="1" cellpadding="1" border="1" align="center">
    <tbody>
        <tr>
            <td>&nbsp;</td>
            <td><strong>M(en)</strong></td>
            <td><strong>W(omen)</strong></td>
            <td><strong>Total</strong></td>
        </tr>
        <tr>
            <td><strong>A</strong></td>
            <td align="right">$AM</td>
            <td align="right">$AW</td>
            <td align="right">$Atotal</td>
        </tr>
        <tr>
            <td><strong>B</strong></td>
            <td align="right">$BM</td>
            <td align="right">$BW</td>
            <td align="right">$Btotal</td>
        </tr>
        <tr>
            <td><strong>C</strong></td>
            <td align="right">$CM</td>
            <td align="right">$CW</td>
            <td align="right">$Ctotal</td>
        </tr>
        <tr>
            <td><strong>D</strong></td>
            <td align="right">$DM</td>
            <td align="right">$DW</td>
            <td align="right">$Dtotal</td>
        </tr>
        <tr>
            <td><strong>F</strong></td>
            <td align="right">$FM</td>
            <td align="right">$FW</td>
            <td align="right">$Ftotal</td>
        </tr>
        <tr>
            <td><strong>Total</strong></td>
            <td align="right">$Mtotal</td>
            <td align="right">$Wtotal</td>
            <td align="right">$TOTAL</td>
        </tr>
    </tbody>
</table>
</p>
<p>There are 7 variables here: one for each of the letter grades (A, B, C, D, F) and one for each gender (M, W). Find P(C OR M).</p>
</div>@
qu.3.3.answer=5@
qu.3.3.choice.1=$wrong1@
qu.3.3.choice.2=$wrong2@
qu.3.3.choice.3=$wrong3@
qu.3.3.choice.4=$wrong4@
qu.3.3.choice.5=$ANSWER@
qu.3.3.fixed=@

qu.3.4.mode=Multiple Choice@
qu.3.4.name=02. Grades by gender: P(C OR M)@
qu.3.4.comment=<p>P(C OR M) = P(C) + P(M) - P(C AND M) =&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><mi mathvariant='normal'>$Ctotal</mi><mrow><mi mathvariant='normal'>$TOTAL</mi></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mfrac><mi mathvariant='normal'>$Mtotal</mi><mrow><mi mathvariant='normal'>$TOTAL</mi></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mfrac><mi mathvariant='normal'>$CM</mi><mrow><mi mathvariant='normal'>$TOTAL</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$ANSWER</mi></mrow></mstyle></math> .</p>@
qu.3.4.editing=useHTML@
qu.3.4.solution=@
qu.3.4.algorithm=$Q="02";
$AM=range(5,30,1);
$BM=range(5,30,1);
$CM=range(5,30,1);
$DM=range(5,30,1);
$FM=range(5,30,1);
$AW=range(5,30,1);
$BW=range(5,30,1);
$CW=range(5,30,1);
$DW=range(5,30,1);
$FW=range(5,30,1);
$Mtotal=$AM+$BM+$CM+$DM+$FM;
$Wtotal=$AW+$BW+$CW+$DW+$FW;
$TOTAL=$Mtotal+$Wtotal;
$Atotal=$AM+$AW;
$Btotal=$BM+$BW;
$Ctotal=$CM+$CW;
$Dtotal=$DM+$DW;
$Ftotal=$FM+$FW;
$ANSWER=decimal(4,$Ctotal/$TOTAL+$Mtotal/$TOTAL-$CM/$TOTAL);
$wrong1=decimal(4,$Ctotal/$TOTAL+$Mtotal/$TOTAL);
$wrong2=decimal(4,$Mtotal/$TOTAL);
$wrong3=decimal(4,$Ctotal/$TOTAL);
$wrong4=decimal(4,$Ctotal/$Mtotal);@
qu.3.4.uid=4baaad0f-07e0-4a95-b10f-e34d23b74713@
qu.3.4.info=  Difficulty=3;
  Type=MC;
@
qu.3.4.question=<div title="UW Statistics Bank/Probability/Complement, Mutually Exclusive &amp; Independence/Q$Q">The following table shows the final marks, as letter grades, for a class of $TOTAL students:
<p>
<table width="200" cellspacing="1" cellpadding="1" border="1" align="center">
    <tbody>
        <tr>
            <td>&nbsp;</td>
            <td><strong>M(en)</strong></td>
            <td><strong>W(omen)</strong></td>
            <td><strong>Total</strong></td>
        </tr>
        <tr>
            <td><strong>A</strong></td>
            <td align="right">$AM</td>
            <td align="right">$AW</td>
            <td align="right">$Atotal</td>
        </tr>
        <tr>
            <td><strong>B</strong></td>
            <td align="right">$BM</td>
            <td align="right">$BW</td>
            <td align="right">$Btotal</td>
        </tr>
        <tr>
            <td><strong>C</strong></td>
            <td align="right">$CM</td>
            <td align="right">$CW</td>
            <td align="right">$Ctotal</td>
        </tr>
        <tr>
            <td><strong>D</strong></td>
            <td align="right">$DM</td>
            <td align="right">$DW</td>
            <td align="right">$Dtotal</td>
        </tr>
        <tr>
            <td><strong>F</strong></td>
            <td align="right">$FM</td>
            <td align="right">$FW</td>
            <td align="right">$Ftotal</td>
        </tr>
        <tr>
            <td><strong>Total</strong></td>
            <td align="right">$Mtotal</td>
            <td align="right">$Wtotal</td>
            <td align="right">$TOTAL</td>
        </tr>
    </tbody>
</table>
</p>
<p>There are 7 variables here: one for each of the letter grades (A, B, C, D, F) and one for each gender (M, W). Find P(C OR M).</p>
</div>@
qu.3.4.answer=5@
qu.3.4.choice.1=$wrong1@
qu.3.4.choice.2=$wrong2@
qu.3.4.choice.3=$wrong3@
qu.3.4.choice.4=$wrong4@
qu.3.4.choice.5=$ANSWER@
qu.3.4.fixed=@

qu.3.5.mode=Inline@
qu.3.5.name=01. Independence@
qu.3.5.comment=<p>Notice that P(AB) $EqSign P(A)P(B) so by definition A and B are $Say.</p>@
qu.3.5.editing=useHTML@
qu.3.5.solution=@
qu.3.5.algorithm=$Q=01;
$PA=range(0.1,0.8,0.1);
$PB=range(0.2,0.7,0.1);
$TypeIs=rint(2);
$PAB=switch($TypeIs,$PA*$PB,range(0.5,0.8)*$PA*$PB);
$Say=switch($TypeIs,"independent","not independent");
$EqSign=switch($TypeIs,"=","≠");
$Ans=switch($TypeIs,"True","False");
$NotAns=switch($TypeIs,"False","True");@
qu.3.5.uid=9d8899cc-3f8e-40d0-b8d4-defbba0d5338@
qu.3.5.info=  Course=202;
  Difficulty=0;
@
qu.3.5.weighting=1@
qu.3.5.numbering=alpha@
qu.3.5.part.1.comment.3=@
qu.3.5.part.1.comment.2=@
qu.3.5.part.1.name=sro_id_1@
qu.3.5.part.1.comment.1=@
qu.3.5.part.1.editing=useHTML@
qu.3.5.part.1.fixed=2@
qu.3.5.part.1.question=null@
qu.3.5.part.1.choice.3=Not enough information is given to determine this.<br>@
qu.3.5.part.1.choice.2=$NotAns@
qu.3.5.part.1.choice.1=$Ans@
qu.3.5.part.1.mode=Multiple Choice@
qu.3.5.part.1.display=vertical@
qu.3.5.part.1.answer=1@
qu.3.5.question=<div title="UW Statistics Bank/Probability/Complement, Mutually Exclusive &amp; Independence/Q$Q">Suppose that P(A) =$PA, P(B)=$PB, and P(AB) =$PAB. Are A and B independent? <span>&nbsp;</span><1><span>&nbsp;</span></div>@

qu.3.6.mode=True False@
qu.3.6.name=08. Independence@
qu.3.6.comment=<p>Let M and S be the events "Person is myopic" and "Person has astigmatism" respectively. This events are independent if and only if the probability of both occurring is 0. This is obviously not so as we are told $Both people have both ailments. Thus these conditions are not independent.</p>@
qu.3.6.editing=useHTML@
qu.3.6.solution=@
qu.3.6.algorithm=$Q=8;
$Myopic=range(40,80,5);
$Stigmatic=range(30,60,5);
$Both=range(4,80,4);
condition:lt($Both,min($Myopic,$Stigmatic)-5);
$Union=$Myopic+$Stigmatic;
$UnionFree=$Union-$Both;@
qu.3.6.uid=3b4d470e-e910-4725-9b93-46f9232271a8@
qu.3.6.info=  Type=TF;
  Course=202;
  Author=Lucy Wang/Sean Scott;
@
qu.3.6.question=<div title="University of Waterloo Statistics Bank/Probability/Complement, Mutually Exclusive &amp; Independence/Q$Q">There are $Myopic people who are myopic, $Stigmatic people have astigmatism, $Both have both.Is myopism independent of astigmatism?</div>@
qu.3.6.answer=2@
qu.3.6.choice.1=True@
qu.3.6.choice.2=False@
qu.3.6.fixed=@

qu.3.7.question=<div title="UW Statistics Bank/Probability/Complement, Mutually Exclusive &amp; Independence/Q$Q">A sample of $TOTAL people are checked to determine their blood type. The results show that $O have type O, $A have Type A, $B have type B and the remaining individuals have Type AB. If one person is randomly selected, what is the probability that this person has either type A or type AB blood? (Please express your answer as a fraction or answer to 4 decimal places).</div>@
qu.3.7.answer.num=$ANSWER@
qu.3.7.answer.units=@
qu.3.7.showUnits=false@
qu.3.7.grading=toler_abs@
qu.3.7.err=.001@
qu.3.7.negStyle=minus@
qu.3.7.numStyle=thousands scientific dollars arithmetic@
qu.3.7.mode=Numeric@
qu.3.7.name=03. P(A or AB blood)@
qu.3.7.comment=<p>Represent the different bloodtypes by their letters.</p>
<p>Then AB = $TOTAL - A - B -  O = $TOTAL - $A - $B - $O = $AB.</p>
<p>It follows that A + AB = $A + $AB =  $APAB.</p>
<p>Therefore P(A OR AB) = <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 mathvariant='normal'>A</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi mathvariant='normal'>AB</mi></mrow><mrow><mi mathvariant='normal'>Total</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mi mathvariant='normal'>$APAB</mi><mrow><mi mathvariant='normal'>$TOTAL</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$ANSWER</mi></mrow></mstyle></math>.</p>@
qu.3.7.editing=useHTML@
qu.3.7.solution=@
qu.3.7.algorithm=$Q=03;
$A=range(20,50,1);
$B=range(20,50,1);
$O=range(20,50,1);
$AB=range(20,50,1);
$APAB=$A+$AB;
$TOTAL=$A+$B+$O+$AB;
$ANSWER=decimal(4,($A+$AB)/$TOTAL);@
qu.3.7.uid=174487bb-63a3-43fd-8e12-430213bca1db@
qu.3.7.info=  Difficulty=2;
  Type=numeric;
@

qu.3.8.mode=True False@
qu.3.8.name=4A. Independence@
qu.3.8.comment=@
qu.3.8.editing=useHTML@
qu.3.8.solution=@
qu.3.8.algorithm=$Q="3A";
$PA=range(0.1,0.8,0.1);
$PB=range(0.2,0.7,0.1);
$PAORB=range(0.2,0.7,0.1);
condition:ne($PAORB,$PA+$PB);@
qu.3.8.uid=59aa45e0-6d79-4474-abe1-afadd68e7697@
qu.3.8.info=  Use=Yes;
@
qu.3.8.question=<div title="STAT202/Test 3/Other Questions/Q$Q  [21.]">Suppose that P(A) =$PA, P(B)=$PB, and P(A or B) =$PAORB. Are A and B independent?</div>@
qu.3.8.answer=2@
qu.3.8.choice.1=True@
qu.3.8.choice.2=False@
qu.3.8.fixed=@

qu.3.9.mode=Multiple Choice@
qu.3.9.name=05. Apartment Building II@
qu.3.9.comment=<p>First add up the numbers to determine there are $S apartments in total.&nbsp; Of these, $X22 are 2 bedroom apartments on the second floor. The probability of being such an apartment then 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 mathvariant='normal'>$X22</mi><mrow><mi mathvariant='normal'>$S</mi></mrow></mfrac></mrow></mstyle></math>, so the probability of NOT being a two bedroom second floor apartment 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><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mfrac><mi mathvariant='normal'>$X22</mi><mrow><mi mathvariant='normal'>$S</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math>.</p>@
qu.3.9.editing=useHTML@
qu.3.9.hint.1=Perhaps this helps:<br />    <br />    If an apartment is selected at random, what is the probability that it is NOT (a 2 bedroom apartment on the 2nd floor)?@
qu.3.9.solution=@
qu.3.9.algorithm=$Q=5;
$Which=rint(4);
$Align=switch(rint(2),"Left","Right");
$X11	=	range(1,5,1);
$X12	=	range(1,5,1);
$X13	=	range(1,5,1);
$X21	=	range(1,5,1);
$X22	=	range(1,5,1);
$X23	=	range(1,5,1);
$X31	=	range(1,5,1);
$X32	=	range(1,5,1);
$X33	=	range(1,5,1);
$S 	=	$X11+$X12+$X13+$X21+$X22+$X23+$X31+$X32+$X33;
$Ans = decimal(4,1-($X22/$S));
$Alt1=decimal(4,range(0.4,0.8,0.05)*$Ans);
$Alt2=decimal(4,$Ans+range(0.4,0.8,0.05)*(1-$Ans));
$Alt3=decimal(4,0.5*($Ans+switch(rint(2),$Alt1,$Alt2)));@
qu.3.9.uid=2bdceb1f-5484-4766-95c3-a6ec44a544db@
qu.3.9.info=  Course=202;
  Author=Sean Scott;
  Source=Dr. Ghodsi;
  Difficulty=3;
@
qu.3.9.question=<div title="UW Statistics Bank/Probability/Complement, Mutually Exclusive &amp; Independence/Q$Q"><img hspace="4" align="$Align" src="__BASE_URI__Probability/C_ME_I/Apartment$Which.gif" alt="Apartment building" title="Apartment building [IMG:Apartment$Which.gif]" />An apartment building has the following apartments:   <br />
<br />
<center>
<table cellspacing="3" bordercolor="#111111" border="0" id="AutoNumber1" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td>&nbsp;</td>
            <td align="center" colspan="3">Bedrooms</td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td>1</td>
            <td>2</td>
            <td>3</td>
        </tr>
        <tr>
            <td>1st floor</td>
            <td align="center">$X11</td>
            <td align="center">$X12</td>
            <td align="center">$X13</td>
        </tr>
        <tr>
            <td>2nd floor</td>
            <td align="center">$X21</td>
            <td align="center">$X22</td>
            <td align="center">$X23</td>
        </tr>
        <tr>
            <td>3rd floor</td>
            <td align="center">$X31</td>
            <td align="center">$X32</td>
            <td align="center">$X33</td>
        </tr>
    </tbody>
</table>
</center> <br />
If an apartment is selected at random, what is the probability that it is NOT a 2 bedroom apartment on the 2nd floor?</div>@
qu.3.9.answer=1@
qu.3.9.choice.1=$Ans@
qu.3.9.choice.2=$Alt1@
qu.3.9.choice.3=$Alt2@
qu.3.9.choice.4=$Alt3@
qu.3.9.fixed=@

qu.3.10.mode=Multiple Choice@
qu.3.10.name=07. P(~Weather Event)@
qu.3.10.comment=<p>If an outcome has probability P of happening, then it has a probability 1 - P of not happening. Thus here the answer is 1 - $P = $Ans.</p>@
qu.3.10.editing=useHTML@
qu.3.10.solution=@
qu.3.10.algorithm=$Q=7;
$Which=rint(5);
$Align=switch(rint(2),"Left","Right");
$Weather=switch($Which-1,"snow","be warmer","be windy","be sunny","rain","be colder");
$P=range(0.15,0.85,0.05);
$Ans=decimal(2,1-$P);
$Alt1=decimal (2,range(0.4,0.8,0.05)*$Ans);
$Alt2=decimal(2,$Ans+range(0.4,0.8,0.05)*(1-$Ans));
$Alt3=decimal(2,0.5*($Ans+switch(rint(2),$Alt1,$Alt2)));@
qu.3.10.uid=43be38fd-d9cc-406c-b2a1-d1862ff7a48c@
qu.3.10.info=  Course=202;
  Course=230;
  Difficulty=0;
@
qu.3.10.question=<div title="UW Statistics Bank/Probability/Complement, Mutually Exclusive &amp; Independence/Q$Q"><img align="$Align" src="__BASE_URI__Probability/C_ME_I/Weather$Which.gif" alt="Weather" title="Weather [IMG:Weather$Which.gif]" />If the probability that it will $Weather tomorrow is $P, then the probability that it will not $Weather tomorrow is:</div>@
qu.3.10.answer=1@
qu.3.10.choice.1=$Ans@
qu.3.10.choice.2=$Alt1@
qu.3.10.choice.3=$Alt2@
qu.3.10.choice.4=$Alt3@
qu.3.10.fixed=@

qu.3.11.question=<div title="UW Statistics Bank/Probability/Pr/Q$Q">A sample of $TOTAL people are checked to determine their blood type. The results show that $O have type O, $A have Type A, $B have type B and the remaining individuals have Type AB. If one person is randomly selected, what is the probability that this person has either type A or type AB blood? (Please express your answer as a fraction or answer to 4 decimal places).</div>@
qu.3.11.answer.num=$Ans@
qu.3.11.answer.units=@
qu.3.11.showUnits=false@
qu.3.11.grading=toler_abs@
qu.3.11.err=0.0005@
qu.3.11.negStyle=minus@
qu.3.11.numStyle=thousands scientific dollars arithmetic@
qu.3.11.mode=Numeric@
qu.3.11.name=34. Blood types - P(A U AB)@
qu.3.11.comment=<p>Represent the different bloodtypes by their letters.</p>
<p>Then AB = $TOTAL - A - B -  O = $TOTAL - $A - $B - $O = $AB.</p>
<p>It follows that A + AB = $A + $AB =  $APAB.</p>
<p>Therefore P(A OR AB) = <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>A</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>AB</mi></mrow><mrow><mi>Total</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mi>$APAB</mi><mrow><mi>$TOTAL</mi></mrow></mfrac></mrow></mrow></mstyle></math> = $Ans.</p>@
qu.3.11.editing=useHTML@
qu.3.11.solution=@
qu.3.11.algorithm=$Q=34;
$A=range(20,50,1);
$B=range(20,50,1);
$O=range(20,50,1);
$AB=range(20,50,1);
$APAB=$A+$AB;
$TOTAL=$A+$B+$O+$AB;
$Ans=decimal(4,($A+$AB)/$TOTAL);@
qu.3.11.uid=e2e54f3b-671b-4b3c-92df-0300c3542423@
qu.3.11.info=  Course=230;
@

qu.3.12.mode=Multiple Choice@
qu.3.12.name=06. Recycling@
qu.3.12.comment=<p>First add up the total number of people - there are $S people in the study.</p>
<p>We want P(Male) + P(no opinion) - P(male and has no opinion)</p>
<p>We subtract because we are "double-counting" the unopinionated males since they are in both the other two groups. Each of these probabilities is the number of people in the group&nbsp; divided by the total number:</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><mi mathvariant='normal'>$M</mi><mrow><mi mathvariant='normal'>$S</mi></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mfrac><mi mathvariant='normal'>$No</mi><mrow><mi mathvariant='normal'>$S</mi></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><mfrac><mi mathvariant='normal'>$Both</mi><mrow><mi mathvariant='normal'>$S</mi></mrow></mfrac></mrow></mrow></mstyle></math> = <font size="3" face="Times New Roman">$Ans</font></p>
<p>&nbsp;</p>@
qu.3.12.editing=useHTML@
qu.3.12.solution=@
qu.3.12.algorithm=$Q=6;
$Align=switch(rint(2),"Left","Right");
$Which=rint(4);
$X11 = range(20,30,1);
$X12 = range(10,20,1);
$X13 = range(10,20,1);
$X21 = range(10,33,1);
$X22 = range(10,20,1);
$X23 = range(10,20,1);
$M=$X11+$X12+$X13;
$No=$X13+$X23;
$Both=$X13;
$S = $X11+$X12+$X13+$X21+$X22+$X23;
$Ans =decimal(4,$M/$S + $No/$S - $Both/$S);
$Alt1=decimal(4,range(0.4,0.8,0.05)*$Ans);
$Alt2=decimal(4,$Ans+range(0.4,0.8,0.05)*(1-$Ans));
$Alt3=decimal(4,0.5*($Ans+switch(rint(2),$Alt1,$Alt2)));@
qu.3.12.uid=c7d72a25-4ba7-4362-b386-f7c4c0f97abe@
qu.3.12.info=  Course=202;
  Author=Sean Scott;
  Source=Dr. Ghodsi;
@
qu.3.12.question=<div title="UW Statistics Bank/Probability/Complement, Mutually Exclusive &amp; Independence/Q$Q"><img hspace="4" align="$Align" alt="Recycling" title="Recycling [IMG:Recycling$Which.gif]" src="__BASE_URI__Probability/C_ME_I/Recycling$Which.gif" />In a recent study, the following data was obtained in response to the question, &ldquo;Do you favor recycling in your neighbourhood?&rdquo;   <br />
<br />
<center>
<table cellspacing="2" cellpadding="0" bordercolor="#111111" border="1" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td>&nbsp;</td>
            <td align="center"><em>Yes</em></td>
            <td align="center"><em>No</em></td>
            <td align="center"><em>No Opinion</em></td>
        </tr>
        <tr>
            <td>Males</td>
            <td align="center">$X11</td>
            <td align="center">$X12</td>
            <td align="center">$X13</td>
        </tr>
        <tr>
            <td>Females</td>
            <td align="center">$X21</td>
            <td align="center">$X22</td>
            <td align="center">$X23</td>
        </tr>
    </tbody>
</table>
</center>
<p>If a person is picked at random, what is the probability that the person is either male or has no opinion regarding recycling?</p>
</div>@
qu.3.12.answer=1@
qu.3.12.choice.1=$Ans@
qu.3.12.choice.2=$Alt1@
qu.3.12.choice.3=$Alt2@
qu.3.12.choice.4=$Alt3@
qu.3.12.fixed=@

qu.3.13.mode=Multiple Choice@
qu.3.13.name=04. Apartment Building@
qu.3.13.comment=<p>You want P(2nd floor) + P(3 bedrooms) - P(2nd floor and 3 bedrooms).</p>
<p>The subtraction is necessary because the first two terms both inlclude apartments on the 2nd floor which have 3 bedrooms (i.e. you are double-counting).</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><mi mathvariant='normal'>$SecondFloor</mi><mrow><mi mathvariant='normal'>$S</mi></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mfrac><mi mathvariant='normal'>$ThreeBedroom</mi><mrow><mi mathvariant='normal'>$S</mi></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><mfrac><mi mathvariant='normal'>$Both</mi><mrow><mi mathvariant='normal'>$S</mi></mrow></mfrac></mrow></mrow></mstyle></math>= <font size="3" face="Times New Roman">$Ans</font></p>@
qu.3.13.editing=useHTML@
qu.3.13.solution=@
qu.3.13.algorithm=$Q="04";
$Which=rint(4);
$Align=switch(rint(2),"Left","Right");

$X11=range(1,5,1);
$X12=range(1,5,1);
$X13=range(1,5,1);
$X21=range(1,5,1);
$X22=range(1,5,1);
$X23=range(1,5,1);
$X31=range(1,5,1);
$X32=range(1,5,1);
$X33=range(1,5,1);
$S = $X11+$X12+$X13+$X21+$X22+$X23+$X31+$X32+$X33;
$SecondFloor=$X21+$X22+$X23;
$ThreeBedroom=$X13+$X23+$X33;
$Both=$X23;
$Ans = decimal(4,($SecondFloor)/$S + ($ThreeBedroom)/$S - $Both/$S);
$Alt1=decimal(4,$Ans+range(0.5,0.9,0.01)*(1-$Ans));
$Alt2=decimal(4,range(0.5,0.9,0.01)*$Ans);
$Alt3=decimal(4,0.5*($Ans+switch(rint(2),$Alt1,$Alt2)));@
qu.3.13.uid=2e99fc58-6051-4056-84f1-04549df1738e@
qu.3.13.info=  Course=202;
  Course=230;
  Author=Sean Scott;
  Difficulty=3;
@
qu.3.13.question=<div title="UW Statistics Bank/Probability/Complement, Mutually Exclusive &amp; Independence/Q$Q"><img hspace="4" align="$Align" src="__BASE_URI__Probability/C_ME_I/Apartment$Which.gif" alt="Apartment building" title="Apartment building [IMG:Apartment$Which.gif]" />An apartment building has the following apartments:   <br />
<br />
<center>
<table cellspacing="3" bordercolor="#111111" border="0" id="AutoNumber1" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td>&nbsp;</td>
            <td align="center" colspan="3">Bedrooms</td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td>1</td>
            <td>2</td>
            <td>3</td>
        </tr>
        <tr>
            <td>1st floor</td>
            <td align="center">$X11</td>
            <td align="center">$X12</td>
            <td align="center">$X13</td>
        </tr>
        <tr>
            <td>2nd floor</td>
            <td align="center">$X21</td>
            <td align="center">$X22</td>
            <td align="center">$X23</td>
        </tr>
        <tr>
            <td>3rd floor</td>
            <td align="center">$X31</td>
            <td align="center">$X32</td>
            <td align="center">$X33</td>
        </tr>
    </tbody>
</table>
</center> <br />
If an apartment is selected at random, what is the probability that it is on the 2nd floor or has 3 bedrooms?</div>@
qu.3.13.answer=4@
qu.3.13.choice.1=$Alt1@
qu.3.13.choice.2=$Alt2@
qu.3.13.choice.3=$Alt3@
qu.3.13.choice.4=$Ans@
qu.3.13.fixed=@

qu.4.topic=With Replacement@

qu.4.1.mode=Multiple Choice@
qu.4.1.name=01. P(all pick different courses)@
qu.4.1.comment=<p>There are $p<sup>$n</sup> ways for the students to select courses. How many of these ways result in all choosing differently? Well, that's like asking how many ways can we choose $n courses without replacement. The answer is $p($p-1)($p-2)...($p-$n+1) = $p<sup>($n)</sup> . Therefore 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><msubsup><mi mathvariant='normal'>$p</mi><mrow></mrow><mrow><mfenced open='(' close=')' separators=','><mrow><mi mathvariant='normal'>$n</mi></mrow></mfenced></mrow></msubsup></mrow><mrow><msup><mi mathvariant='normal'>$p</mi><mrow><mi mathvariant='normal'>$n</mi></mrow></msup></mrow></mfrac></mrow></mstyle></math>.</p>@
qu.4.1.editing=useHTML@
qu.4.1.solution=@
qu.4.1.algorithm=$Q=01;
$p=range(5,15);
$n=range(4,$p-1);@
qu.4.1.uid=8076edeb-08a4-471b-8729-3ebad9d64019@
qu.4.1.info=  Difficulty=1;
  Type=MC;
@
qu.4.1.question=<div title="UW Statistics Bank/Probability/With Replacement/Q$Q">$n students are each picking one course from a list of $p courses. What is the probability they all pick different courses? Assume students choose courses independently of each other.</div>@
qu.4.1.answer=4@
qu.4.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><mfrac><mrow><mi mathvariant='normal'>$n</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow><mrow><mi mathvariant='normal'>$p</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac></mrow></mstyle></math>@
qu.4.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><mfrac><mfenced open='(' close=')' separators=','><mrow><munderover><mrow><mo mathcolor='#0000ff' lspace='0.0em' rspace='0.0em'>&#32;</mo><mo mathcolor='#0000ff' lspace='0.0em' rspace='0.0em'>&#32;</mo><mo mathcolor='#0000ff' lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow><mrow><mi mathvariant='normal'>$n</mi></mrow><mrow><mi mathvariant='normal'>$p</mi></mrow></munderover></mrow></mfenced><mrow><msup><mi mathvariant='normal'>$n</mi><mrow><mi mathvariant='normal'>$p</mi></mrow></msup></mrow></mfrac><mspace height='0.0ex' width='0.0em' depth='0.0ex' linebreak='newline'/><mspace height='0.0ex' width='0.0em' depth='0.0ex' linebreak='auto'/></mrow></mstyle></math>@
qu.4.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><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>1</mn><mrow><mi mathvariant='normal'>$p</mi></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$n</mi></mrow></msup></mrow></mstyle></math>@
qu.4.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 mathvariant='normal'>$p</mi><mrow><mfenced open='(' close=')' separators=','><mrow><mi mathvariant='normal'>$n</mi></mrow></mfenced></mrow></msup><mrow><msup><mi mathvariant='normal'>$p</mi><mrow><mi mathvariant='normal'>$n</mi></mrow></msup></mrow></mfrac></mrow></mstyle></math>@
qu.4.1.choice.5=None of the above.@
qu.4.1.fixed=4@

qu.4.2.mode=Multiple Choice@
qu.4.2.name=12. Pick a number@
qu.4.2.comment=@
qu.4.2.editing=useHTML@
qu.4.2.solution=@
qu.4.2.algorithm=$Q=12;
$X1 = range(1,5,1);
$XN = range(6,10,1);
$ANS = ($XN-$X1+1)^-1;
$ALT1 = ($XN-$X1+1)^-2;
$ALT2 = range(0.1,0.5,0.00001);
$ALT3 = ($XN-$X1+1)^-3;@
qu.4.2.uid=0a6e7d00-8d6a-4242-aac2-b09c157471d0@
qu.4.2.info=  Use=Yes;
@
qu.4.2.question=<div title="STAT202/Test 3/Probability/Q$Q  [25.]">A student and a professor each choose a number between $X1 and $XN ($X1 and $XN are both possible choices). What is the probability that the two choose the same number?</div>@
qu.4.2.answer=1@
qu.4.2.choice.1=$ANS@
qu.4.2.choice.2=$ALT1@
qu.4.2.choice.3=$ALT2@
qu.4.2.choice.4=$ALT3@
qu.4.2.fixed=@

qu.4.3.question=<div title="UW Statistics Bank/Probability/With Replacement/Q$Q"><img hspace="4" align="$Align" src="__BASE_URI__Probability/WR/$GifName" title="Cards [IMG:$GifName]" alt="Card hand" />Suppose $wn cards are drawn <em>with replacement</em> from a standard deck of 52 cards. What is the probability that all the cards drawn have the same face value? Ignore suits, for example the 10 of spades and the 10 of hearts have the same face value. <strong>Note: Give an exact answer </strong>(<a href="__BASE_URI__Tools/ExactAnswers.htm" onclick="window.open(this.href,'Exact','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,width=700,height=400,status'); return false"><font size="1">explained</font></a>)<strong>.</strong></div>@
qu.4.3.answer.num=(1/13)^$nm1@
qu.4.3.answer.units=@
qu.4.3.showUnits=false@
qu.4.3.grading=exact_value@
qu.4.3.negStyle=minus@
qu.4.3.numStyle=thousands scientific dollars arithmetic@
qu.4.3.mode=Numeric@
qu.4.3.name=08. P(all cards have same face)@
qu.4.3.comment=<p>Since drawing is done with replacement the events are independent. <u>You do not care what the first card drawn is</u>. All that matters is that the remaining $wnm1 cards drawn have the same face value as the first. The probability that a drawn card matches the first one 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>1</mn><mrow><mn>13</mn></mrow></mfrac></mrow></mstyle></math>. Since the events are independent the probability of all of them happening is just the product of their probabilities. Thus we have $wnm1 occurrences of <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>1</mn><mrow><mn>13</mn></mrow></mfrac></mrow></mstyle></math> multiplied together, or <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>13</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$nm1</mi></mrow></msup></mrow></mstyle></math>.<br />
<br />
What if the question had asked the probability of drawing (for example) $wn $CardIs's? The answer would actually be&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><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>1</mn><mrow><mn>13</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$n</mi></mrow></msup></mrow></mstyle></math>. Do you see why?</p>@
qu.4.3.editing=useHTML@
qu.4.3.hint.1=Since drawing is done with replacement, these events are independent.@
qu.4.3.hint.2=Does it matter what the actual face value is? In other words, do you care what face value is drawn for the first card?@
qu.4.3.solution=@
qu.4.3.algorithm=$Q=8;
$Which1=rint(13);
$CardIs=switch($Which1,"2","3","4","5","6","7","8","9","10","Jack","Queen","King","Ace");
$CardIs2=switch(rint(13),"2","3","4","5","6","7","8","9","10","Jack","Queen","King","Ace");
condition:not(eq($CardIs,$CardIs2));
$n=range(2,6,1);
$nm1=$n - 1;
$GifName=switch($n,"error","error","2Cards.gif","3Cards.gif","4Cards.gif","5Cards.gif","6Cards.gif");
$wn=switch($n,"error","error","two","three","four","five","six");
$wnm1=switch($nm1,"error","one","two","three","four","five");
$Align=switch(rint(2),"Left","Right");@
qu.4.3.uid=cc3db366-6cd4-49f6-b609-f83690fc1fa8@
qu.4.3.info=  Course=230;
  Difficulty=1;
@

qu.4.4.question=<div title="UW Statistics Bank/Probability/With Replacement/Q$Q"><img hspace="4" align="$Align" src="__BASE_URI__Probability/WR/$GifName" title="Cards [IMG:$GifName]" alt="Card hand" />Suppose $wn cards are drawn <em>with replacement</em> from a standard deck of 52 cards. What is the probability that all the cards drawn are $CardIs's? <strong>Note: Give an exact answer </strong>(<a href="__BASE_URI__Tools/ExactAnswers.htm" onclick="window.open(this.href,'Exact','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,width=700,height=400,status'); return false"><font size="1">explained</font></a>)<strong>.</strong></div>@
qu.4.4.answer.num=(1/13)^$n@
qu.4.4.answer.units=@
qu.4.4.showUnits=false@
qu.4.4.grading=exact_value@
qu.4.4.negStyle=minus@
qu.4.4.numStyle=thousands scientific dollars arithmetic@
qu.4.4.mode=Numeric@
qu.4.4.name=09. P(all drawn are a given value)@
qu.4.4.comment=<p>Since drawing is done with replacement the events are independent.</p>
<p>The probability of drawing a $CardIs for the first card 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>1</mn><mrow><mn>13</mn></mrow></mfrac></mrow></mstyle></math>. Now, what is the probability that the remaining $wnm1 card(s) are also $CardIs's? In each case  the probability of drawing a $CardIs 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>1</mn><mrow><mn>13</mn></mrow></mfrac></mrow></mstyle></math>. Since the events are independent the probability of all of them happening is just the product of their probabilities. Thus we have $wn occurrences of <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>1</mn><mrow><mn>13</mn></mrow></mfrac></mrow></mstyle></math> multiplied together, or <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>13</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$n</mi></mrow></msup></mrow></mstyle></math>(1/13)<sup>$n</sup>.<br />
<br />
Notice that the result would be the same regardless of what the actual face value of the card is. For example if the question had asked the probability of drawing $wn $CardIs2's your answer would be the same. However if the question had asked the probability of drawing $wn cards with the same face values, the answer would actually be&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><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>1</mn><mrow><mn>13</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$nm1</mi></mrow></msup></mrow></mstyle></math>. Do you see why?</p>@
qu.4.4.editing=useHTML@
qu.4.4.hint.1=To draw $wn $CardIs's, you obviously need the first card drawn to be a(n) $CardIs. What's the probability of that happening?@
qu.4.4.hint.2=Does it matter that the two cards drawn are both $CardIs's? For example would your approach differ if you were asked about drawing $wn $CardIs2's?@
qu.4.4.solution=@
qu.4.4.algorithm=$Q="09";
$which1=rint(13);
$CardIs=switch($which1,"2","3","4","5","6","7","8","9","10","Jack","Queen","King","Ace");
$CardIs2=switch(rint(13),"2","3","4","5","6","7","8","9","10","Jack","Queen","King","Ace");
condition:not(eq($CardIs,$CardIs2));
$n=range(2,6,1);
$nm1=$n - 1;
$wn=switch($n,"error","error","two","three","four","five","six");
$GifName=switch($n,"error","error","2Cards.gif","3Cards.gif","4Cards.gif","5Cards.gif","6Cards.gif");
$wnm1=switch($nm1,"error","one","two","three","four","five");
$Align=switch(rint(2),"Left","Right");@
qu.4.4.uid=5444e07d-092d-4b05-80e8-eef814eb7ba3@
qu.4.4.info=  Difficulty=2;
  Course=230;
  Type=numeric;
@

qu.4.5.question=<div title="University of Waterloo Statistics Bank/Probability/With Replacement/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 does NOT include a $NotIn.
<p><strong>Note: Give an exact answer </strong>(<a onclick="window.open(this.href,'Exact','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,width=700,height=440,status'); return false" href="__BASE_URI__Tools/ExactAnswers.htm"><font size="1">explained</font></a>)<strong>.</strong></p>
</div>@
qu.4.5.answer.num=$Ans@
qu.4.5.answer.units=@
qu.4.5.showUnits=false@
qu.4.5.grading=toler_abs@
qu.4.5.err=.001@
qu.4.5.negStyle=minus@
qu.4.5.numStyle=thousands scientific dollars arithmetic@
qu.4.5.mode=Numeric@
qu.4.5.name=11. n digit code, none of given digit@
qu.4.5.comment=<p>Since you are selecting with replacement this means that each time you select a digit the probability 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>8</mn><mrow><mn>9</mn></mrow></mfrac></mrow></mstyle></math> that it is NOT a $NotIn. These events are independent, so the probability of not selecting a $NotIn in each and every one of the $n times you select 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>8</mn><mn>9</mn></mfrac></mrow></mfenced><mi>$n</mi></msup></mrow></mstyle></math>.</p>@
qu.4.5.editing=useHTML@
qu.4.5.solution=@
qu.4.5.algorithm=$Q="11";
$NotIn=range(1,9);
$n=range(3,7);
$Ans=(8/9)^$n;@
qu.4.5.uid=1a9a2a84-6011-4123-b206-d860471a49c4@
qu.4.5.info=  Course=230;
  Type=numeric;
  Origin=test;
@

qu.4.6.question=<div title="University of Waterloo Statistics Bank/Probability/With Replacement/Q$Q"><img width="50" hspace="4" height="50" align="right" title="This question is from STAT 230 Fall 2002  Test 1, Q1d [IMG:TestGuy.gif]" alt="This question is from STAT 230 Fall 2002  Test 1, Q1d" src="__BASE_URI__Tools/TestGuy.gif" />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 code number has at least one digit repeated. (4 decimal accuracy)</div>@
qu.4.6.answer.num=$Ans@
qu.4.6.answer.units=@
qu.4.6.showUnits=false@
qu.4.6.grading=toler_abs@
qu.4.6.err=.001@
qu.4.6.negStyle=minus@
qu.4.6.numStyle=thousands scientific dollars arithmetic@
qu.4.6.mode=Numeric@
qu.4.6.name=13. Code Creation IV [F02 T1Q1d]@
qu.4.6.comment=Restate this as finding 1 - P(all digits are different) = <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 mathsize='10'>1</mn><mo mathsize='10' mathvariant='italic' lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mfrac><mrow><mn mathsize='10'>9</mn><mo mathsize='10' mathvariant='italic' lspace='0.0em' rspace='0.0em'>&sdot;</mo><mn mathsize='10'>8</mn><mo mathsize='10' mathvariant='italic' lspace='0.0em' rspace='0.0em'>&sdot;</mo><mo mathsize='10' mathvariant='italic' lspace='0.2222222em' rspace='0.0em'>..</mo><mo mathsize='10' mathvariant='italic' lspace='0.0em' rspace='0.0em'>&period;</mo><mo mathsize='10' mathvariant='italic' lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi mathsize='10' mathvariant='normal'>$NineMn</mi></mrow><mrow><msup><mn mathsize='10'>9</mn><mrow><mi mathsize='10' mathvariant='normal'>$n</mi></mrow></msup></mrow></mfrac><mo mathsize='10' mathvariant='italic' lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathsize='10' mathvariant='normal'>$Ans</mi></mrow></mstyle></math></p>@
qu.4.6.editing=useHTML@
qu.4.6.solution=@
qu.4.6.algorithm=$Q="13";
$n=range(3,7);
$NineMn=9-$n;
$Ans=decimal(4,1-fact(9)/(9^$n*fact(9-$n)));@
qu.4.6.uid=2bb0f700-20eb-45e7-a58f-80aeb9e66eb6@
qu.4.6.info=  Course=230;
  Type=numeric;
  Origin=test;
@

qu.4.7.question=<div title="University of Waterloo Statistics Bank/Probability/With Replacement/Q$Q"><img width="50" hspace="4" height="50" align="right" src="__BASE_URI__Tools/TestGuy.gif" alt="This question is from STAT 230 Fall 2002  Test 1, Q1a" title="This question is from STAT 230 Fall 2002  Test 1, Q1c [IMG:TestGuy.gif]" />A 4 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 consists of two $D1's and two $D2's.
<p><strong>Note: Give an exact answer </strong>(<a onclick="window.open(this.href,'Exact','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,width=700,height=440,status'); return false" href="__BASE_URI__Tools/ExactAnswers.htm"><font size="1">explained</font></a>)<strong>.</strong></p>
</div>@
qu.4.7.answer.num=6/6561@
qu.4.7.answer.units=@
qu.4.7.showUnits=false@
qu.4.7.grading=exact_value@
qu.4.7.negStyle=minus@
qu.4.7.numStyle=thousands scientific dollars arithmetic@
qu.4.7.mode=Numeric@
qu.4.7.name=12. 4 digit code has two 5's & two 7's@
qu.4.7.comment=<p>The probability can be found by evaluating: <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>Number</mi><mo mathvariant='italic' lspace='0.0em' rspace='0.0em'>&InvisibleTimes;</mo><mi>of</mi><mo mathvariant='italic' lspace='0.0em' rspace='0.0em'>&InvisibleTimes;</mo><mi>strings</mi><mo mathvariant='italic' lspace='0.0em' rspace='0.0em'>&InvisibleTimes;</mo><mi>with</mi><mo mathvariant='italic' lspace='0.0em' rspace='0.0em'>&InvisibleTimes;</mo><mi>two</mi><mo mathvariant='italic' lspace='0.0em' rspace='0.0em'>&InvisibleTimes;</mo><mi>$D1</mi><mo mathvariant='italic' lspace='0.1111111em' rspace='0.0em'>&apos;</mo><mi>s</mi><mo mathvariant='italic' lspace='0.0em' rspace='0.0em'>&#32;</mo><mo mathvariant='bold-italic' fontweight='bold' lspace='0.0em' rspace='0.0em'>and</mo><mo mathvariant='italic' lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>two</mi><mo mathvariant='italic' lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>$D2</mi><mo mathvariant='italic' lspace='0.1111111em' rspace='0.0em'>&apos;</mo><mi>s</mi></mrow><mrow><mi>Total</mi><mo mathvariant='italic' lspace='0.0em' rspace='0.0em'>&InvisibleTimes;</mo><mi>number</mi><mo mathvariant='italic' lspace='0.0em' rspace='0.0em'>&InvisibleTimes;</mo><mi>of</mi><mo mathvariant='italic' lspace='0.0em' rspace='0.0em'>&InvisibleTimes;</mo><mn mathvariant='italic'>4</mn><mo mathvariant='italic' lspace='0.0em' rspace='0.0em'>&InvisibleTimes;</mo><mi>digit</mi><mo mathvariant='italic' lspace='0.0em' rspace='0.0em'>&InvisibleTimes;</mo><mi>strings</mi></mrow></mfrac><mo mathvariant='italic' lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mfenced open='(' close=')' separators=','><mrow><munder><mn>4</mn><mn>2</mn></munder></mrow></mfenced></mrow><mrow><msup><mn>9</mn><mn>4</mn></msup></mrow></mfrac><mrow><mi mathvariant='normal'></mi></mrow></mrow></mstyle></math><br />
<br />
Why? The denominator is obvious (each digit can be selected in 9 different ways). The numerator? You can uniquely specify any 4 digit numbers consisting of two $D1's and two $D2's by telling the two positions of the $D1's (or the $D2's). There are C(4,2) = 6 possible ways to place two $D1's in the 4 digit string, thus there are 6 unique 4 digit numbers with two $D1's and two $D2's.</p>@
qu.4.7.editing=useHTML@
qu.4.7.solution=@
qu.4.7.algorithm=$Q="12";
$D1=range(1,9);
$D2=range(1,9);
condition:ne($D1,$D2);@
qu.4.7.uid=e9b6c687-a23c-4e2e-99d9-66666f593557@
qu.4.7.info=  Type=numeric;
  Course=230;
  Origin=test;
@

qu.4.8.question=<div title="University of Waterloo Statistics Bank/Probability/With Replacement/Q$Q"><img width="50" hspace="4" height="50" align="right" src="__BASE_URI__Tools/TestGuy.gif" alt="This question is from STAT 230 Fall 2002  Test 1, Q1a" title="This question is from STAT 230 Fall 2002  Test 1, Q1a [IMG:TestGuy.gif]" />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.
<p><strong>Note: Give an exact answer </strong>(<a href="__BASE_URI__Tools/ExactAnswers.htm" onclick="window.open(this.href,'Exact','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,width=700,height=440,status'); return false"><font size="1">explained</font></a>)<strong>.</strong></p>
</div>@
qu.4.8.answer.num=4/9@
qu.4.8.answer.units=@
qu.4.8.showUnits=false@
qu.4.8.grading=exact_value@
qu.4.8.negStyle=minus@
qu.4.8.numStyle=thousands scientific dollars arithmetic@
qu.4.8.mode=Numeric@
qu.4.8.name=10. n digit code is even@
qu.4.8.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.4.8.editing=useHTML@
qu.4.8.solution=@
qu.4.8.algorithm=$Q=10;
$n=range(3,7);
$a=$n/9;@
qu.4.8.uid=76f8c532-c87a-4899-a0b7-88b243df4192@
qu.4.8.info=  Course=230;
  Type=numeric;
  Origin=test;
@

qu.4.9.mode=Multiple Choice@
qu.4.9.name=03. P(Two pick same number)@
qu.4.9.comment=<p>Let one person select a number, it does not matter what number. Then there are $Num numbers so the probability that the second person picks the same number 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>1</mn><mrow><mi mathvariant='normal'>$Num</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&period;</mo></mrow></mstyle></math></p>@
qu.4.9.editing=useHTML@
qu.4.9.solution=@
qu.4.9.algorithm=$Q=3;
$X1 = range(1,5,1);
$XN = range($X1+3,12,1);
$Num=$XN-$X1+1;
$Ans = decimal(4,1/$Num);
$Alt1=decimal(4,range(0.4,0.8,0.05)*$Ans);
$Alt2=decimal(4,$Ans+range(0.4,0.8,0.05)*(1-$Ans));
$Alt3=decimal(4,0.5*($Ans+switch(rint(2),$Alt1,$Alt2)));@
qu.4.9.uid=3d882078-4e9a-433a-990a-1e1402c08623@
qu.4.9.info=  Course=202;
  Course=230;
  Type=MC;
  Difficulty=0;
@
qu.4.9.question=<div title="UW Statistics Bank/Probability/With Replacement/Q$Q">A student and a professor each choose a number between $X1 and $XN ($X1 and $XN are both possible choices). What is the probability that the two choose the same number?</div>@
qu.4.9.answer=1@
qu.4.9.choice.1=$Ans@
qu.4.9.choice.2=$Alt1@
qu.4.9.choice.3=$Alt2@
qu.4.9.choice.4=$Alt3@
qu.4.9.fixed=@

qu.4.10.mode=Multiple Choice@
qu.4.10.name=06. P(n H/T in m coin tosses)@
qu.4.10.comment=<p>First determine the total number of possible outcomes. Each toss has two possible values, so the total number of outcomes is 2<sup>$Tosses</sup> = $AnsBot .</p>
<p>Now, think of the coin tosses laid out in a line. Each outcome with exactly $NumHT $Which is the same as selecting $NumHT of the $Tosses positions in the line. This is just <sub>$Tosses</sub>C<sub>$NumHT</sub> =&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=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$Tosses</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi mathvariant='normal'>$NumHT</mi></mrow></mtd></mtr></mtable></mfenced><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo></mrow></mstyle></math> $AnsTop. So the probability of getting one of these 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 mathvariant='normal'>$AnsTop</mi><mrow><mi mathvariant='normal'>$AnsBot</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi><mo lspace='0.0em' rspace='0.0em'>&period;</mo></mrow></mstyle></math></p>@
qu.4.10.editing=useHTML@
qu.4.10.solution=@
qu.4.10.algorithm=$Q=6;
$Tosses=range(4,7,1);
$TossesAlpha=switch($Tosses,0,1,2,3,"four","five","six","seven");
$NumHT=range(2,1+$Tosses/2,1);
$NumHTAlpha=switch($NumHT,0,"one","two","three","four","five","six","seven");
$Which=switch(rint(2),"Heads","Tails");
$AnsTop=fact($Tosses)/(fact($NumHT)*fact($Tosses-$NumHT));
$AnsBot=2^$Tosses;
$Ans=decimal(4,$AnsTop/$AnsBot);
$Alt1=decimal(4,$Ans/2);
$Alt2=decimal(4,3*$Ans/4);
$Alt3=$Ans+range(0.01,1-$Ans,0.01);@
qu.4.10.uid=f5ab3663-c5ff-4cb9-b094-5c81f6db844a@
qu.4.10.info=  Course=202;
  Course=230;
  Type=MC;
@
qu.4.10.question=<div title="UW Statistics Bank/Probability/With Replacement/Q$Q">
A coin is tossed $TossesAlpha times. Find the probability of getting exactly $NumHTAlpha $Which.</div>@
qu.4.10.answer=1@
qu.4.10.choice.1=$Ans@
qu.4.10.choice.2=$Alt1@
qu.4.10.choice.3=$Alt2@
qu.4.10.choice.4=$Alt3@
qu.4.10.fixed=@

qu.4.11.mode=Multiple Choice@
qu.4.11.name=05. Pick a section@
qu.4.11.comment=<p>We do not care what section the first student selects. The probability that each subsequent student selects that same section 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>1</mn><mrow><mi mathvariant='normal'>$Classes</mi></mrow></mfrac></mrow></mstyle></math>, so the probability that all the remaining students do so is the product of these independent events:<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=','><mfrac><mrow><mn>1</mn></mrow><mrow><mi mathvariant='normal'>$Classes</mi></mrow></mfrac></mfenced><mrow><mi mathvariant='normal'>$SM1</mi></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math>.</p>@
qu.4.11.editing=useHTML@
qu.4.11.solution=@
qu.4.11.algorithm=$Q=5;
$S=range(2,4);
$SM1=$S-1;
$Classes=range($S+1,$S+4,1);
$P=1/$Classes;
$Ans=decimal(4,$P^$SM1);
$Alt1=decimal(4,range(0.4,0.8,0.05)*$Ans);
$Alt2=decimal(4,$Ans+range(0.4,0.8,0.05)*(1-$Ans));
$Alt3=decimal(4,0.5*($Ans+$Alt1));
$Alt4=decimal(4,0.5*($Ans+$Alt2));@
qu.4.11.uid=3e7a87e3-b38b-4a29-b8f8-481358f3ae34@
qu.4.11.info=  Difficulty=1;
  Course=230;
@
qu.4.11.question=<div title="UW Statistics Bank/Probability/With Replacement/Q$Q">
A course has $Classes sections. A group of $S students each randomly select a section. Assume there is no restriction on the number in a section. What is the probability that all $S students end up in the same section?</div>@
qu.4.11.answer=1@
qu.4.11.choice.1=$Ans@
qu.4.11.choice.2=$Alt1@
qu.4.11.choice.3=$Alt2@
qu.4.11.choice.4=$Alt3@
qu.4.11.choice.5=$Alt4@
qu.4.11.fixed=@

qu.4.12.mode=Multiple Choice@
qu.4.12.name=07. P(all pick different courses)@
qu.4.12.comment=<p>There are $p<sup>$n</sup> ways for the students to select courses. How many of these ways result in all choosing differently? Well, that's like asking how many ways can we choose $n courses without replacement. The answer is $p($p-1)($p-2)...($p-$n+1) = $p<sup>($n)</sup> . Therefore 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><msubsup><mi mathvariant='normal'>$p</mi><mrow></mrow><mrow><mfenced open='(' close=')' separators=','><mrow><mi mathvariant='normal'>$n</mi></mrow></mfenced></mrow></msubsup></mrow><mrow><msup><mi mathvariant='normal'>$p</mi><mrow><mi mathvariant='normal'>$n</mi></mrow></msup></mrow></mfrac></mrow></mstyle></math>.</p>@
qu.4.12.editing=useHTML@
qu.4.12.solution=@
qu.4.12.algorithm=$Q=7;
$n=range(4,10);
$p=range($n+1,15);@
qu.4.12.uid=ea2d1bb0-edd0-4bbc-afbe-7a7c21747129@
qu.4.12.info=  Course=230;
  Type=numeric;
@
qu.4.12.question=<div title="UW Statistics Bank/Probability/With Replacement/Q$Q">
$n students are each picking one course from a list of $p courses. What is the probability they all pick different courses? Assume students choose courses independently of each other.</div>@
qu.4.12.answer=4@
qu.4.12.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 mathvariant='normal'>$n</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow><mrow><mi mathvariant='normal'>$p</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac></mrow></mstyle></math>@
qu.4.12.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><mfenced open='(' close=')' separators=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$p</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi mathvariant='normal'>$n</mi></mrow></mtd></mtr></mtable></mfenced><mrow><msup><mi mathvariant='normal'>$n</mi><mrow><mi mathvariant='normal'>$p</mi></mrow></msup></mrow></mfrac></mrow></mstyle></math>@
qu.4.12.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><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>1</mn><mrow><mi mathvariant='normal'>$p</mi></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$n</mi></mrow></msup></mrow></mstyle></math>@
qu.4.12.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 mathvariant='normal'>$p</mi><mrow><mfenced open='(' close=')' separators=','><mrow><mi mathvariant='normal'>$n</mi></mrow></mfenced></mrow></msup><mrow><msup><mi mathvariant='normal'>$p</mi><mrow><mi>$n</mi></mrow></msup></mrow></mfrac></mrow></mstyle></math>@
qu.4.12.choice.5=None of the above.@
qu.4.12.fixed=4@

qu.4.13.question=<div title="UW Statistics Bank/Probability/With Replacement/Q$Q">Two numbers are drawn <u>with replacement</u> from the set {$E1,$E2,$O1,$E3,$O2} . What is the probability that both are odd? Answer with 3 decimal accuracy, or use a fraction.</div>@
qu.4.13.answer.num=0.16@
qu.4.13.answer.units=@
qu.4.13.showUnits=false@
qu.4.13.grading=toler_abs@
qu.4.13.err=.01@
qu.4.13.negStyle=minus@
qu.4.13.numStyle=thousands scientific dollars arithmetic@
qu.4.13.mode=Numeric@
qu.4.13.name=02. P(Draw odd numbers)@
qu.4.13.comment=<p>Two of five numbers are odd. Each time you draw a number the probability that it is odd 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>2</mn><mrow><mn>5</mn></mrow></mfrac></mrow></mstyle></math> (since drawing is with replacement). Thus the probability BOTH are odd 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>2</mn><mrow><mn>5</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>2</mn><mrow><mn>5</mn></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mn>4</mn><mrow><mn>25</mn></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mn>0.16</mn></mrow></mstyle></math></p>@
qu.4.13.editing=useHTML@
qu.4.13.solution=@
qu.4.13.algorithm=$Q=02;
$E1=switch(rint(2),2,4);
$E2=switch(rint(3),6,8,10);
$E3=14;
$O1=switch(rint(3),1,3,5);
$O2=switch(rint(2),7,9);@
qu.4.13.uid=358a7850-b042-456e-8168-53623f7c6d37@
qu.4.13.info=  Difficulty=0;
  Type=numeric;
@

qu.4.14.question=<div title="UW Statistics Bank/Probability/With Replacement/Q$Q">
Two numbers are drawn <u>with replacement</u> from the set {$E1,$E2,$O1,$E3,$O2} . What is the probability that both are even? <strong>Note: Give an exact answer </strong>(<a onclick="window.open(this.href,'Exact','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,width=700,height=400,status'); return false" href="__BASE_URI__Tools/ExactAnswers.htm"><font size="1">explained</font></a>)<strong>.</strong></div>@
qu.4.14.answer.num=0.36@
qu.4.14.answer.units=@
qu.4.14.showUnits=false@
qu.4.14.grading=exact_value@
qu.4.14.negStyle=minus@
qu.4.14.numStyle=thousands scientific dollars arithmetic@
qu.4.14.mode=Numeric@
qu.4.14.name=04. P(Draw 2 even numbers)@
qu.4.14.comment=<p>Three of five numbers are even. Each time you draw a number the probability that it is even 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>3</mn></mrow><mrow><mn>5</mn></mrow></mfrac></mrow></mstyle></math> (since drawing is with replacement). Thus the probability BOTH are even 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>3</mn></mrow><mrow><mn>5</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mrow><mn>3</mn></mrow><mrow><mn>5</mn></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mn>9</mn></mrow><mrow><mn>25</mn></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mn>0.36</mn></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow></mstyle></math></p>@
qu.4.14.editing=useHTML@
qu.4.14.solution=@
qu.4.14.algorithm=$Q=4;
$E1=switch(rint(2),2,4);
$E2=switch(rint(3),6,8,10);
$E3=14;
$O1=switch(rint(3),1,3,5);
$O2=switch(rint(2),7,9);@
qu.4.14.uid=ce43d8ae-b708-4919-990b-d1e0b47ad887@
qu.4.14.info=  Difficulty=0;
  Type=numeric;
  Course=230;
@

qu.5.topic=Without Replacement@

qu.5.1.question=<div title="UW Statistics Bank/Probability/Without Replacement/Q$Q">$n cards are drawn <u>without replacement</u> from a standard deck of 52 cards. What is the probability that all the cards are $Color? 4 decimal accuracy please.</div>@
qu.5.1.answer.num=$Ans@
qu.5.1.answer.units=@
qu.5.1.showUnits=false@
qu.5.1.grading=toler_abs@
qu.5.1.err=.001@
qu.5.1.negStyle=minus@
qu.5.1.numStyle=thousands scientific dollars arithmetic@
qu.5.1.mode=Numeric@
qu.5.1.name=11. P(all red/black)@
qu.5.1.comment=<p><strong>The correct answer is $AnsML    or $Ans . </strong></p>
<p>Consider the probability of drawing a $Color card the first time. Since there are 26 $Color cards in a deck of 52 cards, the probability 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>26</mn><mrow><mn>52</mn></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&amp;equals;</mo><mrow><mfrac><mn>1</mn><mrow><mn>2</mn></mrow></mfrac></mrow></mrow></mstyle></math>. Now there are 25 $Color cards in a deck of 51 cards, so the probability the next card drawn is $Color 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>25</mn><mrow><mn>51</mn></mrow></mfrac></mrow></mstyle></math>, and the next <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>24</mn><mrow><mn>50</mn></mrow></mfrac></mrow></mstyle></math>etc. Since these are all independent events the probability of drawing <em>n</em> $Color cards 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>26</mn><mrow><mn>52</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>25</mn><mrow><mn>51</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mrow><mfrac><mrow><mn>26</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mfenced open='(' close=')' separators=','><mrow><mi>n</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>1</mn></mrow></mfenced></mrow><mrow><mn>52</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mfenced open='(' close=')' separators=','><mrow><mi>n</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>1</mn></mrow></mfenced></mrow></mfrac></mrow></mrow></mstyle></math>.</p>
<p>&nbsp;</p>@
qu.5.1.editing=useHTML@
qu.5.1.solution=@
qu.5.1.algorithm=$Q="11";
$Color=switch(rint(2),"red","black");
$n=range(2,8,1);
$AnsFract=maple("(26!/(26-$n)!)*((52-$n)!/52!)");
$AnsML=mathml("$AnsFract");
$Ans=decimal(4,$AnsFract);@
qu.5.1.uid=cfa1ab88-d027-4150-8fa4-15980d471ad3@
qu.5.1.info=  Difficulty=2;
  Course=230;
  Type=numeric;
@

qu.5.2.mode=Multiple Choice@
qu.5.2.name=01. P(2 chem profs)@
qu.5.2.comment=<p>First the total number of profs to pick from is <font size="3" face="Times New Roman">$NumStat + $NumChem = $Total</font></p>
<p>The probability that the first prof picked is from chemistry 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 mathvariant='normal'>$NumChem</mi><mrow><mi mathvariant='normal'>$Total</mi></mrow></mfrac></mrow></mstyle></math>. That leaves <font size="3" face="Times New Roman">$TotalM1</font> profs of whom <font size="3" face="Times New Roman">$NumChemM1 </font>are Chemists, so the probability of selecting the second prof from the Chemists 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 mathvariant='normal'>$NumChemM1</mi><mrow><mi mathvariant='normal'>$TotalM1</mi></mrow></mfrac></mrow></mstyle></math>, so the probability that both are Chemistry profs 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 mathvariant='normal'>$NumChem</mi><mrow><mi mathvariant='normal'>$Total</mi></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mi mathvariant='normal'>$NumChemM1</mi><mrow><mi mathvariant='normal'>$TotalM1</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math>.</p>@
qu.5.2.editing=useHTML@
qu.5.2.solution=@
qu.5.2.algorithm=$Q=1;
$NumStat = range(2,5,1);
$NumChem=range(6,10,1);
$NumChemM1=$NumChem-1;
$Total=$NumStat+$NumChem;
$TotalM1=$Total-1;
$Ans = decimal(4,($NumChem/$Total)*($NumChem-1)/($Total-1));
$Alt1=decimal(4,$Ans+range(0.5,0.9,0.01)*(1-$Ans));
$Alt2=decimal(4,range(0.5,0.9,0.01)*$Ans);
$Alt3=decimal(4,0.5*($Ans+switch(rint(2),$Alt1,$Alt2)));@
qu.5.2.uid=fca4bb2b-815a-40bd-9b0a-ef9e918662cc@
qu.5.2.info=  Course=202;
  Course=230;
  Type=MC;
@
qu.5.2.question=<div title="UW Statistics Bank/Probability/Without Replacement/Q$Q">$NumStat statistics professors and $NumChem chemistry professors are available to be advisors to a student organization. The student organization needs two of the professors to be advisors. If each professor has an equal chance of being selected, what is the probability that both professors are chemistry professors?</div>@
qu.5.2.answer=1@
qu.5.2.choice.1=$Ans@
qu.5.2.choice.2=$Alt1@
qu.5.2.choice.3=$Alt2@
qu.5.2.choice.4=$Alt3@
qu.5.2.fixed=@

qu.5.3.mode=Multiple Choice@
qu.5.3.name=10. P(2 cards both E or O)@
qu.5.3.comment=<p>Notice that this questions assumes the A is even, that is the Ace follows the King as #14. You could just as well assume the Ace is odd (treat it as a 1). The answer will be the same, just the role of odds and evens will swap (this case shown in ( ) below.)</p>
<ol>
    <li>To draw two odds (evens), the probability of drawing the first 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>6</mn><mrow><mn>13</mn></mrow></mfrac></mrow></mstyle></math> and of drawing the second 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>23</mn><mrow><mn>51</mn></mrow></mfrac></mrow></mstyle></math> so the probability of drawing two odds (evens) is&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><mn>6</mn><mrow><mn>13</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mrow><mfrac><mn>23</mn><mrow><mn>51</mn></mrow></mfrac></mrow></mrow></mstyle></math></li>
    <li>Suppose you draw an even (odd) card first. Notice that 7 of the 13 card values are even (odd) - or if you prefer 28 of 52 cards are even (odd) - so the probability of doing this is&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><mn>7</mn><mrow><mn>13</mn></mrow></mfrac></mrow></mstyle></math>. Now, there are 27 even (odd) cards left in the 51 remaining, so the probability of drawing a second even (odd) card 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>27</mn><mrow><mn>51</mn></mrow></mfrac></mrow></mstyle></math>. The probability of drawing two even (odd) cards is&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><mn>7</mn><mrow><mn>13</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mrow><mfrac><mn>27</mn><mrow><mn>51</mn></mrow></mfrac></mrow></mrow></mstyle></math> .</li>
</ol>
<p>The probability of drawing two evens or two odds then is&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><mn>6</mn><mrow><mn>13</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>23</mn><mrow><mn>51</mn></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mfrac><mn>7</mn><mrow><mn>13</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>27</mn><mrow><mn>51</mn></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mn>327</mn><mrow><mn>663</mn></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mn>109</mn><mrow><mn>221</mn></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>0.4932</mn></mrow></mstyle></math>.</p>@
qu.5.3.editing=useHTML@
qu.5.3.solution=@
qu.5.3.algorithm=$Q=10;
$Which=rint(4);
$Align=switch(rint(2),"Left","Right");
$AnsML=mathml("109/221");
$Ans=decimal(4,109/221);
$Alt1ML=mathml("8/13");
$Alt1=decimal(4,8/13);
$Pick2=rint(3);
$Alt2ML=switch($Pick2,mathml("25/52"),mathml("27/52"),mathml("13/17"));
$Alt2=decimal(4,switch($Pick2,25/52,27/52,13/17));
$Alt3ML=mathml("25/51");
$Alt3=decimal(4,25/51);@
qu.5.3.uid=23df9e6e-57cd-4063-bf6c-cad4ee306fa1@
qu.5.3.info=  Course=230;
  Type=MC;
  Difficulty=1;
  Algorithmic=no;
@
qu.5.3.question=<div title="UW Statistics Bank/Probability/Without Replacement/Q$Q"><img hspace="4" Align="$Align" title="Two cards [IMG:2cards$Which.gif]" alt="Two cards" src="__BASE_URI__Probability/WoR/2cards$Which.gif" />Two cards are drawn without replacement from a standard deck of 52. What is the probability that they are <u>both</u> even or both odd? Count Q &amp; A as even, J &amp; K as odd.</div>@
qu.5.3.answer=1@
qu.5.3.choice.1=$AnsML ($Ans)@
qu.5.3.choice.2=$Alt1ML ($Alt1)@
qu.5.3.choice.3=$Alt2ML ($Alt2)@
qu.5.3.choice.4=$Alt3ML ($Alt3)@
qu.5.3.fixed=4@

qu.5.4.mode=Multiple Choice@
qu.5.4.name=09. P(2 cards same/diff suits)@
qu.5.4.comment=<p>The first card is drawn - you do not care what it is. However there are now 51 cards left, and $Top of them $Explain the card you just drew, so the probability of drawing one of these from the remaining cards 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 mathvariant='normal'>$Top</mi><mrow><mn>51</mn></mrow></mfrac></mrow></mstyle></math>which simplifies to $AnsML.</p>@
qu.5.4.editing=useHTML@
qu.5.4.solution=@
qu.5.4.algorithm=$Q=9;
$Which=rint(4);
$Align=switch(rint(2),"Left","Right");
$Pick=rint(2);
$Quest=switch($Pick,"the same suit","from two different suits");
$AnsML=switch($Pick,mathml("12/51"),mathml("39/51"));
$Alt1ML=switch($Pick,mathml("39/51"),mathml("12/51"));
$Alt2ML=switch($Pick,mathml("3/4"),mathml("3/13"));
$Alt3ML=switch($Pick,mathml("25/51"),mathml("28/51"));
$Alt4ML=switch($Pick,mathml("39/50"),mathml("6/25"));
$Top=switch($Pick,12,39);
$Explain=switch($Pick,"the same suit as","a different suit from");@
qu.5.4.uid=20536b08-de0c-4335-86a4-c3c127418f63@
qu.5.4.info=  Diificulty=1;
  Keyword=cards;
  Course=230;
@
qu.5.4.question=<div title="UW Statistics Bank/Probability/Without Replacement/Q$Q"><img hspace="4" align="$Align" src="__BASE_URI__Probability/WoR/2cards$Which.gif" alt="Two cards" title="Two cards [IMG:2cards$Which.gif]" />Two cards are drawn without replacement from a standard deck of 52. What is the probability that they are $Quest?</div>@
qu.5.4.answer=1@
qu.5.4.choice.1=$AnsML@
qu.5.4.choice.2=$Alt1ML@
qu.5.4.choice.3=$Alt2ML@
qu.5.4.choice.4=$Alt3ML@
qu.5.4.choice.5=$Alt4ML@
qu.5.4.fixed=4@

qu.5.5.question=<div title="University of Waterloo Statistics Bank/Probability/Without Replacement/Q$Q"><img width="50" hspace="4" height="50" align="right" title="This question is from STAT 230 W06 Test 1, Version 1, Q1b [IMG:TestGuy.gif]" alt="This question is from STAT 230 W06 Test 1, Version 1, Q1b" src="__BASE_URI__Tools/TestGuy.gif" />The digits {1,2,...,$n} are randomly arranged in a row. Find the probability that the first digit is 1 and last digit is $n. (4 decimal accuracy.)</div>@
qu.5.5.answer.num=$Ans@
qu.5.5.answer.units=@
qu.5.5.showUnits=false@
qu.5.5.grading=toler_abs@
qu.5.5.err=.001@
qu.5.5.negStyle=minus@
qu.5.5.numStyle=thousands scientific dollars arithmetic@
qu.5.5.mode=Numeric@
qu.5.5.name=15.Random sequence 1,…,n@
qu.5.5.comment=<p>Positions 1 and $n are fixed; the middle $WMidNum can permute. Answer&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><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&times;</mo><mi mathvariant='normal'>$nM2</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.2222222em' rspace='0.2222222em'>&times;</mo><mn>1</mn></mrow><mrow><mi mathvariant='normal'>$n</mi><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math> .</p>@
qu.5.5.editing=useHTML@
qu.5.5.solution=@
qu.5.5.algorithm=$Q="15";
$n=range(4,9);
$nM2=$n-2;
$WMidNum=switch($n-4,"two","three","four","five","six","seven");
$Ans=decimal(4,fact($nM2)/fact($n));@
qu.5.5.uid=ddfbce88-fbea-46be-9247-81283e69ae05@
qu.5.5.info=  Type=numeric;
  Course=230;
  Origin=test;
@

qu.5.6.mode=Multiple Choice@
qu.5.6.name=03. P(Committee makeup)@
qu.5.6.comment=<p>There are $total students in total. So divide how many ways we can select $p 2nd-year and $q 3rd-years by how many ways we can choose $comsize  at random:&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><mfrac><mrow><mrow><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$s</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi mathvariant='normal'>$p</mi></mrow></mtd></mtr></mtable></mrow></mfenced></mrow><mrow><mrow><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$t</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi mathvariant='normal'>$q</mi></mrow></mtd></mtr></mtable></mrow></mfenced></mrow><mrow></mrow></mrow></mrow><mrow><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$total</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi mathvariant='normal'>$comsize</mi></mrow></mtd></mtr></mtable></mrow></mfenced></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mi mathvariant='normal'>$AnsTop</mi><mrow><mi mathvariant='normal'>$AnsBot</mi></mrow></mfrac></mrow><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math></p>@
qu.5.6.editing=useHTML@
qu.5.6.solution=@
qu.5.6.algorithm=$Q=3;
$fi=range(1,6,1);
$s=range(2,9-$fi,1);
$t=range(1,12-$s-$fi,1);
$fo=range(1,15-$t-$s-$fi,1);
$total=$fi+$s+$t+$fo;
$comsize=range(2,0.4*$total);
$p=range(1,min($s-1,$comsize-1),1);
$q=$comsize-$p;
condition:le($q,$t);
$AnsTop=maple("combinat[numbcomb]($s,$p)*combinat[numbcomb]($t,$q)");
$AnsBot=maple("combinat[numbcomb]($total,$comsize)");
$Ans=decimal(4,$AnsTop/$AnsBot);
$Alt1=decimal(4,range(0.4,0.7,0.05)*$Ans);
$Alt2=decimal(4,$Ans+range(0.3,0.8,0.05)*(1-$Ans));
$Alt3=decimal(4,0.5*($Alt1+$Ans));
$Alt4=decimal(4,0.5*($Ans+$Alt2));@
qu.5.6.uid=b06e6f60-ef1e-433e-8cb1-159274e61090@
qu.5.6.info=  Difficulty=3;
  Type=MC;
@
qu.5.6.question=<div title="UW Statistics Bank/Probability/Without Replacement/Q$Q">Consider a group of $fi first-year, $s second-year, $t third-year and $fo fourth-year students. A committee of size $comsize is randomly selected. Calculate the probability that the committee will consist of $p second year student(s) and $q third year student(s).</div>@
qu.5.6.answer=1@
qu.5.6.choice.1=$Ans@
qu.5.6.choice.2=$Alt1@
qu.5.6.choice.3=$Alt2@
qu.5.6.choice.4=$Alt3@
qu.5.6.choice.5=$Alt4@
qu.5.6.fixed=@

qu.5.7.mode=Inline@
qu.5.7.name=07. P(Product is even)@
qu.5.7.comment=<p>P(both numbers are odd) = <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 mathvariant='normal'>$odd</mi><mrow><mi mathvariant='normal'>$total</mi></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mrow><mi mathvariant='normal'>$odd</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>1</mn></mrow><mrow><mi mathvariant='normal'>$total</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>1</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mrow><mfrac><mrow><mi mathvariant='normal'>$odd</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>2</mn></mrow><mrow><mi mathvariant='normal'>$total</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>2</mn></mrow></mfrac></mrow></mrow></mstyle></math>= $Ans2</p>
<p>P(product is even) = P(at least one choice is even) = 1 - P(all are odd)</p>
<p>= 1 - $Ans2&nbsp; = $Ans</p>@
qu.5.7.editing=useHTML@
qu.5.7.solution=@
qu.5.7.algorithm=$Q = 7;
$total=range(16,24,2);
$odd = $total/2;
$Ans = decimal(3,1-($odd)*($odd-1)*($odd-2)/($total*($total-1)*($total-2)));
$Ans2 = decimal(3,$odd*($odd-1)*($odd-2)/($total*($total-1)*($total-2)));@
qu.5.7.uid=6907b4c3-1d0d-48c3-a7b1-bd7144e97bac@
qu.5.7.info=  Course=202;
  Type=numeric;
@
qu.5.7.weighting=1,1@
qu.5.7.numbering=alpha@
qu.5.7.part.1.name=sro_id_1@
qu.5.7.part.1.answer.units=@
qu.5.7.part.1.numStyle=thousands scientific  arithmetic@
qu.5.7.part.1.editing=useHTML@
qu.5.7.part.1.showUnits=false@
qu.5.7.part.1.err=0.01@
qu.5.7.part.1.question=(Unset)@
qu.5.7.part.1.mode=Numeric@
qu.5.7.part.1.grading=toler_abs@
qu.5.7.part.1.negStyle=minus@
qu.5.7.part.1.answer.num=$Ans@
qu.5.7.part.2.name=sro_id_2@
qu.5.7.part.2.answer.units=@
qu.5.7.part.2.numStyle=thousands scientific  arithmetic@
qu.5.7.part.2.editing=useHTML@
qu.5.7.part.2.showUnits=false@
qu.5.7.part.2.err=0.01@
qu.5.7.part.2.question=(Unset)@
qu.5.7.part.2.mode=Numeric@
qu.5.7.part.2.grading=toler_abs@
qu.5.7.part.2.negStyle=minus@
qu.5.7.part.2.answer.num=$Ans2@
qu.5.7.question=<div title="UW Statistics Bank/Probability/Without Replacement/Q$Q">Three distinct integers are chosen at random from the first $total positive integers.<p>Compute the probability that their product is even: <1><span>&nbsp;</span></p><p>Compute the probability that their product is odd: <span>&nbsp;</span><2><span>&nbsp;</span></p><p>3 decimal accuracy please.</p></div>@

qu.5.8.question=<div title="UW Statistics Bank/Probability/Without Replacement/Q$Q"><img hspace=4 align="$Align" alt="Smoking" title="Smoking [IMG:Smoke$Which.gif]" src="__BASE_URI__Probability/WoR/Smoke$Which.gif" />At a party of $m men and $w women, $ms of the men and $ws of the women are smokers. If two men and two women are randomly selected, approximately what is the probability that all four are smokers? (Please answer to 3 decimal places).</div>@
qu.5.8.answer.num=$Ans@
qu.5.8.answer.units=@
qu.5.8.showUnits=false@
qu.5.8.grading=toler_abs@
qu.5.8.err=.01@
qu.5.8.negStyle=minus@
qu.5.8.numStyle=thousands scientific dollars arithmetic@
qu.5.8.mode=Numeric@
qu.5.8.name=04. P(all smoke)@
qu.5.8.comment=<p>The number of ways to choose 2 men from the $ms who smoke 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 mathvariant='normal'>$ms</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>2</mn></mrow></mtd></mtr></mtable></mrow></mfenced><mrow></mrow><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow></mrow></mtd></mtr></mtable></mrow></mrow></mstyle></math> . Similarily there are&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><mi mathvariant='normal'>$ws</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>2</mn></mrow></mtd></mtr></mtable></mrow></mfenced><mrow></mrow><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow></mrow></mtd></mtr></mtable></mrow></mrow></mstyle></math>to choose two women from the $ws who smoke. The number of ways to choose 2 men and 2 women from everyone 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 mathvariant='normal'>$ms</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>2</mn></mrow></mtd></mtr></mtable></mrow></mfenced><mrow></mrow><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$ws</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>2</mn></mrow></mtd></mtr></mtable></mrow></mfenced></mrow></mtd></mtr></mtable></mrow></mrow></mstyle></math>. Therefore, the probability that all 4 people choosen are smokers 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><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$ms</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>2</mn></mrow></mtd></mtr></mtable></mrow></mfenced><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$ws</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>2</mn></mrow></mtd></mtr></mtable></mrow></mfenced></mrow><mrow><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$m</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>2</mn></mrow></mtd></mtr></mtable></mrow></mfenced><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$w</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>2</mn></mrow></mtd></mtr></mtable></mrow></mfenced></mrow></mfrac></mrow><mrow><mi mathvariant='normal'></mi></mrow></mstyle></math>= $AnsML = $Ans</p>@
qu.5.8.editing=useHTML@
qu.5.8.solution=@
qu.5.8.algorithm=$Q=4;
$Which=rint(5);
$Align=switch(rint(2),"Left","Right");
$m=range(10,15,1);
$w=range(10,15,1);
$ms=range(3,5,1);
$ws=range(3,5,1);
$n=maple("combinat[numbcomb]($m,2)*combinat[numbcomb]($w,2)");
$ns=maple("combinat[numbcomb]($ms,2)*combinat[numbcomb]($ws,2)");
$AnsML=mathml("$ns/$n");
$Ans=decimal(3,$ns/$n);@
qu.5.8.uid=83279516-eca2-4aa6-97b5-eeba47773f10@
qu.5.8.info=  Difficulty=3;
  Type=numeric;
  Course=230;
@

qu.5.9.question=<div title="UW Statistics Bank/Probability/Without Replacement/Q$Q">Two cards are drawn without replacement from a standard deck of 52. What is the probability that the first card is a $Card, and the second is NOT a $Card? (Please answer to 4 decimals of accuracy.)</div>@
qu.5.9.answer.num=$Ans@
qu.5.9.answer.units=@
qu.5.9.showUnits=false@
qu.5.9.grading=toler_abs@
qu.5.9.err=.001@
qu.5.9.negStyle=minus@
qu.5.9.numStyle=thousands scientific dollars arithmetic@
qu.5.9.mode=Numeric@
qu.5.9.name=08. Card Draw - 2 cards - P(1st 7 & 2nd isn't)@
qu.5.9.comment=<p>The probability that the first card drawn is a $Card 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>1</mn><mrow><mn>13</mn></mrow></mfrac></mrow></mstyle></math> (or <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>4</mn><mrow><mn>52</mn></mrow></mfrac></mrow></mstyle></math> if you prefer). Then that leaves 51 cards of which 48 are NOT a $Card, so the probability of drawing a non-$Card card second 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>48</mn><mrow><mn>51</mn></mrow></mfrac></mrow></mstyle></math>. The probability of the two draws happening in sequence 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>1</mn><mrow><mn>13</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>48</mn><mrow><mn>51</mn></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>0.0724</mn></mrow></mstyle></math></p>@
qu.5.9.editing=useHTML@
qu.5.9.solution=@
qu.5.9.algorithm=$Q=8;
$Card=switch(rint(0,12),'2','3','4','5','6','7','8','9','10','Jack','Queen','King','Ace');
$Ans=0.0724;@
qu.5.9.uid=a64d18ec-dda7-425e-aabd-ed303ec60c53@
qu.5.9.info=  Difficulty=2;
  Keyword=cards;
  Course=230;
@

qu.5.10.mode=Multiple Choice@
qu.5.10.name=02. P(2 Stats books) from bookcase@
qu.5.10.comment=<p>There are $Books books to choose from initially, and $Stats of them are Statistics so the probability of selecting a Stats book the first time 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 mathvariant='normal'>$Stats</mi><mrow><mi mathvariant='normal'>$Books</mi></mrow></mfrac></mrow></mstyle></math>. Similarly the probability of doing so the second time 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 mathvariant='normal'>$StatsM1</mi><mrow><mi mathvariant='normal'>$BooksM1</mi></mrow></mfrac></mrow></mstyle></math>. So the probability 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 mathvariant='normal'>$Stats</mi><mrow><mi mathvariant='normal'>$Books</mi></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mi mathvariant='normal'>$StatsM1</mi><mrow><mi mathvariant='normal'>$BooksM1</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mi mathvariant='normal'>$AnsTop</mi><mrow><mi mathvariant='normal'>$Denom</mi></mrow></mfrac></mrow></mrow></mstyle></math></p>
<p>&nbsp;</p>@
qu.5.10.editing=useHTML@
qu.5.10.solution=@
qu.5.10.algorithm=$Q=2;
$Stats=3+rint(7);
$StatsM1=$Stats-1;
$Other=3+rint(8);
$Books=$Stats+$Other;
$BooksM1=$Books-1;
$OName=switch(rint(4),"Biology","History","Heuristics","Genetics");
$Denom=($Stats+$Other)*($Stats+$Other-1)/2;
$AnsTop=$Stats*($Stats-1)/2;
$Alt1Top=$AnsTop-1-rint($AnsTop/2);
$Alt2Top=min($Stats,$Other)+$AnsTop;
$Alt3Top=$AnsTop+$Stats+$Other;@
qu.5.10.uid=e1ec5fcb-7e02-462d-8e81-15cf967fe455@
qu.5.10.info=  Course=202;
  Course=230;
  Type=MC;
@
qu.5.10.question=<div title="UW Statistics Bank/Probability/Without Replacement/Q$Q">
A bookcase contains $Stats statistics books and $Other $OName books. If 2 books are chosen at random, the chance that both are statistics books is:</div>@
qu.5.10.answer=1@
qu.5.10.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><mi mathvariant='normal'>$AnsTop</mi><mrow><mi mathvariant='normal'>$Denom</mi></mrow></mfrac></mrow></mstyle></math>@
qu.5.10.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><mi mathvariant='normal'>$Alt1Top</mi><mrow><mi mathvariant='normal'>$Denom</mi></mrow></mfrac></mrow></mstyle></math>@
qu.5.10.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><mi mathvariant='normal'>$Alt2Top</mi><mrow><mi mathvariant='normal'>$Denom</mi></mrow></mfrac></mrow></mstyle></math>@
qu.5.10.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><mi mathvariant='normal'>$Alt3Top</mi><mrow><mi mathvariant='normal'>$Denom</mi></mrow></mfrac></mrow></mstyle></math>@
qu.5.10.fixed=@

qu.5.11.mode=Multiple Choice@
qu.5.11.name=12. P(numbers meet criteria)@
qu.5.11.comment=<p>The sample space only has 10 points! The points satisfying the criteria "$SayWhat" are shown in green, so you can just count them and divide by 10.</p>
<p>$S1(1,2,3)$EndSpan,$S2(1,2,4)$EndSpan,$S1(1,2,5)$EndSpan,$S1(1,3,4)$EndSpan,$S5(1,3,5)$EndSpan,$S1(1,4,5)$EndSpan<br />
$S2(2,3,4)$EndSpan,$S1(2,3,5)$EndSpan,$S2(2,4,5)$EndSpan<br />
$S1(3,4,5)$EndSpan</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>@
qu.5.11.editing=useHTML@
qu.5.11.solution=@
qu.5.11.algorithm=$Q=12;
$Pick=rint(7);
$SayWhat=switch($Pick,"exactly two even numbers are picked","at least two even numbers are picked","two even numbers are picked","exactly two odd numbers are picked","at least two odd numbers are picked","their sum is even","their sum is odd");
$Ans=switch($Pick,.3,.3,.3,.6,.7,.6,.4);
$Alt1=$Ans+0.1;
$Alt2=$Ans-0.1;
$Alt3=if(ne($Ans,0.4),0.5,0.2);
$Alt4=if(gt($Ans,0.4),0.3,switch(rint(2),0.6,0.7));
$S1=switch($Pick,"","","","<span style='color:green'>","<span style='color:green'>","<span style='color:green'>","");
$S2=switch($Pick,"<span style='color:green'>","<span style='color:green'>","<span style='color:green'>",'','','',"<span style='color:green'>");
$C="3,4,6, 8 and 10 are S1/ 7 & 9 are S2, S5 below";
$S5=switch($Pick,"","","","","<span style='color:green'>","","<span style='color:green'>");
$EndSpan="</span>";@
qu.5.11.uid=be1e0fe6-53a6-4eba-ac92-5f6d7499598b@
qu.5.11.info=  Course=230;
  Type=MC;
@
qu.5.11.question=<div title="UW Statistics Bank/Probability/Without Replacement/Q$Q">Three numbers are chosen from 1,2,3,4,5. What is the probability that $SayWhat? NOTE: The numbers are chosen <u>without</u> replacement.</div>@
qu.5.11.answer=1@
qu.5.11.choice.1=$Ans@
qu.5.11.choice.2=$Alt1@
qu.5.11.choice.3=$Alt2@
qu.5.11.choice.4=$Alt3@
qu.5.11.choice.5=$Alt4@
qu.5.11.fixed=4@

qu.5.12.question=<div title="University of Waterloo Statistics Bank/Probability/Without Replacement/Q16"><img width="50" hspace="4" height="50" align="right" src="__BASE_URI__Tools/TestGuy.gif" alt="This question is from STAT 230 W06, Test 1, Version 1, Q1c" title="This question is from STAT 230 W06, Test 1, Version 1, Q1c [IMG:TestGuy.gif]" /> The digits {1,2,3,4,5} are randomly arranged in a row. Find the probability that the even numbers occur side-by-side.
<p><strong>Note: Give an exact answer </strong>(<a onclick="window.open(this.href,'Exact','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,width=700,height=440,status'); return false" href="__BASE_URI__Tools/ExactAnswers.htm"><font size="1">explained</font></a>)<strong>.</strong></p>
</div>@
qu.5.12.answer.num=2/5@
qu.5.12.answer.units=@
qu.5.12.showUnits=false@
qu.5.12.grading=exact_value@
qu.5.12.negStyle=minus@
qu.5.12.numStyle=thousands scientific dollars arithmetic@
qu.5.12.mode=Numeric@
qu.5.12.name=16. Evens together in {1,2,3,4,5]@
qu.5.12.comment=<p><strong>Solution 1</strong>: 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 answer <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>2</mn><mo mathvariant='italic' lspace='0.0em' rspace='0.0em'>&sdot;</mo><mn>4</mn><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow><mrow><mn>5</mn><mo mathvariant='italic' lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow></mfrac><mo mathvariant='italic' lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mn>2</mn><mn>5</mn></mfrac></mrow></mstyle></math><br />
<strong>Solution 2</strong>: 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 <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 mathvariant='italic' lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mn>8</mn><mo mathvariant='italic' lspace='0.0em' rspace='0.0em'>&sdot;</mo><mn>3</mn><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow><mrow><mn>5</mn><mo mathvariant='italic' lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow></mfrac><mo mathvariant='italic' lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mn>2</mn><mn>5</mn></mfrac></mrow></mstyle></math></p>@
qu.5.12.editing=useHTML@
qu.5.12.solution=@
qu.5.12.algorithm=@
qu.5.12.uid=0c2d8731-aefb-4aaa-a274-61487891d5a0@
qu.5.12.info=  Course=230;
  Origin=test;
  Type=numeric;
  Algorithmic=no;
@

qu.5.13.question=<div title="UW Statistics Bank/Probability/Without Replacement/Q$Q"><img width="115" hspace="4" height="88" align="right" title="Field [IMG:Field.gif]" alt="Field" src="__BASE_URI__Probability/WoR/Field.gif" />A field consists of $nsq plots arranged in $n rows and $n columns. $n plots are chosen at random without replacement. What is the probability that these are all from the same row? (Please express your answer as a fraction or with 3 decimal accuracy).</div>@
qu.5.13.answer.num=$Ans@
qu.5.13.answer.units=@
qu.5.13.showUnits=false@
qu.5.13.grading=toler_abs@
qu.5.13.err=.01@
qu.5.13.negStyle=minus@
qu.5.13.numStyle=thousands scientific dollars arithmetic@
qu.5.13.mode=Numeric@
qu.5.13.name=05. Selecting $n plots from a field of $n^2 - P(all from same row)@
qu.5.13.comment=<p>Select the first plot. The probability of selecting the next plot from the same row 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 mathvariant='normal'>$n</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>1</mn></mrow><mrow><mi mathvariant='normal'>$nsq</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>1</mn></mrow></mfrac></mrow></mstyle></math> (there are $nsq-1 plots left, $n-1 of them are in the same row as your first pick). Similarly the probability of selecting the next plot from that row 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 mathvariant='normal'>$n</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>2</mn></mrow><mrow><mi mathvariant='normal'>$nsq</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>2</mn></mrow></mfrac></mrow></mstyle></math>, then <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 mathvariant='normal'>$n</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>3</mn></mrow><mrow><mi mathvariant='normal'>$nsq</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>3</mn></mrow></mfrac></mrow></mstyle></math> ... etc. Thus the probability of all $n from the same row 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 mathvariant='normal'>$nm1</mi><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow><mrow><mi mathvariant='normal'>P</mi><mfenced open='(' close=')' separators=','><mrow><mi mathvariant='normal'>$nsqm1</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi mathvariant='normal'>$nm1</mi></mrow></mfenced></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mi mathvariant='normal'>$AnsTop</mi><mrow><mi mathvariant='normal'>$AnsBot</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mn>1</mn><mrow><mi mathvariant='normal'>$ABR</mi></mrow></mfrac></mrow></mstyle></math> .</p>@
qu.5.13.editing=useHTML@
qu.5.13.solution=@
qu.5.13.algorithm=$Q=5;
$n=range(4,7,1);
$nm1=$n-1;
$nsq=$n^2;
$nsqm1=$nsq-1;
$Ans=maple("factorial($n-1)/combinat[numbperm]($nsq-1,$n-1)");
$AnsTop=fact($n-1);
$AnsBot=maple("combinat[numbperm]($nsq-1,$n-1)");
$ABR=$AnsBot/$AnsTop;@
qu.5.13.uid=7d2015f8-b197-43e8-a825-14e11f742a4c@
qu.5.13.info=  Difficulty=3;
  Course=240;
  Type=numeric;
@

qu.5.14.mode=Inline@
qu.5.14.name=06. Boys & Girls@
qu.5.14.comment=<p>There are $NB + $NG = $Total students in total. Once you have selected a girl student there are $NB boys left in a group of $TotalM1 students, so the probability of selecting a boy is $AnsML .</p>@
qu.5.14.editing=useHTML@
qu.5.14.solution=@
qu.5.14.algorithm=$Q="06";
$NG = range(10,20,1);
$NB = range(1,10,1);
$Total=$NG+$NB;
$TotalM1=$Total-1;
$AnsML = mathml("$NB/($Total-1)");
$Alt1ML = mathml("$NB/($NG+$NB)");
$Alt2ML = mathml("$NG/($NG+$NB-1)");
$Alt3ML = mathml("$NG/($NG+$NB)");@
qu.5.14.uid=754cde6c-6c8c-4414-9ecd-d5cb9b11eadc@
qu.5.14.info=  Course=202;
  Course=230;
  Type=MC;
@
qu.5.14.weighting=1@
qu.5.14.numbering=alpha@
qu.5.14.part.1.comment.3=@
qu.5.14.part.1.comment.2=@
qu.5.14.part.1.name=sro_id_1@
qu.5.14.part.1.comment.1=@
qu.5.14.part.1.editing=useHTML@
qu.5.14.part.1.fixed=@
qu.5.14.part.1.choice.4=$Alt3ML<br>    @
qu.5.14.part.1.question=null@
qu.5.14.part.1.choice.3=$Alt2ML@
qu.5.14.part.1.choice.2=$Alt1ML@
qu.5.14.part.1.choice.1=$AnsML@
qu.5.14.part.1.mode=Multiple Choice@
qu.5.14.part.1.display=vertical@
qu.5.14.part.1.comment.4=@
qu.5.14.part.1.answer=1@
qu.5.14.question=<div title="UW Statistics Bank/Probability/Without Replacement/Q$Q">In a second grade class containing $NG girls and $NB boys, 2 students are selected at random to give out the math papers. What is the probability that the second student chosen is a boy, given that the first one was a girl?<span>&nbsp;<br /></span><1><span>&nbsp;</span></div>@

qu.5.15.question=<div title="UW Statistics Bank/Probability/Pr/Q$Q"><img  align="$Align" alt="Smoking" src="__BASE_URI__Probability/Pr/Smoke$Which.gif" title="Smoking [IMG:Smoke$Which.gif]" hspace=4 />At a party of $m men and $w women, $ms of the men and $ws of the women are smokers. If two men and two women are randomly selected, approximately what is the probability that all four are smokers? (Please answer to 5 decimal places).
<p>&nbsp;</p>
</div>@
qu.5.15.answer.num=$Ans@
qu.5.15.answer.units=@
qu.5.15.showUnits=false@
qu.5.15.grading=toler_abs@
qu.5.15.err=0.0005@
qu.5.15.negStyle=minus@
qu.5.15.numStyle=thousands scientific dollars arithmetic@
qu.5.15.mode=Numeric@
qu.5.15.name=31. P(subgroup all smoke)@
qu.5.15.comment=<p>The number of ways to choose 2 men from the $ms who smoke 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=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi>$ms</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>2</mn></mrow></mtd></mtr></mtable></mfenced></mrow></mstyle></math> . Similarily there are <sub><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=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi>$ws</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>2</mn></mrow></mtd></mtr></mtable></mfenced></mrow></mstyle></math></sub> to choose two women from the $ws who smoke. The number of ways to choose 2 men and 2 women from everyone 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=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi>$m</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>2</mn></mrow></mtd></mtr></mtable></mfenced></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi>$w</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>2</mn></mrow></mtd></mtr></mtable></mrow></mfenced></mrow></mstyle></math>. Therefore, the probability that all 4 people chosen are smokers 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'><mfrac><mrow><mrow><mfenced open='(' close=')' separators=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi>$ms</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>2</mn></mrow></mtd></mtr></mtable></mfenced></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mrow><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi>$ws</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>2</mn></mrow></mtd></mtr></mtable></mrow></mfenced></mrow></mrow></mrow><mrow><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi>$m</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>2</mn></mrow></mtd></mtr></mtable></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi>$w</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>2</mn></mrow></mtd></mtr></mtable></mrow></mfenced></mrow></mfrac></mstyle></math>= $Ans.</p>@
qu.5.15.editing=useHTML@
qu.5.15.solution=@
qu.5.15.algorithm=$Q=31;
$Which=1+rint(5);
$Align=switch(rint(2),"Left","Right");
$m=range(10,15,1);
$w=range(10,15,1);
$ms=range(3,5,1);
$ws=range(3,5,1);
$n=maple("combinat[numbcomb]($m,2)*combinat[numbcomb]($w,2)");
$ns=maple("combinat[numbcomb]($ms,2)*combinat[numbcomb]($ws,2)");
$Ans=decimal(5,$ns/$n);@
qu.5.15.uid=ad8ec157-3a64-4217-9abe-bb2586f502d0@
qu.5.15.info=  Course=230;
@

qu.5.16.mode=Multiple Choice@
qu.5.16.name=13. P(product is even/odd)@
qu.5.16.comment=<p>There are 10 elements in this sample space:</p>
<p>(1,2,3),(1,2,4),(1,2,5),(1,3,4),(1,3,5),(1,4,5),<br />
(2,3,4),(2,3,5),(2,4,5),<br />
(3,4,5)</p>
<p>If any of the 3 numbers selected is even then the product is even. Thus the only case where the product is NOT even is (1,3,5), so the probability the product is $par 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 mathvariant='normal'>$AnsT</mi><mrow><mn>10</mn></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math> .</p>@
qu.5.16.editing=useHTML@
qu.5.16.solution=@
qu.5.16.algorithm=$Q=13;
$n=rint(2);
$par=switch($n,"even","odd");
$Ans=switch($n,0.9,0.1);
$AnsT=switch($n,9,1);
$AnsML=mathml("$AnsT/10");
$Alt1T=10-$AnsT;
$Alt1ML=mathml("$Alt1T/10");
$Alt2ML=mathml("1/2");
$Alt3ML=switch(rint(3),mathml("1/12"),mathml("3/4"),mathml("7/36"));
$Alt4ML=switch(rint(3),mathml("5/24"),mathml("7/24"),mathml("9/39"));
$Qualifier=switch($n,"","not ");@
qu.5.16.uid=46e01b55-9652-4bc6-8ef4-032cf96b4933@
qu.5.16.info=  Course=230;
  Type=MC;
@
qu.5.16.question=<div title="UW Statistics Bank/Probability/Without Replacement/Q$Q">Three numbers are chosen from 1,2,3,4,5. What is the probability that their product is $par? NOTE: The numbers are chosen without replacement.</div>@
qu.5.16.answer=1@
qu.5.16.choice.1=$AnsML@
qu.5.16.choice.2=$Alt1ML@
qu.5.16.choice.3=$Alt2ML@
qu.5.16.choice.4=$Alt3ML@
qu.5.16.choice.5=$Alt4ML@
qu.5.16.fixed=4@

qu.5.17.question=<div title="University of Waterloo Statistics Bank/Probability/Without Replacement/Q$Q"><img width="50" hspace="4" height="50" align="right" title="This question is from STAT 230 Fall 2002  Test 1, Q1e [IMG:TestGuy.gif]" alt="This question is from STAT 230 Fall 2002  Test 1, Q1e" src="__BASE_URI__Tools/TestGuy.gif" />A 4 digit code number is generated by randomly selecting digits, <strong>without replacement</strong>, from the set {1,2,3,...,9}. Find the probability that the number is even (4 decimal accuracy).<br />
<em><font size="1"><br />
</font></em></div>@
qu.5.17.answer.num=(8*7*6*4)/(9*8*7*6)@
qu.5.17.answer.units=@
qu.5.17.showUnits=false@
qu.5.17.grading=toler_abs@
qu.5.17.err=.001@
qu.5.17.negStyle=minus@
qu.5.17.numStyle=thousands scientific dollars arithmetic@
qu.5.17.mode=Numeric@
qu.5.17.name=14. 4 digit code is even@
qu.5.17.comment=<p>First determine how many possible 4 digit code numbers there are: 9 ways to pick the first, then 8 ways for the second, etc. so there are 9*8*7*6 possible 4 digit numbers.<br />
<br />
How many ways can you select an even number? There are 4 even numbers to select from for the last digit. The remaining three digits can be selected 8*7*6 ways. The probability of an even number when selecting without replacement 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>8</mn><mo mathvariant='italic' lspace='0.0em' rspace='0.0em'>&sdot;</mo><mn>7</mn><mo mathvariant='italic' lspace='0.0em' rspace='0.0em'>&sdot;</mo><mn>6</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mn>4</mn></mrow><mrow><mn>9</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mn>8</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mn>7</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mn>6</mn></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mn>4</mn><mn>9</mn></mfrac></mrow></mstyle></math> which incidentally is the same as the case when you select with replacement!</p>@
qu.5.17.editing=useHTML@
qu.5.17.solution=@
qu.5.17.algorithm=@
qu.5.17.uid=6b996eae-7ed3-4389-9c90-63ce9df36f95@
qu.5.17.info=  Course=230;
  Type=numeric;
  Origin=test;
  Algorithmic=no;
@

qu.6.topic=Naive Binomial Distribution@

qu.6.1.mode=Multiple Choice@
qu.6.1.name=15. P(4 correct)@
qu.6.1.comment=@
qu.6.1.editing=useHTML@
qu.6.1.solution=@
qu.6.1.algorithm=$Q=15;
$N = range(5,7,1);
$K = range(1,4,1);
$n = range(4,5,1);
$P = 1/$n;
$ANS=(fact($N)/(fact($K)*fact($N-$K)))*($P^($K))*(1-$P)^($N-$K);
$ALT1 = range(0.1,0.5,0.000001);
$ALT2 = range(0.5,0.95,0.000001);
$ALT3 = range(0.1,0.2,0.000001);@
qu.6.1.uid=24bf354c-1c69-49d2-bc3d-629e3a65c249@
qu.6.1.info=  Use=Yes;
@
qu.6.1.question=<div title="STAT202/Test 3/Probability/Q$Q  [29.]">A student takes a $N question multiple choice quiz with $n choices for each question. If the student guesses at random on each question, what is the probability that the student gets exactly $K questions correct?</div>@
qu.6.1.answer=3@
qu.6.1.choice.1=$ALT1@
qu.6.1.choice.2=$ALT2@
qu.6.1.choice.3=$ANS@
qu.6.1.choice.4=$ALT3@
qu.6.1.fixed=@

qu.6.2.question=<div title="UW Statistics Bank/Probability/Na&iuml;ve Binomial Distribution/Q$Q">A doctor knows $percent % of all her patients are late for their appointments. Given $n randomly selected patients, what is the approximate probability that exactly $x of them are late for their appointments? (Please answer to 4 decimal places).</div>@
qu.6.2.answer.num=$Ans@
qu.6.2.answer.units=@
qu.6.2.showUnits=false@
qu.6.2.grading=toler_abs@
qu.6.2.err=0.001@
qu.6.2.negStyle=minus@
qu.6.2.numStyle=thousands scientific dollars arithmetic@
qu.6.2.mode=Numeric@
qu.6.2.name=02. P(x patients late)@
qu.6.2.comment=<p>The probability of <font size="3" face="Times New Roman">$x</font> being late and <font size="3" face="Times New Roman">$n-$x </font>being on time is <font size="3" face="Times New Roman">($p)<sup>$x</sup>(1-$p)<sup>$n-$x</sup></font>. But there are&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><mi mathvariant='normal'>$n</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi mathvariant='normal'>$x</mi></mrow></mtd></mtr></mtable></mrow></mfenced><mrow></mrow><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow></mrow></mtd></mtr></mtable></mrow></mrow></mstyle></math> = <font size="3" face="Times New Roman">$numb</font> of ways to select the <font size="3" face="Times New Roman">$x</font> latecomers, so <font size="3" face="Times New Roman">P($x late) =($numb)($p)<sup>$x</sup>(1-$p)<sup>$n-$x</sup> =  $Ans</font>.</p>@
qu.6.2.editing=useHTML@
qu.6.2.solution=@
qu.6.2.algorithm=$Q=2;
$n=range(5,8,1);
$x=range(2,$n-1,1);
$numb=fact($n)/(fact($x)*fact($n-$x));
$p=decimal(2,range(0.1,0.9,0.01));
$percent=100*$p;
$Ans=decimal(5,$numb*($p^$x)*((1-$p)^($n-$x)));@
qu.6.2.uid=3399a73d-5ca4-408a-b888-328a55dd7457@
qu.6.2.info=  Difficulty=2;
@

qu.6.3.mode=Multiple Choice@
qu.6.3.name=2A. MC Guessing@
qu.6.3.comment=<p>First select 2 of the $Qs questions (to be the correct ones) 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>$Qs</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>2</mn></mrow></mtd></mtr></mtable></mrow></mfenced></mrow><mrow><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mi>$Qs</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow><mrow><mn>2</mn><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo><mfenced open='(' close=')' separators=','><mrow><mi>$Qs</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>2</mn></mrow></mfenced><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mi>$Qs</mi><mfenced open='(' close=')' separators=','><mrow><mi>$Qs</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>1</mn></mrow></mfenced></mrow><mrow><mn>2</mn></mrow></mfrac></mrow></mstyle></math> = $Choose ways. Multiply this by the probability of getting two correct then by the probability of getting $Qs-2 incorrect:</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>$Choose</mi><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>1</mn><mrow><mi>$Choices</mi></mrow></mfrac></mrow></mfenced><mrow><mn>2</mn></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mrow><mi>$Choices</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>1</mn></mrow><mrow><mi>$Choices</mi></mrow></mfrac></mrow></mfenced><mrow><mfenced open='(' close=')' separators=','><mrow><mi>$Qs</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>2</mn></mrow></mfenced></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>$Ans</mi></mrow></mstyle></math></p>@
qu.6.3.editing=useHTML@
qu.6.3.solution=@
qu.6.3.algorithm=$Q="2A";
$Qs=range(4,8,1);
$Choices = range(4,5,1);
$Choose=$Qs*($Qs-1)/2;
$Ans=decimal(3,$Qs*($Qs-1)/2*(1/$Choices)^2*(($Choices-1)/$Choices)^($Qs-2));
$Alt1=decimal(3,range($Ans/4,$Ans/2,0.001));
$Alt2=decimal(3,($Alt1+$Ans)/2);
$Alt3=$Ans+0.015+range(0,0.257,0.001);@
qu.6.3.uid=d3bd0e06-5d51-409c-883c-dfe0a01361b8@
qu.6.3.question=<div title="STAT202/Test 4/Probability Functions/Q$Q  [24.]">A multiple choice test has $Qs questions with $Choices choices for each question. Find the probability of getting exactly two correct answers just by guessing.</div>@
qu.6.3.answer=1@
qu.6.3.choice.1=$Ans@
qu.6.3.choice.2=$Alt1@
qu.6.3.choice.3=$Alt2@
qu.6.3.choice.4=$Alt3@
qu.6.3.fixed=@

qu.6.4.mode=Multiple Choice@
qu.6.4.name=19. Guess at MC-2@
qu.6.4.comment=@
qu.6.4.editing=useHTML@
qu.6.4.solution=@
qu.6.4.algorithm=$Q=19;
$N = range(15,20,1);
$n = range(4,5,1);
$P = 1/$n;
$P0=(fact($N)/(fact(0)*fact($N-0)))*($P^(0))*(1-$P)^($N-0);
$P1=(fact($N)/(fact(1)*fact($N-1)))*($P^(1))*(1-$P)^($N-1);
$P2=(fact($N)/(fact(2)*fact($N-2)))*($P^(2))*(1-$P)^($N-2);
$ANS = 1-$P0-$P1-$P2;
$ALT1 = range(0.1,0.5,0.000001);
$ALT2 = range(0.5,0.95,0.000001);
$ALT3 = range(0.1,0.2,0.000001);@
qu.6.4.uid=21e19f89-452a-4767-8743-f31426dabbe5@
qu.6.4.info=  Use=Yes;
@
qu.6.4.question=<div title="STAT202/Test 3/Probability/Q$Q  [33.]">If a student randomly guesses at $N multiple-choice questions, find the probability that the student gets more than 2 correct. Each question has $n possible choices.</div>@
qu.6.4.answer=1@
qu.6.4.choice.1=$ANS@
qu.6.4.choice.2=$ALT1@
qu.6.4.choice.3=$ALT2@
qu.6.4.choice.4=$ALT3@
qu.6.4.fixed=@

qu.6.5.question=<div title="STAT202/Test 3/Probability/Q$Q  [30.]">If 1.5% of the bolts made by an automotive factory are defective, what is the probability that in a shipment of 200 bolts, there are 6 defective bolts? Answer to 3 decimal places.</div>@
qu.6.5.answer.num=0.050@
qu.6.5.answer.units=@
qu.6.5.showUnits=false@
qu.6.5.grading=toler_abs@
qu.6.5.err=.001@
qu.6.5.negStyle=minus@
qu.6.5.numStyle=thousands scientific dollars arithmetic@
qu.6.5.mode=Numeric@
qu.6.5.name=03. P(6 bad bolts)@
qu.6.5.comment=@
qu.6.5.editing=useHTML@
qu.6.5.solution=@
qu.6.5.algorithm=$Q=03;@
qu.6.5.uid=e397153f-5e48-4a03-9546-72ea7657cab8@
qu.6.5.info=  Use=No;
@

qu.6.6.mode=True False@
qu.6.6.name=04. Large numbers & P@
qu.6.6.comment=<p>You know you would think in the Statistics Department of the best Mathematics Faculty in North America someone could explain this intuitively, but apparently not.&nbsp; It may help you to visualize extreme cases:</p>
<p>P(1 head in 2 tosses) = 0.5&nbsp; (Outcomes are: TT, HH, <strong>TH</strong>, <strong>HT</strong>)</p>
<p>P(500,000 heads (exactly) in 1,000,000 tosses) ? Must be very small.</p>
<p>Remember the important thing here is that tossing EXACTLY 500,000 heads in 1,000,000 tosses is very small (EXACTLY, NOT "at least").</p>
<p>Essentially as we increase the number of tosses the number of possible outcomes increases much faster than the number of ways to toss exactly a set number of Heads.</p>@
qu.6.6.editing=useHTML@
qu.6.6.solution=@
qu.6.6.algorithm=$Q=05;
$X = switch(rint(4),"50 heads in 100 tosses of a fair coin is less likely than observing 500 heads in 1000 tosses.","2 heads in 45 tosses of a fair coin is less likely than observing 14 heads in 315 tosses.","5 heads in 13 tosses of a fair coin is less likely than observing 55 heads in 143 tosses.");@
qu.6.6.uid=490f2702-4587-48cc-a049-5d3e83ebdbb9@
qu.6.6.info=  Course=202;
@
qu.6.6.question=<div title="UW Statistics Bank/Probability/Na&iuml;ve Binomial Distribution/Q$Q">The probability of observing $X</div>@
qu.6.6.answer=2@
qu.6.6.choice.1=True@
qu.6.6.choice.2=False@
qu.6.6.fixed=@

qu.6.7.mode=Multiple Choice@
qu.6.7.name=06. P(n correct guess \@ MC)@
qu.6.7.comment=<p>First determine how many ways you can choose the $K correct $SayQ. This in fact is C($N,$K) = <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 mathvariant='normal'>$N</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow><mrow><mi mathvariant='normal'>$K</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo><mfenced open='(' close=')' separators=','><mrow><mi mathvariant='normal'>$N</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi mathvariant='normal'>$K</mi></mrow></mfenced><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac></mrow></mstyle></math>= $Ways. The probability of getting $K correct $SayQ 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><mi mathvariant='normal'>$n</mi></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$K</mi></mrow></msup></mrow></mstyle></math>, the probability of the rest being incorrect 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><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mfrac><mn>1</mn><mrow><mi mathvariant='normal'>$n</mi></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$N</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi mathvariant='normal'>$K</mi></mrow></msup></mrow></mstyle></math>so the probability of getting exactly $K correct $SayQ 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><mfrac><mrow><mi mathvariant='normal'>$N</mi><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow><mrow><mi mathvariant='normal'>$K</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo><mfenced open='(' close=')' separators=','><mrow><mi mathvariant='normal'>$N</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi mathvariant='normal'>$K</mi></mrow></mfenced><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow></mfrac></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>1</mn><mrow><mi mathvariant='normal'>$n</mi></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$K</mi></mrow></msup><msup><mfenced open='(' close=')' separators=','><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mfrac><mn>1</mn><mrow><mi mathvariant='normal'>$n</mi></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$N</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi mathvariant='normal'>$K</mi></mrow></msup></mrow><mrow><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math></p>@
qu.6.7.editing=useHTML@
qu.6.7.solution=@
qu.6.7.algorithm=$Q=06;
$N = range(5,7,1);
$K = range(1,4,1);
$SayQ=if(eq($K,1),"question","questions");
$n = range(4,5,1);
$P = 1/$n;
$Ways=fact($N)/(fact($K)*fact($N-$K));
$Ans=decimal(4,$Ways*($P^($K))*(1-$P)^($N-$K));
$Alt1=decimal(4,$Ans+range(0.5,0.9,0.01)*(1-$Ans));
$Alt2=decimal(4,range(0.5,0.9,0.01)*$Ans);
$Alt3=decimal(4,0.5*($Ans+switch(rint(2),$Alt1,$Alt2)));@
qu.6.7.uid=4b256cd4-5f20-457e-93ca-bc1de5ebc2fe@
qu.6.7.info=  Course=202;
  Course=230;
  Type=MC;
@
qu.6.7.question=<div title="UW Statistics Bank/Probability/Naive Binomial Distribution/Q$Q"><img width="60" hspace="4" height="58" align="left" title="Test [IMG:Test.gif]" alt="Test" src="__BASE_URI__Probability/NB/Test.gif" />A student takes a $N question multiple choice quiz with $n choices for each question. If the student guesses at random on each question, what is the probability that the student gets exactly $K questions correct?</div>@
qu.6.7.answer=1@
qu.6.7.choice.1=$Ans@
qu.6.7.choice.2=$Alt1@
qu.6.7.choice.3=$Alt2@
qu.6.7.choice.4=$Alt3@
qu.6.7.fixed=@

qu.6.8.mode=Multiple Choice@
qu.6.8.name=11b. Coin tossing, P(# heads even)@
qu.6.8.comment=<p>P(even number of heads) = P(0 heads) + P(2 heads) = <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>1</mn><mrow><mi mathvariant='normal'>$n</mi></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>1</mn><mrow><mi mathvariant='normal'>$n</mi></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mfenced open='(' close=')' separators=','><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mfrac><mn>1</mn><mrow><mi mathvariant='normal'>$n</mi></mrow></mfrac></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfenced open='(' close=')' separators=','><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><mfrac><mn>1</mn><mrow><mi mathvariant='normal'>$n</mi></mrow></mfrac></mrow></mrow></mfenced></mrow></mstyle></math> = $AnsML or $Ans.</p>@
qu.6.8.editing=useHTML@
qu.6.8.solution=@
qu.6.8.algorithm=$Q="11B";
$n=range(2,8,1);
$np=maple("convert(1-1/$n, rational)");
$Ans=decimal(3,(1/$n^2)+(1-1/$n)^2);
$AnsT=$n^2-2*$n+2;
$AnsB=$n^2;
$AnsML=mathml("$AnsT/$AnsB");
$Alt1T=max($AnsB,$AnsT+range(2,5));
$Alt1B=$AnsB+1;
$Alt1ML=mathml("$Alt1T/$Alt1B");
$Alt2T=max(1,$AnsT-1);
$Alt2B=$AnsB+1;
$Alt2ML=mathml("$Alt2T/$Alt2B");
$Alt3B=$AnsB+range(2,6);
$Alt3ML=mathml("$AnsT/$Alt3B");
$Which=rint(4);
$Align=switch(rint(2),"Left","Right");@
qu.6.8.uid=0efa99af-218b-4505-a734-8baa31fde703@
qu.6.8.info=  Course=230;
  Type=MC;
@
qu.6.8.question=<div title="UW Statistics Bank/Probability/Naive Binomial Distribution/Q$Q"><img hspace="4" align="$Align" src="__BASE_URI__Probability/NB/CanCoin$Which.gif" alt="Coin" title="Coin [IMG:CanCoin$Which.gif]" />Suppose that 2 independent tosses of a coin having probability <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 lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mn>1</mn><mrow><mi mathvariant='normal'>$n</mi></mrow></mfrac></mrow></mrow></mstyle></math> of coming up heads are made. Then the probability of an even number of heads is: (NOTE: 0 is an even number!)</div>@
qu.6.8.answer=1@
qu.6.8.choice.1=$AnsML@
qu.6.8.choice.2=$Alt1ML@
qu.6.8.choice.3=$Alt2ML@
qu.6.8.choice.4=$Alt3ML@
qu.6.8.fixed=@

qu.6.9.mode=Multiple Choice@
qu.6.9.name=07. P(>2 correct) at MC guessing@
qu.6.9.comment=<p>First note that for any question, P(correct) = <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>1</mn><mrow><mi mathvariant='normal'>$n</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$P</mi></mrow></mstyle></math> , P(wrong) = 1 - $P = $NotP</p>
<p>The best approach here is to use the fact that P(more than 2 correct) = 1 - P(2 or less correct)<br />
= 1 - P(0 correct) - P(1 correct) - P(2 correct)</p>
<p>For each of these probabilities find the number of ways "n" questions could be selected: <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=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$N</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>n</mi></mrow></mtd></mtr></mtable></mfenced></mrow></mstyle></math> then multiply by $P<sup>n</sup>($NotP)<sup>$N-n</sup> . Thus:</p>
<p>P(more than 2 correct) = 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><mfenced open='(' close=')' separators=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$N</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>0</mn></mrow></mtd></mtr></mtable></mfenced></mrow></mstyle></math>$P<sup>0</sup>($NotP)<sup>$N-0</sup> - <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=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$N</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>1</mn></mrow></mtd></mtr></mtable></mfenced></mrow></mstyle></math>$P<sup>1</sup>($NotP)<sup>$N-1</sup> - <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=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$N</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>2</mn></mrow></mtd></mtr></mtable></mfenced></mrow></mstyle></math>$P<sup>2</sup>($NotP)<sup>$N-2</sup> <br />
= 1 - $P0 - $P1 - $P2 = $Ans</p>@
qu.6.9.editing=useHTML@
qu.6.9.solution=@
qu.6.9.algorithm=$Q=7;
$N = range(15,20,1);
$n = range(4,5,1);
$P = 1/$n;
$NotP = 1-$P;
$P0=(fact($N)/(fact(0)*fact($N-0)))*($P^(0))*(1-$P)^($N-0);
$P1=(fact($N)/(fact(1)*fact($N-1)))*($P^(1))*(1-$P)^($N-1);
$P2=(fact($N)/(fact(2)*fact($N-2)))*($P^(2))*(1-$P)^($N-2);
$Ans = decimal(4,1-$P0-$P1-$P2);
$Alt1=decimal(4,range(0.4,0.8,0.05)*$Ans);
$Alt2=decimal(4,$Ans+range(0.4,0.8,0.05)*(1-$Ans));
$Alt3=decimal(4,0.5*($Ans+switch(rint(2),$Alt1,$Alt2)));@
qu.6.9.uid=4dd058e5-65c2-4bf7-a752-bde9eba05df1@
qu.6.9.info=  Course=202;
  Course=230;
  Type=MC;
@
qu.6.9.question=<div title="UW Statistics Bank/Probability/Naive Binomial Distribution/Q$Q">
If a student randomly guesses at $N multiple-choice questions, find the probability that the student gets more than 2 correct. Each question has $n possible choices.</div>@
qu.6.9.answer=1@
qu.6.9.choice.1=$Ans@
qu.6.9.choice.2=$Alt1@
qu.6.9.choice.3=$Alt2@
qu.6.9.choice.4=$Alt3@
qu.6.9.fixed=@

qu.6.10.question=<div title="UW Statistics Bank/Probability/Naïve Binomial Distribution/Q$Q">
<img hspace="4" align="$Align" src="__BASE_URI__Probability/Pr/Bolt$Which.gif" alt="Bolt" title="Bolt [IMG:Bolt$Which.gif]" />If $Pp% of the bolts made by an automotive factory are defective, what is the probability that in a shipment of $NumBolts bolts, there are $NumBad defective bolts? Answer to 3 decimal places.</div>@
qu.6.10.answer.num=$Ans@
qu.6.10.answer.units=@
qu.6.10.showUnits=false@
qu.6.10.grading=toler_abs@
qu.6.10.err=.01@
qu.6.10.negStyle=minus@
qu.6.10.numStyle=thousands scientific dollars arithmetic@
qu.6.10.mode=Numeric@
qu.6.10.name=03. P(n bad bolts)@
qu.6.10.comment=<p>Think of the bolts arranged in a long line. There are <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=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi>$NumBolts</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>$NumBad</mi></mrow></mtd></mtr></mtable></mfenced></mrow></mstyle></math> ways to select which $NumBad spots in the line have a bad bolt. The probability of $NumBad bad bolts 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><mi>$Pp</mi><mrow><mn>100</mn></mrow></mfrac></mrow></mfenced><mrow><mi>$NumBad</mi></mrow></msup></mrow></mstyle></math> while the probability the rest are good 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><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mfrac><mi>$Pp</mi><mrow><mn>100</mn></mrow></mfrac></mrow></mfenced><mrow><mfenced open='(' close=')' separators=','><mrow><mi>$NumBolts</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>$NumBad</mi></mrow></mfenced></mrow></msup></mrow></mstyle></math> . Multiply these together to get the answer.</p>@
qu.6.10.editing=useHTML@
qu.6.10.solution=@
qu.6.10.algorithm=$Q=3;
$Which=rint(4)+1;
$Align=switch(rint(2),"Left","Right");
$p=range(0.01,0.025,0.005);
$Pp=100*$p;
$NumBolts=range(50,200,25);
$NumBad=range(3,7,1);
$Ways=maple("binomial($NumBolts,$NumBad)");
$Ans=decimal(4,$Ways*$p^$NumBad*(1-$p)^($NumBolts-$NumBad));@
qu.6.10.uid=2b5cbea4-0c0a-482f-a318-76a675d567db@
qu.6.10.info=  Course=202;
  Course=230;
@

qu.6.11.mode=Multiple Choice@
qu.6.11.name=05. P(n of m tosses are [H,T])@
qu.6.11.comment=<p>First determine the total number of possible outcomes. Each toss has two possible values, so the total number of outcomes is 2<sup>$Tosses</sup> = $AnsBot .</p>
<p>Now, think of the coin tosses laid out in a line. Each outcome with exactly $NumHT $Which is the same as selecting $NumHT of the $Tosses positions in the line. This is just <sub>$Tosses</sub>C<sub>$NumHT</sub> = $AnsTop. So the probability of getting one of these 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 mathvariant='normal'>$AnsTop</mi><mrow><mi mathvariant='normal'>$AnsBot</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi><mo lspace='0.0em' rspace='0.0em'>&period;</mo></mrow></mstyle></math></p>@
qu.6.11.editing=useHTML@
qu.6.11.solution=@
qu.6.11.algorithm=$Q=5;
$Which=rint(4);
$Align=switch(rint(2),"Left","Right");
$Tosses=range(4,7,1);
$TossesAlpha=switch($Tosses,0,1,2,3,"four","five","six","seven");
$NumHT=range(2,1+$Tosses/2,1);
$NumHTAlpha=switch($NumHT,0,"one","two","three","four","five","six","seven");
$WhichSide=switch(rint(2),"Heads","Tails");
$AnsTop=fact($Tosses)/(fact($NumHT)*fact($Tosses-$NumHT));
$AnsBot=2^$Tosses;
$Ans=decimal(4,$AnsTop/$AnsBot);
$Alt1=decimal(4,$Ans/2);
$Alt2=decimal(4,3*$Ans/4);
$Alt3=$Ans+range(0.01,1-$Ans,0.01);@
qu.6.11.uid=fffb0928-dc79-49d7-a919-e5d9c12df373@
qu.6.11.info=  Course=202;
  Course=230;
  Type=MC;
@
qu.6.11.question=<div title="UW Statistics Bank/Probability/Naive Binomial Distribution/Q$Q"><img hspace="4" align="$Align" src="__BASE_URI__Probability/NB/CanCoin$Which.gif" alt="Coin" title="Coin [IMG:CanCoin$Which.gif]" />A coin is tossed $TossesAlpha times. Find the probability of getting exactly $NumHTAlpha $WhichSide.</div>@
qu.6.11.answer=1@
qu.6.11.choice.1=$Ans@
qu.6.11.choice.2=$Alt1@
qu.6.11.choice.3=$Alt2@
qu.6.11.choice.4=$Alt3@
qu.6.11.fixed=@

qu.6.12.mode=Multiple Choice@
qu.6.12.name=01. Ordering stuff@
qu.6.12.comment=<p>You can select $NumOfType "spots" for the $Special $Object 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=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi>$NumOrdered</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>$NumOfType</mi></mrow></mtd></mtr></mtable></mfenced></mrow></mstyle></math> ways. The probability of selecting $NumOfType $Special $Object 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><mrow><mi>$PER</mi></mrow><mrow><mn>100</mn></mrow></mfrac></mrow></mfenced><mrow><mi>$NumOfType</mi></mrow></msup></mrow></mstyle></math>. The probability of selecting the remainder to NOT be $Special $Object is&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><msup><mfenced open='(' close=')' separators=','><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mfrac><mrow><mi>$PER</mi></mrow><mrow><mn>100</mn></mrow></mfrac></mrow></mfenced><mrow><mfenced open='(' close=')' separators=','><mrow><mi>$NumOrdered</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>$NumOfType</mi></mrow></mfenced></mrow></msup></mrow></mstyle></math>. Just multiply these 3 numbers together to get your answer.</p>@
qu.6.12.editing=useHTML@
qu.6.12.solution=@
qu.6.12.algorithm=$Q=1;
$Pick=range(0,3,1);
$Store=switch($Pick,"jewellery store","pet store","flower shop","bakery");
$Object=switch($Pick,"pairs of earrings","parakeets","bouquets","cakes");
$Special=switch($Pick,"platinum","blue","all white","marble");
$ImageIs=switch($Pick,"Earring","Parakeet","Bouquet","Cake");
$Align=switch(rint(2),"Left","Right");
$NumOrdered = range(6,20,2);
$NumOfType = range(2,$NumOrdered/2,1);
$NumNotType=$NumOrdered-$NumOfType;
$P = range(0.1,0.9,0.1);
$Ans=decimal(4,(fact($NumOrdered)/(fact($NumOfType)*fact($NumNotType)))*($P^($NumOfType))*(1-$P)^($NumNotType));
condition:ge($Ans,0.002);
$PER = $P*100;
$Alt1=decimal(4,range(0.4,0.8,0.05)*$Ans);
condition:ge($Alt1,0.001);
$Alt2=decimal(4,$Ans+range(0.4,0.8,0.05)*(1-$Ans));
$Alt3=decimal(4,0.5*($Ans+switch(rint(2),$Alt1,$Alt2)));@
qu.6.12.uid=edda90b3-8a6c-46aa-807d-8cc33bd8cfb2@
qu.6.12.info=  Course=202;
  Course=230;
@
qu.6.12.question=<div title="UW Statistics Bank/Probability/Naïve Binomial Distribution/Q$Q">
<img hspace="4" align="$Align" src="__BASE_URI__Probability/Pr/$ImageIs.gif" alt="$ImageIs" title="$ImageIs [IMG:$ImageIs.gif]" />A $Store supplier has a supply of $Object of which $PER% are $Special. A $Store orders $NumOrdered $Object from this supplier. If the supplier selects the $Object at random, what is the chance that the $Store gets exactly $NumOfType $Special $Object?</uw></p>
<p>&nbsp;</p>
<p>&nbsp;</p>@
qu.6.12.answer=1@
qu.6.12.choice.1=$Ans@
qu.6.12.choice.2=$Alt1@
qu.6.12.choice.3=$Alt2@
qu.6.12.choice.4=$Alt3@
qu.6.12.fixed=@

qu.6.13.question=<div title="University of Waterloo Statistics Bank/Probability/Naive Binomial Distribution/Q$Q">On an $NWord question true-false quiz, a student guesses each answer. What is the probability that he/she gets at least one of the answers correct? <strong>Note: Give an exact answer </strong>(<a onclick="window.open(this.href,'Exact','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,width=700,height=400,status'); return false" href="__BASE_URI__Tools/ExactAnswers.htm"><font size="1">explained</font></a>)<strong>.</strong></div>@
qu.6.13.answer.num=$Ans@
qu.6.13.answer.units=@
qu.6.13.showUnits=false@
qu.6.13.grading=exact_value@
qu.6.13.negStyle=minus@
qu.6.13.numStyle=thousands scientific dollars arithmetic@
qu.6.13.mode=Numeric@
qu.6.13.name=08. At least one correct on T/F@
qu.6.13.comment=<p>First consider the question: "What is the probability of getting 0 correct?"&nbsp; There are 2<sup>$NumQ</sup> ways to answer the test, but only 1 way to answer all questions wrong. So the probability of getting all questions wrong 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>1</mn><mrow><msup><mn>2</mn><mrow><mi mathvariant='normal'>$NumQ</mi></mrow></msup></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mn>1</mn><mrow><mi mathvariant='normal'>$AnsBot</mi></mrow></mfrac></mrow></mrow></mstyle></math>. Thus P(At least 1 correct) = 1 -P(All wrong) = <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><mrow><mfrac><mn>1</mn><mrow><mi mathvariant='normal'>$AnsBot</mi></mrow></mfrac></mrow></mrow></mstyle></math>=$AnsML</p>@
qu.6.13.editing=useHTML@
qu.6.13.solution=@
qu.6.13.algorithm=$Q=8;
$NumQ=range(3,8,1);
$NWord=switch($NumQ,0,1,2,"three","four","five","six","seven","eight");
$AnsTop=2^$NumQ-1;
$AnsBot=2^$NumQ;
$Ans=$AnsTop/$AnsBot;
$AnsML=mathml("$AnsTop/$AnsBot");@
qu.6.13.uid=39a39f4b-24a8-403b-b553-93195423f441@
qu.6.13.info=  Course=202;
  Course=230;
  Type=numeric;
  Difficulty=1;
@

qu.6.14.question=<div title="UW Statistics Bank/Probability/Naive Binomial Distribution/Q$Q"><img hspace="4" align="$Align" src="__BASE_URI__Probability/NB/CanCoin$Which.gif" title="Coin [IMG:CanCoin$Which.gif]" alt="Coin" />Suppose that $n independent tosses of a coin having probability 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><mn>1</mn><mrow><mn>3</mn></mrow></mfrac></mrow></mstyle></math> of coming up heads are made. Then the probability of an even number of heads is: (Answer to 3 decimal accuracy, or express your answer as a reduced fraction .) NOTE: 0 is an even number!</div>@
qu.6.14.answer.num=$Ans@
qu.6.14.answer.units=@
qu.6.14.showUnits=false@
qu.6.14.grading=toler_abs@
qu.6.14.err=1@
qu.6.14.negStyle=minus@
qu.6.14.numStyle=thousands scientific dollars arithmetic@
qu.6.14.mode=Numeric@
qu.6.14.name=12. n tosses, P(# heads even)@
qu.6.14.comment=<p>Notice that P(T) = <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 mathvariant='normal'>$nptop</mi><mrow><mi mathvariant='normal'>$npbot</mi></mrow></mfrac></mrow></mstyle></math>. To calculate this you need to add up the probabilities for each possible even number of heads - remember that 0 is even!&nbsp;</p>
<p>&nbsp;P(n heads) = (ways to select n spots for Heads)P(H)<sup>n</sup>P(T)<sup>$n-n</sup> <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></mrow><mrow><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><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$n</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>n</mi></mrow></mtd></mtr></mtable></mrow></mfenced></mrow><mrow><mfrac><mrow><mi mathvariant='normal'>$ptop</mi></mrow><mrow><msup><mi mathvariant='normal'>$pbot</mi><mrow><mi mathvariant='normal'>n</mi></mrow></msup></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mrow><mfrac><mrow><mi mathvariant='normal'>$nptop</mi></mrow><mrow><msup><mi mathvariant='normal'>$pbot</mi><mrow><mi mathvariant='normal'>$n</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>n</mi></mrow></msup></mrow></mfrac></mrow></mrow></mstyle></math></p>
<p>P(0 heads) = <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></mrow><mrow><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$n</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>0</mn></mrow></mtd></mtr></mtable></mrow></mfenced></mrow><mrow><mfrac><mrow><mi mathvariant='normal'>$ptop</mi></mrow><mrow><msup><mi mathvariant='normal'>$pbot</mi><mrow><mn>0</mn></mrow></msup></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mrow><mi mathvariant='normal'>$nptop</mi></mrow><mrow><msup><mi mathvariant='normal'>$pbot</mi><mrow><mi mathvariant='normal'>$n</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>0</mn></mrow></msup></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mrow><mi mathvariant='normal'>$p0top</mi></mrow><mrow><msup><mi mathvariant='normal'>$pbot</mi><mrow><mi mathvariant='normal'>$n</mi></mrow></msup></mrow></mfrac></mrow></mrow></mstyle></math></p>
<p>P(2 heads) = <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></mrow><mrow><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$n</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>2</mn></mrow></mtd></mtr></mtable></mrow></mfenced></mrow><mrow><mfrac><mrow><mi mathvariant='normal'>$ptop</mi></mrow><mrow><msup><mi mathvariant='normal'>$pbot</mi><mrow><mn>2</mn></mrow></msup></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mrow><mi mathvariant='normal'>$nptop</mi></mrow><mrow><msup><mi mathvariant='normal'>$pbot</mi><mrow><mi mathvariant='normal'>$n</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>2</mn></mrow></msup></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mi mathvariant='normal'>$p2top</mi><mrow><msup><mi mathvariant='normal'>$pbot</mi><mrow><mi mathvariant='normal'>$n</mi></mrow></msup></mrow></mfrac></mrow></mrow></mstyle></math></p>
<p>and so on, depending on the number of dice tosses.</p>@
qu.6.14.editing=useHTML@
qu.6.14.solution=@
qu.6.14.algorithm=$Q=12;
$Align=switch(rint(2),"Left","Right");
$Which=rint(4);
$n=range(2,6,1);
$pbot=3;
$ptop=1;
$nptop=2;
$npbot=3;
$p0top = $nptop^$n;
$p2top=binomial($n,2)*$ptop^2*$nptop^($n-2);
$p4top=binomial($n,4)*$ptop^4*$nptop^($n-4);
$p6top=binomial($n,6)*$ptop^6*$nptop^($n-6);
$Ans=switch($n-2,5/9,14/27,41/81,122/243,365/729);@
qu.6.14.uid=c3e11635-a8c4-468d-8fef-db7b80efedaf@
qu.6.14.info=  Course=230;
  Type=numeric;
@

qu.6.15.mode=Multiple Choice@
qu.6.15.name=16. Guess at MC@
qu.6.15.comment=<p>If a student randomly guesses at $N multiple-choice questions, find the probability that the student gets exactly $K correct. Each question has $n possible choices.</p>
<p>First determine how many ways you can select $K of the $N questions. This 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=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi>$N</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>$K</mi></mrow></mtd></mtr></mtable></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mi>$N</mi><mo lspace='0.1111111em' rspace='0.0em'>&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><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi>$K</mi><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow></mfrac></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>$NumWays</mi></mrow></mstyle></math></p>
<p>P(guessing correct) = <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>1</mn><mrow><mi>$n</mi></mrow></mfrac></mrow></mstyle></math>=$P, P(guessing wrong) = <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><mrow><mfrac><mn>1</mn><mrow><mi>$n</mi></mrow></mfrac></mrow></mrow></mstyle></math>=$NotP so</p>
<p>P(Exactly 2 correct) = $NumWays($P)<sup>$K</sup>($NotP)<sup>$N-$K</sup> = $Ans</p>@
qu.6.15.editing=useHTML@
qu.6.15.solution=@
qu.6.15.algorithm=$Q=16;
$N = range(10,15,1);
$K = range(1,4,1);
$n = range(4,5,1);
$P = 1/$n;
$NotP=($n-1)/$n;
$NumWays=fact($N)/(fact($K)*fact($N-$K));
$Ans=$NumWays*($P^($K))*(1-$P)^($N-$K);
$Alt1=decimal(4,range(0.4,0.8,0.05)*$Ans);
$Alt2=decimal(4,$Ans+range(0.4,0.8,0.05)*(1-$Ans));
$Alt3=decimal(4,0.5*($Ans+switch(rint(2),$Alt1,$Alt2)));@
qu.6.15.uid=3798419c-8db3-4a3f-adca-100812817618@
qu.6.15.info=  Course=202;
  Course=230;
@
qu.6.15.question=<div title="UW Statistics Bank/Probability/Pr/Q$Q">If a student randomly guesses at $N multiple-choice questions, find the probability that the student gets exactly $K correct. Each question has $n possible choices.</div>@
qu.6.15.answer=1@
qu.6.15.choice.1=$Ans@
qu.6.15.choice.2=$Alt1@
qu.6.15.choice.3=$Alt2@
qu.6.15.choice.4=$Alt3@
qu.6.15.fixed=@

qu.6.16.question=<div title="UW Statistics Bank/Probability/Naive Binomial Distribution/Q$Q"><img hspace="4" align="$Align" title="Coin [IMG:CanCoin$Which.gif]" alt="Coin" src="__BASE_URI__Probability/NB/CanCoin$Which.gif" />Suppose that 2 independent tosses of a coin having probability <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 lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mn>1</mn><mrow><mi mathvariant='normal'>$n</mi></mrow></mfrac></mrow></mrow></mstyle></math> of coming up heads are made. Then the probability of an even number of heads is: (Answer to 3 decimal accuracy, or express your answer as a reduced fraction .) NOTE: 0 is an even number!</div>@
qu.6.16.answer.num=$Ans@
qu.6.16.answer.units=@
qu.6.16.showUnits=false@
qu.6.16.grading=toler_abs@
qu.6.16.err=0.01@
qu.6.16.negStyle=minus@
qu.6.16.numStyle=thousands scientific dollars arithmetic@
qu.6.16.mode=Numeric@
qu.6.16.name=11a. Coin tossing, P(# heads even)@
qu.6.16.comment=<p>P(even number of heads) = P(0 heads) + P(2 heads) = <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>1</mn><mrow><mi mathvariant='normal'>$n</mi></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>1</mn><mrow><mi mathvariant='normal'>$n</mi></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mfenced open='(' close=')' separators=','><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mfrac><mn>1</mn><mrow><mi mathvariant='normal'>$n</mi></mrow></mfrac></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfenced open='(' close=')' separators=','><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><mfrac><mn>1</mn><mrow><mi mathvariant='normal'>$n</mi></mrow></mfrac></mrow></mrow></mfenced></mrow></mstyle></math> = $AnsML or $Ans.</p>@
qu.6.16.editing=useHTML@
qu.6.16.solution=@
qu.6.16.algorithm=$Q="11A";
$Which=rint(4);
$Align=switch(rint(2),"Left","Right");
$n=range(2,8,1);
$np=maple("convert(1-1/$n, rational)");
$Ans=decimal(3,(1/$n^2)+(1-1/$n)^2);
$AnsT=$n^2-2*$n+2;
$AnsB=$n^2;
$AnsML=mathml("$AnsT/$AnsB");@
qu.6.16.uid=bb5ce393-9f8a-485a-8329-13f90baf01ac@
qu.6.16.info=  Course=230;
  Type=numeric;
@

qu.6.17.question=<div title="UW Statistics Bank/Probability/Naive Binomial Distribution/Q$Q"><img align="$Align" title="Doctor [IMG:Doctor$Which.gif]" alt="Doctor" src="__BASE_URI__Probability/NB/Doctor$Which.gif" />A doctor knows $percent % of all her patients are late for their appointments. Given $n randomly selected patients, what is the approximate probability that exactly $x of them are late for their appointments? (Please answer to 4 decimal places).</div>@
qu.6.17.answer.num=$Ans@
qu.6.17.answer.units=@
qu.6.17.showUnits=false@
qu.6.17.grading=toler_abs@
qu.6.17.err=0.001@
qu.6.17.negStyle=minus@
qu.6.17.numStyle=thousands scientific dollars arithmetic@
qu.6.17.mode=Numeric@
qu.6.17.name=10. P(x of n late for appt)@
qu.6.17.comment=<p>The probability of $x being late and $n-$x being on time is ($p)<sup>$x</sup>(1-$p)<sup>$n-$x</sup>. But there are&nbsp; <sub><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=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$n</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi mathvariant='normal'>$x</mi></mrow></mtd></mtr></mtable></mfenced></mrow></mstyle></math></sub> = $numb of ways to select the $x latecomers, so P(3 late) =($numb)($p)<sup>$x</sup>(1-$p)<sup>$n-$x</sup> =  $Ans.</p>@
qu.6.17.editing=useHTML@
qu.6.17.solution=@
qu.6.17.algorithm=$Q=10;
$Which=rint(2);
$Align=switch(rint(2),"Left","Right");
$n=range(5,8,1);
$x=range(2,$n-1,1);
$numb=maple("combinat[numbcomb]($n,$x)");
$p=decimal(2,range(0.1,0.9,0.01));
$percent=100*$p;
$Ans=decimal(5,$numb*($p^$x)*((1-$p)^($n-$x)));
condition:(gt($Ans,0.000999));@
qu.6.17.uid=4394f3af-d489-4133-858b-2e475103081a@
qu.6.17.info=  Course=230;
@

qu.6.18.mode=Multiple Choice@
qu.6.18.name=01. Platinum earrings@
qu.6.18.comment=@
qu.6.18.editing=useHTML@
qu.6.18.solution=@
qu.6.18.algorithm=$Q=01;
$N = range(5,7,1);
$K = range(1,4,1);
$P = range(0.1,0.9,0.1);
$PER = $P*100;
$ANS=(fact($N)/(fact($K)*fact($N-$K)))*($P^($K))*(1-$P)^($N-$K);
$ALT1 = range(0.1,0.5,0.000001);
$ALT2 = range(0.5,0.95,0.000001);
$ALT3 = range(0.1,0.2,0.000001);@
qu.6.18.uid=57f0ac98-493e-418a-be9a-ba2c89319d25@
qu.6.18.info=  Use=Yes;
@
qu.6.18.question=<div title="STAT202/Test 3/Probability/Q$Q  [28]">A jewellery supplier has a supply of pairs of earrings of which $PER% are platinum pairs. A jewellery store orders $N sets of earrings from this supplier. If the supplier selects the pairs of earrings at random, what is the chance that the jewellery store gets exactly $K sets of platinum pairs?</div>@
qu.6.18.answer=3@
qu.6.18.choice.1=$ALT1@
qu.6.18.choice.2=$ALT2@
qu.6.18.choice.3=$ANS@
qu.6.18.choice.4=$ALT3@
qu.6.18.fixed=@

qu.6.19.mode=Multiple Choice@
qu.6.19.name=04. Parakeets@
qu.6.19.comment=@
qu.6.19.editing=useHTML@
qu.6.19.solution=@
qu.6.19.algorithm=$Q=04;
$N = range(5,7,1);
$K = range(1,4,1);
$P = range(0.1,0.9,0.1);
$PER = $P*100;
$ANS=(fact($N)/(fact($K)*fact($N-$K)))*($P^($K))*(1-$P)^($N-$K);
$ALT1 = range(0.1,0.5,0.000001);
$ALT2 = range(0.5,0.95,0.000001);
$ALT3 = range(0.1,0.2,0.000001);@
qu.6.19.uid=19c34f24-1a41-445e-a165-01c834c655f9@
qu.6.19.info=  Use=Yes;
@
qu.6.19.question=<div title="STAT202/Test 3/Probability/Q$Q  [31.]">A pet supplier has a stock of parakeets of which $PER% are blue parakeets. A pet store orders $N parakeets from this supplier. If the supplier selects the parakeets at random, what is the chance that the pet store gets exactly $K blue parakeet?</div>@
qu.6.19.answer=2@
qu.6.19.choice.1=$ALT1@
qu.6.19.choice.2=$ANS@
qu.6.19.choice.3=$ALT2@
qu.6.19.choice.4=$ALT3@
qu.6.19.fixed=@

qu.6.20.mode=Inline@
qu.6.20.name=09. Heart Study@
qu.6.20.comment=<p>Using a binomial approximation we have:</p>
<p>Mean = np = $number*$prob =&nbsp; $mean</p>
<p>Variance = np(1-p) = $number*$prob*(1-$prob) = $var</p>
<p>and <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>StDev</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><msqrt><mrow><mi>Var</mi></mrow></msqrt><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$stdev</mi></mrow></mstyle></math></p>@
qu.6.20.editing=useHTML@
qu.6.20.solution=@
qu.6.20.algorithm=$Q=09;
$Which=rint(4);
$Align=switch(rint(2),"Left","Right");
$number=range(2000,3500,500);
$prob=decimal(2,range(.01,.06,.01));
$mean=$number*$prob;
$var=$number*$prob*(1-$prob);
$stdev=decimal(3,sqrt($var));@
qu.6.20.uid=48ed575f-6480-4bdc-a0dc-e5961cfafeca@
qu.6.20.info=  Course=202;
  Type=numeric;
@
qu.6.20.weighting=1,1@
qu.6.20.numbering=alpha@
qu.6.20.part.1.name=sro_id_1@
qu.6.20.part.1.answer.units=@
qu.6.20.part.1.numStyle=   @
qu.6.20.part.1.editing=useHTML@
qu.6.20.part.1.showUnits=false@
qu.6.20.part.1.question=(Unset)@
qu.6.20.part.1.mode=Numeric@
qu.6.20.part.1.grading=exact_value@
qu.6.20.part.1.negStyle=both@
qu.6.20.part.1.answer.num=$mean@
qu.6.20.part.2.name=sro_id_2@
qu.6.20.part.2.answer.units=@
qu.6.20.part.2.numStyle=   @
qu.6.20.part.2.editing=useHTML@
qu.6.20.part.2.showUnits=false@
qu.6.20.part.2.err=0.01@
qu.6.20.part.2.question=(Unset)@
qu.6.20.part.2.mode=Numeric@
qu.6.20.part.2.grading=toler_abs@
qu.6.20.part.2.negStyle=both@
qu.6.20.part.2.answer.num=$stdev@
qu.6.20.question=<div title="UW Statistics Bank/Probability/Naive Binomial Distribution/Q$Q"><img hspace="4" align="$Align" alt="Pills" src="__BASE_URI__Probability/NB/Pill$Which.gif" title="Pill(s) [IMG:Pill$Which.gif]" />A heart study asked whether the anti cholesterol drug gemfibrozil reduces heart attacks. In planning such an experiment, the researchers must be confident that the sample sizes are large enough to enable them to observe enough hear attacks. The study planned to give gemfibrozil to about $number men aged 40 to 55 and a placebo to another $number. The probability of a heart attack during the five-year period of the study for men this age is about $prob. What are the mean and standard deviation of the number of heart attacks that will be observed in one group if the treatment does not change this probability?</div><p>Mean (<strong>Exact answer </strong>(<a href="__BASE_URI__Tools/ExactAnswers.htm" onclick="window.open(this.href,'Exact','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,width=700,height=400,status'); return false"><font size="1">explained</font></a>)) = <span>&nbsp;</span><1><span>&nbsp; <br /></span></p><p>Standard deviation (three decimal places) = <span>&nbsp;</span><2><span>&nbsp;</span></p>@

qu.6.21.mode=Multiple Choice@
qu.6.21.name=18. Guess at MC@
qu.6.21.comment=@
qu.6.21.editing=useHTML@
qu.6.21.solution=@
qu.6.21.algorithm=$Q=18;
$N = range(10,15,1);
$K = range(1,4,1);
$n = range(4,5,1);
$P = 1/$n;
$ANS=(fact($N)/(fact($K)*fact($N-$K)))*($P^($K))*(1-$P)^($N-$K);
$ALT1 = range(0.1,0.5,0.000001);
$ALT2 = range(0.5,0.95,0.000001);
$ALT3 = range(0.1,0.2,0.000001);@
qu.6.21.uid=c6339450-9a6c-4247-9b0a-bd28b5ead0a4@
qu.6.21.info=  Use=Yes;
@
qu.6.21.question=<div title="STAT202/Test 3/Probability/Q$Q  [33.]">If a student randomly guesses at $N multiple-choice questions, find the probability that the student gets exactly $K correct. Each question has $n possible choices.</div>@
qu.6.21.answer=1@
qu.6.21.choice.1=$ANS@
qu.6.21.choice.2=$ALT1@
qu.6.21.choice.3=$ALT2@
qu.6.21.choice.4=$ALT3@
qu.6.21.fixed=@

qu.7.topic=Basics@

qu.7.1.question=<div title="UW Statistics Bank/Probability/Basics/Q23">Two fair coins are tossed. What is the probability that both coins show the same face (that is both are heads or both are tails)? HINT: Write out all possible outcomes for this "experiment". .<strong>Note: Give an exact answer </strong>(<a onclick="window.open(this.href,'Exact','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,width=700,height=400,status'); return false" href="__BASE_URI__Tools/ExactAnswers.htm"><font size="1">explained</font></a>)<strong>.</strong>
<p>&nbsp;</p>
</div>@
qu.7.1.answer.num=1/2@
qu.7.1.answer.units=@
qu.7.1.showUnits=false@
qu.7.1.grading=exact_value@
qu.7.1.negStyle=minus@
qu.7.1.numStyle=thousands scientific dollars arithmetic@
qu.7.1.mode=Numeric@
qu.7.1.name=23. P(2 coins have same face)@
qu.7.1.comment=<p>There are 4 possible outcomes in this experiment: TT, TH, HT, HH</p>
<p>They are all equally likely. Two have both coins the same, so the probability 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>2</mn><mrow><mn>4</mn></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mn>1</mn><mrow><mn>2</mn></mrow></mfrac></mrow></mrow></mstyle></math>.</p>@
qu.7.1.editing=useHTML@
qu.7.1.solution=@
qu.7.1.algorithm=@
qu.7.1.uid=6cac9635-030f-47ad-a5ca-605c2815d1de@
qu.7.1.info=  Course=230;
  Type=numeric;
  Difficulty=0;
@

qu.7.2.mode=Multiple Choice@
qu.7.2.name=14. Pizza party@
qu.7.2.comment=<p>First work out how many students actually went out:</p>
<p>P(Male goes)(#Males) + P(Female goes)(#Females)</p>
<p>= $GM($M) + $GF($F) = $Out</p>
<p>So the probability that a random selected student from this group is female 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><mo lspace='0.1111111em' rspace='0.1111111em'>&num;</mo><mi>females</mi></mrow><mrow><mo lspace='0.1111111em' rspace='0.1111111em'>&num;</mo><mi>in group</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo></mrow><mrow><mfrac><mi mathvariant='normal'>$OutF</mi><mrow><mi mathvariant='normal'>$Out</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math></p>@
qu.7.2.editing=useHTML@
qu.7.2.solution=@
qu.7.2.algorithm=$Q=14;
$M = range(2,12,1);
$F = range(2,14,1);
$S = $M+$F;
$PM = $M/$S;
$PF = $F/$S;
$OutM=range(1,$M-1);
$GM = decimal(2,$OutM/$M);
$GMP=decimal(2,100*$GM);
$OutF=range(1,$F-1);
$GF = decimal(2,$OutF/$F);
$GFP=decimal(2,100*$GF);
$Out=$OutM+$OutF;
$Ans=decimal(4,$GF*$F/($GF*$F+$GM*$M));
$Alt1=decimal(4,$Ans+range(0.5,0.9,0.01)*(1-$Ans));
$Alt2=decimal(4,range(0.5,0.9,0.01)*$Ans);
$Alt3=decimal(4,0.5*($Ans+switch(rint(2),$Alt1,$Alt2)));
$Which=rint(5);
$Align=switch(rint(2),"Left","Right");@
qu.7.2.uid=1a010a81-5f6c-436a-90ca-3f60abefd2df@
qu.7.2.info=  Course=202;
  Type=MC;
@
qu.7.2.question=<div title="UW Statistics Bank/Probability/Basics/Q$Q"><img hspace="4" align="$Align" title="Pizza [IMG:Pizza$Which.gif]" alt="Pizza" src="__BASE_URI__Probability/Basics/Pizza$Which.gif" />A group of $M male and $F female students is planning to go out for pizza. If $GMP % of the male students go and $GFP % of the female students go, find the probability that a random student who goes out for pizza is female.</div>@
qu.7.2.answer=3@
qu.7.2.choice.1=$Alt1@
qu.7.2.choice.2=$Alt2@
qu.7.2.choice.3=$Ans@
qu.7.2.choice.4=$Alt3@
qu.7.2.fixed=@

qu.7.3.mode=Multiple Choice@
qu.7.3.name=03b. P(Letter Grade)@
qu.7.3.comment=<p>P($AnsGrade) = <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><mo lspace='0.1111111em' rspace='0.1111111em'>&num;</mo><mi>receiving $AnsGrade</mi></mrow><mrow><mi>total</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mi mathvariant='normal'>$GradeTot</mi></mrow><mrow><mi mathvariant='normal'>$TOTAL</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math>.</p>@
qu.7.3.editing=useHTML@
qu.7.3.solution=@
qu.7.3.algorithm=$Q="03b";
$AM=range(5,30,1);
$BM=range(5,30,1);
$CM=range(5,30,1);
$DM=range(5,30,1);
$FM=range(5,30,1);
$AW=range(5,30,1);
$BW=range(5,30,1);
$CW=range(5,30,1);
$DW=range(5,30,1);
$FW=range(5,30,1);
$Mtotal=$AM+$BM+$CM+$DM+$FM;
$Wtotal=$AW+$BW+$CW+$DW+$FW;
$TOTAL=$Mtotal+$Wtotal;
$Atotal=$AM+$AW;
$Btotal=$BM+$BW;
$Ctotal=$CM+$CW;
$Dtotal=$DM+$DW;
$Ftotal=$FM+$FW;
$WhichGrade=rint(5);
$AnsGrade=switch($WhichGrade,"A","B","C","D","F");
$GradeTot=switch($WhichGrade,$Atotal,$Btotal,$Ctotal,$Dtotal,$Ftotal);
$Ans=decimal(4,$GradeTot/$TOTAL);
$Alt1=decimal(4,$Ans+range(0.5,0.9,0.01)*(1-$Ans));
$Alt2=decimal(4,range(0.5,0.9,0.01)*$Ans);
$Alt3=decimal(4,0.5*($Ans+switch(rint(2),$Alt1,$Alt2)));@
qu.7.3.uid=cfb1a985-daf4-4e15-a670-331f50159b5d@
qu.7.3.info=  Difficulty=2;
  Course=230;
  Author=Sean Scott;
  Type=MC;
@
qu.7.3.question=<div title="UW Statistics Bank/Probability/Basics/Q$Q">The following table shows the final marks, as letter grades, for a class of $TOTAL students:
<p>
<table width="200" cellspacing="1" cellpadding="1" border="1" align="center">
    <tbody>
        <tr>
            <td>&nbsp;</td>
            <td><strong>M(en)</strong></td>
            <td><strong>W(omen)</strong></td>
            <td><strong>Total</strong></td>
        </tr>
        <tr>
            <td><strong>A</strong></td>
            <td align="right">$AM</td>
            <td align="right">$AW</td>
            <td align="right">$Atotal</td>
        </tr>
        <tr>
            <td><strong>B</strong></td>
            <td align="right">$BM</td>
            <td align="right">$BW</td>
            <td align="right">$Btotal</td>
        </tr>
        <tr>
            <td><strong>C</strong></td>
            <td align="right">$CM</td>
            <td align="right">$CW</td>
            <td align="right">$Ctotal</td>
        </tr>
        <tr>
            <td><strong>D</strong></td>
            <td align="right">$DM</td>
            <td align="right">$DW</td>
            <td align="right">$Dtotal</td>
        </tr>
        <tr>
            <td><strong>F</strong></td>
            <td align="right">$FM</td>
            <td align="right">$FW</td>
            <td align="right">$Ftotal</td>
        </tr>
        <tr>
            <td><strong>Total</strong></td>
            <td align="right">$Mtotal</td>
            <td align="right">$Wtotal</td>
            <td align="right">$TOTAL</td>
        </tr>
    </tbody>
</table>
</p>
<p>There are 7 variables here: one for each of the letter grades (A, B, C, D, F) and one for each gender (M, W). Find P($AnsGrade) (i.e. what is the probability that a randomly selected student gets a $AnsGrade grade?).</p>
</div>@
qu.7.3.answer=1@
qu.7.3.choice.1=$Ans@
qu.7.3.choice.2=$Alt1@
qu.7.3.choice.3=$Alt2@
qu.7.3.choice.4=$Alt3@
qu.7.3.fixed=@

qu.7.4.mode=Multiple Choice@
qu.7.4.name=16. n-digit PIN, P(guess on 1 try)@
qu.7.4.comment=<p>There are $PP possible PINs (ranging from all 0's to all 9's) and you have one guess, so the probability of being correct 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>1</mn><mrow><mi mathvariant='normal'>$PP</mi></mrow></mfrac></mrow></mstyle></math>.</p>@
qu.7.4.editing=useHTML@
qu.7.4.solution=@
qu.7.4.algorithm=$n=range(4,6);
$Ex=switch($n-4,"0129","04565","010879");
$Fn=fact($n);
$PP=10^$n;
$PPAlt2=10^($n+1);
$PPAlt3=switch(rint(3),10^($n-1),10^($n-1)/2,fact($n));
$Ans=mathml("1/$PP");
$Alt1ML=mathml("2/$PP");
$Alt2ML=switch(rint(2),mathml("1/$PPAlt2"),mathml("$Fn/$PPAlt2"));
$Alt3ML=mathml("1/$PPAlt3");
$Which=rint(6);
$Align=switch(rint(2),"Left","Right");@
qu.7.4.uid=55cea380-5c25-4543-b5aa-83dbc48f8d9c@
qu.7.4.info=  Course=230;
  Type=MC;
@
qu.7.4.question=<div title="University of Waterloo Statistics Bank/Probability/Basics/Q$Q"><img vspace="0" hspace="4" border="0" align="$Align" src="__BASE_URI__Probability/Basics/ATM$Which.gif" title="ATM [IMG:atm$Which.gif]" alt="ATM." />A bank uses $n digit PIN numbers (e.g. $Ex). Assume all combinations are equally likely. What is the probability of guessing somebody&rsquo;s PIN number on a single attempt?</div>@
qu.7.4.answer=1@
qu.7.4.choice.1=$Ans@
qu.7.4.choice.2=$Alt1ML@
qu.7.4.choice.3=$Alt2ML@
qu.7.4.choice.4=$Alt3ML@
qu.7.4.choice.5=None of the above.@
qu.7.4.fixed=4@

qu.7.5.mode=Multiple Choice@
qu.7.5.name=07.P(Student in a major)@
qu.7.5.comment=<p>First add up the total number of students:&nbsp; $M1 + $M2 + $M3 = $Total.</p>
<p>The probability of selecting a $Major1 major is just the number of $Major1 majors divided by the total: <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 mathvariant='normal'>$M1</mi><mrow><mi mathvariant='normal'>$Total</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo></mrow></mstyle></math>$Ans</p>@
qu.7.5.editing=useHTML@
qu.7.5.solution=@
qu.7.5.algorithm=$Q=7;
$Pick=rint(3);
$Major1=switch($Pick,"Engineering","Sociology","Architecture");
$Article1=switch($Pick,"an","a","an");
$Major2=switch(rint(3),"Science","Psychology","Nursing");
$Major3=switch(rint(3),"Mathematics","Business","Theology");
$M1=100*range(3,8,1);
$M2=range(200,$M1-100,100);
$M3=range(100,$M2-100,100);
$Total=$M1+$M2+$M3;
$Ans=mathml("$M1/$Total");
$Alt1=switch(rint(2),mathml("$M2/$Total"),mathml("$M1/($Total-$M1)"));
$Alt2=switch(rint(2),mathml("$M3/$Total"),mathml("($M2+$M1)/$Total"));
$M4=$M1-10-10*rint(9);
$Alt3=mathml("$M4/$Total");@
qu.7.5.uid=8f267a4f-553c-4de9-a12f-5fd0f110ed44@
qu.7.5.info=  Course=202;
  Course=230;
@
qu.7.5.question=<div title="UW Statistics Bank/Probability/Basics/Q$Q">
At a certain college, there were $M1 $Major1 majors, $M2 $Major2 majors, and $M3 $Major3 majors. If one student was selected at random, the probability that they are $Article1 $Major1 major is:</div>@
qu.7.5.answer=1@
qu.7.5.choice.1=$Ans@
qu.7.5.choice.2=$Alt1@
qu.7.5.choice.3=$Alt2@
qu.7.5.choice.4=$Alt3@
qu.7.5.fixed=@

qu.7.6.question=<div title="University of Waterloo Statistics Bank/Probability/Basics/Geometric/Q$Q"><img width="255" height="255" align="right" title="Dart outside circle in square [IMG:DOS.gif]" alt="Dart outside circle in square" src="__BASE_URI__Probability/Basics/Geometric/DOS.gif" />A square has side length $s. A circle of radius $r is drawn so it lies entirely in the square. If I now toss a dart so it lands in the square, what is the probability the dart MISSES the circle (assume I do not aim)? (4 decimal accuracy.)</div>@
qu.7.6.answer.num=$Ans@
qu.7.6.answer.units=@
qu.7.6.showUnits=false@
qu.7.6.grading=toler_abs@
qu.7.6.err=.001@
qu.7.6.negStyle=minus@
qu.7.6.numStyle=thousands scientific dollars arithmetic@
qu.7.6.mode=Numeric@
qu.7.6.name=04. Dart outside Circle in Square@
qu.7.6.comment=<p>P(dart falls outside circle) =&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><mi>Area</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>outside</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>Circle</mi></mrow><mrow><mi>Area</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>of</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>Square</mi></mrow></mfrac></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><mrow><mfrac><mrow><mi>Area</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>of</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>Square</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>Area</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>of</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>Circle</mi></mrow><mrow><mi>Area</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>of</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>Square</mi></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 mathvariant='normal'>$s</mi><mrow><mn>2</mn></mrow></msup><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>&pi;</mi><mfenced open='(' close=')' separators=','><mrow><msup><mi mathvariant='normal'>$r</mi><mrow><mn>2</mn></mrow></msup></mrow></mfenced></mrow><mrow><msup><mi mathvariant='normal'>$s</mi><mrow><mn>2</mn></mrow></msup></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow></mstyle></math></p>@
qu.7.6.editing=useHTML@
qu.7.6.solution=@
qu.7.6.algorithm=$Q=4;
$s=range(6,20,1);
$r=range(2,10,1);
condition:lt($r,($s/2)-1);
$ACircle=Pi*($r)^2;
$Ans=decimal(4,($s^2-$ACircle)/$s^2);@
qu.7.6.uid=52515a4c-b969-4b3b-9356-9a05d87ed118@
qu.7.6.info=  Type=numeric;
  Course=230;
  Difficulty=1;
@

qu.7.7.mode=Multiple Choice@
qu.7.7.name=04. Number game@
qu.7.7.comment=<p>Be careful! There ARE 14 possible outcomes for this experiment - look at this table of possible outcomes:</p>
<table cellspacing="0" cellpadding="0" bordercolor="#111111" border="1" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td>&nbsp;</td>
            <td colspan="5">2nd draw</td>
        </tr>
        <tr>
            <td><font face="Times New Roman">&darr;</font> 1st draw</td>
            <td align="right">1</td>
            <td align="right">2</td>
            <td align="right">3</td>
            <td align="right">4</td>
            <td align="right">5</td>
        </tr>
        <tr>
            <td align="right">1</td>
            <td align="center">x</td>
            <td align="center">&nbsp;</td>
            <td align="center">x</td>
            <td align="center">&nbsp;</td>
            <td align="center">&nbsp;</td>
        </tr>
        <tr>
            <td align="right">2</td>
            <td align="center">&nbsp;</td>
            <td align="center">x</td>
            <td align="center">&nbsp;</td>
            <td align="center">x</td>
            <td align="center">&nbsp;</td>
        </tr>
        <tr>
            <td align="right">3</td>
            <td align="center">x</td>
            <td align="center">&nbsp;</td>
            <td align="center">x</td>
            <td align="center">&nbsp;</td>
            <td align="center">x</td>
        </tr>
        <tr>
            <td align="right">4</td>
            <td align="center">&nbsp;</td>
            <td align="center">x</td>
            <td align="center">&nbsp;</td>
            <td align="center">x</td>
            <td align="center">&nbsp;</td>
        </tr>
        <tr>
            <td align="right">5</td>
            <td align="center">&nbsp;</td>
            <td align="center">&nbsp;</td>
            <td align="center">x</td>
            <td align="center">&nbsp;</td>
            <td align="center">x</td>
        </tr>
    </tbody>
</table>
<p>where "x" shows impossible outcomes. BUT these outcomes are NOT  equally likely!</p>
<p>Each of the 5 possible first draws are equally likely - P(first = n) = <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='10' 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>1</mn><mrow><mn>5</mn></mrow></mfrac></mrow></mstyle></math>  for n = 1,2,3,4,5. If your first draw is anything BUT 3, then there are 3  possible choices for the second draw and all three of those are equally likely  (has a probability of <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>1</mn><mrow><mn>3</mn></mrow></mfrac></mrow></mstyle></math> of being chosen). Thus each of the outcomes for any  first number but 3 has a probability (<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>1</mn><mrow><mn>5</mn></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><mfrac><mn>1</mn><mrow><mn>3</mn></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><mfrac><mn>1</mn><mrow><mn>15</mn></mrow></mfrac></mrow></mstyle></math> &asymp; 0.067. For a first draw  of 3, there are only 2 possible second numbers so the probability of any draw  starting with 3 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>1</mn><mrow><mn>5</mn></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><mfrac><mn>1</mn><mrow><mn>2</mn></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><mfrac><mn>1</mn><mrow><mn>10</mn></mrow></mfrac></mrow></mstyle></math> = 0.1. Here's the table with these values:</p>
<table cellspacing="0" cellpadding="0" bordercolor="#111111" border="1" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td>&nbsp;</td>
            <td align="center" colspan="5"><strong>2nd draw</strong></td>
        </tr>
        <tr>
            <td><strong>1st </strong></td>
            <td align="center"><strong>1</strong></td>
            <td align="center"><strong>2</strong></td>
            <td align="center"><strong>3</strong></td>
            <td align="center"><strong>4</strong></td>
            <td align="center"><strong>5</strong></td>
        </tr>
        <tr>
            <td align="center"><strong>1</strong></td>
            <td align="center">0</td>
            <td align="center">0.067</td>
            <td align="center">0</td>
            <td align="center">0.067</td>
            <td align="center">0.067</td>
        </tr>
        <tr>
            <td align="center"><strong>2</strong></td>
            <td align="center">0.067</td>
            <td align="center">0</td>
            <td align="center">0.067</td>
            <td align="center">0</td>
            <td align="center">0.067</td>
        </tr>
        <tr>
            <td align="center"><strong>3</strong></td>
            <td align="center">0</td>
            <td align="center">0.1</td>
            <td align="center">0</td>
            <td align="center">0.1</td>
            <td align="center">0</td>
        </tr>
        <tr>
            <td align="center"><strong>4</strong></td>
            <td align="center">0.067</td>
            <td align="center">0</td>
            <td align="center">0.067</td>
            <td align="center">0</td>
            <td align="center">0.067</td>
        </tr>
        <tr>
            <td align="center"><strong>5</strong></td>
            <td align="center">0.067</td>
            <td align="center">0.067</td>
            <td align="center">0</td>
            <td align="center">0.067</td>
            <td align="center">0</td>
        </tr>
    </tbody>
</table>
<p>The probability of any type of outcome can be found by adding the  probabilities of those outcomes meeting the criteria.</p>
<p>For example P(sum=6) = P(15) + P(51) = 1/15 + 1/15 = 2/15<br />
P(2nd draw > 1st draw) = P(12) + P(14) + P(15) + P(23) + P(25) + P(34) + P(45) =  6(1/15) + 1/10 = 1/2</p>
<p>For probabilities of sums use this table:</p>
<table cellspacing="0" cellpadding="3" bordercolor="#111111" border="1" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td>Sum:</td>
            <td align="center">$Col3Color 3$EndSpan</td>
            <td align="center">$Col4Color 4$EndSpan</td>
            <td align="center">$Col5Color 5$EndSpan</td>
            <td align="center">$Col6Color 6$EndSpan</td>
            <td align="center">$Col7Color 7$EndSpan</td>
            <td align="center">$Col8Color 8$EndSpan</td>
            <td align="center">$Col9Color 9$EndSpan</td>
        </tr>
        <tr>
            <td>Outcomes:</td>
            <td x:str="'12, 21">$Col3Color 12, 21$EndSpan</td>
            <td>$Col4Color x$EndSpan</td>
            <td x:str="'14, 41, 23, 32">$Col5Color 14, 41, 23, 32$EndSpan</td>
            <td x:str="'15, 51">$Col6Color 15, 51$EndSpan</td>
            <td x:str="'25, 52, 34, 43">$Col7Color 25, 52, 34, 43$EndSpan</td>
            <td>$Col8Color x$EndSpan</td>
            <td x:str="'45, 54">$Col9Color 45, 54$EndSpan</td>
        </tr>
        <tr>
            <td>Prob:</td>
            <td align="center" x:str="'12, 21">$Col3Color 2/15$EndSpan</td>
            <td align="center">$Col4Color 0$EndSpan</td>
            <td align="center" x:str="'14, 41, 23, 32">$Col5Color 3/15 + 1/10$EndSpan</td>
            <td align="center" x:str="'15, 51">$Col6Color 2/15$EndSpan</td>
            <td align="center" x:str="'25, 52, 34, 43">$Col7Color 3/15 + 1/10$EndSpan</td>
            <td align="center">$Col8Color 0$EndSpan</td>
            <td align="center" x:str="'45, 54">$Col9Color 2/15$EndSpan</td>
        </tr>
    </tbody>
</table>
<p align="center"><em><font size="2"><br />
</font></em></p>@
qu.7.7.editing=useHTML@
qu.7.7.solution=@
qu.7.7.algorithm=$Q=4;
$n=range(3,9);
$Ans = switch($n-3,"2/15","0","3/10","2/15","3/10",0,"2/15");
$Col3Color=if(eq($n,3),"<span style='color:red'>","");
$Col4Color=if(eq($n,4),"<span style='color:red'>","");
$Col5Color=if(eq($n,5),"<span style='color:red'>","");
$Col6Color=if(eq($n,6),"<span style='color:red'>","");
$Col7Color=if(eq($n,7),"<span style='color:red'>","");
$Col8Color=if(eq($n,8),"<span style='color:red'>","");
$Col9Color=if(eq($n,9),"<span style='color:red'>","");
$EndSpan="</span>";@
qu.7.7.uid=021833cc-fa3f-48b6-97d1-e5004eeb0813@
qu.7.7.info=  Type=MC;
  Course=230;
@
qu.7.7.question=<div title="University of Waterloo Statistics Bank/Probability/Basics/Q$Q">Two numbers are selected from the set {1,2,3,4,5} as follows:
<ul>
    <li>The first number is selected at random. Call it x.</li>
    <li>x, x+2 (if x<4) and x-2&nbsp; (if x>2) are removed from the set. Notice that at LEAST two numbers are thus removed, three being removed in the case x = 3.&nbsp; Now the second number is selected at random from what is left.</li>
</ul>
<p>For example if x = 2 then the second number is selected from {1,3,5} since 2 and 4 are removed.<br />
<br />
Let X be the sum of the two numbers. Then P(X = $n) is:</p>
</div>@
qu.7.7.answer=4@
qu.7.7.choice.1=7/10@
qu.7.7.choice.2=3/15@
qu.7.7.choice.3=5/7@
qu.7.7.choice.4=$Ans@
qu.7.7.choice.5=None of the above.@
qu.7.7.fixed=4@

qu.7.8.mode=Multiple Choice@
qu.7.8.name=31. P(dice sum in (L,U))@
qu.7.8.comment=<p>There are 36 two-dice rolls in total (that is the sample space is 36 in size):<br />
<br />
<table cellspacing="0" cellpadding="0" bordercolor="#111111" border="0" style="border-collapse: collapse;" id="AutoNumber1">
    <tbody>
        <tr>
            <td>$R1(1,1)$EndSpan</td>
        </tr>
        <tr>
            <td>$R2(1,2),(2,1)$EndSpan</td>
        </tr>
        <tr>
            <td>$R3(1,3),(2,2),(3,1)$EndSpan</td>
        </tr>
        <tr>
            <td>$R4(1,4),(2,3),(3,2),(4,1)$EndSpan</td>
        </tr>
        <tr>
            <td>$R5(1,5),(2,4),(3,3),(4,2),(5,1)$EndSpan</td>
        </tr>
        <tr>
            <td>$R6(1,6),(2,5),(3,4),(4,3),(5,2),(6,1)$EndSpan</td>
        </tr>
        <tr>
            <td>$R7(2,6),(3,5),(4,4),(5,3),(6,2)$EndSpan</td>
        </tr>
        <tr>
            <td>$R8(3,6),(4,5),(5,4),(6,3)$EndSpan</td>
        </tr>
        <tr>
            <td>$R9(4,6),(5,5),(6,4)$EndSpan</td>
        </tr>
        <tr>
            <td>$R10(5,6),(6,5)$EndSpan</td>
        </tr>
        <tr>
            <td>$R11(6,6)$EndSpan</td>
        </tr>
    </tbody>
</table>
</p>
<p>By examining the table we see there are $NumLow rolls that total less than $Lower and $NumHigh rolls totalling more than $Upper so there are <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 mathvariant='normal'>$NumLow</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi mathvariant='normal'>$NumHigh</mi></mrow><mrow><mn>36</mn></mrow></mfrac></mrow></mstyle></math> = $Ans rolls meeting our criteria.</p>@
qu.7.8.editing=useHTML@
qu.7.8.solution=@
qu.7.8.algorithm=$Q="31";
$Which=rint(6);
$Align=switch(rint(2),"Left","Right");
$Lower=range(3,6,1);
$Upper=range(6,11,1);
$NumLow=switch($Lower-3,1,3,6,10);
$NumHigh=switch(11-$Upper,1,3,6,10,15,21);
$Ans=mathml("($NumLow+$NumHigh)/36");
$Alt1=mathml("3/36");
$Alt2=switch(rint(2),mathml("28/36"),mathml("4/7"));
$Alt3=switch(rint(3),mathml("10/36"),mathml("9/17"),mathml("23/35"));
$Alt4=mathml("14/36");
$R1="<span style='color:green'>";
$R11="<span style='color:green'>";
$R2=if(lt(2,$Lower-1),"<span style='color:green'>",if(ge(2,$Upper),"<span style='color:green'>",""));
$R3=if(lt(3,$Lower-1),"<span style='color:green'>",if(ge(3,$Upper),"<span style='color:green'>",""));
$R4=if(lt(4,$Lower-1),"<span style='color:green'>",if(ge(4,$Upper),"<span style='color:green'>",""));
$R5=if(lt(5,$Lower-1),"<span style='color:green'>",if(ge(5,$Upper),"<span style='color:green'>",""));
$R6=if(lt(6,$Lower-1),"<span style='color:green'>",if(ge(6,$Upper),"<span style='color:green'>",""));
$R7=if(lt(7,$Lower-1),"<span style='color:green'>",if(ge(7,$Upper),"<span style='color:green'>",""));
$R8=if(lt(8,$Lower-1),"<span style='color:green'>",if(ge(8,$Upper),"<span style='color:green'>",""));
$R9=if(lt(9,$Lower-1),"<span style='color:green'>",if(ge(9,$Upper),"<span style='color:green'>",""));
$R10=if(lt(10,$Lower-1),"<span style='color:green'>",if(ge(10,$Upper),"<span style='color:green'>",""));
$EndSpan="</span>";@
qu.7.8.uid=d73280c4-79a3-4f10-9491-9866fb7cc8a7@
qu.7.8.info=  Course=230;
  Author=Sean Scott;
  Type=MC;
@
qu.7.8.question=<div title="UW Statistics Bank/Probability/Basics/Q$Q"><img hspace="4" align="$Align" title="Two dice [IMG:TwoDice$Which.gif]" src="__BASE_URI__Probability/Basics/2Dice$Which.gif" alt="Two Dice" />Two fair six-sided dice are thrown. What is the probability that they total a number less than $Lower or more than $Upper?</div>@
qu.7.8.answer=1@
qu.7.8.choice.1=$Ans@
qu.7.8.choice.2=$Alt1@
qu.7.8.choice.3=$Alt2@
qu.7.8.choice.4=$Alt3@
qu.7.8.choice.5=$Alt4@
qu.7.8.fixed=@

qu.7.9.mode=Multiple Choice@
qu.7.9.name=22. P(two dice sum to n)@
qu.7.9.comment=<p>There are 36 two-dice rolls in total (that is the sample space is 36 in size), how many of those outcomes will sum to $SumsTo? Just write out the rolls that sum to $SumsTo (shown in <font color="#ff0000">red</font> below) and divide by 36.</p>
<p><br />
<table cellspacing="0" cellpadding="0" bordercolor="#111111" border="0" id="AutoNumber1" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td>$R1(1,1)$EndSpan</td>
        </tr>
        <tr>
            <td>$R2(1,2),(2,1)$EndSpan</td>
        </tr>
        <tr>
            <td>$R3(1,3),(2,2),(3,1)$EndSpan</td>
        </tr>
        <tr>
            <td>$R4(1,4),(2,3),(3,2),(4,1)$EndSpan</td>
        </tr>
        <tr>
            <td>$R5(1,5),(2,4),(3,3),(4,2),(5,1)$EndSpan</td>
        </tr>
        <tr>
            <td>$R6(1,6),(2,5),(3,4),(4,3),(5,2),(6,1)$EndSpan</td>
        </tr>
        <tr>
            <td>$R7(2,6),(3,5),(4,4),(5,3),(6,2)$EndSpan</td>
        </tr>
        <tr>
            <td>$R8(3,6),(4,5),(5,4),(6,3)$EndSpan</td>
        </tr>
        <tr>
            <td>$R9(4,6),(5,5),(6,4)$EndSpan</td>
        </tr>
        <tr>
            <td>$R10(5,6),(6,5)$EndSpan</td>
        </tr>
        <tr>
            <td>$R11(6,6)$EndSpan</td>
        </tr>
    </tbody>
</table>
</p>
<p>If you prefer a formula, for dice summing to&nbsp; <em>n</em> (<em>n</em> between 2 and 12 inclusive):</p>
<p><br />
<em><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>n</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mrow><mn>6</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi mathvariant='normal'>abs</mi><mfenced open='(' close=')' separators=','><mrow><mi>n</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>7</mn></mrow></mfenced></mrow><mrow><mn>36</mn></mrow></mfrac></mrow></mrow></mstyle></math>, </em>in our case <em>: <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 mathvariant='normal'>$SumsTo</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mn>6</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi mathvariant='normal'>abs</mi><mfenced open='(' close=')' separators=','><mrow><mi mathvariant='normal'>$SumsTo</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>7</mn></mrow></mfenced></mrow><mrow><mn>36</mn></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mi mathvariant='normal'>$AnsTop</mi><mrow><mn>36</mn></mrow></mfrac></mrow></mrow></mstyle></math><br />
</em></p>@
qu.7.9.editing=useHTML@
qu.7.9.hint.1=If you don't see the answer, just list out all possible dice rolls that add to $SumsTo and divide how many there are by the total number of possible rolls.@
qu.7.9.solution=@
qu.7.9.algorithm=$Q=22;
$SumsTo=range(2,12,1);
$Reps=6-abs($SumsTo-7);
$AnsTop=6-abs($SumsTo-7);
$AnsML=mathml("$AnsTop/36");
$Alt1ML=mathml("$AnsTop/30");
$Alt2ML=switch(rint(2),mathml("($AnsTop+1)/36"),mathml("($AnsTop+1)/30"));
$Alt3ML=switch(rint(2),mathml("5/7"),mathml("7/13"));
$Alt4ML=switch(rint(2),mathml("6/13"),mathml("4/7"));
$Which=rint(6);
$Align=switch(rint(2),"Left","Right");
$R1=if(eq($SumsTo,2),"<span style='color:red'>","");
$R2=if(eq($SumsTo,3),"<span style='color:red'>","");
$R3=if(eq($SumsTo,4),"<span style='color:red'>","");
$R4=if(eq($SumsTo,5),"<span style='color:red'>","");
$R5=if(eq($SumsTo,6),"<span style='color:red'>","");
$R6=if(eq($SumsTo,7),"<span style='color:red'>","");
$R7=if(eq($SumsTo,8),"<span style='color:red'>","");
$R8=if(eq($SumsTo,9),"<span style='color:red'>","");
$R9=if(eq($SumsTo,10),"<span style='color:red'>","");
$R10=if(eq($SumsTo,11),"<span style='color:red'>","");
$R11=if(eq($SumsTo,12),"<span style='color:red'>","");
$EndSpan="</span>";@
qu.7.9.uid=080828a5-0ea5-415c-887f-ac044bd035d0@
qu.7.9.info=  Course=230;
  Type=MC;
  Difficulty=2;
@
qu.7.9.question=<div title="UW Statistics Bank/Probability/Basics/Q$Q"><img width="90" height="54" align="left" src="__BASE_URI__Probability/Basics/2Dice0.gif" alt="" />Two fair dice are thrown. What is the probability that they total $SumsTo?</div>@
qu.7.9.answer=1@
qu.7.9.choice.1=$AnsML@
qu.7.9.choice.2=$Alt1ML@
qu.7.9.choice.3=$Alt2ML@
qu.7.9.choice.4=$Alt3ML@
qu.7.9.choice.5=$Alt4ML@
qu.7.9.fixed=@

qu.7.10.question=<div title="UW Statistics Bank/Probability/Basics/Q26">A fair dice is tossed 3 times. What is the probability that the same number appears on two consecutive tosses? Having all 3 tosses the same counts. <strong>Note: Give an exact answer </strong>(<a href="__BASE_URI__Tools/ExactAnswers.htm" onclick="window.open(this.href,'Exact','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,width=700,height=400,status'); return false"><font size="1">explained</font></a>)<strong>.</strong></div>@
qu.7.10.answer.num=11/36@
qu.7.10.answer.units=@
qu.7.10.showUnits=false@
qu.7.10.grading=exact_value@
qu.7.10.negStyle=minus@
qu.7.10.numStyle=thousands scientific dollars arithmetic@
qu.7.10.mode=Numeric@
qu.7.10.name=26. 3 die tosses, P(2 consec. Equal)@
qu.7.10.comment=<p>In this case it is ridiculous to write out all 216 possible outcomes! Think of cases though -</p>
<ol>
    <li>How many ways can dice 1 = dice 2 (<span style="font-weight: bold;">6</span>) with dice 3 different (<span style="font-weight: bold;">5</span>) for <span style="font-weight: bold;">6(5) = 30 </span>ways.</li>
    <li>How many  ways can dice 2 = dice 3 with dice 1 different (<span style="font-weight: bold;">30</span> also by a symmetry argument)</li>
    <li>And finally how many ways can all 3 be the same? (<span style="font-weight: bold;">6</span>)</li>
</ol>
<p>That's <span style="font-weight: bold;">30 + 30 + 6 = 66</span> ways out of the 216 possible tosses, so the probability 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>66</mn><mrow><mn>216</mn></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mn>11</mn><mrow><mn>36</mn></mrow></mfrac></mrow></mrow></mstyle></math>.</p>@
qu.7.10.editing=useHTML@
qu.7.10.solution=@
qu.7.10.algorithm=@
qu.7.10.uid=1e5bdbb4-7549-4bac-a9c2-8ec19fdb5f25@
qu.7.10.info=  Course=230;
  Author=Sean Scott;
  Type=numeric;
  Difficulty=2;
  Algorithmic=no;
@

qu.7.11.mode=Multiple Choice@
qu.7.11.name=12. P(2 wins|2 buys) for tickets@
qu.7.11.comment=<p>$NumT             =             range(15,50,5)                               $NumTM1             =             $NumT-1                               $AnsBot             =             $NumT*$NumTM1/2</p>
<p>Consider the first prize. There are $NumT tickets and you hold 2, so the probability of one of your tickets being drawn is 2/$NumT . Now there are $NumTM1 tickets left and you hold 1, so the probability of your second ticket being drawn is 1/$NumTM1 . The probability of BOTH events happening then is just the product of their probabilities:</p>@
qu.7.11.editing=useHTML@
qu.7.11.solution=@
qu.7.11.algorithm=$Q=12;
$NumT=range(15,50,5);
$NumTM1=$NumT-1;
$AnsBot=$NumT*$NumTM1/2;
$Alt1Bot=2*$AnsBot;
$Alt2Bot=int(($AnsBot+$Alt1Bot)/2);
$Alt3Top=3+2*rint(5);
$Alt3Bot=$AnsBot-5*rint(8);@
qu.7.11.uid=54000a38-3b45-4085-8450-f35e020f75be@
qu.7.11.info=  Course=202;
  Course=230;
  Difficulty=2;
@
qu.7.11.question=<div title="UW Statistics Bank/Probability/Basics/Q$Q">If $NumT tickets are sold and 2 prizes are to be awarded, find the probability that one person will win both prizes if that person buys exactly 2 tickets.</div>@
qu.7.11.answer=1@
qu.7.11.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><mn>1</mn><mrow><mi mathvariant='normal'>$AnsBot</mi></mrow></mfrac></mrow></mstyle></math>@
qu.7.11.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><mn>1</mn><mrow><mi mathvariant='normal'>$Alt1Bot</mi></mrow></mfrac></mrow></mstyle></math>@
qu.7.11.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>1</mn><mrow><mi mathvariant='normal'>$Alt2Bot</mi></mrow></mfrac></mrow></mstyle></math>@
qu.7.11.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><mi mathvariant='normal'>$Alt3Top</mi><mrow><mi mathvariant='normal'>$Alt3Bot</mi></mrow></mfrac></mrow></mstyle></math>@
qu.7.11.fixed=@

qu.7.12.question=<div title="UW Statistics Bank/Probability/Basics/Q$Q"><img hspace="4" align="$Align" src="__BASE_URI__Probability/Basics/Balls$Which.gif" alt="Balls in basket" title="Balls in basket [IMG:Balls$Which.gif]" />$balls balls are randomly placed in $baskets baskets numbered 1 through $baskets. What is the probability that basket 1 is empty? (4 decimals accuracy.)</div>@
qu.7.12.answer.num=$Ans@
qu.7.12.answer.units=@
qu.7.12.showUnits=false@
qu.7.12.grading=toler_abs@
qu.7.12.err=.001@
qu.7.12.negStyle=minus@
qu.7.12.numStyle=thousands scientific dollars arithmetic@
qu.7.12.mode=Numeric@
qu.7.12.name=17. Balls in Baskets I@
qu.7.12.comment=<p><strong>The correct answer is $Ans or <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><mi mathvariant='normal'>$basketsm1</mi><mrow><mi mathvariant='normal'>$baskets</mi></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$balls</mi></mrow></msup></mrow></mstyle></math>.</strong><br />
<br />
Consider the first ball. Since there are $basketsm1 baskets we can put the ball in that are not basket #$Bnum, the probability of <strong>not</strong> putting the ball in basket #$Bnum 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 mathvariant='normal'>$basketsm1</mi><mrow><mi mathvariant='normal'>$baskets</mi></mrow></mfrac></mrow></mstyle></math>.<br />
<br />
Now we repeat this event for each ball. We are safe to assume that each ball's placement is independent of the others, so the probability of not putting any ball in basket #$Bnum is just <strong><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><mi mathvariant='normal'>$basketsm1</mi><mrow><mi mathvariant='normal'>$baskets</mi></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$balls</mi></mrow></msup></mrow></mstyle></math></strong>.</p>@
qu.7.12.editing=useHTML@
qu.7.12.hint.1=What is the probability that one ball (say the first one) is <strong>not</strong> placed in basket $Bnum?@
qu.7.12.hint.2=Does the location of balls 1,2,...n-1 have any bearing on where ball n may go?@
qu.7.12.solution=@
qu.7.12.algorithm=$Q="17";
$balls=range(1,20,1);
$baskets=range(2,12,1);
$basketsm1=$baskets-1;
$Bnum=range(1,$baskets);
$Ans=decimal(3,(($baskets - 1)/$baskets)^$balls);
$Which=rint(4);
$Align=switch(rint(2),"Left","Right");@
qu.7.12.uid=e4b355a1-4154-4818-9afd-bd6bc6c30eda@
qu.7.12.info=  Difficulty=1;
  Course=230;
  Type=numeric;
@

qu.7.13.mode=Multiple Choice@
qu.7.13.name=02. Balls in boxes, P(box 1 empty)@
qu.7.13.comment=<p>Each time you place a ball, the probability that you won't put it in the first box 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 mathvariant='normal'>$pm1</mi><mrow><mi mathvariant='normal'>$p</mi></mrow></mfrac></mrow></mstyle></math>. Since placing the $n balls consists of $n independent events, the probability that none of the $n balls ends up in the first box 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><mi mathvariant='normal'>$pm1</mi><mrow><mi mathvariant='normal'>$p</mi></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$n</mi></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math>.</p>@
qu.7.13.editing=useHTML@
qu.7.13.solution=@
qu.7.13.algorithm=$Q=02;
$n=range(3,10,1);
$p=range(3,10,1);
$pm1=$p-1;
$Ans=decimal(4,($pm1/$p)^$n);
$Alt1=decimal(4,range(0.3,0.8,0.05)*$Ans);
$Alt2=decimal(4,range(1.2,1.6,0.05)*$Ans);
$Alt3=decimal(4,0.5*($Ans+$Alt1));
$Alt4=decimal(4,range(0.35,0.65,0.05)*($Ans+$Alt2));@
qu.7.13.uid=1cd58365-d7d5-4e86-9894-2dfaf60c4b93@
qu.7.13.info=  Difficulty=3;
  Course=230;
  Type=MC;
@
qu.7.13.question=<div title="University of Waterloo Statistics Bank/Probability/Basics/Q$Q"><img width="116" hspace="3" height="86" align="right" src="__BASE_URI__Probability/Basics/Balls.gif" alt="" />$n balls are distributed at random into $p boxes there being no restriction on the number of balls per box. The probability that the first box is empty is:</div>@
qu.7.13.answer=1@
qu.7.13.choice.1=$Ans@
qu.7.13.choice.2=$Alt1@
qu.7.13.choice.3=$Alt2@
qu.7.13.choice.4=$Alt3@
qu.7.13.choice.5=$Alt4@
qu.7.13.fixed=@

qu.7.14.mode=Multiple Choice@
qu.7.14.name=13. Board Game@
qu.7.14.comment=<p><img width="255" height="503" align="left" src="__BASE_URI__Probability/Basics/snake_laddera_tree.gif" alt="" /></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Consider your possible first rolls, and how you can win for each case. Notice that "6" is NOT a possible roll since that wins the game in 1 roll, and you are asked the probability of winning in EXACTLY 2 rolls. Also notice that, because of the arrows, opening rolls of 2 and 4 are the same, as are 3 and 5. To find the answer then simply use the tree shown to work out each case. You can also do it analytically:<br />
<br />
P(win in 2) <br />
= P(1)P(5 or 6) + P(2 or 4)P(2,3,4,5,or 6) + P(3 or 5)P(3,4,5, or 6) <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><mfrac><mn>1</mn><mrow><mn>6</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>2</mn><mrow><mn>6</mn></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mfrac><mn>2</mn><mrow><mn>6</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>5</mn><mrow><mn>6</mn></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mfrac><mn>2</mn><mrow><mn>6</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>4</mn><mrow><mn>6</mn></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mn>5</mn><mrow><mn>9</mn></mrow></mfrac></mrow></mrow></mstyle></math> .</p>@
qu.7.14.editing=useHTML@
qu.7.14.solution=@
qu.7.14.algorithm=$Q=13;
$Bottom1=2+rint(8);
$Top1=1+rint($Bottom1-1);
condition:ne(5/9,$Top1/$Bottom1);
$Top2=1+rint($Bottom1-1);
condition:ne(5/9,$Top2/$Bottom1);
condition:ne($Top1,$Top2);
$Bottom2=$Bottom1+1+rint(3);
condition:ne(5/9,$Top1/$Bottom2);@
qu.7.14.uid=d5ae1921-a4ed-435e-a1dc-a9aaf1465504@
qu.7.14.info=  Difficulty=3;
  Course=230;
  Type=MC;
@
qu.7.14.question=<div title="UW Statistics Bank/Probability/Basics/Q$Q">Shown is the board for a simple dice game. You roll a dice and move the same number of squares (for example if your first roll is a 3, move to the 3 square). If you land on an arrow's tail, you must move to the square where that arrow's head is. You win if you land on the "6" square or beyond (for example rolling a 5 when you are on the 4 square will win).<br />
<br />
<center> <img width="233" hspace="4" height="82" align="absmiddle" src="__BASE_URI__Probability/Basics/snakes_ladders_a.gif" alt="Board game" /></center><br />
<br />
What is the probability of winning this game in EXACTLY 2 moves?</div>@
qu.7.14.answer=2@
qu.7.14.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 mathvariant='normal'>$Top1</mi></mrow><mrow><mi mathvariant='normal'>$Bottom1</mi></mrow></mfrac></mrow></mstyle></math>@
qu.7.14.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><mn>5</mn><mrow><mn>9</mn></mrow></mfrac></mrow></mstyle></math>@
qu.7.14.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><mi mathvariant='normal'>$Top1</mi><mrow><mi mathvariant='normal'>$Bottom2</mi></mrow></mfrac></mrow></mstyle></math>@
qu.7.14.choice.4=0@
qu.7.14.choice.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><mfrac><mi mathvariant='normal'>$Top2</mi><mrow><mi mathvariant='normal'>$Bottom1</mi></mrow></mfrac></mrow></mstyle></math>@
qu.7.14.fixed=@

qu.7.15.question=<div title="UW Statistics Bank/Probability/Basics/Q$Q">A fair dice is tossed 3 times. What is the probability that all three tosses are different? <strong>Note: Give an exact answer </strong>(<a href="__BASE_URI__Tools/ExactAnswers.htm" onclick="window.open(this.href,'Exact','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,width=700,height=400,status'); return false"><font size="1">explained</font></a>)<strong>.</strong></div>@
qu.7.15.answer.num=5/9@
qu.7.15.answer.units=@
qu.7.15.showUnits=false@
qu.7.15.grading=exact_value@
qu.7.15.negStyle=minus@
qu.7.15.numStyle=thousands scientific dollars arithmetic@
qu.7.15.mode=Numeric@
qu.7.15.name=25. P(3 dice tosses different)@
qu.7.15.comment=<p>In this case it is ridiculous to write out all 216 possible outcomes! Think of the tosses in sequence:</p>
<ul>
    <li>First dice - who cares?</li>
    <li>Second dice - 5 out of 6 times will be different than the first</li>
    <li>Third dice - assuming toss 1 and toss 2 differ, then 4 out of 6 times this toss will differ from those two.</li>
</ul>
<p>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><mfrac><mn>5</mn><mrow><mn>6</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>4</mn><mrow><mn>6</mn></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mn>20</mn><mrow><mn>36</mn></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mn>5</mn><mrow><mn>9</mn></mrow></mfrac></mrow></mrow></mstyle></math>of the time the three tosses will differ.<br />
<br />
You can also see this by considering one case, where the first toss is "1" (the other 5 cases are of course identical). Writing out all 36 possible outcomes, and coloring those that are no good for us:</p>
<table cellspacing="3" cellpadding="0" bordercolor="#111111" border="1" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td align="center" style="background-color: red; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: yellow; font-size: 10pt; font-weight: 400; font-style: normal; vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="background-color: red; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: yellow; font-size: 10pt; font-weight: 400; font-style: normal; vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="background-color: red; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: yellow; font-size: 10pt; font-weight: 400; font-style: normal; vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">&nbsp;</td>
            <td align="center" style="background-color: rgb(204, 255, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="background-color: rgb(204, 255, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: bottom; white-space: nowrap;">3</td>
            <td align="center" style="background-color: rgb(204, 255, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">&nbsp;</td>
            <td align="center" style="background-color: rgb(204, 255, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="background-color: rgb(204, 255, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: bottom; white-space: nowrap;">5</td>
            <td align="center" style="background-color: rgb(204, 255, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: bottom; white-space: nowrap;">1</td>
        </tr>
        <tr>
            <td align="center" style="background-color: red; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: yellow; font-size: 10pt; font-weight: 400; font-style: normal; vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="background-color: red; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: yellow; font-size: 10pt; font-weight: 400; font-style: normal; vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="background-color: red; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: yellow; font-size: 10pt; font-weight: 400; font-style: normal; vertical-align: bottom; white-space: nowrap;">2</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">&nbsp;</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">3</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">2</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">&nbsp;</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">5</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">2</td>
        </tr>
        <tr>
            <td align="center" style="background-color: red; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: yellow; font-size: 10pt; font-weight: 400; font-style: normal; vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="background-color: red; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: yellow; font-size: 10pt; font-weight: 400; font-style: normal; vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="background-color: red; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: yellow; font-size: 10pt; font-weight: 400; font-style: normal; vertical-align: bottom; white-space: nowrap;">3</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">&nbsp;</td>
            <td align="center" style="background-color: rgb(153, 204, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="background-color: rgb(153, 204, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: bottom; white-space: nowrap;">3</td>
            <td align="center" style="background-color: rgb(153, 204, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: bottom; white-space: nowrap;">3</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">&nbsp;</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">5</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">3</td>
        </tr>
        <tr>
            <td align="center" style="background-color: red; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: yellow; font-size: 10pt; font-weight: 400; font-style: normal; vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="background-color: red; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: yellow; font-size: 10pt; font-weight: 400; font-style: normal; vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="background-color: red; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: yellow; vertical-align: bottom; font-size: 10pt; font-weight: 400; font-style: normal; white-space: nowrap;">4</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">&nbsp;</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">3</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">4</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">&nbsp;</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">5</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">4</td>
        </tr>
        <tr>
            <td align="center" style="background-color: red; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: yellow; font-size: 10pt; font-weight: 400; font-style: normal; vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="background-color: red; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: yellow; font-size: 10pt; font-weight: 400; font-style: normal; vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="background-color: red; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: yellow; vertical-align: bottom; font-size: 10pt; font-weight: 400; font-style: normal; white-space: nowrap;">5</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">&nbsp;</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">3</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">5</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">&nbsp;</td>
            <td align="center" style="background-color: rgb(153, 204, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="background-color: rgb(153, 204, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: bottom; white-space: nowrap;">5</td>
            <td align="center" style="background-color: rgb(153, 204, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: bottom; white-space: nowrap;">5</td>
        </tr>
        <tr>
            <td align="center" style="background-color: red; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: yellow; font-size: 10pt; font-weight: 400; font-style: normal; vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="background-color: red; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: yellow; font-size: 10pt; font-weight: 400; font-style: normal; vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="background-color: red; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: yellow; vertical-align: bottom; font-size: 10pt; font-weight: 400; font-style: normal; white-space: nowrap;">6</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">&nbsp;</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">3</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">6</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">&nbsp;</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">5</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">6</td>
        </tr>
        <tr>
            <td align="center" style="background-color: rgb(204, 255, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="background-color: rgb(204, 255, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: bottom; white-space: nowrap;">2</td>
            <td align="center" style="background-color: rgb(204, 255, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">&nbsp;</td>
            <td align="center" style="background-color: rgb(204, 255, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="background-color: rgb(204, 255, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: bottom; white-space: nowrap;">4</td>
            <td align="center" style="background-color: rgb(204, 255, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">&nbsp;</td>
            <td align="center" style="background-color: rgb(204, 255, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="background-color: rgb(204, 255, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: bottom; white-space: nowrap;">6</td>
            <td align="center" style="background-color: rgb(204, 255, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: bottom; white-space: nowrap;">1</td>
        </tr>
        <tr>
            <td align="center" style="background-color: rgb(153, 204, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="background-color: rgb(153, 204, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: bottom; white-space: nowrap;">2</td>
            <td align="center" style="background-color: rgb(153, 204, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: bottom; white-space: nowrap;">2</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">&nbsp;</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">4</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">2</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">&nbsp;</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">6</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">2</td>
        </tr>
        <tr>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">2</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">3</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">&nbsp;</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">4</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">3</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">&nbsp;</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">6</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">3</td>
        </tr>
        <tr>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">2</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">4</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">&nbsp;</td>
            <td align="center" style="background-color: rgb(153, 204, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="background-color: rgb(153, 204, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: bottom; white-space: nowrap;">4</td>
            <td align="center" style="background-color: rgb(153, 204, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: bottom; white-space: nowrap;">4</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">&nbsp;</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">6</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">4</td>
        </tr>
        <tr>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">2</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">5</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">&nbsp;</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">4</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">5</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">&nbsp;</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">6</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">5</td>
        </tr>
        <tr>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">2</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">6</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">&nbsp;</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">4</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">6</td>
            <td align="center" style="vertical-align: bottom; white-space: nowrap;">&nbsp;</td>
            <td align="center" style="background-color: rgb(153, 204, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: bottom; white-space: nowrap;">1</td>
            <td align="center" style="background-color: rgb(153, 204, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: bottom; white-space: nowrap;">6</td>
            <td align="center" style="background-color: rgb(153, 204, 255); background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 50%; -moz-background-size: auto auto; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; vertical-align: bottom; white-space: nowrap;">6</td>
        </tr>
    </tbody>
</table>
<p><br />
You can simply count to see that 20 of the 36 cases meet the criteria for this question.</p>@
qu.7.15.editing=useHTML@
qu.7.15.solution=@
qu.7.15.algorithm=@
qu.7.15.uid=160e82f2-1575-4f6a-84a5-230c7776f09e@
qu.7.15.info=  Course=230;
  Difficulty=1;
  Source=SMS;
  Type=numeric;
@

qu.7.16.mode=Multiple Choice@
qu.7.16.name=20. Pin # guess - P(guess on 3 trys)@
qu.7.16.comment=<div style="margin-top: 0px; margin-bottom: 2px;" class="shadedDiv descriptionSpan">
<p>The probability of getting it in 1 guess 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>1</mn><mrow><mi mathvariant='normal'>$PP</mi></mrow></mfrac></mrow></mstyle></math> , so in 3 guesses the probability is just <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><mi mathvariant='normal'>$PP</mi></mrow></mfrac></mrow></mstyle></math>.</p>
<hr style="width: 100%; height: 2px;" />
In fact our logic is suspect - we forgot the small (but non-zero) chance of actually guessing the PIN!  This leads to:<br />
<br />
P(guess right) = P(right first) + P(wrong first)P(right second) + P(wrong 1st)P(wrong second)P(right third)<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><mfrac><mn>1</mn><mrow><mi mathvariant='normal'>$PP</mi></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mfrac><mi mathvariant='normal'>$PPm1</mi><mrow><mi mathvariant='normal'>$PP</mi></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>1</mn><mrow><mi mathvariant='normal'>$PPm1</mi></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mfrac><mi mathvariant='normal'>$PPm1</mi><mrow><mi mathvariant='normal'>$PP</mi></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mi mathvariant='normal'>$PPm2</mi><mrow><mi mathvariant='normal'>$PPm1</mi></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>1</mn><mrow><mi mathvariant='normal'>$PPm2</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>3</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>1</mn><mrow><mi mathvariant='normal'>$PP</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mn>3</mn><mrow><mi mathvariant='normal'>$PP</mi></mrow></mfrac></mrow></mrow></mstyle></math>
<p>&nbsp;</p>
</div>
<table width="27" height="25" cellspacing="1" cellpadding="2" border="0">
    <tbody>
        <tr>
            <td valign="top" align="right">&nbsp;</td>
            <td valign="top" align="right" class="normalDiv">&nbsp;</td>
            <td valign="top" class="normalDiv">&nbsp;</td>
        </tr>
    </tbody>
</table>@
qu.7.16.editing=useHTML@
qu.7.16.solution=@
qu.7.16.algorithm=$Q=20;
$n=range(4,6);
$Ex=switch($n-4,"0129","04565","010879");
$Fn=fact($n);
$PP=10^$n;
$PPm1=$PP-1;
$PPm2=$PP-2;
$PPm3=$PP-3;
$PPAlt2=10^($n+1);
$PPAlt3=switch(rint(2),10^($n-1),fact($n));
$Ans=mathml("3/$PP");
$Alt1ML=mathml("2/$PP");
$Alt2ML=switch(rint(2),mathml("3/$PPAlt2"),mathml("$Fn/$PPAlt2"));
$Alt3ML=mathml("3/$PPAlt3");
$Which=rint(6);
$Align=switch(rint(2),"Left","Right");@
qu.7.16.uid=a99e27aa-1e50-4944-8305-098dbe9e00dd@
qu.7.16.info=  Course=230;
  Type=MC;
@
qu.7.16.question=<div title="University of Waterloo Statistics Bank/Probability/Basics/Q$Q"><img vspace="0" hspace="4" border="0" align="$Align" alt="ATM." title="ATM [IMG:atm$Which.gif]" src="__BASE_URI__Probability/Basics/ATM$Which.gif" />A bank uses $n digit PIN numbers (e.g. $Ex). Assume all combinations are equally likely. What is the probability of guessing somebody&rsquo;s PIN number with 3 attempts using different numbers each time?</div>@
qu.7.16.answer=1@
qu.7.16.choice.1=$Ans@
qu.7.16.choice.2=$Alt1ML@
qu.7.16.choice.3=$Alt2ML@
qu.7.16.choice.4=$Alt3ML@
qu.7.16.choice.5=None of the above.@
qu.7.16.fixed=4@

qu.7.17.mode=Multiple Choice@
qu.7.17.name=32. P(dice sum Even/Odd)@
qu.7.17.comment=<p>There are 36 two-dice rolls in total (that is the sample space is 36 in size):<br />
<br />
<table cellspacing="0" cellpadding="0" bordercolor="#111111" border="0" id="AutoNumber1" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td>$R1(1,1)$EndSpan</td>
        </tr>
        <tr>
            <td>$R2(1,2),(2,1)$EndSpan</td>
        </tr>
        <tr>
            <td>$R3(1,3),(2,2),(3,1)$EndSpan</td>
        </tr>
        <tr>
            <td>$R4(1,4),(2,3),(3,2),(4,1)$EndSpan</td>
        </tr>
        <tr>
            <td>$R5(1,5),(2,4),(3,3),(4,2),(5,1)$EndSpan</td>
        </tr>
        <tr>
            <td>$R6(1,6),(2,5),(3,4),(4,3),(5,2),(6,1)$EndSpan</td>
        </tr>
        <tr>
            <td>$R7(2,6),(3,5),(4,4),(5,3),(6,2)$EndSpan</td>
        </tr>
        <tr>
            <td>$R8(3,6),(4,5),(5,4),(6,3)$EndSpan</td>
        </tr>
        <tr>
            <td>$R9(4,6),(5,5),(6,4)$EndSpan</td>
        </tr>
        <tr>
            <td>$R10(5,6),(6,5)$EndSpan</td>
        </tr>
        <tr>
            <td>$R11(6,6)$EndSpan</td>
        </tr>
    </tbody>
</table>
<br />
Count up how many such rolls have their sum $par, then divide by 36 to get the answer <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>18</mn><mrow><mn>36</mn></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mn>1</mn><mrow><mn>2</mn></mrow></mfrac></mrow></mrow></mstyle></math>.</p>@
qu.7.17.editing=useHTML@
qu.7.17.solution=@
qu.7.17.algorithm=$Q="32";
$Which=1+rint(4);
$Align=switch(rint(2),"Left","Right");
$ParPick=rint(2);
$par=switch($ParPick,"even","odd");
$EndSpan="</span>";
$R1=switch($ParPick,"<span style='color:green'>","");
$R2=switch($ParPick,"","<span style='color:green'>");
$R3=switch($ParPick,"<span style='color:green'>","");
$R4=switch($ParPick,"","<span style='color:green'>");
$R5=switch($ParPick,"<span style='color:green'>","");
$R6=switch($ParPick,"","<span style='color:green'>");
$R7=switch($ParPick,"<span style='color:green'>","");
$R8=switch($ParPick,"","<span style='color:green'>");
$R9=switch($ParPick,"<span style='color:green'>","");
$R10=switch($ParPick,"","<span style='color:green'>");
$R11=switch($ParPick,"<span style='color:green'>","");
$AnsML=mathml("1/2");
$Alt1ML=mathml("7/12");
$Alt2ML=switch(rint(2),mathml("2/3"),mathml("5/12"));
$Alt3ML=switch(rint(3),mathml("3/4"),mathml("17/36"),mathml("18/35"));
$Alt4ML=switch(rint(3),mathml("5/7"),mathml("13/36"),mathml("17/24"));@
qu.7.17.uid=8e93d43d-ed37-44f0-9811-63378caad851@
qu.7.17.info=  Course=230;
  Author=Sean Scott;
@
qu.7.17.question=<div title="UW Statistics Bank/Probability/Basics/Q$Q"><img hspace="4" align="$Align" title="Two dice. [IMG:2Dice$Which]" alt="Two dice" src="__BASE_URI__Probability/Basics/2Dice$Which.gif" />Two fair six-sided dice are thrown. What is the probability the total is $par?</div>@
qu.7.17.answer=1@
qu.7.17.choice.1=$AnsML@
qu.7.17.choice.2=$Alt1ML@
qu.7.17.choice.3=$Alt2ML@
qu.7.17.choice.4=$Alt3ML@
qu.7.17.choice.5=$Alt4ML@
qu.7.17.fixed=4@

qu.7.18.question=<div title="UW Statistics Bank/Probability/Basics/Q$Q"><img hspace="4" align="$Align" alt="$ImgName" src="__BASE_URI__Probability/Pr/$ImgName$Which.gif" title="$ImgName [IMG:$ImgName$Which.gif]" />Suppose the probability for the number of $What sold per day for a $Who in $Where is<br />
<br />
<table cellspacing="1" cellpadding="1" border="1" align="center">
    <tbody>
        <tr>
            <td>$TWhat sold/day</td>
            <td>Probability</td>
        </tr>
        <tr>
            <td>0</td>
            <td align="center">$p0</td>
        </tr>
        <tr>
            <td>1</td>
            <td align="center">$p1</td>
        </tr>
        <tr>
            <td>2</td>
            <td align="center">$p2</td>
        </tr>
        <tr>
            <td>3</td>
            <td align="center">$p3</td>
        </tr>
        <tr>
            <td>4</td>
            <td align="center">$p4</td>
        </tr>
        <tr>
            <td>Total</td>
            <td align="center">1.00</td>
        </tr>
    </tbody>
</table>
<p><br />
Then, the probability that there wil be more than 2 $What sold in a day is (3 decimal accuracy)</p>
</div>@
qu.7.18.answer.num=$ans@
qu.7.18.answer.units=@
qu.7.18.showUnits=false@
qu.7.18.grading=toler_abs@
qu.7.18.err=0.01@
qu.7.18.negStyle=minus@
qu.7.18.numStyle= scientific  arithmetic@
qu.7.18.mode=Numeric@
qu.7.18.name=10. P(more than 2 cars sold)@
qu.7.18.comment=<p>Just add P(selling 3) + P(selling 4)</p>@
qu.7.18.editing=useHTML@
qu.7.18.solution=@
qu.7.18.algorithm=$Q = 10;
$WhatSell=rint(4);
$What=switch($WhatSell,"cars","SUVs","boats","houses");
$TWhat=switch($WhatSell,"Cars","SUVs","Boats","Houses");
$Who=switch($WhatSell,"car dealership","car dealership","marina","real estate office");
$Where=switch(rint(4),"Calgary","Peterborough","Corner Brook","Vancouver");
$Which=1+rint(4);
$Align=switch(rint(2),"Left","Right");
$ImgName=switch($WhatSell,"Car","SUV","Boat","House");
$p0=decimal(2,rand(0,0.25));
$p1=decimal(2,rand(0,0.3));
$p2=decimal(2,rand(0,0.3));
$p3=decimal(2,rand(0,1-$p0-$p1-$p2));
$p4=1-$p0-$p1-$p2-$p3;
$ans=$p3+$p4;@
qu.7.18.uid=a6da38f9-57d5-42fb-9508-043a2a6f322c@
qu.7.18.info=  Course=202;
  Course=230;
  Difficulty=0;
@

qu.7.19.mode=Multiple Choice@
qu.7.19.name=02. P(Die>x)@
qu.7.19.comment=<p>There $SayWhat1 6 - $Limit = $AnsTop $SayWhat2 greater than $Limit, so (assuming a fair die) the probability of $SayWhat3 turning up 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 mathvariant='normal'>$AnsTop</mi><mrow><mn>6</mn></mrow></mfrac></mrow></mstyle></math>.</p>@
qu.7.19.editing=useHTML@
qu.7.19.solution=@
qu.7.19.algorithm=$Q=2;
$Limit=range(1,5);
$AnsTop=6-$Limit;
$Alt1Top=if($AnsTop-1,$AnsTop-1,$AnsTop+1);
$Alt2Top=if($AnsTop-2,$AnsTop-2,$AnsTop+2);
$SayWhat1 = if(eq($Limit,5),"is","are");
$SayWhat2 = if(eq($Limit,5),"number","numbers");
$SayWhat3 = if(eq($Limit,5),"it","one of them");@
qu.7.19.uid=82b854c9-a83b-4a91-adc3-e8a98b9c2876@
qu.7.19.info=  Course=202;
  Course=230;
  Type=MC;
@
qu.7.19.question=<div title="University of Waterloo Statistics Bank/Probability/Basics/Dice/Q$Q">
If a die is rolled one time, the probability of getting a number greater than $Limit is:</div>@
qu.7.19.answer=1@
qu.7.19.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><mi mathvariant='normal'>$AnsTop</mi><mrow><mn>6</mn></mrow></mfrac></mrow></mstyle></math>@
qu.7.19.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><mi mathvariant='normal'>$Alt1Top</mi><mrow><mn>6</mn></mrow></mfrac></mrow></mstyle></math>@
qu.7.19.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><mi mathvariant='normal'>$Alt2Top</mi><mrow><mn>6</mn></mrow></mfrac></mrow></mstyle></math>@
qu.7.19.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><mn>2</mn><mrow><mn>5</mn></mrow></mfrac></mrow></mstyle></math>@
qu.7.19.fixed=@

qu.7.20.mode=Multiple Choice@
qu.7.20.name=27. P(Die roll in subset)@
qu.7.20.comment=<p>The sample space is {1,2,3,4,5,6} and each outcome is equally likely (has probability <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>1</mn><mrow><mn>6</mn></mrow></mfrac></mrow></mstyle></math>). The subset satisfying the criteria "die toss is $Criteria" has $Size elements, the probability of one of those happening is just&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 mathvariant='normal'>$Size</mi><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo></mrow><mrow><mfrac><mn>1</mn><mrow><mn>6</mn></mrow></mfrac></mrow></mstyle></math>=$AnsML .</p>@
qu.7.20.editing=useHTML@
qu.7.20.solution=@
qu.7.20.algorithm=$Q=27;
$L11=switch(rint(2),"1","2");
$L12=switch(rint(2),"3","4");
$L13=switch(rint(2),"5","6");
$L1="one of $L11, $L12, or $L13";
$L21=switch(rint(3),"1","4","5");
$L22=switch(rint(3),"2","3","6");
$L2="a $L21 or a $L22";
$Pick=rint(4);
$Criteria=switch($Pick,"even","odd","$L1","$L2");
$Size=switch($Pick,3,3,3,2);
$AnsML=switch($Pick,mathml("1/2"),mathml("1/2"),mathml("1/2"),mathml("1/3"));
$Alt1ML=if(eq($Pick,3),mathml("1/2"),mathml("1/3"));
$Alt2ML=mathml("($Pick+1)/5");
$Alt3ML=switch(rint(2),mathml("1/6"),mathml("5/6"));
$Alt4ML=switch(rint(2),mathml("2/3"),mathml("($Pick+1)/7"));@
qu.7.20.uid=78badabc-6af9-4639-9f3b-a627951a81af@
qu.7.20.info=  Type=MC;
  Author=Sean Scott;
  Course=230;
  Difficulty=1;
@
qu.7.20.question=<div title="University of Waterloo Statistics Bank/Probability/Basics/Q$Q"><img width="53" hspace="4" height="53" align="left" alt="A die" src="__BASE_URI__Probability/Basics/Die0.gif" title="A die [IMG:Die0.gif]" /><img hspace="4" align="right" alt="A die" src="__BASE_URI__Probability/Basics/Die1.gif" title="A die [IMG:Die1.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 $Criteria?</div>@
qu.7.20.answer=1@
qu.7.20.choice.1=$AnsML@
qu.7.20.choice.2=$Alt1ML@
qu.7.20.choice.3=$Alt2ML@
qu.7.20.choice.4=$Alt3ML@
qu.7.20.choice.5=$Alt4ML@
qu.7.20.fixed=4@

qu.7.21.mode=Multiple Choice@
qu.7.21.name=03. P(Dice difference)@
qu.7.21.comment=<p>Notice that the total number of possible outcomes is 30 - NOT 36 - because we eliminated the cases where both dice are equal. The simplest way to do this is to list out how many outcomes satisfy the condition, then divide that number by 30.</p>
<p>The easiest way is to list all the rolls, that gives you the probability of each (that is # occurrences/30).</p>
<table cellpadding="3" border="1">
    <tbody>
        <tr>
            <td align="center">X</td>
            <td align="center">How?</td>
            <td align="center">#</td>
            <td align="center">P(X)</td>
        </tr>
        <tr>
            <td align="right">$Row1Color 1</td>
            <td style="vertical-align: top;">$Row1Color (1,2),(2,3),..(5,6),<br />
            (6,5),..(2,1)</td>
            <td align="right" style="vertical-align: top;">$Row1Color 10</td>
            <td align="center" style="vertical-align: top;">$Row1Color&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><mn>10</mn><mrow><mn>30</mn></mrow></mfrac></mrow></mstyle></math></td>
        </tr>
        <tr>
            <td align="right" style="vertical-align: top;">$Row2Color 2</td>
            <td style="vertical-align: top;">$Row2Color (1,3),(2,4),(3,5),(4,6),<br />
            (6,4),(5,3),(4,2),(3,1)</td>
            <td align="right" style="vertical-align: top;">$Row2Color 8</td>
            <td align="right" style="vertical-align: top;">$Row2Color&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><mn>8</mn><mrow><mn>30</mn></mrow></mfrac></mrow></mstyle></math></td>
        </tr>
        <tr>
            <td align="right">$Row3Color 3</td>
            <td style="vertical-align: top;">$Row3Color (1,4),(2,5),(3,6),<br />
            (6,3),(5,2),(4,1)</td>
            <td align="right" style="vertical-align: top;">$Row3Color 6</td>
            <td align="center" style="vertical-align: top;">$Row3Color&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><mn>6</mn></mrow><mrow><mn>30</mn></mrow></mfrac></mrow></mstyle></math></td>
        </tr>
        <tr>
            <td align="right" style="vertical-align: top;">$Row4Color 4</td>
            <td style="vertical-align: top;">$Row4Color (1,5),(2,6),(6,2),(5,1)</td>
            <td align="right" style="vertical-align: top;">$Row4Color 4</td>
            <td align="center" style="vertical-align: top;">$Row4Color&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><mn>4</mn></mrow><mrow><mn>30</mn></mrow></mfrac></mrow></mstyle></math></td>
        </tr>
        <tr>
            <td align="right" style="vertical-align: top;">$Row5Color 5</td>
            <td style="vertical-align: top;">$Row5Color (1,6),(6,1)</td>
            <td align="right" style="vertical-align: top;">$Row5Color 2</td>
            <td align="center" style="vertical-align: top; ">$Row5Color &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><mn>2</mn></mrow><mrow><mn>30</mn></mrow></mfrac></mrow></mstyle></math></td>
        </tr>
    </tbody>
</table>@
qu.7.21.editing=useHTML@
qu.7.21.hint.1=How would your answer differ if we allowed the two dice to be the same value?<br>@
qu.7.21.solution=@
qu.7.21.algorithm=$Q=3;
$d=range(1,5);
$Ans=decimal(3,(12-2*$d)/30);
$AnsTop=12-2*$d;
$Wans1Top=$AnsTop+range(1,4,1);
$Wans2Top=$AnsTop-1;
$Wans3Top=7;
$Wans4Top=range(1,11,1);
$WAns1=decimal(3,(12-2*$d)/36);
$r=decimal(2,range(.01,.3,.01));
$WAns2=decimal(3,$Ans+$r);
$Which=rint(6);
$Align=switch(rint(2),"Left","Right");
$Row1Color=if(eq($d,1),"<span style='color:red'>","");
$Row2Color=if(eq($d,2),"<span style='color:red'>","");
$Row3Color=if(eq($d,3),"<span style='color:red'>","");
$Row4Color=if(eq($d,4),"<span style='color:red'>","");
$Row5Color=if(eq($d,5),"<span style='color:red'>","");
$EndSpan="</span>";@
qu.7.21.uid=9a7b937e-f7a4-4a77-8d3b-5a3d1a5150cd@
qu.7.21.info=  Difficulty=2;
  Keyword=expected value;
  Course=230;
  Type=MC;
@
qu.7.21.question=<div title="University of Waterloo Statistics Bank/Probability/Basics/Dice/Q$Q"><img hspace="4" align="$Align" title="Two Dice [IMG:2Dice$Which.gif]" alt="Two Dice" src="__BASE_URI__Probability/Basics/Dice/2Dice$Which.gif" />Two dice are thrown. If they both show the same face they are thrown again.&nbsp;
<p>Otherwise let X = (larger face) - (smaller face) . Then P(X = $d) is:</p>
</div>@
qu.7.21.answer=1@
qu.7.21.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><mi mathvariant='normal'>$AnsTop</mi><mrow><mn>30</mn></mrow></mfrac></mrow></mstyle></math>@
qu.7.21.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 mathvariant='normal'>$Wans1Top</mi></mrow><mrow><mn>30</mn></mrow></mfrac></mrow></mstyle></math>@
qu.7.21.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><mi mathvariant='normal'>$Wans2Top</mi><mrow><mn>30</mn></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></mrow></mstyle></math>@
qu.7.21.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><mi mathvariant='normal'>$Wans3Top</mi><mrow><mn>36</mn></mrow></mfrac></mrow></mstyle></math>@
qu.7.21.choice.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><mfrac><mi mathvariant='normal'>$Wans4Top</mi><mrow><mn>36</mn></mrow></mfrac></mrow></mstyle></math>@
qu.7.21.fixed=@

qu.7.22.question=<div title="University of Waterloo Statistics Bank/Probability/Basics/Geometric/Q$Q"><img width="80" hspace="4" height="80" align="right" title="Triangle in Square [IMG:TIS.gif]" alt="Triangle in a square" src="__BASE_URI__Probability/Basics/Geometric/TIS.gif" />Suppose a square has side length <span style="font-style: italic;">s</span>, and an equilateral triangle has side length <span style="font-style: italic;">t</span>. (<em><font size="3" face="Times New Roman">s</font></em> and <em><font size="3" face="Times New Roman">t</font></em> are such that the triangle can be placed entirely inside the square.) You pick a point at random in the square, then I randomly place the triangle entirely in the square. What is the ratio <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>t</mi><mrow><mi>s</mi></mrow></mfrac></mrow></mstyle></math> if the probability that the triangle covers your point is $p? (Answer to 4 decimal places please.)</div>@
qu.7.22.answer.num=$Ans@
qu.7.22.answer.units=@
qu.7.22.showUnits=false@
qu.7.22.grading=toler_abs@
qu.7.22.err=.001@
qu.7.22.negStyle=minus@
qu.7.22.numStyle=thousands scientific dollars arithmetic@
qu.7.22.mode=Numeric@
qu.7.22.name=02. Triangle in square@
qu.7.22.comment=<p><img width="200" hspace="4" height="236" align="left" src="__BASE_URI__Probability/Basics/Geometric/Is.gif" alt="Isoceles triangle with side length t" title="Isoceles triangle with side length t [IMG:Is.gif]" />From the diagram <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>t</mi><mrow><mn>2</mn></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mi>t</mi><mrow><mn>2</mn></mrow></mfrac></mrow></mfenced><mrow><mn>2</mn></mrow></msup><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><msup><mi>h</mi><mrow><mn>2</mn></mrow></msup></mrow></mstyle></math>. <br />
Solving you get&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>h</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><msqrt><mrow><mn>3</mn></mrow></msqrt><mi>t</mi></mrow><mrow><mn>2</mn></mrow></mfrac></mrow></mstyle></math>. <br />
The area of the triangle is :<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><mfrac><mn>1</mn><mrow><mn>2</mn></mrow></mfrac><mi>base</mi><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi>height</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mn>1</mn><mrow><mn>2</mn></mrow></mfrac><mi>t</mi><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mrow><msqrt><mrow><mn>3</mn></mrow></msqrt><mi>t</mi></mrow><mrow><mn>2</mn></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><msqrt><mrow><mn>3</mn></mrow></msqrt><mrow><mn>4</mn></mrow></mfrac><msup><mi>t</mi><mrow><mn>2</mn></mrow></msup></mrow></mstyle></math> <img align="absmiddle" alt="" src="http://euclid.hamline.edu/%7Earundquist/latex/showequation.php?eqn_id=17848" />  .<br />
Since the area of the square is s<sup>2</sup> the question is asking us to find a value of <span style="font-style: italic;">t</span> such that <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><msqrt><mrow><mn>3</mn></mrow></msqrt></mrow><mrow><mn>4</mn></mrow></mfrac><msup><mi>t</mi><mrow><mn>2</mn></mrow></msup></mrow><mrow><msup><mi>s</mi><mrow><mn>2</mn></mrow></msup></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$p</mi></mrow></mstyle></math>.<br />
Solving:&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><msup><mi>t</mi><mrow><mn>2</mn></mrow></msup><mrow><msup><mi>s</mi><mrow><mn>2</mn></mrow></msup></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mn>4</mn><mfenced open='(' close=')' separators=','><mrow><mi mathvariant='normal'>$p</mi></mrow></mfenced></mrow><mrow><msqrt><mrow><mn>3</mn></mrow></msqrt></mrow></mfrac></mrow><mrow><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfrac><mi>t</mi><mrow><mi>s</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><msqrt><mrow><mfrac><mrow><mn>4</mn><mfenced open='(' close=')' separators=','><mrow><mi mathvariant='normal'>$p</mi></mrow></mfenced></mrow><mrow><msqrt><mrow><mn>3</mn></mrow></msqrt></mrow></mfrac></mrow></msqrt><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math></p>
<p>&nbsp;</p>
<p>&nbsp;</p>@
qu.7.22.editing=useHTML@
qu.7.22.solution=@
qu.7.22.algorithm=$Q="02";
$p=decimal(3,range(0.1,0.4,0.05));
$temp = 2*sqrt($p)/sqrt(sqrt(3));
$Ans = decimal(4,2*sqrt($p)/sqrt(sqrt(3)));@
qu.7.22.uid=bd1938d1-912f-4d35-99e9-e94759efc470@
qu.7.22.info=  Course=230;
  Difficulty=2;
  Type=numeric;
@

qu.7.23.question=<div title="UW Statistics Bank/Probability/Basics/Q$Q"><img hspace="3" align="$Align" title="Basket of Balls [IMG:Balls$Which]" alt="Imagine a basket of balls." src="__BASE_URI__Probability/Basics/Balls$Which.gif" />$balls balls are randomly placed in $baskets baskets numbered 1 through $baskets. What is the probability that the last ball is put in basket  $LastBallIn? (4 decimal accuracy)</div>@
qu.7.23.answer.num=$Ans@
qu.7.23.answer.units=@
qu.7.23.showUnits=false@
qu.7.23.grading=toler_abs@
qu.7.23.err=0.001@
qu.7.23.negStyle=minus@
qu.7.23.numStyle=thousands scientific dollars arithmetic@
qu.7.23.mode=Numeric@
qu.7.23.name=18. P(Last ball in basket n)@
qu.7.23.comment=<p><img hspace="4" align="right" alt="Red Herring" title="Red Herring [IMG:RedHerring.gif]" src="__BASE_URI__Probability/Basics/RedHerring.gif" /><strong>The correct answer is $Ans or <math xmlns='http://www.w3.org/1998/Math/MathML'><mrow><mfrac linethickness='1' denomalign='center' numalign='center' bevelled='false'><mn mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>1</mn><mi mathcolor='#000000' mathbackground='#ffffff' mathsize='12' mathvariant='normal' fontfamily='Times New Roman'>$baskets</mi></mfrac></mrow></math></strong><br />
<br />
The question is a red herring. It doesn't matter how many balls you put in the baskets, or what ball you are considering. The ball placements are all independent events, so the probability that the last ball goes in a given basket (say basket $LastBallIn) is just 1/$baskets.</p>
<p>&nbsp;</p>@
qu.7.23.editing=useHTML@
qu.7.23.hint.1=Does it matter what ball you are considering? That is, would your answer change if the first ball was used instead of the last?@
qu.7.23.hint.2=Does it matter what basket you are considering? That is, would  your answer be the same if the question asked about Basket #$AltBasket instead of #$LastBallIn?@
qu.7.23.solution=@
qu.7.23.algorithm=$Q="18";
$balls=range(1,20,1);
$baskets=range(2,12,1);
$LastBallIn=range(1,$baskets,1);
$AltBasket=if(eq($LastBallIn,$baskets),range(1,$baskets-1),$baskets);
$Ans=decimal(3,1/$baskets);
$Which=rint(4);
$Align=switch(rint(2),"Left","Right");@
qu.7.23.uid=18f4fd8b-9197-4f7c-881e-39d478c75cba@
qu.7.23.info=  Difficulty=1;
  Course=230;
  Type=numeric;
@

qu.7.24.question=<div title="University of Waterloo Statistics Bank/Probability/Basics/Geometric/Q$Q">An equilateral triangle with side length <em>s</em> is drawn inside a circle of radius $r. You can assume that the triangle fits completely inside the circle. A raindrop falls randomly inside the circle. If the probability that the raindrop strikes the triangle is $p, what is the value of <em>s</em> ? (4 decimal accuracy).</div>@
qu.7.24.answer.num=$Ans@
qu.7.24.answer.units=@
qu.7.24.showUnits=false@
qu.7.24.grading=toler_abs@
qu.7.24.err=.001@
qu.7.24.negStyle=minus@
qu.7.24.numStyle=thousands scientific dollars arithmetic@
qu.7.24.mode=Numeric@
qu.7.24.name=03. Raindrop on triangle in circle.@
qu.7.24.comment=<img align="left" title="Equialteral Triangle with side length s [IMG:ET.gif]" alt="Equialteral Triangle with side length s" src="__BASE_URI__Probability/Basics/Geometric/ET.gif" />First find the area of the triangle. Since it's an equilateral triangle we can use the Pythagorean Theorem to find its height:<br />
<br />
Apply Pythagoras:&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><msup><mi>s</mi><mrow><mn>2</mn></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mi>s</mi><mrow><mn>2</mn></mrow></mfrac></mrow></mfenced><mrow><mn>2</mn></mrow></msup><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><msup><mi>h</mi><mrow><mn>2</mn></mrow></msup></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><mfrac><mrow><mn>3</mn><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><msup><mi>s</mi><mrow><mn>2</mn></mrow></msup></mrow><mrow><mn>4</mn></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><msup><mi>h</mi><mrow><mn>2</mn></mrow></msup></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>h</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><msqrt><mrow><mn>3</mn></mrow></msqrt><mi>s</mi></mrow><mrow><mn>2</mn></mrow></mfrac></mrow></mstyle></math><br />
<br />
So now we can find the Area of the Triangle:<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>A</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mn>1</mn><mrow><mn>2</mn></mrow></mfrac><mi>bh</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mn>1</mn><mrow><mn>2</mn></mrow></mfrac><mi>s</mi><mfrac><mrow><msqrt><mrow><mn>3</mn></mrow></msqrt><mi>s</mi></mrow><mrow><mn>2</mn></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><msqrt><mrow><mn>3</mn></mrow></msqrt><msup><mi>s</mi><mrow><mn>2</mn></mrow></msup></mrow><mrow><mn>4</mn></mrow></mfrac></mrow></mstyle></math><br />
<br />
The probability <em>p = $p&nbsp;</em>is just the ratio <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><msub><mi>A</mi><mrow><mi>triangle</mi></mrow></msub><mrow><msub><mi>A</mi><mrow><mi>circle</mi></mrow></msub></mrow></mfrac></mrow></mstyle></math>.&nbsp; <em><font size="3" face="Times New Roman">A<sub>circle</sub></font></em> is just <img align="absmiddle" alt="" src="http://euclid.hamline.edu/%7Earundquist/latex/showequation.php?eqn_id=17849" />($r)<sup>2</sup> , thus<br />
<font size="3" face="Times New Roman">$p</font> = <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><mfrac><mrow><msqrt><mrow><mn>3</mn></mrow></msqrt><msup><mi>s</mi><mrow><mn>2</mn></mrow></msup></mrow><mrow><mn>4</mn></mrow></mfrac><mrow><mi>&pi;</mi><msup><mi mathvariant='normal'>$r</mi><mrow><mn>2</mn></mrow></msup></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>&pi;</mi><msup><mfenced open='(' close=')' separators=','><mrow><mi mathvariant='normal'>$r</mi></mrow></mfenced><mrow><mn>2</mn></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi mathvariant='normal'>$p</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><msqrt><mrow><mn>3</mn></mrow></msqrt><msup><mi>s</mi><mrow><mn>2</mn></mrow></msup></mrow><mrow><mn>4</mn></mrow></mfrac></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></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>s</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><msqrt><mrow><mfrac><mrow><mn>4</mn><mo mathvariant='italic' lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>&pi;</mi><msup><mfenced open='(' close=')' separators=','><mrow><mi mathvariant='normal'>$r</mi></mrow></mfenced><mrow><mn>2</mn></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi mathvariant='normal'>$p</mi></mrow><mrow><msqrt><mrow><mn>3</mn></mrow></msqrt></mrow></mfrac></mrow></msqrt><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math>@
qu.7.24.editing=useHTML@
qu.7.24.solution=@
qu.7.24.algorithm=$Q=3;
$p=decimal(3,range(0.01,0.27,0.01));
$r=range(5,12,1);
$Ans=decimal(4,sqrt(4*Pi*$p/sqrt(3))*$r);@
qu.7.24.uid=219663ce-3dff-4c1c-a694-4216b962bc21@
qu.7.24.info=  Course=230;
  Type=numeric;
@

qu.7.25.question=<div title="University of Waterloo Statistics Bank/Probability/Basics/Dice/Q$Q"><img hspace="4" align="$Align" src="__BASE_URI__Probability/Basics/Dice/2Dice$Which.gif" alt="Two Dice" title="Two Dice [IMG:2Dice$Which.gif]" />Let X be the largest outcome and Y the smallest when 2 balanced (6-sided) dice are rolled. Let R = X - Y and let f(r) = P(R=r)  represent the probability function for R. What is f($r)?
<p><strong>Note: Give an exact answer </strong>(<a onclick="window.open(this.href,'Exact','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,width=700,height=440,status'); return false" href="__BASE_URI__Tools/ExactAnswers.htm"><font size="1">explained</font></a>)<strong>.</strong></p>
.</div>@
qu.7.25.answer.num=$Ans@
qu.7.25.answer.units=@
qu.7.25.showUnits=false@
qu.7.25.grading=exact_value@
qu.7.25.negStyle=minus@
qu.7.25.numStyle=thousands scientific dollars arithmetic@
qu.7.25.mode=Numeric@
qu.7.25.name=01. P(dice diff = r)@
qu.7.25.comment=<p>There are 6<sup>2</sup> = 36 possible outcomes.&nbsp; Consider the following table:
<table cellpadding="3" bordercolor="#111111" border="1" id="AutoNumber2" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td><strong>r</strong></td>
            <td><strong>Possibles (N = 6)</strong></td>
            <td><strong>#</strong></td>
            <td><strong>f(r)</strong></td>
        </tr>
        <tr>
            <td>$Row0Color 0</td>
            <td>$Row0Color(1,1),(2,2),(3,3),(4,4),(5,5),(6,6)</td>
            <td>$Row0Color 6</td>
            <td align="right">$Row0Color 1/6$EndSpan</td>
        </tr>
        <tr>
            <td>$Row1Color 1</td>
            <td>$Row1Color (2,1),(3,2),(4,3),(5,4),(6,5),<br />
            (1,2),(2,3),(3,4),(4,5),(5,6)</td>
            <td>$Row1Color 10</td>
            <td align="right">$Row1Color 10/36$EndSpan</td>
        </tr>
        <tr>
            <td>$Row2Color 2</td>
            <td>$Row2Color (3,1),(4,2),(5,3),(6,4),<br />
            (1,3),(2,4),(3,5),(4,6)</td>
            <td>$Row2Color 8</td>
            <td align="right">$Row2Color 8/36$EndSpan</td>
        </tr>
        <tr>
            <td>$Row3Color 3</td>
            <td>$Row3Color (4,1),(5,2),(6,3)<br />
            (1,4),(2,5),(3,6)</td>
            <td>$Row3Color 6</td>
            <td align="right">$Row3Color 6/36$EndSpan</td>
        </tr>
        <tr>
            <td>$Row4Color 4</td>
            <td>$Row4Color (5,1),(6,2)<br />
            (1,5),(2,6)</td>
            <td>$Row4Color 4</td>
            <td align="right">$Row4Color 4/36$EndSpan</td>
        </tr>
        <tr>
            <td>$Row5Color 5</td>
            <td>$Row5Color (6,1)<br />
            (1,6)</td>
            <td>$Row5Color 2</td>
            <td align="right">$Row5Color 2/36$EndSpan</td>
        </tr>
    </tbody>
</table>
</p>
<p>&nbsp;</p>@
qu.7.25.editing=useHTML@
qu.7.25.solution=@
qu.7.25.algorithm=$Q=1;
$r=range(0,5);
$Ans=switch($r,"1/6","10/36","8/36","6/36","4/36","2/36");
$Which=rint(6);
$Align=switch(rint(2),"Left","Right");
$Row0Color=if(eq($r,0),"<span style='color:red'>","");
$Row1Color=if(eq($r,1),"<span style='color:red'>","");
$Row2Color=if(eq($r,2),"<span style='color:red'>","");
$Row3Color=if(eq($r,3),"<span style='color:red'>","");
$Row4Color=if(eq($r,4),"<span style='color:red'>","");
$Row5Color=if(eq($r,5),"<span style='color:red'>","");
$EndSpan="</span>";@
qu.7.25.uid=f18ccaaa-f7b1-490f-b21f-d1d95bf33efb@
qu.7.25.info=  Difficulty=2;
  Course=230;
@

qu.7.26.mode=Multiple Choice@
qu.7.26.name=30. P(Dice sum>N)@
qu.7.26.comment=<p>There are 36 two-dice rolls in total (that is the sample space is 36 in size). The rolls meeting the criteria "sum is greater than $Sum" are shown in <font color="#339966">green</font> below::<br />
<br />
<table cellspacing="0" cellpadding="0" bordercolor="#111111" border="0" style="border-collapse: collapse;" id="AutoNumber1">
    <tbody>
        <tr>
            <td>(1,1)</td>
        </tr>
        <tr>
            <td>$R2(1,2),(2,1)$EndSpan</td>
        </tr>
        <tr>
            <td>$R3(1,3),(2,2),(3,1)$EndSpan</td>
        </tr>
        <tr>
            <td>$R4(1,4),(2,3),(3,2),(4,1)$EndSpan</td>
        </tr>
        <tr>
            <td>$R5(1,5),(2,4),(3,3),(4,2),(5,1)$EndSpan</td>
        </tr>
        <tr>
            <td>$R6(1,6),(2,5),(3,4),(4,3),(5,2),(6,1)$EndSpan</td>
        </tr>
        <tr>
            <td>$R7(2,6),(3,5),(4,4),(5,3),(6,2)$EndSpan</td>
        </tr>
        <tr>
            <td>$R8(3,6),(4,5),(5,4),(6,3)$EndSpan</td>
        </tr>
        <tr>
            <td>$R9(4,6),(5,5),(6,4)$EndSpan</td>
        </tr>
        <tr>
            <td>$R10(5,6),(6,5)$EndSpan</td>
        </tr>
        <tr>
            <td>$R11(6,6)$EndSpan</td>
        </tr>
    </tbody>
</table>
<br />
Count up how many rolls meet the criteria and divide by 36 to get the answer $AnsML .</p>@
qu.7.26.editing=useHTML@
qu.7.26.solution=@
qu.7.26.algorithm=$Q="30";
$Which=rint(6);
$Align=switch(rint(2),"Left","Right");
$Sum=range(2,6,1);
$AnsT=switch($Sum-2,35,33,30,26,21);
$AnsML=mathml("$AnsT/36");
$Alt1T=switch($Sum-2,33,30,26,21,35);
$Alt2T=switch($Sum-2,30,26,21,35,33);
$Alt3T=switch($Sum-2,26,21,35,33,30);
$Alt4T=switch($Sum-2,21,35,33,30,26);
$Alt1ML=mathml("$Alt1T/36");
$Alt2ML=mathml("$Alt2T/36");
$Alt3ML=mathml("$Alt3T/36");
$Alt4ML=mathml("$Alt4T/36");
$EndSpan="</span>";
$R2=if(eq($Sum,2),"<span style='color:green'>","");
$R3=if(le($Sum,3),"<span style='color:green'>","");
$R4=if(le($Sum,4),"<span style='color:green'>","");
$R5=if(le($Sum,5),"<span style='color:green'>","");
$R6=if(le($Sum,6),"<span style='color:green'>","");
$R7=if(le($Sum,7),"<span style='color:green'>","");
$R8="<span style='color:green'>";
$R9="<span style='color:green'>";
$R10="<span style='color:green'>";
$R11="<span style='color:green'>";@
qu.7.26.uid=ed454d36-6719-4f09-9dcf-bab09b172004@
qu.7.26.info=  Author=Sean Scott;
  Course=230;
  Type=MC;
@
qu.7.26.question=<div title="UW Statistics Bank/Probability/Basics/Q$Q"><img hspace="4" align="$Align" src="__BASE_URI__Probability/Basics/2Dice$Which.gif" alt="Two dice" title="Two dice. [IMG:2Dice$Which]" />Two fair six-sided dice are thrown. What is the probability that they total more than $Sum?</div>@
qu.7.26.answer=1@
qu.7.26.choice.1=$AnsML@
qu.7.26.choice.2=$Alt1ML@
qu.7.26.choice.3=$Alt2ML@
qu.7.26.choice.4=$Alt3ML@
qu.7.26.choice.5=$Alt4ML@
qu.7.26.fixed=4@

qu.7.27.question=<div title="UW Statistics Bank/Probability/Basics/Q$Q"><img hspace="3" align="$Align" src="__BASE_URI__Probability/Basics/DicePoly$Which.gif" alt="Multisided die" title="Multisided die [IMG:DicePoly$Which.gif]" /><img hspace="3" align="$Align" src="__BASE_URI__Probability/Basics/DicePoly$Which.gif" alt="Multisided die" title="Multisided die [IMG:DicePoly$Which.gif]" />Suppose you roll two fair $n-sided dice. Each dice has its faces labeled 1 through $n and by "fair" we mean each face is equally likely to appear. What is the probability that both dice show the same face? <strong>Note: Give an exact answer </strong>(<a onclick="window.open(this.href,'Exact','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,width=700,height=400,status'); return false" href="__BASE_URI__Tools/ExactAnswers.htm"><font size="1">explained</font></a>)<strong>.</strong>

</div>@
qu.7.27.answer.num=1/$n@
qu.7.27.answer.units=@
qu.7.27.showUnits=false@
qu.7.27.grading=exact_value@
qu.7.27.negStyle=minus@
qu.7.27.numStyle=thousands scientific dollars arithmetic@
qu.7.27.mode=Numeric@
qu.7.27.name=29. Two n-sided dice equal@
qu.7.27.comment=<p>Label the dice #1 and #2. We don't care what face #1 shows, all we want is the probability that #2 shows the same face. Each face shows up with equal probability though, so the probability that #2 has the same face showing is just <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>1</mn><mrow><mi mathvariant='normal'>$n</mi></mrow></mfrac></mrow></mstyle></math> .</p>@
qu.7.27.editing=useHTML@
qu.7.27.solution=@
qu.7.27.algorithm=$Q=29;
$n=range(4,20,2);
$Which=rint(6);
$Align=switch(rint(2),"Left","Right");@
qu.7.27.uid=60ad21ec-57a7-4ad3-9341-fd24d4a59dbd@
qu.7.27.info=  Type=numeric;
  Course=230;
  Author=SMS;
@

qu.7.28.mode=Multiple Choice@
qu.7.28.name=05. Select from Staff, P(worker)@
qu.7.28.comment=<p>First determine how many people in total work there:</p>
<p>Secretaries + Techies + Engineers + Executives + Workers</p>
<p>= $sec+$tech+$eng+$exec+$work= $total</p>
<p>Then the probability of selcting a worker is just <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><mo lspace='0.1111111em' rspace='0.1111111em'>&num;</mo><mi>workers</mi></mrow><mrow><mi>total</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfrac><mi mathvariant='normal'>$work</mi><mrow><mi mathvariant='normal'>$total</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo></mrow></mstyle></math>$Ans</p>@
qu.7.28.editing=useHTML@
qu.7.28.solution=@
qu.7.28.algorithm=$Q=5;
$sec=range(2,6,2);
$tech=rint(4)*4+12;
$eng=range(4,8,2);
$exec=2;
$work=range(40,80,4);
$total=$sec+$tech+$eng+$exec+$work;
$Ans=mathml("$work/$total");
$Alt1=switch(rint(2),mathml("$tech/$total"),mathml("$sec/$total"));
$Alt2=switch(rint(2),mathml("$eng/$total"),mathml("$eng/($total-$eng)"));
$Alt3=switch(rint(2),mathml("($work+$tech)/$total"),mathml("($work+$sec)/$total"));
$Which=rint(5);
$Align=switch(rint(2),"Left","Right");@
qu.7.28.uid=58a5c8ef-0b1b-4630-b804-7b78caa3f715@
qu.7.28.info=  Course=202;
  Course=230;
@
qu.7.28.question=<div title="UW Statistics Bank/Probability/Basics/Q$Q"><img hspace="4" align="left" src="__BASE_URI__Probability/Basics/Staff$Which.gif" alt="Staff" title="Staff member(s) [IMG:Staff$Which.gif]" />The staff at a small company includes: $sec secretaries, $tech technicians, $eng engineers, $exec executives, and $work factory workers. If a person is selected at random, what is the probability that he or she is a factory worker?</div>@
qu.7.28.answer=1@
qu.7.28.choice.1=$Ans@
qu.7.28.choice.2=$Alt1@
qu.7.28.choice.3=$Alt2@
qu.7.28.choice.4=$Alt3@
qu.7.28.fixed=@

qu.7.29.mode=Multiple Choice@
qu.7.29.name=01. P(Disembark at station n)@
qu.7.29.comment=<p>How many ways can the passengers disembark using all the stations? There are $n passengers and they have $p stations to choose from so this can be done in $p<sup>$n</sup> ways.</p>
<p>How many ways if <em><strong>no-one</strong></em> uses station $q? The passengers now only have $pm1 stations to choose from so this can be done in $pm1<sup>$n</sup> ways.</p>
<p>Therefore probability of <em><strong>at least one</strong></em> person getting off at station $q 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><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mi mathvariant='normal'>$pm1</mi><mrow><mi mathvariant='normal'>$p</mi></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$n</mi></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math>.</p>@
qu.7.29.editing=useHTML@
qu.7.29.solution=@
qu.7.29.algorithm=$Q=01;
$Align=switch(rint(3),"Left","Right","AbsMiddle");
$Which=rint(4);
$n=range(10,20,1);
$p=range(5,9,1);
$pm1=$p-1;
$q=range(2,$p-1,1);
$Ans=decimal(4,1-(($pm1/$p)^$n));
$Alt1=decimal(4,range(0.3,0.9,0.05)*$Ans);
$Alt2=decimal(4,$Ans+range(0.3,0.7,0.05)*(1-$Ans));
$Alt3=decimal(4,0.5*($Ans+range(0.4,0.6,0.05)*$Alt1));
$Alt4=decimal(4,0.5*($Ans+range(0.4,0.6,0.05)*$Alt2));@
qu.7.29.uid=8ad611ba-9fcb-4b00-8b14-d5958df423b8@
qu.7.29.info=  Difficulty=3;
  Course=230;
@
qu.7.29.question=<div title="UW Statistics Bank/Probability/Basics/Q$Q">Suppose $n passengers board a train<img vspace="2" hspace="4" align="$Align" src="__BASE_URI__Probability/Basics/Train$Which.gif" alt="Train" title="Train [IMG:Train$Which.gif]" /> in Windsor. On its way to Ottawa the train will make stops at $p different stations (numbered 1,2,...,$p = Ottawa) where passengers may get off. Assuming passengers are equally likely to get off at any station, what is the probability that at least one passenger gets off at station $q?</div>@
qu.7.29.answer=1@
qu.7.29.choice.1=$Ans@
qu.7.29.choice.2=$Alt1@
qu.7.29.choice.3=$Alt2@
qu.7.29.choice.4=$Alt3@
qu.7.29.choice.5=$Alt4@
qu.7.29.fixed=@

qu.7.30.question=<div title="University of Waterloo Statistics Bank/Probability/Basics/Q$Q">The digits {1, 2,..,6} are randomly arranged in a row. Find the probability that the first digit is $start and last digit is $end.
<p><strong>Note: Give an exact answer </strong>(<a href="__BASE_URI__Tools/ExactAnswers.htm" onclick="window.open(this.href,'Exact','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,width=700,height=440,status'); return false"><font size="1">explained</font></a>)<strong>.</strong></p>
</div>@
qu.7.30.answer.num=1/30@
qu.7.30.answer.units=@
qu.7.30.showUnits=false@
qu.7.30.grading=exact_value@
qu.7.30.negStyle=minus@
qu.7.30.numStyle=thousands scientific dollars arithmetic@
qu.7.30.mode=Numeric@
qu.7.30.name=06. List of digits is n---m@
qu.7.30.comment=<p>There are 6! possible permutations of the 6 digits. For permutations of the desired type, the first and last digits are fixed (as $start and $end respectively) and the middle four digits can be any permutation of the 4 remaining digits. Thus there are 4! possible outcomes and the probability of such an outcome 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>4</mn><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow><mrow><mn>6</mn><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mn>1</mn><mrow><mn>30</mn></mrow></mfrac></mrow></mrow></mstyle></math></p>
<p>&nbsp;</p>@
qu.7.30.editing=useHTML@
qu.7.30.solution=@
qu.7.30.algorithm=$Q=6;
$start=range(1,5);
$end=range($start+1,6);@
qu.7.30.uid=d9783d82-eb58-49a6-84af-aa961f8d850b@
qu.7.30.info=  Course=230;
  Type=numeric;
  Difficulty=1;
@

qu.7.31.mode=Inline@
qu.7.31.name=08. Hybrid Genes@
qu.7.31.comment=<p>Consider a simple table showing possible outcomes:</p>
<div>
<table cellspacing="1" cellpadding="1" bordercolor="#111111" border="1" id="AutoNumber1" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td colspan="2">Father</td>
        </tr>
        <tr>
            <td rowspan="3">M<br />
            o<br />
            t<br />
            h<br />
            e<br />
            r</td>
            <td>&nbsp;</td>
            <td align="center"><em>d</em></td>
            <td align="center"><em>r</em></td>
        </tr>
        <tr>
            <td><em>d</em></td>
            <td>
            <p align="center">dd</p>
            </td>
            <td>dr</td>
        </tr>
        <tr>
            <td><em>r</em></td>
            <td align="center">rd</td>
            <td align="center">rr</td>
        </tr>
    </tbody>
</table>
</div>
<p>All outcomes are equally likely, so you can see the probability of being dominant (<em>dd</em>) or recessive (<em>rr</em>) 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>1</mn><mrow><mn>4</mn></mrow></mfrac></mrow></mstyle></math>, while the probability of being hybrid (<em>rd</em> or <em>dr</em>) 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>2</mn><mrow><mn>4</mn></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mn>1</mn><mrow><mn>2</mn></mrow></mfrac></mrow></mrow></mstyle></math>.</p>
<p>b) Look at the table above to see that P(child appears as dominant) = P(is dominant) + P(is hybrid) = <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>1</mn><mrow><mn>4</mn></mrow></mfrac><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mfrac><mn>1</mn><mrow><mn>2</mn></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mrow><mfrac><mn>3</mn><mrow><mn>4</mn></mrow></mfrac></mrow></mrow></mstyle></math>. To determine the probabilty that $children of 4 appear dominant, first determine how many ways $children can be selected from the 4:&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=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mn>4</mn></mrow></mtd></mtr><mtr><mtd><mrow><mi>$children</mi></mrow></mtd></mtr></mtable></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mn>4</mn><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow><mrow><mfenced open='(' close=')' separators=','><mrow><mn>4</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>$children</mi></mrow></mfenced><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo><mi>$children</mi><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow></mfrac></mrow><mrow><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>$c0</mi></mrow></mstyle></math></p>
<p>The probabilty is just (ways to select $children)[P(dominant)]<sup>$children</sup>[P(not dominant)]<sup>4-$children</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><mi>$c0</mi><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>3</mn><mrow><mn>4</mn></mrow></mfrac></mrow></mfenced><mrow><mi>$children</mi></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>1</mn><mrow><mn>4</mn></mrow></mfrac></mrow></mfenced><mrow><mn>4</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>$children</mi></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>$c</mi></mrow></mstyle></math></p>@
qu.7.31.editing=useHTML@
qu.7.31.solution=@
qu.7.31.algorithm=$Q=08;
$Which=1+rint(4);
$Align=switch(rint(2),"Left","Right");
$a1=1/4;
$a2=1/4;
$a3=1/2;
$b=3/4;
$children=range(1,4,1);
$c0=maple("binomial(4,$children)");
$Prec=maple("$c0*(.75^$children)*(.25^(4-$children))");
$c=decimal(4,$Prec);@
qu.7.31.uid=1a58dd88-7bea-41a0-9a6a-3dcaf511826b@
qu.7.31.info=  Course=202;
@
qu.7.31.weighting=1,1,1,1@
qu.7.31.numbering=alpha@
qu.7.31.part.1.name=sro_id_1@
qu.7.31.part.1.answer.units=@
qu.7.31.part.1.numStyle=   arithmetic@
qu.7.31.part.1.editing=useHTML@
qu.7.31.part.1.showUnits=false@
qu.7.31.part.1.question=(Unset)@
qu.7.31.part.1.mode=Numeric@
qu.7.31.part.1.grading=exact_value@
qu.7.31.part.1.negStyle=minus@
qu.7.31.part.1.answer.num=$a1@
qu.7.31.part.2.name=sro_id_2@
qu.7.31.part.2.answer.units=@
qu.7.31.part.2.numStyle=   arithmetic@
qu.7.31.part.2.editing=useHTML@
qu.7.31.part.2.showUnits=false@
qu.7.31.part.2.question=(Unset)@
qu.7.31.part.2.mode=Numeric@
qu.7.31.part.2.grading=exact_value@
qu.7.31.part.2.negStyle=minus@
qu.7.31.part.2.answer.num=$a2@
qu.7.31.part.3.name=sro_id_3@
qu.7.31.part.3.answer.units=@
qu.7.31.part.3.numStyle=   arithmetic@
qu.7.31.part.3.editing=useHTML@
qu.7.31.part.3.showUnits=false@
qu.7.31.part.3.question=(Unset)@
qu.7.31.part.3.mode=Numeric@
qu.7.31.part.3.grading=exact_value@
qu.7.31.part.3.negStyle=minus@
qu.7.31.part.3.answer.num=$a3@
qu.7.31.part.4.name=sro_id_4@
qu.7.31.part.4.answer.units=@
qu.7.31.part.4.numStyle=   @
qu.7.31.part.4.editing=useHTML@
qu.7.31.part.4.showUnits=false@
qu.7.31.part.4.err=0.01@
qu.7.31.part.4.question=(Unset)@
qu.7.31.part.4.mode=Numeric@
qu.7.31.part.4.grading=toler_abs@
qu.7.31.part.4.negStyle=both@
qu.7.31.part.4.answer.num=$c@
qu.7.31.question=<div title="UW Statistics Bank/Probability/Basics/Q$Q"><img hspace="4" align="$Align" title="An eye [IMG:Eye$Which.gif]" alt="An eye" src="__BASE_URI__Probability/Pr/Eye$Which.gif" />Suppose that a particular trait of a person (such as eye color or left handedness) is classified on the basis of on pair of genes and suppose that <em>d</em> represents a dominant gene and<em> r </em>a recessive gene. Thus a person with <em>dd</em> genes is pure dominance, one with <em>rr</em> is pure recessive, and one with <em>rd</em> is hybrid. Children receive one gene from each parent. <br /><br />a) <strong>For part (a), please give exact answers </strong>(<a href="__BASE_URI__Tools/ExactAnswers.htm" onclick="window.open(this.href,'Exact','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,width=700,height=400,status'); return false"><font size="1">explained</font></a>)<strong>.</strong> <br /><br />What is the probability of a child of two <u>hybrid</u> parents to have:<br /><br />Dominance?&nbsp;&nbsp; <1><span>&nbsp;</span><br />Recesive? &nbsp; &nbsp; &nbsp; <2><span>&nbsp;</span><br />Hybrid? &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; <3><span>&nbsp;</span><p><br />b) The pure dominance and the hybrid are alike in appearance. If two hybrid parents have a total of 4 children, what is the probability that exactly $children of the 4 children have the outward appearance of the dominant gene? (3 decimal accuracy)&nbsp; <4><span>&nbsp;</span></p></div>@

qu.7.32.mode=Inline@
qu.7.32.name=11. Autism developmental score@
qu.7.32.comment=<p>The probability of a score of 3 can be read from the table. The probability of a score of at <u>least</u> 3 is:</p>
<p>P(score &ge; 3) = P(score=3) + P(score=4) + P(score=5)</p>@
qu.7.32.editing=useHTML@
qu.7.32.solution=@
qu.7.32.algorithm=$Q = 11;
$s1=decimal(2,rand(0,0.3));
$s2=decimal(2,rand(0,0.25));
$s3=decimal(2,rand(0,0.25));
$s5=decimal(2,rand(0,0.15));
$s4=1-$s1-$s2-$s3-$s5;
$ans1=$s3;
$ans2=$s3+$s4+$s5;@
qu.7.32.uid=3ef49f2c-84e0-424c-beae-defbd01cadf0@
qu.7.32.info=  Course=202;
  Difficulty=3;
@
qu.7.32.weighting=1,1@
qu.7.32.numbering=alpha@
qu.7.32.part.1.name=sro_id_1@
qu.7.32.part.1.answer.units=@
qu.7.32.part.1.numStyle= scientific  arithmetic@
qu.7.32.part.1.editing=useHTML@
qu.7.32.part.1.showUnits=false@
qu.7.32.part.1.err=0.01@
qu.7.32.part.1.question=(Unset)@
qu.7.32.part.1.mode=Numeric@
qu.7.32.part.1.grading=toler_abs@
qu.7.32.part.1.negStyle=minus@
qu.7.32.part.1.answer.num=$ans1@
qu.7.32.part.2.name=sro_id_2@
qu.7.32.part.2.answer.units=@
qu.7.32.part.2.numStyle= scientific  arithmetic@
qu.7.32.part.2.editing=useHTML@
qu.7.32.part.2.showUnits=false@
qu.7.32.part.2.err=0.01@
qu.7.32.part.2.question=(Unset)@
qu.7.32.part.2.mode=Numeric@
qu.7.32.part.2.grading=toler_abs@
qu.7.32.part.2.negStyle=minus@
qu.7.32.part.2.answer.num=$ans2@
qu.7.32.question=<div title="UW Statistics Bank/Probability/Basics/Q$Q">Autistic children are often evaluated and given a developmental score from 1 to 5, where 1 represents the absence of signs (normal development), and 5 represents the maximal severity of signs (severe retardation). One proposed distribution for the developmental scores of autistic children is as follows:<p>&nbsp;</p><p><table width="216" cellspacing="1" cellpadding="1" border="1" align="center">    <tbody>        <tr>            <td>Developmental Score (X)</td>            <td>P(x)</td>        </tr>        <tr>            <td align="center">1</td>            <td>$s1</td>        </tr>        <tr>            <td align="center">2</td>            <td>$s2</td>        </tr>        <tr>            <td align="center">3</td>            <td>$s3</td>        </tr>        <tr>            <td align="center">4</td>            <td>$s4</td>        </tr>        <tr>            <td align="center">5</td>            <td>$s5</td>        </tr>        <tr>            <td>Total</td>            <td>1.00</td>        </tr>    </tbody></table>Assuming that this probability distribution is correct, answer the following questions (2 decimal accuracy):</p><p>The probability that an autistic child has a developmental score of 3 is<span>&nbsp;</span><1><span>&nbsp;</span><br />The probability that an autistic child has a developmental score of&nbsp; at least 3 is <span>&nbsp;</span><2><span>&nbsp;</span></p></div>@

qu.7.33.question=<div title="University of Waterloo Statistics Bank/Probability/Basics/Geometric/Q$Q"><img width="169" hspace="4" height="137" align="right" src="__BASE_URI__Probability/Basics/Geometric/DIS.gif" alt="Dart in Circle in Square" title="Dart in Circle in Square [IMG:DIS.gif]" />A square has side length $s. A circle of radius $r is drawn so it lies entirely in the square. If I now toss a dart so it lands in the square, what is the probability the dart falls in the circle (assume I don't aim)? (Answer to 3 decimal accuracy.)</div>@
qu.7.33.answer.num=$Ans@
qu.7.33.answer.units=@
qu.7.33.showUnits=false@
qu.7.33.grading=toler_abs@
qu.7.33.err=0.01@
qu.7.33.negStyle=minus@
qu.7.33.numStyle=thousands scientific dollars arithmetic@
qu.7.33.mode=Numeric@
qu.7.33.name=01. Dart in Circle in Square@
qu.7.33.comment=<p>P(dart falls in circle) = <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 mathvariant='normal'>Area</mi><mo lspace='0.0em' rspace='0.0em'>&InvisibleTimes;</mo><mi mathvariant='normal'>of</mi><mo lspace='0.0em' rspace='0.0em'>&InvisibleTimes;</mo><mi mathvariant='normal'>Circle</mi></mrow><mrow><mi mathvariant='normal'>Area</mi><mo lspace='0.0em' rspace='0.0em'>&InvisibleTimes;</mo><mi mathvariant='normal'>of</mi><mo lspace='0.0em' rspace='0.0em'>&InvisibleTimes;</mo><mi mathvariant='normal'>Square</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><msup><mrow><mi mathvariant='normal'>&#960;</mi><mo lspace='0.0em' rspace='0.0em'>&ApplyFunction;</mo><mfenced open='(' close=')' separators=','><mrow><mi mathvariant='normal'>$r</mi></mrow></mfenced></mrow><mn>2</mn></msup></mrow><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mi mathvariant='normal'>$s</mi></mrow></mfenced><mn>2</mn></msup></mrow></mfrac><mo mathvariant='italic' lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow></mstyle></math></p>@
qu.7.33.editing=useHTML@
qu.7.33.solution=@
qu.7.33.algorithm=$Q="01";
$s=range(6,20,1);
$r=range(2,10,1);
condition:lt($r,($s/2)-1);
$Ans=decimal(4,Pi*($r)^2/($s)^2);@
qu.7.33.uid=e969b2d1-c2f1-4f82-8a30-ae2e513d6e83@
qu.7.33.info=  Type=numeric;
  Difficulty=1;
  Course=230;
@

qu.7.34.question=<div title="University of Waterloo Statistics Bank/Probability/Basics/Q$Q"><img hspace="4" align="$Align" title="Coin [IMG:Coin$Which.gif]" alt="Coin" src="__BASE_URI__Probability/Basics/Coin$Which.gif" />You flip a fair coin $n times. What is the probability that you will get at least one  head? (Please answer to 4 decimal place accuracy).</div>@
qu.7.34.answer.num=$Ans@
qu.7.34.answer.units=@
qu.7.34.showUnits=false@
qu.7.34.grading=toler_abs@
qu.7.34.err=.001@
qu.7.34.negStyle=minus@
qu.7.34.numStyle=thousands scientific dollars arithmetic@
qu.7.34.mode=Numeric@
qu.7.34.name=21. Coin Toss - n coins - P(at least one head)@
qu.7.34.comment=<p>Define the events:</p>
<div style="margin-left: 40px;">A = heads appears at least one time in ten flips  <br />
B =  heads appears zero times in ten flips.</div>
<p>Because events A and B account for all possible outcomes of $n flips of the coin,  <br />
<br />
P(A) = 1 - P(B) <br />
= 1 - P($n T's)                = <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><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>1</mn><mrow><mn>2</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$n</mi></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math></p>@
qu.7.34.editing=useHTML@
qu.7.34.solution=@
qu.7.34.algorithm=$Q=21;
$n=range(6,12);
$Ans = decimal(4,1-(0.5^$n));
$Which=rint(4);
$Align=switch(rint(2),"Left","Right");@
qu.7.34.uid=1ee7820b-a0aa-4e03-9014-9051109cf759@
qu.7.34.info=  Type=numeric;
  Course=230;
@

qu.7.35.mode=Multiple Choice@
qu.7.35.name=15. P(Card face is prime)@
qu.7.35.comment=<p>There are $NumPrimes primes ($PrimesAre), there are $Denom different faces so the probability of selecting one of these $NumPrimes is $AnsML.</p>@
qu.7.35.editing=useHTML@
qu.7.35.solution=@
qu.7.35.algorithm=$Q=15;
$Which=rint(5);
$Align=switch(rint(2),"Left","Right");
$Option=rint(3);
$Qualifier=switch($Option,"(take J = 11, Q = 12, K = 13 and A = 1) Note: 2 is a prime, 1 is not.","(Face cards (J,Q,K) and Aces are non-numeric and so cannot be prime, but are possible drawn cards.)","(Assume face cards (J,Q,K) and Aces are removed from the deck before you draw.)");
$AnsML=switch($Option,mathml("6/13"),mathml("4/13"),mathml("4/9"));
$NumPrimes=switch($Option,6,4,4);
$PrimesAre=switch($Option,"2,3,5,7,11=J,13=K","2,3,5,7","2,3,5,7");
$Denom=switch($Option,13,13,9);
$Alt1ML=switch($Option,mathml("4/13"),mathml("4/9"),mathml("6/13"));
$Alt2ML=switch($Option,mathml("4/9"),mathml("6/13"),mathml("4/13"));
$Alt3ML=switch(rint(3),mathml("17/52"),mathml("1/2"),mathml("7/13"));
$Alt4ML=switch(rint(3),mathml("17/36"),mathml("11/36"),mathml("7/36"));@
qu.7.35.uid=44242689-483d-48f1-9f5a-ddbe282ee8e5@
qu.7.35.info=  Diificulty=1;
  Keyword=cards;
  Course=230;
@
qu.7.35.question=<div title="UW Statistics Bank/Probability/Basics/Q$Q"><img width="72" hspace="4/" height="96" align="$Align" title="Card [IMG:Card$Which.gif]" alt="Card" src="__BASE_URI__Probability/Basics/Card$Which.gif" />A card is drawn from a standard deck of 52. What is the probability that it's face value is a prime number? $Qualifier</div>@
qu.7.35.answer=1@
qu.7.35.choice.1=$AnsML@
qu.7.35.choice.2=$Alt1ML@
qu.7.35.choice.3=$Alt2ML@
qu.7.35.choice.4=$Alt3ML@
qu.7.35.choice.5=$Alt4ML@
qu.7.35.fixed=4@

qu.7.36.question=<div title="UW Statistics Bank/Probability/Basics/Q$Q"><img hspace="4" align="$Align" src="__BASE_URI__Probability/Basics/Coin$Which.gif" alt="Coin" title="Coin [IMG:Coin$Which.gif]" />A fair coin is tossed three times. What is the probability that $Criteria times in a row?&nbsp; <br />
<br />
<strong>Give an exact answer </strong>(<a href="__BASE_URI__Tools/ExactAnswers.htm" onclick="window.open(this.href,'Exact','resizable=yes,location=no,menubar=no,scrollbars=no,status=no,toolbar=no,fullscreen=no,dependent=no,width=700,height=400,status'); return false"><font size="1">explained</font></a>)<strong>.</strong></div>@
qu.7.36.answer.num=$Ans@
qu.7.36.answer.units=@
qu.7.36.showUnits=false@
qu.7.36.grading=exact_value@
qu.7.36.negStyle=minus@
qu.7.36.numStyle=thousands scientific dollars arithmetic@
qu.7.36.mode=Numeric@
qu.7.36.name=24. 3 tosses, P(Criterion met)@
qu.7.36.comment=<p>You can write out all 8 possible outcomes for this experiment. Alternately you could also use a "tree" diagram to see the possible sequences. In the diagram below the arrows point to outcomes that satisfy the criterion "$Criteria times in a row".<br />
<img hspace=0 width="523" height="564" alt="Coin Toss decision tree" title="Coin Toss decision tree [IMG:3TossTree.gif]" src="__BASE_URI__Probability/Basics/3TossTree.gif" /><img alt="Outcomes that count" hspace=0 src="__BASE_URI__Probability/Basics/3Toss2$RightBar.gif" title="Outcomes that count [IMG:3Toss2$RightBar.gif]"/></p>@
qu.7.36.editing=useHTML@
qu.7.36.solution=@
qu.7.36.algorithm=$Q=24;
$Pick=rint(5);
$Criteria=switch($Pick,"the same face will appear exactly two -but not three -","the same face will appear two or three","heads will appear two or three","tails will appear two or three","the same face will never appear two");
$Ans=switch($Pick,1/2,3/4,3/8,3/8,1/4);
$RightBar=switch($Pick,"ExactEither","PlusEither","PlusHeads","PlusTails","Never2");
$Which=rint(4);
$Align=switch(rint(2),"Left","Right");@
qu.7.36.uid=e4e92316-bc56-4a14-8c32-fe139184f072@
qu.7.36.info=  Course=230;
  Type=numeric;
@

qu.7.37.mode=Non Permuting Multiple Choice@
qu.7.37.name=04. Most likely dice total.@
qu.7.37.comment=<p>If you consider all possible outcomes (4-sided,5-sided):<br />
<br />
(1,1),(1,2),(1,3),(1,4),(1,5),<br />
(2,1),(2,2),(2,3),(2,4),(2,5),<br />
(3,1),(3,2),(3,3),(3,4),(3,5),<br />
(4,1),(4,2),(4,3),(4,4),(4,5)<br />
<br />
and relist using totals:  	<br />
2,3,4,5,6,<br />
3,4,5,6,7,<br />
4,5,6,7,8,<br />
5,6,7,8,9<br />
<br />
You can see that 5 and 6 are most likely (both have Probability 4/20).</p>@
qu.7.37.editing=useHTML@
qu.7.37.solution=@
qu.7.37.algorithm=$Q=04;
$Which4=rint(5);
$Which5=rint(3);
$Align4=switch(rint(2),"Left","Right");
$Align5=switch(rint(2),"Left","Right");@
qu.7.37.uid=ca0d0671-2573-456a-9190-8d1b7f80d32a@
qu.7.37.info=  Course=230;
  Type=MC;
  Difficulty=1;
  Algorithmic=no;
@
qu.7.37.question=<div title="University of Waterloo Statistics Bank/Probability/Basics/Dice/Q$Q">
<img hspace="4" align="$Align4" alt="4 sided die" title="4 sided die [IMG:4sidedDie$Which4.gif]" src="__BASE_URI__Probability/Basics/Dice/4sidedDie$Which4.gif" /><img hspace="4" align="$Align5" alt="5 sided die" title="5 sided die [IMG:5sidedDie$Which5.gif]" src="__BASE_URI__Probability/Basics/Dice/5sidedDie$Which5.gif" />There are two unusual dice: one has 4 faces and the other has 5. One is labeled from 1 to 4 and the other is from 1 to 5. Assume faces are equally likely to occur for both dice. Consider the experiment when both dice are tossed once. What are the most likely total scores?
<p>&nbsp;</p>
</div>@
qu.7.37.answer=1@
qu.7.37.choice.1=5 and 6@
qu.7.37.choice.2=4@
qu.7.37.choice.3=20@
qu.7.37.choice.4=6 and 7@
qu.7.37.choice.5=7@
qu.7.37.fixed=@

qu.7.38.mode=Multiple Choice@
qu.7.38.name=28. P(Two dice the same)@
qu.7.38.comment=<p>There are 36 two-dice rolls in total (that is the sample space is 36 in size):<br />
<br />
<font color="#00ff00">(1,1)</font><br />
(1,2),(2,1)<br />
(1,3),<font color="#00ff00">(2,2)</font>,(3,1)<br />
(1,4),(2,3),(3,2),(4,1)<br />
(1,5),(2,4),<font color="#00ff00">(3,3)</font>,(4,2),(5,1)<br />
(1,6),(2,5),(3,4),(4,3),(5,2),(6,1)<br />
(2,6),(3,5),<font color="#00ff00">(4,4)</font>,(5,3),(6,2)<br />
(3,6),(4,5),(5,4),(6,3)<br />
(4,6),<font color="#00ff00">(5,5)</font>,(6,4)<br />
(5,6),(6,5)<br />
<font color="#00ff00">(6,6)</font><br />
<br />
6 rolls have the two dice being the same, so the probability 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>6</mn><mrow><mn>36</mn></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mn>1</mn><mrow><mn>6</mn></mrow></mfrac></mrow></mrow></mstyle></math></p>@
qu.7.38.editing=useHTML@
qu.7.38.solution=@
qu.7.38.algorithm=$Q="28";
$AnsML=mathml("1/6");
$Alt1Top=1+rint(4);
$Alt1ML=mathml("$Alt1Top/36");
$Alt2Top=7+rint(3);
$Alt2ML=mathml("$Alt2Top/36");
$Alt3Top=10+rint(6);
$Alt3ML=mathml("$Alt3Top/36");
$Alt4Top=16+rint(7);
$Alt4ML=mathml("$Alt4Top/36");
$Align=switch(rint(2),"Left","Right");
$Which=rint(4);@
qu.7.38.uid=35cb023f-3847-4cdd-9af8-c86c5b0dcbb0@
qu.7.38.info=  Course=230;
  Author=Sean Scott;
  Type=MC;
  Dificulty=2;
@
qu.7.38.question=<div title="UW Statistics Bank/Probability/Basics/Q$Q"><img hspace="4" align="$Align" src="__BASE_URI__Probability/Basics/2Dice$Which.gif" alt="Two Dice" title="Two dice [IMG:2Dice$Which.gif]" />
<p>&nbsp;</p>
<div title="STAT230/Chapter 2/Balls, Cards &amp; Dice/Q$Q">Two fair dice are thrown. What is the probability that they both show the same number?</div>
</div>@
qu.7.38.answer=1@
qu.7.38.choice.1=$AnsML@
qu.7.38.choice.2=$Alt1ML@
qu.7.38.choice.3=$Alt2ML@
qu.7.38.choice.4=$Alt3ML@
qu.7.38.choice.5=$Alt4ML@
qu.7.38.fixed=@

qu.7.39.question=<div title="University of Waterloo Statistics Bank/Probability/Basics/Q$Q"><img hspace="4" align="$Align" src="__BASE_URI__Probability/Basics/Coin$Which.gif" alt="Coin" title="Coin [IMG:Coin$Which.gif]" />Consider tossing a fair coin <em>n</em> times, where <em>n</em> is a positive integer (1,2,3,...). Suppose you are told the probability of getting at least one Head in your <em>n</em> tosses is $p . What is <em>n</em>?</div>@
qu.7.39.answer.num=$Ans@
qu.7.39.answer.units=@
qu.7.39.showUnits=false@
qu.7.39.grading=exact_value@
qu.7.39.negStyle=minus@
qu.7.39.numStyle=thousands scientific dollars arithmetic@
qu.7.39.mode=Numeric@
qu.7.39.name=09. Toss n times, P(n) => n is?@
qu.7.39.comment=<p>Correct Answer = $Ans</p>
<p>Define the events:</p>
<div style="margin-left: 40px;">A = heads appears at least one time in <em>n</em> flips <br />
B = heads appears zero times in <em>n</em> flips.</div>
<p>Because events A and B account for all possible outcomes of <em>n</em> flips of the coin,  <br />
<br />
P(A) = 1 - P(B)  = 1 - P(<em>n</em> T's) = 1 - (0.5)<sup><em>n</em></sup><br />
<br />
Since we are told this probability is $p:</p>
<p>1 - (0.5)<sup><em>n</em></sup> = $p<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><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>1</mn><mrow><mn>2</mn></mrow></mfrac></mrow></mfenced><mrow><mi>n</mi></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi mathvariant='normal'>$p</mi></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><msup><mn>2</mn><mrow><mi>n</mi></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Pow</mi></mrow></mstyle></math><br />
<br />
<font size="3" face="Times New Roman"><em>n</em> = $Ans</font></p>
<p>&nbsp;</p>@
qu.7.39.editing=useHTML@
qu.7.39.solution=@
qu.7.39.algorithm=$Q=9;
$Ans=range(2,9);
$p = decimal(6,1-1/(2^$Ans));
$Pow=2^$Ans;
$Which=rint(4);
$Align=switch(rint(2),"Left","Right");@
qu.7.39.uid=026bb9a4-e5bb-455e-82e2-ed93c1513007@
qu.7.39.info=  Type=numeric;
  Course=230;
@

qu.7.40.mode=Multiple Choice@
qu.7.40.name=32. Grades for large class - P(A)@
qu.7.40.comment=<p>P(A) = <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><mo lspace='0.0em' rspace='0.0em'>&num;</mo><mi> receiving A</mi></mrow><mrow><mi>total</mi></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><mfrac><mi>$Atotal</mi><mrow><mi>$TOTAL</mi></mrow></mfrac></mrow></mstyle></math> = $ANSWER</p>@
qu.7.40.editing=useHTML@
qu.7.40.solution=@
qu.7.40.algorithm=$Q=32;
$AM=range(5,30,1);
$BM=range(5,30,1);
$CM=range(5,30,1);
$DM=range(5,30,1);
$FM=range(5,30,1);
$AW=range(5,30,1);
$BW=range(5,30,1);
$CW=range(5,30,1);
$DW=range(5,30,1);
$FW=range(5,30,1);
$Mtotal=$AM+$BM+$CM+$DM+$FM;
$Wtotal=$AW+$BW+$CW+$DW+$FW;
$TOTAL=$Mtotal+$Wtotal;
$Atotal=$AM+$AW;
$Btotal=$BM+$BW;
$Ctotal=$CM+$CW;
$Dtotal=$DM+$DW;
$Ftotal=$FM+$FW;
$ANSWER=decimal(4,$Atotal/$TOTAL);
$wrong1=decimal(4,$AM/$TOTAL);
$wrong2=decimal(4,$AW/$TOTAL);
$wrong3=decimal(4,$AM/$Atotal);
$wrong4=decimal(4,$AW/$Atotal);@
qu.7.40.uid=fdcf51aa-407c-40b4-8add-16db54316d53@
qu.7.40.info=  Course=230;
@
qu.7.40.question=<div title="UW Statistics Bank/Probability/Pr/Q$Q">The following table shows the final marks, as letter grades, for a class of $TOTAL students:
<p>&nbsp;</p>
<p>
<table width="200" cellspacing="1" cellpadding="1" border="1" align="center">
    <tbody>
        <tr>
            <td>&nbsp;</td>
            <td><strong>M(en)</strong></td>
            <td><strong>W(omen)</strong></td>
            <td><strong>Total</strong></td>
        </tr>
        <tr>
            <td><strong>A</strong></td>
            <td align="right">$AM</td>
            <td align="right">$AW</td>
            <td align="right">$Atotal</td>
        </tr>
        <tr>
            <td><strong>B</strong></td>
            <td align="right">$BM</td>
            <td align="right">$BW</td>
            <td align="right">$Btotal</td>
        </tr>
        <tr>
            <td><strong>C</strong></td>
            <td align="right">$CM</td>
            <td align="right">$CW</td>
            <td align="right">$Ctotal</td>
        </tr>
        <tr>
            <td><strong>D</strong></td>
            <td align="right">$DM</td>
            <td align="right">$DW</td>
            <td align="right">$Dtotal</td>
        </tr>
        <tr>
            <td><strong>F</strong></td>
            <td align="right">$FM</td>
            <td align="right">$FW</td>
            <td align="right">$Ftotal</td>
        </tr>
        <tr>
            <td><strong>Total</strong></td>
            <td align="right">$Mtotal</td>
            <td align="right">$Wtotal</td>
            <td align="right">$TOTAL</td>
        </tr>
    </tbody>
</table>
</p>
<p>There are 7 variables here: one for each of the letter grades (A, B, C, D, F) and one for each gender (M, W). Find P(A).</p>
</div>@
qu.7.40.answer=5@
qu.7.40.choice.1=$wrong1@
qu.7.40.choice.2=$wrong2@
qu.7.40.choice.3=$wrong3@
qu.7.40.choice.4=$wrong4@
qu.7.40.choice.5=$ANSWER@
qu.7.40.fixed=@

qu.7.41.question=<div title="UW Statistics Bank/Probability/Basics/Q$Q"><img hspace="4" align="$Align" src="__BASE_URI__Probability/Basics/Card$Which.gif" alt="A card" title="A card [IMG:Card$Which.gif]" />A card is drawn from a standard deck of 52 cards. What is the probability that the card belongs to the set {$C1, $C1P1,..., $CEnd}? (4 decimal accuracy please.)</div>@
qu.7.41.answer.num=$Ans@
qu.7.41.answer.units=@
qu.7.41.showUnits=false@
qu.7.41.grading=toler_abs@
qu.7.41.err=.001@
qu.7.41.negStyle=minus@
qu.7.41.numStyle=thousands scientific dollars arithmetic@
qu.7.41.mode=Numeric@
qu.7.41.name=19. P(card in subset)@
qu.7.41.comment=<p><strong>The correct answer is $Ans or <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 mathvariant='normal'>$NumCards</mi><mrow><mn>13</mn></mrow></mfrac></mrow></mstyle></math>.</strong></p>
<p>It doesn't matter what set of $NumCards face values the set contains. There are 13 different face values in the deck, the probability of selecting one of the $NumCards values in the set is just <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 mathvariant='normal'>$NumCards</mi><mrow><mn>13</mn></mrow></mfrac></mrow></mstyle></math>.</p>@
qu.7.41.editing=useHTML@
qu.7.41.solution=@
qu.7.41.algorithm=$Q=19;
$Which=rint(5);
$Align=switch(rint(2),"Left","Right");
$C1=range(2,8,1);
$C1P1=$C1+1;
$CEnd=range(4,10,1);
condition:gt($CEnd,$C1P1);
$NumCards=1+$CEnd-$C1;
$Ans=decimal(4,$NumCards/13);@
qu.7.41.uid=e39c0e32-5c33-4465-a10f-3b9c50215547@
qu.7.41.info=  Difficulty=0;
  Course=230;
@

qu.7.42.question=<div title="UW Statistics Bank/Probability/Basics/Q$Q">The following table shows the final marks, as letter grades, for a class of $TOTAL students:
<p>
<table width="200" cellspacing="1" cellpadding="1" border="1" align="center">
    <tbody>
        <tr>
            <td>&nbsp;</td>
            <td><strong>M(en)</strong></td>
            <td><strong>W(omen)</strong></td>
            <td><strong>Total</strong></td>
        </tr>
        <tr>
            <td><strong>A</strong></td>
            <td align="right">$AM</td>
            <td align="right">$AW</td>
            <td align="right">$Atotal</td>
        </tr>
        <tr>
            <td><strong>B</strong></td>
            <td align="right">$BM</td>
            <td align="right">$BW</td>
            <td align="right">$Btotal</td>
        </tr>
        <tr>
            <td><strong>C</strong></td>
            <td align="right">$CM</td>
            <td align="right">$CW</td>
            <td align="right">$Ctotal</td>
        </tr>
        <tr>
            <td><strong>D</strong></td>
            <td align="right">$DM</td>
            <td align="right">$DW</td>
            <td align="right">$Dtotal</td>
        </tr>
        <tr>
            <td><strong>F</strong></td>
            <td align="right">$FM</td>
            <td align="right">$FW</td>
            <td align="right">$Ftotal</td>
        </tr>
        <tr>
            <td><strong>Total</strong></td>
            <td align="right">$Mtotal</td>
            <td align="right">$Wtotal</td>
            <td align="right">$TOTAL</td>
        </tr>
    </tbody>
</table>
</p>
<p>There are 7 variables here: one for each of the letter grades (A, B, C, D, F) and one for each gender (M, W). Find P($AnsGrade) (i.e. what is the probability that a randomly selected student gets a $AnsGrade grade?).</p>
<p>3 decimal accuracy please.</p>
</div>@
qu.7.42.answer.num=$Ans@
qu.7.42.answer.units=@
qu.7.42.showUnits=false@
qu.7.42.grading=toler_abs@
qu.7.42.err=.01@
qu.7.42.negStyle=minus@
qu.7.42.numStyle=thousands scientific dollars arithmetic@
qu.7.42.mode=Numeric@
qu.7.42.name=03a. P(Letter Grade)@
qu.7.42.comment=<p>P($AnsGrade) = <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><mo lspace='0.1111111em' rspace='0.1111111em'>&num;</mo><mi>receiving $AnsGrade</mi></mrow><mrow><mi>total</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mi mathvariant='normal'>$GradeTot</mi></mrow><mrow><mi mathvariant='normal'>$TOTAL</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math>.</p>@
qu.7.42.editing=useHTML@
qu.7.42.solution=@
qu.7.42.algorithm=$Q="03a";
$AM=range(5,30,1);
$BM=range(5,30,1);
$CM=range(5,30,1);
$DM=range(5,30,1);
$FM=range(5,30,1);
$AW=range(5,30,1);
$BW=range(5,30,1);
$CW=range(5,30,1);
$DW=range(5,30,1);
$FW=range(5,30,1);
$Mtotal=$AM+$BM+$CM+$DM+$FM;
$Wtotal=$AW+$BW+$CW+$DW+$FW;
$TOTAL=$Mtotal+$Wtotal;
$Atotal=$AM+$AW;
$Btotal=$BM+$BW;
$Ctotal=$CM+$CW;
$Dtotal=$DM+$DW;
$Ftotal=$FM+$FW;
$WhichGrade=rint(5);
$AnsGrade=switch($WhichGrade,"A","B","C","D","F");
$GradeTot=switch($WhichGrade,$Atotal,$Btotal,$Ctotal,$Dtotal,$Ftotal);
$Ans=decimal(4,$GradeTot/$TOTAL);@
qu.7.42.uid=f356d7eb-14ff-4f24-b303-7d65405f56d5@
qu.7.42.info=  Difficulty=2;
  Type=numeric;
  Author=Sean Scott;
  Course=230;
@

