qu.1.topic=Other Measures@

qu.1.1.mode=Inline@
qu.1.1.name=12+. Measures of a Subway Chain@
qu.1.1.comment=<p>a) The range is Maximum - Minimum = $Max - $Min = $Range<br />
<span>b) To find variance, first find the mean. Let the data points be <font size="3" face="Times New Roman"><em>x</em><sub>1</sub>, ...,<em>x</em><sub>9</sub></font> 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>&mu;</mi></mrow><mrow><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><munderover><mo lspace='0.0em' rspace='0.1666667em' stretchy='true' largeop='true' movablelimits='true'>&Sum;</mo><mrow><mi mathvariant='normal'>i</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn></mrow><mrow><mn>9</mn></mrow></munderover><msub><mi>x</mi><mrow><mi>i</mi></mrow></msub></mrow><mrow><mn>9</mn></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Mean</mi></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow></mstyle></math>.&nbsp; Then Variance 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><mi>&sigma;</mi><mrow><mn>2</mn></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><munderover><mo lspace='0.0em' rspace='0.1666667em' stretchy='true' largeop='true' movablelimits='true'>&Sum;</mo><mrow><mi>i</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn></mrow><mrow><mn>9</mn></mrow></munderover><msup><mfenced open='(' close=')' separators=','><mrow><msub><mi>x</mi><mrow><mi>i</mi></mrow></msub><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>&mu;</mi></mrow></mfenced><mrow><mn>2</mn></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Var</mi></mrow></mstyle></math></span></p>
<p>c)  The Standard Deviation is just the square root of variance,&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>s</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><msqrt><mrow><mi mathvariant='normal'>$Var</mi></mrow></msqrt><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$SD</mi></mrow></mstyle></math></p>
<p>d) Coefficient of Variation = <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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><mn>100</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mi>SD</mi><mrow><mi>Mean</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>100</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mi mathvariant='normal'>$SD</mi><mrow><mi mathvariant='normal'>$Mean</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$COV</mi></mrow></mstyle></math><span>&nbsp; </span></p>
<p><span><span>e) IQR = Quartile 3 - Quartile 1 = $Q3 - $Q1 = $IQR<br />
</span></span></p>@
qu.1.1.editing=useHTML@
qu.1.1.solution=@
qu.1.1.algorithm=$Q="12+";
$S=maple("randomize():
convert(LinearAlgebra[RandomVector](9,generator=5*rand(20..50)),list)");
$T=maple("sort($S)");
$T1=maple("$T[1]");
$T9=maple("$T[9]");
$PMean=maple("Statistics[Mean]($S)");
$Mean=decimal(1,$PMean);
$PreVar=maple("Statistics[Variance]($S)");
$Var=decimal(2,$PreVar);
$SD=decimal(2,sqrt($Var));
$COV=decimal(2,100*$SD/$Mean);
$Min=min($S);
$Max=max($S);
$Range=$Max-$Min;
$PQ1=maple("Statistics[Quartile]($S,1,method=5)");
$Q1=decimal(1,$PQ1);
$PQ3=maple("Statistics[Quartile]($S,3,method=5)");
$Q3=decimal(1,$PQ3);
$IQR=$Q3-$Q1;@
qu.1.1.uid=7e6f7733-257e-4259-bb78-e05a696037a7@
qu.1.1.info=  Difficulty=4;
  Course=202;
  Keyword=range;
  Keyword=standard deviation;
  Keyword=IQR;
  Keyword=coefficient of variation;
@
qu.1.1.weighting=1,1,1,1,1@
qu.1.1.numbering=alpha@
qu.1.1.part.1.name=sro_id_1@
qu.1.1.part.1.answer.units=@
qu.1.1.part.1.numStyle=thousands scientific  arithmetic@
qu.1.1.part.1.editing=useHTML@
qu.1.1.part.1.showUnits=false@
qu.1.1.part.1.question=(Unset)@
qu.1.1.part.1.mode=Numeric@
qu.1.1.part.1.grading=exact_value@
qu.1.1.part.1.negStyle=minus@
qu.1.1.part.1.answer.num=$Range@
qu.1.1.part.2.name=sro_id_2@
qu.1.1.part.2.answer.units=@
qu.1.1.part.2.numStyle=thousands scientific  arithmetic@
qu.1.1.part.2.editing=useHTML@
qu.1.1.part.2.showUnits=false@
qu.1.1.part.2.err=0.01@
qu.1.1.part.2.question=(Unset)@
qu.1.1.part.2.mode=Numeric@
qu.1.1.part.2.grading=toler_abs@
qu.1.1.part.2.negStyle=minus@
qu.1.1.part.2.answer.num=$Var@
qu.1.1.part.3.name=sro_id_3@
qu.1.1.part.3.answer.units=@
qu.1.1.part.3.numStyle=thousands scientific  arithmetic@
qu.1.1.part.3.editing=useHTML@
qu.1.1.part.3.showUnits=false@
qu.1.1.part.3.err=0.01@
qu.1.1.part.3.question=(Unset)@
qu.1.1.part.3.mode=Numeric@
qu.1.1.part.3.grading=toler_abs@
qu.1.1.part.3.negStyle=minus@
qu.1.1.part.3.answer.num=$SD@
qu.1.1.part.4.name=sro_id_4@
qu.1.1.part.4.answer.units=@
qu.1.1.part.4.numStyle=thousands scientific  arithmetic@
qu.1.1.part.4.editing=useHTML@
qu.1.1.part.4.showUnits=false@
qu.1.1.part.4.err=0.01@
qu.1.1.part.4.question=(Unset)@
qu.1.1.part.4.mode=Numeric@
qu.1.1.part.4.grading=toler_abs@
qu.1.1.part.4.negStyle=minus@
qu.1.1.part.4.answer.num=$COV@
qu.1.1.part.5.name=sro_id_5@
qu.1.1.part.5.answer.units=@
qu.1.1.part.5.numStyle=thousands scientific  arithmetic@
qu.1.1.part.5.editing=useHTML@
qu.1.1.part.5.showUnits=false@
qu.1.1.part.5.err=0.01@
qu.1.1.part.5.question=(Unset)@
qu.1.1.part.5.mode=Numeric@
qu.1.1.part.5.grading=toler_abs@
qu.1.1.part.5.negStyle=minus@
qu.1.1.part.5.answer.num=$IQR@
qu.1.1.question=<div title="UW Statistics Bank/Numerical Analysis/Measures of Spread/Sample Variance, SD and CV/Q$Q">There are nine branches of Subway<sup>&reg;</sup>&nbsp; in a local area. Each day the manager takes a &ldquo;mid-day read&rdquo; of store sales in the area. One day, the mid-day read for the nine stores is (in \\$) :<p>$S .</p><p>Find: <br />a) the range&nbsp; <span>&nbsp;</span><1><span>&nbsp;</span></p><p><span>b) the Variance (2 decimals) &nbsp; <2><span>&nbsp;</span></span></p><p>c)  the Standard Deviation (2 decimals) <span>&nbsp;</span><3><span>&nbsp;</span></p><p><span>d)  the Coefficient of Variation&nbsp; <span>&nbsp;</span><4><span>&nbsp;</span></span>%</p><p><span><span>e) the IQR: <span>&nbsp;</span><5><span>&nbsp;</span></span></span></p></div>@

qu.1.2.mode=Multiple Choice@
qu.1.2.name=01+. Graphical (x - μ)^2@
qu.1.2.comment=<p>You are looking for the data set that shows the least spread about its mean.</p>@
qu.1.2.editing=useHTML@
qu.1.2.solution=@
qu.1.2.algorithm=$Q="01+";
$Num=range(800,1200,50);
$Ans=3;
$Alt1=switch(rint(2),1,2);
$Alt2=switch(rint(2),4,5);
$Alt3=switch(rint(3),6,7);
$Alt4=switch(rint(4),3-$Alt1,9-$Alt2,13-$Alt3,0);@
qu.1.2.uid=119e4be9-5439-442d-a2a0-ebacd2250d99@
qu.1.2.info=  Difficulty=3;
  Course=202;
  Type=MC;
@
qu.1.2.question=<div title="UW Statistics Bank/Numerical Analysis/Measures of Spread/Other Measures/Q$Q">Which of the following data sets (each consists of $Num values grouped into a histogram) have the smallest value 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><munderover><mo lspace='0.0em' rspace='0.1666667em' stretchy='true' largeop='true' movablelimits='true'>&Sum;</mo><mrow><mi mathcolor='#800080'>i</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn></mrow><mi mathcolor='#800080'>n</mi></munderover><msup><mfenced open='(' close=')' separators=','><mrow><msub><mi>x</mi><mrow><mi>i</mi></mrow></msub><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mover><mrow><mi>x</mi></mrow><mrow><msub><mo mathvariant='italic' lspace='0.0em' rspace='0.0em'>&strns;</mo><mi></mi></msub></mrow></mover></mrow></mfenced><mrow><mn>2</mn></mrow></msup></mrow></mstyle></math> ?</div>@
qu.1.2.answer=2@
qu.1.2.choice.1=<img title="Histogram [IMG:HistogramSpread$Alt1.gif]" alt="Histogram" src="__BASE_URI__NA/MoS/OtherMeasures/HistogramSpread$Alt1.gif">@
qu.1.2.choice.2=<img title="Histogram [IMG:HistogramSpread3.gif]" alt="Histogram" src="__BASE_URI__NA/MoS/OtherMeasures/HistogramSpread3.gif">@
qu.1.2.choice.3=<img title="Histogram [IMG:HistogramSpread$Alt2.gif]" alt="Histogram" src="__BASE_URI__NA/MoS/OtherMeasures/HistogramSpread$Alt2.gif">@
qu.1.2.choice.4=<img title="Histogram [IMG:HistogramSpread$Alt3.gif]" alt="Histogram" src="__BASE_URI__NA/MoS/OtherMeasures/HistogramSpread$Alt3.gif">@
qu.1.2.choice.5=<img title="Histogram [IMG:HistogramSpread$Alt4.gif]" alt="Histogram" src="__BASE_URI__NA/MoS/OtherMeasures/HistogramSpread$Alt4.gif">@
qu.1.2.fixed=@

qu.1.3.mode=Inline@
qu.1.3.name=20. Range/mean/sd/CV@
qu.1.3.comment=@
qu.1.3.editing=useHTML@
qu.1.3.solution=@
qu.1.3.algorithm=$Q=20;
$x1 = 700 + rint(600);
$x2 = 700 + rint(600);
$x3 = 700 + rint(600);
$x4 = 700 + rint(600);
$max = max($x1, $x2, $x3, $x4);
$min = min($x1, $x2, $x3, $x4);
$range = $max - $min;
$mean = ($x1 + $x2 + $x3 + $x4)/4;
$variance = ($x1*$x1 + $x2*$x2 + $x3*$x3 + $x4*$x4)/3 - $mean*$mean*4/3;
$sd = sqrt($variance);
$cv = $sd / $mean * 100;@
qu.1.3.uid=4833e9e2-0052-489f-b8d3-968e3800e4df@
qu.1.3.info=  Level of Difficulty=3;
  Keyword=range;
  Keyword=mean;
  Keyword=standard deviation;
  Keyword=coefficient of variation;
@
qu.1.3.weighting=1,1,1,1@
qu.1.3.numbering=alpha@
qu.1.3.part.1.name=sro_id_1@
qu.1.3.part.1.answer.units=@
qu.1.3.part.1.numStyle=   @
qu.1.3.part.1.editing=useHTML@
qu.1.3.part.1.showUnits=false@
qu.1.3.part.1.question=(Unset)@
qu.1.3.part.1.mode=Numeric@
qu.1.3.part.1.grading=exact_value@
qu.1.3.part.1.negStyle=both@
qu.1.3.part.1.answer.num=$range@
qu.1.3.part.2.name=sro_id_2@
qu.1.3.part.2.answer.units=@
qu.1.3.part.2.numStyle=   @
qu.1.3.part.2.editing=useHTML@
qu.1.3.part.2.showUnits=false@
qu.1.3.part.2.err=0.01@
qu.1.3.part.2.question=(Unset)@
qu.1.3.part.2.mode=Numeric@
qu.1.3.part.2.grading=toler_abs@
qu.1.3.part.2.negStyle=both@
qu.1.3.part.2.answer.num=$mean@
qu.1.3.part.3.name=sro_id_3@
qu.1.3.part.3.answer.units=@
qu.1.3.part.3.numStyle=thousands scientific  arithmetic@
qu.1.3.part.3.editing=useHTML@
qu.1.3.part.3.showUnits=false@
qu.1.3.part.3.err=0.01@
qu.1.3.part.3.question=(Unset)@
qu.1.3.part.3.mode=Numeric@
qu.1.3.part.3.grading=toler_abs@
qu.1.3.part.3.negStyle=minus@
qu.1.3.part.3.answer.num=$sd@
qu.1.3.part.4.name=sro_id_4@
qu.1.3.part.4.answer.units=@
qu.1.3.part.4.numStyle=   @
qu.1.3.part.4.editing=useHTML@
qu.1.3.part.4.showUnits=false@
qu.1.3.part.4.err=0.01@
qu.1.3.part.4.question=(Unset)@
qu.1.3.part.4.mode=Numeric@
qu.1.3.part.4.grading=toler_abs@
qu.1.3.part.4.negStyle=both@
qu.1.3.part.4.answer.num=$cv@
qu.1.3.question=<div title="UW Statistics Bank/Numerical Analysis/Measures of Spread/Q$Q">There are nine branches of SUBWAY in a local area. Each day the manager takes a "mid-day read" of store sales in the area. One day, the "mid-day read" for four stores is: \\$$x1; \\$$x2; \\$$x3; \\$$x4. Find the range, the mean, the standard deviation and the coefficient of variation for the sample (<em>answer to 2 decimals of accuracy</em>).<p>&nbsp;</p><p>range:&nbsp;<span> </span><1><span>&nbsp;</span></p><p>mean:&nbsp;<span> </span><2><span>&nbsp;</span></p><p>standard deviation:&nbsp;<span> </span><3><span>&nbsp;</span></p><p>coefficient of variation: <span>&nbsp;</span><4><span> %</span></p><p>&nbsp;</p></div>@

qu.1.4.mode=Multiple Choice@
qu.1.4.name=02. Range@
qu.1.4.comment=<p>Just calculate Maximum - Minimum = $Max - $Min = $Ans&nbsp; .</p>@
qu.1.4.editing=useHTML@
qu.1.4.solution=@
qu.1.4.algorithm=$Q=2;
$Num=rint(5,11,1);
$S=maple("randomize();
convert(LinearAlgebra[RandomVector]($Num,generator	=rand(1..2*$Num)),list)");
$T=maple("sort($S)");
$Max=max($S);
$Min=min($S);
$Ans=$Max-$Min;
$Alt1=2*$Ans+rint(15);
$Alt2=max($Ans-5-rint(2),1+rint(2));
$Alt3=int(range(0.3,0.7,0.01)*($Ans+$Alt1));
$Alt4=$Max;@
qu.1.4.uid=f4d316e7-ffe4-41d8-aa46-d79c0ee3b842@
qu.1.4.info=  Difficulty=0;
  Keyword=range;
  Course=202;
  Course=230;
  Type=MC;
@
qu.1.4.question=<div title="UW Statistics Bank/Numerical Analysis/Measures of Spread/Other Measures/Q$Q">
The range of the dataset $S is</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.choice.5=$Alt4@
qu.1.4.fixed=4@

qu.1.5.mode=True False@
qu.1.5.name=03. Value of IQR@
qu.1.5.comment=<p>The IQR is actually Q3 - Q1 .</p>@
qu.1.5.editing=useHTML@
qu.1.5.solution=@
qu.1.5.algorithm=$Q=3;
$x = switch(rint(4),"the mean from the maximum value of a data set","the first quartile from the second quartile of a data set","the second quartile from the third quartile of a data set");@
qu.1.5.uid=4ee6ecc5-04c5-4253-8c23-1d80cc242b7d@
qu.1.5.info=  Difficulty=1;
  Keyword=quartile;
  Course=202;
  Type=TF;
@
qu.1.5.question=<div title="UW Statistics Bank/Numerical Analysis/Measures of Spread/Other Measures/Q$Q">
The interquartile range or IQR is found by subtracting $x.</div>@
qu.1.5.answer=2@
qu.1.5.choice.1=True@
qu.1.5.choice.2=False@
qu.1.5.fixed=@

qu.2.topic=Sample Variance, SD and CV@

qu.2.1.mode=True False@
qu.2.1.name=11. Interpreting coefficient of variation@
qu.2.1.comment=@
qu.2.1.editing=useHTML@
qu.2.1.solution=@
qu.2.1.algorithm=@
qu.2.1.uid=02d36417-80a6-4e47-89dc-79dd5e35162a@
qu.2.1.info=  Difficulty=1;
  Keyword=coefficient of variation;
  Course=202;
  Type=TF;
  Algorithmic=no;
@
qu.2.1.question=<div title="UW Statistics Bank/Numerical Analysis/Measures of Spread/Sample Variance, SD and CV/Q11">
Coefficient of variation measures the relative dispersion that actually exists among the groups.</div>@
qu.2.1.answer=1@
qu.2.1.choice.1=True@
qu.2.1.choice.2=False@
qu.2.1.fixed=@

qu.2.2.mode=True False@
qu.2.2.name=04. Variance definition@
qu.2.2.comment=<p>The variance is the sum of the square of the data points distances from the mean, <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><munderover><mo lspace='0.0em' rspace='0.1666667em' stretchy='true' largeop='true' movablelimits='true'>&Sum;</mo><mrow><mi></mi></mrow><mi></mi></munderover><msup><mfenced open='(' close=')' separators=','><mrow><mi>x</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><msub><mi>x</mi><mrow><mi>i</mi></mrow></msub></mrow></mfenced><mrow><mn>2</mn></mrow></msup></mrow></mstyle></math> , so the statement is false.</p>@
qu.2.2.editing=useHTML@
qu.2.2.solution=@
qu.2.2.algorithm=$Q = 4;
$X = switch(rint(3),"standard deviation of a set of data","mean of the data","standard deviation minus the mean of the data");@
qu.2.2.uid=bcb20b48-e26b-4eab-aca5-7a444a71e28e@
qu.2.2.info=  Difficulty=1;
  Keyword=variance;
  Course=202;
  Course=230;
  Type=TF;
@
qu.2.2.question=<div title="UW Statistics Bank/Numerical Analysis/Measures of Spread/Sample Variance, SD and CV/Q$Q">The variance is the square root of the $X.</div>@
qu.2.2.answer=2@
qu.2.2.choice.1=True@
qu.2.2.choice.2=False@
qu.2.2.fixed=@

qu.2.3.mode=True False@
qu.2.3.name=08. Can Var = 0?@
qu.2.3.comment=<p><span style="font-weight: bold;">TRUE</span>, although it's unlikely. Since Variance is a measure of spread about the mean, if ALL of our values are the same there is no spread and the variance will be 0!</p>@
qu.2.3.editing=useHTML@
qu.2.3.solution=@
qu.2.3.algorithm=@
qu.2.3.uid=9b8b0a42-590c-4c91-826e-7b9ec29dbc99@
qu.2.3.info=  Difficulty=1;
  Keyword=variance;
  Suggested Value=1;
  Course=202;
  Course=230;
  Type=TF;
  Algorithmic=no;
@
qu.2.3.question=<div title="UW Statistics Bank/Numerical Analysis/Measures of Spread/Sample Variance, SD and CV/Q$Q">It is possible for the Variance of a set of values to be 0?</div>@
qu.2.3.answer=1@
qu.2.3.choice.1=True@
qu.2.3.choice.2=False@
qu.2.3.fixed=@

qu.2.4.mode=Matching@
qu.2.4.name=09. Rank by Variance@
qu.2.4.comment=<p>As a general rule, variance increases as does the disparateness of your sample population. For example a large city usually has a highly disparate population, varying widely in age, size, etc. The variance of weights from that sample would be high compared to the variance of weights from 20 boys from the same grade. We would expect the boys in the same grade to be very similar in size.</p>@
qu.2.4.editing=useHTML@
qu.2.4.solution=@
qu.2.4.algorithm=$Q=9;
$Stub="<br>";
$C1="Weights of 20 randomly selected people from a large city.<br>";
$C2="Weights of 20 randomly selected children from one classroom (assume only one grade uses that classroom).<br>";
$C3="Weights of 20 randomly selected boys from the same grade.<br>";
$C4="Weights of 20 randomly selected children from a school with 9 grades and 600 students.";
$R1="largest variance";
$R2="second largest variance";
$R3="second smallest variance";
$R4="smallest variance";
$Ch1=switch(rint(4),1,2,3,4);@
qu.2.4.uid=c48a51cf-d010-40fd-aecb-295b61633409@
qu.2.4.info=  Keyword=variance;
  Course=202;
  Course=230;
  Difficulty=3;
  Type=Matching;
  Algorithmic=no;
@
qu.2.4.format.columns=1@
qu.2.4.question=<div title="UW Statistics Bank/Numerical Analysis/Measures of Spread/Sample Variance, SD and CV/Q$Q">Rank the following distributions from the one with the least Variance to the one with the greatest.</div>@
qu.2.4.term.1=$C1@
qu.2.4.term.1.def.1=$R1@
qu.2.4.term.2=$C4@
qu.2.4.term.2.def.1=$R2@
qu.2.4.term.3=$C2@
qu.2.4.term.3.def.1=$R3@
qu.2.4.term.4=$C3@
qu.2.4.term.4.def.1=$R4@

qu.2.5.mode=Multiple Choice@
qu.2.5.name=05b. SD & Mean to COV@
qu.2.5.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>COV</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mn>100</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mrow><mfrac><mi>SD</mi><mrow><mi>Mean</mi></mrow></mfrac></mrow></mrow><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>100</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mrow><mi mathvariant='normal'>$sd</mi></mrow><mrow><mi mathvariant='normal'>$mean</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math></p>@
qu.2.5.editing=useHTML@
qu.2.5.solution=@
qu.2.5.algorithm=$Q="05b";
$sd=range(2,9);
$mean=range(10,30);
$Ans=decimal(2,100*$sd/$mean);
$Alt1=decimal(2,100*range(0.6,0.9,0.05)*$sd/$mean);
$Alt2=decimal(2,100*$mean/$sd);
$Alt3=decimal(2,range(1.2,1.6,0.05)*$Ans);@
qu.2.5.uid=de0b9b3d-7332-424c-a77e-6dfe1bbde4f5@
qu.2.5.info=  Difficulty=3;
  Keyword=standard deviation;
  Keyword=coefficient of variation;
  Keyword=mean;
  Course=202;
  Type=MC;
@
qu.2.5.question=<div title="UW Statistics Bank/Numerical Analysis/Measures of Spread/Sample Variance, SD and CV/Q$Q">Given that the mean of a set of data is $mean and the standard deviation is $sd, what would be the coefficient of variation (expressed as a %)?</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.fixed=@

qu.2.6.question=<div title="UW Statistics Bank/Numerical Analysis/Measures of Spread/Sample Variance, SD and CV/Q$Q">Given that the mean of a set of data is $mean and the standard deviation is $sd, what would be the coefficient of variation (3 decimals, expressed as a %)?</div>@
qu.2.6.answer.num=$Ans@
qu.2.6.answer.units=@
qu.2.6.showUnits=false@
qu.2.6.grading=toler_abs@
qu.2.6.err=.01@
qu.2.6.negStyle=minus@
qu.2.6.numStyle=thousands scientific dollars arithmetic@
qu.2.6.mode=Numeric@
qu.2.6.name=05a. SD & Mean to COV@
qu.2.6.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>COV</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mn>100</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mrow><mfrac><mi>SD</mi><mrow><mi>Mean</mi></mrow></mfrac></mrow></mrow><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>100</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mrow><mi mathvariant='normal'>$sd</mi></mrow><mrow><mi mathvariant='normal'>$mean</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math></p>@
qu.2.6.editing=useHTML@
qu.2.6.solution=@
qu.2.6.algorithm=$Q="05a";
$sd=range(2,9);
$mean=range(10,30);
$Ans=decimal(2,100*$sd/$mean);@
qu.2.6.uid=1dc88597-ccee-4cee-9409-c1a8dde0a649@
qu.2.6.info=  Difficulty=3;
  Keyword=standard deviation;
  Keyword=coefficient of variation;
  Keyword=mean;
  Course=202;
  Type=numeric;
@

qu.2.7.mode=Multiple Choice@
qu.2.7.name=10. SD from 4 numbers@
qu.2.7.comment=<p>Notice that the choices: {4,5,6,7}, {1,2,3,4}, and {7,8,9,10} are all sets of 4 consecutive numbers, thus all of these have the same standard deviation (1.118) and it is the smallest possible SD for a subset of 4 distinct integers. For the other two choices you can actually calculate the SD. For {1,5,6,10} it is&nbsp; 3.201 and for {1,2,9,10} it is 4.031&nbsp; . You also could see this intuitively.</p>@
qu.2.7.editing=useHTML@
qu.2.7.solution=@
qu.2.7.algorithm=@
qu.2.7.uid=6bf4c13f-a0a8-458b-bf80-5f66bcbe6346@
qu.2.7.info=  Difficulty=2;
  Course=202;
  Course=230;
  Keyword=standard deviation;
  Type=MC;
  Algorithmic=no;
@
qu.2.7.question=<div title="UW Statistics Bank/Numerical Analysis/Measures of Spread/Sample Variance, SD and CV/Q10">Which of the following is <span style="font-weight: bold;">NOT</span> correct?
<p>Of the number sets shown in this question:</p>
</div>@
qu.2.7.answer=3@
qu.2.7.choice.1=The numbers 4, 5, 6, 7 have the smallest possible standard deviation.@
qu.2.7.choice.2=The numbers 1, 2, 3, 4 have the smallest possible standard deviation.@
qu.2.7.choice.3=The numbers 1, 5, 6, 10 have the largest possible standard deviation.@
qu.2.7.choice.4=The numbers 1, 2, 9, 10 have the largest possible standard deviation. @
qu.2.7.choice.5=The numbers 7, 8, 9, 10 have the smallest possible standard deviation. @
qu.2.7.fixed=@

qu.2.8.question=<div title="UW Statistics Bank/Numerical Analysis/Measures of Spread/Sample Variance, SD and CV/Q$Q">If a sample of data has mean $Mean and variance $Var, then its coefficient of variation is: <br />
<br />
<img width="45" height="92" align="right" title="This is admonishment, not nagging! [IMG:Admonish.gif]" alt="This is admonishment, not nagging!" src="__BASE_URI__Tools/Admonish.gif" />(<em>Give the percentage amount, but do NOT include the % symbol. e.g. enter 50 for 50%. A fraction, such as </em><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><mfrac><mrow><mn>372</mn></mrow><mrow><mn>12</mn></mrow></mfrac></mrow></mstyle></math>(for 31%) is an acceptable answer. <strong>DO NOT ANSWER WITH A VALUE IN [0,1], GIVE THE ACTUAL PERCENTAGE.</strong></em>)
<p>3 decimal accuracy please.</p>
</div>@
qu.2.8.answer.num=$Ans@
qu.2.8.answer.units=@
qu.2.8.showUnits=false@
qu.2.8.grading=toler_abs@
qu.2.8.err=.01@
qu.2.8.negStyle=minus@
qu.2.8.numStyle=thousands scientific dollars arithmetic@
qu.2.8.mode=Numeric@
qu.2.8.name=06. Mean & Variance to COV@
qu.2.8.comment=<p>First find the S.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><msqrt><mrow><mi mathvariant='normal'>$Var</mi></mrow></msqrt><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$SD</mi></mrow></mstyle></math>. The the COV = <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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>100</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mrow><mi>S</mi><mo lspace='0.0em' rspace='0.0em'>&period;</mo><mi mathvariant='normal'>D</mi><mo lspace='0.0em' rspace='0.0em'>&period;</mo></mrow><mrow><mi>Mean</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>100</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mi mathvariant='normal'>$SD</mi><mrow><mi mathvariant='normal'>$Mean</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math>(%)</p>@
qu.2.8.editing=useHTML@
qu.2.8.solution=@
qu.2.8.algorithm=$Q=6;
$Var=(1+rint(4))^2;
$Mean=range((2*$Var),(6*$Var),2);
$SD=sqrt($Var);
$Ans=decimal(2,100*sqrt($Var)/$Mean);@
qu.2.8.uid=31284d95-a87e-41b3-95f1-e2d36eeda698@
qu.2.8.info=  Difficulty=3;
  Keyword=coefficient of variation;
  Keyword=variance;
  Keyword=mean;
  Course=202;
  Type=numeric;
@

qu.2.9.question=<div title="UW Statistics Bank/Numerical Analysis/Measures of Spread/Sample Variance, SD and CV/Q$Q">If a set of data has $n points and variance $Var, then the standard deviation is (3 decimals):<br />
<p>&nbsp;</p>
</div>@
qu.2.9.answer.num=$Ans@
qu.2.9.answer.units=@
qu.2.9.showUnits=false@
qu.2.9.grading=toler_abs@
qu.2.9.err=.01@
qu.2.9.negStyle=minus@
qu.2.9.numStyle=thousands scientific dollars arithmetic@
qu.2.9.mode=Numeric@
qu.2.9.name=07. Variance to SD@
qu.2.9.comment=<img width="105" height="59" align="right" title="Red Herring [IMG:RedHerring.gif]" src="__BASE_URI__Tools/RedHerring.gif" alt="Red Herring" />Notice that the number of data points is irrelevant, S.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><msqrt><mrow><mi>Variance</mi></mrow></msqrt><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><msqrt><mrow><mi mathvariant='normal'>$Var</mi></mrow></msqrt><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math></p>
<p>&nbsp;</p>@
qu.2.9.editing=useHTML@
qu.2.9.solution=@
qu.2.9.algorithm=$Q = "7";
$Var=(1+rint(4))^2;
$n=range((2*$Var),(6*$Var),2);
$Ans=decimal(2,sqrt($Var));@
qu.2.9.uid=26cba947-2cf2-4028-9d9b-057516036a83@
qu.2.9.info=  Difficulty=0;
  Keyword=variance;
  Keyword=standard deviation;
  Course=202;
  Course=230;
  Type=numeric;
@

qu.2.10.mode=Multiple Choice@
qu.2.10.name=01. SD to Var@
qu.2.10.comment=<p>Variance = SD<sup>2</sup> = $SD<sup>2</sup> = $Ans</p>@
qu.2.10.editing=useHTML@
qu.2.10.solution=@
qu.2.10.algorithm=$Q=1;
$Number=6+rint(10);
$SD=3+rint(10);
$Ans=$SD^2;
$Alt1=$Ans-1-rint(5);
$Alt2=3*$Ans-2;
$Alt3=($Ans+$Alt2)/2;@
qu.2.10.uid=1a64b7b2-4ede-4c11-a5b9-ba72ae945933@
qu.2.10.info=  Difficulty=1;
  Keyword=standard deviation;
  Keyword=variance;
  Course=202;
  Course=230;
  Type=MC;
@
qu.2.10.question=<div title="UW Statistics Bank/Numerical Analysis/Measures of Spread/Sample Variance, SD and CV/Q$Q">
If a set of $Number numbers has standard deviation $SD, then its variance is</div>@
qu.2.10.answer=1@
qu.2.10.choice.1=$Ans@
qu.2.10.choice.2=$Alt1@
qu.2.10.choice.3=$Alt2@
qu.2.10.choice.4=$Alt3@
qu.2.10.fixed=@

qu.2.11.mode=Inline@
qu.2.11.name=12. Compare COV@
qu.2.11.comment=<p>Recall that the Coefficient of Variation is <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>COV</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mi>E</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi></mrow></mfenced></mrow><mrow><mi>SD</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi></mrow></mfenced></mrow></mfrac></mrow></mstyle></math>.</p>
<p>The COV for the fire fighters 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'>$FireSD</mi></mrow><mrow><mi mathvariant='normal'>$FireEX</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans1</mi></mrow></mstyle></math>.</p>
<p>The COV for the plumbers 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'>$PlumberSD</mi></mrow><mrow><mi mathvariant='normal'>$PlumberEX</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans2</mi></mrow></mstyle></math>.</p>
<p>Since, $Ans1 $Criteria $Ans2, the $AnsName income is more uniform.</p>@
qu.2.11.editing=useHTML@
qu.2.11.solution=@
qu.2.11.algorithm=$Q = 12;
$FireEX=range(25000,30000,1000);
$FireSD=range(400,1200,50);
$PlumberEX=range(54000,58000,1000);
$PlumberSD=range(500,1500,50);
$Ans1=$FireSD/$FireEX;
$Ans2=$PlumberSD/$PlumberEX;
condition:ne($Ans1,$Ans2);
$AnsName=if(gt($Ans1,$Ans2),"plumbers","firefighters");
$AltName=if(lt($Ans1,$Ans2),"plumbers","firefighters");
$Criteria=if(gt($Ans1,$Ans2),">","<");@
qu.2.11.uid=9064bd3f-dd12-4f88-b809-1f9d6c8bac78@
qu.2.11.info=  Keyword=coefficient of variation;
  Course=202;
  Difficulty=3;
  Type=MC;
@
qu.2.11.weighting=1@
qu.2.11.numbering=alpha@
qu.2.11.part.1.name=sro_id_1@
qu.2.11.part.1.editing=useHTML@
qu.2.11.part.1.fixed=@
qu.2.11.part.1.question=null@
qu.2.11.part.1.choice.2=The $AltName's earnings are more stable.@
qu.2.11.part.1.choice.1=The $AnsName's earnings are more stable.@
qu.2.11.part.1.mode=Non Permuting Multiple Choice@
qu.2.11.part.1.display=vertical@
qu.2.11.part.1.answer=1@
qu.2.11.question=<div title="University of Waterloo Statistics Bank/Numerical Analysis/Measures of Spread/Sample Variance, SD and CV/Q$Q">The mean annual earnings of a sample of firefighters is \\$$FireEX, and the data show a standard deviation of \\$$FireSD. The mean annual earnings of a sample of master plumbers is \\$$PlumberEX, and their standard deviation is \\$$PlumberSD. If we use the coefficient of variation to evaluate annual earnings, whose annual earnings are more stable (i.e., fluctuate less)?<p><span>&nbsp;</span><1><span>&nbsp;</span></p></div>@

qu.2.12.mode=Multiple Choice@
qu.2.12.name=03. Variance to SD@
qu.2.12.comment=<p>Standard deviation is just the square root of variance, 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>S</mi><mo lspace='0.0em' rspace='0.0em'>&period;</mo><mi mathvariant='normal'>D</mi><mo lspace='0.0em' rspace='0.0em'>&period;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><msqrt><mrow><mi>$var</mi></mrow></msqrt><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>$Ans</mi></mrow></mstyle></math></p>@
qu.2.12.editing=useHTML@
qu.2.12.solution=@
qu.2.12.algorithm=$Q=3;
$var=decimal(2,range(1.11,2.51,0.07));
$Ans=decimal(2,sqrt($var));
$Alt1=0.5*($Ans+$var);
$Alt2=1;
$Alt3=$Ans-0.5;@
qu.2.12.uid=5f18b04b-8984-4a48-a89b-38f3f0797a59@
qu.2.12.info=  Difficulty=1;
  Keyword=standard deviation;
  Keyword=variance;
  Course=202;
  Course=230;
  Type=MC;
@
qu.2.12.question=<div title="UW Statistics Bank/Numerical Analysis/Measures of Spread/Sample Variance, SD and CV/Q$Q">
Given that the variance for a data set is $var, what would be the standard deviation?</div>@
qu.2.12.answer=1@
qu.2.12.choice.1=$Ans@
qu.2.12.choice.2=$Alt1@
qu.2.12.choice.3=$Alt2@
qu.2.12.choice.4=$Alt3@
qu.2.12.fixed=@

qu.2.13.mode=True False@
qu.2.13.name=02. Coefficient of Variation@
qu.2.13.comment=<p>By definition the <em>coefficient of variation</em> 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><mrow><mi>standard</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>deviation</mi></mrow><mrow><mi>mean</mi></mrow></mfrac></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mn>100</mn><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><mrow><mfrac><mrow><mi>standard</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>deviation</mi></mrow><mrow><mi>mean</mi></mrow></mfrac></mrow></mrow></mstyle></math> (both definitions are used).</p>@
qu.2.13.editing=useHTML@
qu.2.13.solution=@
qu.2.13.algorithm=$Q=3;
$X=switch(rint(4),"mean divided by the standard deviation expressed as a percentage","mean divided by the variance","variance divided by the mean expressed as a percentage","beta value times the standard deviation");@
qu.2.13.uid=323d35ab-c575-4f30-96c5-a7da39d2dc47@
qu.2.13.info=  Difficulty=1;
  Keyword=coefficient of variation;
  Course=202;
  Type=TF;
@
qu.2.13.question=<div title="UW Statistics Bank/Numerical Analysis/Measures of Spread/Sample Variance, SD and CV/Q$Q">
The coefficient of variation is the $X.</div>@
qu.2.13.answer=2@
qu.2.13.choice.1=True@
qu.2.13.choice.2=False@
qu.2.13.fixed=@

qu.3.topic=Variance of Random Variables@

qu.3.1.question=<div title="UW Statistics Bank/Numerical Analysis/Measures of Spread/Variance of Random Variables/Q$Q"><img width="50" hspace="4" height="50" align="right" src="__BASE_URI__Tools/TestGuy.gif" title="This question drawn from a STAT230 Test or Exam [IMG:TestGuy.gif]" alt="This question drawn from a STAT230 Test or Exam" />A random variable X has probability function f(x) defined on the set {$x1,$x2,$x3} with f($x1) = $fx1 and f($x2)=$fx2.  Find the variance of X. (Please answer to 4 decimals of accuracy.)</div>@
qu.3.1.answer.num=$VarIs@
qu.3.1.answer.units=@
qu.3.1.showUnits=false@
qu.3.1.grading=toler_abs@
qu.3.1.err=.001@
qu.3.1.negStyle=minus@
qu.3.1.numStyle=thousands scientific dollars arithmetic@
qu.3.1.mode=Numeric@
qu.3.1.name=04. Simple pdf, find Var(X)@
qu.3.1.comment=<p>First, find the value of f($x3):<br />
<br />
f($x3) = 1 - f($x1) - f($x2) = 1 - $fx1 - $fx2 = $fx3.<br />
<br />
Now:<br />
<br />
E(X) = $x1*($fx1) + $x2*($fx2) +$x3*($fx3) = $Ex<br />
E(X<sup>2</sup>) = ($x1)<sup>2</sup>$fx1 + ($x2)<sup>2</sup>$fx2 + ($x3)<sup>2</sup>*fx3 = $Ex2<br />
<br />
Var(X) = E[(X - E(X))<sup>2</sup>] = E(X<sup>2</sup>) - [E(X)]<sup>2</sup> = $Ex2 - ($Ex)<sup>2</sup> = $VarIs</p>@
qu.3.1.editing=useHTML@
qu.3.1.solution=@
qu.3.1.algorithm=$Q=4;
$x1=rint(-2,4);
$x2=$x1+rint(1,3);
$x3=$x2+rint(1,4);
$fx1=decimal(2,range(.01,.75,.01));
$fx2=decimal(2,range(.01,0.99-$fx1,.01));
$fx3=1-$fx1-$fx2;
$Ex = $x1*$fx1 +$x2*$fx2+ $x3*$fx3;
$Ex2 = ($x1)^2*$fx1 + ($x2)^2*$fx2+ ($x3)^2*$fx3;
$VarIs = $Ex2 - ($Ex)^2;@
qu.3.1.uid=8100cf43-7009-425d-a480-d5b96187c43b@
qu.3.1.info=  Difficulty=2;
  Keyword=variance;
  Type=numeric;
  Course=230;
@

qu.3.2.mode=Multiple Choice@
qu.3.2.name=30. SD of Coin Toss@
qu.3.2.comment=<p>Let x be the number of $Side. Notice that this is a Binomila distribution with n = $NThen:</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><mover accent='true'><mi>x</mi><mrow><mi>_</mi></mrow></mover></mrow></mstyle></math>=P($Side)(# Tosses) = $Mean</p>
<p>&sigma;<sup>2</sup> = P($Side)P(not $Side)(#Tosses) = (0.5)(0.5)$N = $Var</p>
<p>S.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><msqrt><mrow><msup><mi>&sigma;</mi><mrow><mn>2</mn></mrow></msup></mrow></msqrt></mrow></mstyle></math>=$Ans</p>@
qu.3.2.editing=useHTML@
qu.3.2.solution=@
qu.3.2.algorithm=$Q=4;
$Side=switch(rint(2),"Heads","Tails");
$N = range(50,100);
$Mean=$N/2;
$Var=decimal(3,$N*0.25);
$Ans = decimal(3,$Var^0.5);
$Alt1 = decimal(3,range(0.4,0.85,0.05)*$Ans);
$Alt2 = decimal(3,range(1.2,1.8,0.05)*$Ans);
$Alt3 = decimal(3,0.5*($Ans+switch(rint(2),$Alt1,$Alt2)));
$Which=rint(4);
$Align=switch(rint(2),"Left","Right");@
qu.3.2.uid=8045aa2e-9e05-4517-a29a-6142452d2348@
qu.3.2.info=  Difficulty=2;
  Keyword=standard deviation;
  Course=202;
  Course=230;
  Type=MC;
@
qu.3.2.question=<div title="UW Statistics Bank/Numerical Analysis/Measures of Spread/Population Variance/Q$Q"><img hspace="4" align="$Align" title="Coin [IMG:Coin$Which.gif]" src="__BASE_URI__NA/MoS/PopulationVariance/Coin$Which.gif" alt="Coin" />A (fair) coin is tossed $N times. Find the standard deviation for the number of $Side that will be tossed.</div>@
qu.3.2.answer=3@
qu.3.2.choice.1=$Alt1@
qu.3.2.choice.2=$Alt2@
qu.3.2.choice.3=$Ans@
qu.3.2.choice.4=$Alt3@
qu.3.2.fixed=@

qu.3.3.question=<div title="University of Waterloo Statistics Bank/Numerical Analysis/Measures of Spread/Variance of Random Variables/Q$Q"><img width="50" hspace="4" height="50" align="right" alt="This question drawn from STAT 230 F03 Quiz 3 Q3a" title="This question drawn from STAT 230 F03 Quiz 3 Q3a [IMG:TestGuy.gif]" src="__BASE_URI__Tools/TestGuy.gif" />A random variable X has probability function f(x) defined on the set {$x1,$x2,$x3} with f($x1) = $fx1 and f($x2)=$fx2.  Find the variance of X. (Please answer to 4 decimals of accuracy.)</div>@
qu.3.3.answer.num=$VarIs@
qu.3.3.answer.units=@
qu.3.3.showUnits=false@
qu.3.3.grading=toler_abs@
qu.3.3.err=.001@
qu.3.3.negStyle=minus@
qu.3.3.numStyle=thousands scientific dollars arithmetic@
qu.3.3.mode=Numeric@
qu.3.3.name=07. Simple pdf, find Var(X)@
qu.3.3.comment=<p>First, find the value of f($x3):<br />
<br />
f($x3) = 1 - f($x1) - f($x2) = 1 - $fx1 - $fx2 = $fx3.<br />
<br />
Now:<br />
<br />
E(X) = $x1*($fx1) + $x2*($fx2) +$x3*($fx3) = $Ex<br />
E(X<sup>2</sup>) = ($x1)<sup>2</sup>$fx1 + ($x2)<sup>2</sup>$fx2 + ($x3)<sup>2</sup>*$fx3 = $Ex2<br />
<br />
Var(X) = E[(X - E(X))<sup>2</sup>] = E(X<sup>2</sup>) - [E(X)]<sup>2</sup> = $Ex2 - ($Ex)<sup>2</sup> = $VarIs</p>@
qu.3.3.editing=useHTML@
qu.3.3.solution=@
qu.3.3.algorithm=$Q=7;
$x1=3-rint(6);
$x2=$x1+1+rint(2);
$x3=$x2+1+rint(3);
$fx1=decimal(2,range(.01,.75,.01));
$fx2=decimal(2,range(.01,.75,.01));
condition:lt($fx1+$fx2,1);
$fx3=1-$fx1-$fx2;
$Ex = $x1*$fx1 +$x2*$fx2+ $x3*$fx3;
$Ex2 = ($x1)^2*$fx1 + ($x2)^2*$fx2+ ($x3)^2*$fx3;
$VarIs = $Ex2 - ($Ex)^2;@
qu.3.3.uid=8f59a0ea-4948-452a-a327-25558e2928b1@
qu.3.3.info=  Difficulty=2;
  Keyword=variance;
  Course=230;
  Origin=test;
  Type=numeric;
@

qu.3.4.mode=Multiple Choice@
qu.3.4.name=06. Variance from Table@
qu.3.4.comment=<p>First find E(X) = $X1*$P1+$X2*$P2+$X3*$P3+$X4*$P4+$X5*$P5+$X6*$P6 = $EX</p>
<p>You can now find Var(X) in either of two equivalents ways:</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>Var</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><munderover><mo lspace='0.0em' rspace='0.1666667em' stretchy='true' largeop='true' movablelimits='true'>&Sum;</mo><mrow><mi mathcolor='#800080'>i</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn></mrow><mrow><mn>6</mn></mrow></munderover><msup><mfenced open='(' close=')' separators=','><mrow><msub><mi>x</mi><mrow><mi>i</mi></mrow></msub><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>E</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi></mrow></mfenced></mrow></mfenced><mrow><mn>2</mn></mrow></msup><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><msub><mi>x</mi><mrow><mi>i</mi></mrow></msub></mrow></mfenced></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow></mstyle></math> = <font size="3" face="Times New Roman">($X1 - $EX)<sup>2</sup>($P1) + ($X2 -$EX)<sup>2</sup>($P2) + ($X3-$EX)<sup>2</sup>($P3) + ($X4-$EX)<sup>2</sup>($P4) + ($X5-$EX)<sup>2</sup>($P5) + ($X6-$EX)<sup>2</sup>($P6) = $VarX</font></p>
<p>Alternately first 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><mi>E</mi><mfenced open='(' close=')' separators=','><mrow><msup><mi>X</mi><mrow><mn>2</mn></mrow></msup></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><munderover><mo lspace='0.0em' rspace='0.1666667em' stretchy='true' largeop='true' movablelimits='true'>&Sum;</mo><mrow><mi mathcolor='#800080'>i</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn></mrow><mrow><mn>6</mn></mrow></munderover><msup><mfenced open='(' close=')' separators=','><mrow><msub><mi>x</mi><mrow><mi>i</mi></mrow></msub></mrow></mfenced><mrow><mn>2</mn></mrow></msup><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><msub><mi>x</mi><mrow><mi>i</mi></mrow></msub></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 mathvariant='normal'>$EX2</mi></mrow></mstyle></math></p>
<p>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>Var</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>E</mi><mfenced open='(' close=')' separators=','><mrow><msup><mi>X</mi><mrow><mn>2</mn></mrow></msup></mrow></mfenced><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><msup><mfenced open='[' close=']' separators=','><mrow><mi>E</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi></mrow></mfenced></mrow></mfenced><mrow><mn>2</mn></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$EX2</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><msup><mfenced open='(' close=')' separators=','><mrow><mi mathvariant='normal'>$EX</mi></mrow></mfenced><mrow><mn>2</mn></mrow></msup><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 mathvariant='normal'>$VarX</mi></mrow></mstyle></math></p>@
qu.3.4.editing=useHTML@
qu.3.4.solution=@
qu.3.4.algorithm=$Q="06";
$X1=0;
$X2=1;
$X3=2;
$X4=3;
$X5=4;
$X6=5;
$P1=range(0.05,0.15,0.01);
$P5=range(0.05,0.30-$P1,0.01);
$P3=0.33-$P5-$P1;
$P4=range(0.2,0.45,0.01);
$P2=range(0.05,0.60-$P4,0.01);
$P6=0.67-$P2-$P4;
$EX=$X1*$P1+$X2*$P2+$X3*$P3+$X4*$P4+$X5*$P5+$X6*$P6;
$VarX=($X1-$EX)^2*$P1+($X2-$EX)^2*$P2+($X3-$EX)^2*$P3+($X4-$EX)^2*$P4+($X5-$EX)^2*$P5+($X6-$EX)^2*$P6;
$EX2=$X1^2*$P1+$X2^2*$P2+$X3^2*$P3+$X4^2*$P4+$X5^2*$P5+$X6^2*$P6;
$VarAlt=$EX2-($EX)^2;
$Alt1=$EX2;
$Alt2=$VarX-range(0.1,0.7*$VarX,0.01);
$Alt3=decimal(2,0.5*($Alt1+$VarX));@
qu.3.4.uid=47bd4c94-cf88-4d11-aa45-c6d3229b330a@
qu.3.4.info=  Type=MC;
  Course=230;
@
qu.3.4.question=<div title="University of Waterloo Statistics Bank/Numerical Analysis/Measures of Spread/Variance of Random Variables/Q$Q">Consider the following probability distribution for a random variable X: <br />
&nbsp;<br />
<table cellspacing="3" cellpadding="2" border="1">
    <tbody>
        <tr>
            <td><strong>x</strong></td>
            <td style="text-align: center;">$X1</td>
            <td style="text-align: center;">$X2</td>
            <td style="text-align: center;">$X3</td>
            <td style="text-align: center;">$X4</td>
            <td style="text-align: center;">$X5</td>
            <td style="text-align: center;">$X6</td>
        </tr>
        <tr>
            <td><strong>P(X=x)</strong></td>
            <td align="right">$P1</td>
            <td align="right">$P2</td>
            <td align="right">$P3</td>
            <td align="right">$P4</td>
            <td align="right">$P5</td>
            <td align="right">$P6</td>
        </tr>
    </tbody>
</table>
<p><br />
Which of the following best estimates Var(X)?</p>
</div>@
qu.3.4.answer=1@
qu.3.4.choice.1=$VarX@
qu.3.4.choice.2=$Alt1@
qu.3.4.choice.3=$Alt2@
qu.3.4.choice.4=$Alt3@
qu.3.4.fixed=@

qu.3.5.mode=Multiple Choice@
qu.3.5.name=14. Variance@
qu.3.5.comment=<p>First find the mean: $Mean&nbsp; ;</p>
<p>then find the mean of the squares: $MeanOfXSq ;</p>
<p>finally just use Var = E(X<sup>2</sup>) - [E(X)]<sup>2</sup>&nbsp; = $MeanOfXSq - ($Mean)<sup>2</sup>&nbsp; = $Var</p>@
qu.3.5.editing=useHTML@
qu.3.5.solution=@
qu.3.5.algorithm=$Q=14;
$P0=sig(2,range(0.15,0.30,0.05));
$P1=sig(1,range(0.05,0.1,0.05));
$P2=sig(2,0.55-$P0-$P1);
$P3=sig(2,range(0.15,0.25));
$P4=sig(2,0.45-$P3);
$Mean=$P1+2*$P2+3*$P3+4*$P4;
$MeanOfXSq=$P1+4*$P2+9*$P3+16*$P4;
$Var=decimal(2,$MeanOfXSq-$Mean^2);
$Alt1=decimal(2,range(1.1,1.7,0.1)*$Var);
$Alt2=decimal(2,range(0.4,0.9,0.1)*$Var);
$Alt3=decimal(2,($Alt2+$Var)/2);@
qu.3.5.uid=157a39dc-d762-4694-834f-7da9b2818e82@
qu.3.5.info=  Use=Yes;
@
qu.3.5.question=<div title="STAT202/Test 3/Mean, Variance, &amp; SD/Q$Q  [37.]">Find the variance of the following distribution.<br />
<div align="center"><center>
<table width="20%" cellspacing="1" bordercolor="#111111" border="0" id="AutoNumber1" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td>
            <p align="center"><em>x</em></p>
            </td>
            <td>
            <p align="center"><em>P(x)</em></p>
            </td>
        </tr>
        <tr>
            <td align="center">0</td>
            <td align="center">$P0</td>
        </tr>
        <tr>
            <td align="center">1</td>
            <td align="center">$P1</td>
        </tr>
        <tr>
            <td align="center">2</td>
            <td align="center">$P2</td>
        </tr>
        <tr>
            <td align="center">3</td>
            <td align="center">$P3</td>
        </tr>
        <tr>
            <td align="center">4</td>
            <td align="center">$P4</td>
        </tr>
    </tbody>
</table>
</center></div>
</div>@
qu.3.5.answer=4@
qu.3.5.choice.1=$Alt1@
qu.3.5.choice.2=$Alt2@
qu.3.5.choice.3=$Alt3@
qu.3.5.choice.4=$Var@
qu.3.5.fixed=@

qu.3.6.mode=Multiple Choice@
qu.3.6.name=02. SD of # cartoons/video etc@
qu.3.6.comment=<p><br />
First find the Expected Value of X:</p>
<p>
<title></title>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0" />
<meta name="ProgId" content="FrontPage.Editor.Document" /></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>E</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo></mrow><mrow><munderover><mo lspace='0.0em' rspace='0.1666667em' stretchy='true' largeop='true' movablelimits='true'>&Sum;</mo><mrow><mi mathcolor='#800080'>i</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn></mrow><mrow><mn>6</mn></mrow></munderover><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><msub><mi>X</mi><mrow><mi>i</mi></mrow></msub></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msub><mi>X</mi><mrow><mi>i</mi></mrow></msub></mrow><mrow><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$X</mi></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow></mstyle></math></p>
<p>Then the mean of X<sup>2</sup>:</p>
<p>&nbsp;<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>E</mi><mfenced open='(' close=')' separators=','><mrow><msup><mi>X</mi><mrow><mn>2</mn></mrow></msup></mrow></mfenced></mrow><mrow><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><munderover><mo lspace='0.0em' rspace='0.1666667em' stretchy='true' largeop='true' movablelimits='true'>&Sum;</mo><mrow><mi mathcolor='#800080'>i</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn></mrow><mrow><mn>6</mn></mrow></munderover></mrow><mrow><msubsup><mi>X</mi><mrow><mi>i</mi></mrow><mrow><mn>2</mn></mrow></msubsup><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><msub><mi>X</mi><mrow><mi>i</mi></mrow></msub></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$X2</mi></mrow></mstyle></math></p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>SD</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><msqrt><mrow><mi mathvariant='normal'>$Var</mi></mrow></msqrt><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math></p>
<p>&nbsp;</p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>Var</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>E</mi><mfenced open='(' close=')' separators=','><mrow><msup><mi>X</mi><mrow><mn>2</mn></mrow></msup></mrow></mfenced><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo></mrow><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mi>E</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi></mrow></mfenced></mrow></mfenced><mrow><mn>2</mn></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$V</mi></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow></mstyle></math>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>SD</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><msqrt><mrow><mi mathvariant='normal'>$V</mi></mrow></msqrt><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math></p>@
qu.3.6.editing=useHTML@
qu.3.6.solution=@
qu.3.6.algorithm=$Q=2;
$Align=switch(rint(2),"Left","Right");
$Activity=switch(rint(3),"cartoons watched","video games played","videos watched");
$Grade=switch(rint(3),"first","second","third");
$Teacher=switch(rint(4),"Mrs. Kelly","Mr. Blossom","Ms. Camber","Ms. Tambo");
$P0 = range(0.1,0.15,0.001);
$P1 = range(0.1,0.15,0.001);
$P2 = range(0.05,0.15,0.001);
$P3 = range(0.1,0.15,0.001);
$P4 = range(0.05,0.15,0.001);
$P5 = 1-$P0-$P1-$P2-$P3-$P4;
$X = (0*$P0)+(1*$P1)+(2*$P2)+(3*$P3)+(4*$P4)+(5*$P5);
$X2 = 0*$P0+1*$P1+4*$P2+9*$P3+16*$P4+25*$P5;
$V = decimal(4,$X2 - $X^2);
$Ans = decimal(3,$V^0.5);
$ALT1 = decimal(3,$V);
$ALT2 = decimal(3,range(0.4,0.8,0.05)*$Ans);
$ALT3 = decimal(3,range(1.1,1.5,0.05)*$V);@
qu.3.6.uid=c2506093-8d14-49d7-8871-7ea6edf9fe77@
qu.3.6.info=  Difficulty=2;
  Keyword=standard deviation;
  Keyword=variance;
  Course=202;
  Course=230;
  Type=MC;
@
qu.3.6.question=<div title="UW Statistics Bank/Numerical Analysis/Measures of Spread/Variance of Random Variables/Q$Q">Let <em><font size="3" face="Times New Roman">X</font></em> be The number of $Activity by $Teacher's $Grade grade class on Saturday mornings.&nbsp; The probability distribution for <em><font size="3" face="Times New Roman">X</font></em> is shown below:
<p>&nbsp;</p>
<div align="center"><center>
<table cellspacing="4" cellpadding="2" bordercolor="#111111" border="1" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td>
            <p align="center"><em>x</em></p>
            </td>
            <td align="center">
            <p>0</p>
            </td>
            <td align="center">
            <p>1<em><br />
            </em></p>
            </td>
            <td align="center">
            <p>2</p>
            </td>
            <td align="center">3</td>
            <td align="center">4</td>
            <td align="center">5</td>
        </tr>
        <tr>
            <td align="center">P(X=x)</td>
            <td align="center">$P0</td>
            <td align="center">$P1</td>
            <td align="center">$P2</td>
            <td align="center">$P3</td>
            <td align="center">$P4</td>
            <td align="center">$P5</td>
        </tr>
    </tbody>
</table>
</center></div>
&nbsp; <br />
What is the standard deviation for the probability distribution above?</div>@
qu.3.6.answer=1@
qu.3.6.choice.1=$Ans@
qu.3.6.choice.2=$ALT1@
qu.3.6.choice.3=$ALT2@
qu.3.6.choice.4=$ALT3@
qu.3.6.fixed=@

qu.3.7.mode=Multiple Choice@
qu.3.7.name=4. SD of cartoons@
qu.3.7.comment=@
qu.3.7.editing=useHTML@
qu.3.7.solution=@
qu.3.7.algorithm=$Q=4;
$P0 = range(0.1,0.15,0.001);
$P1 = range(0.1,0.15,0.001);
$P2 = range(0.05,0.15,0.001);
$P3 = range(0.1,0.15,0.001);
$P4 = range(0.05,0.15,0.001);
$P5 = 1-$P0-$P1-$P2-$P3-$P4;
$X = (0*$P0)+(1*$P1)+(2*$P2)+(3*$P3)+(4*$P4)+(5*$P5);
$X2 = 0*$P0+1*$P1+4*$P2+9*$P3+16*$P4+25*$P5;
$V = $X2 - $X^2;
$ANS = $V^0.5;
$ALT1 = $V;
$ALT2 = $V^0.3;
$ALT3 = range(2,3,0.001);@
qu.3.7.uid=890bc667-e3b5-407c-ac46-6163bc2be790@
qu.3.7.info=  Use=Yes;
@
qu.3.7.question=<div title="STAT202/Test 3/Mean, Variance, &amp; SD/Q$Q  [36.]">The number of cartoons watched by Mrs. Kelly's first grade class on Saturday morning is shown below.<br />
<div align="center"><center>
<table cellspacing="1" bordercolor="#111111" border="0" width="20%" id="AutoNumber1" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td>
            <p align="center"><em>x</em></p>
            </td>
            <td>
            <p align="center"><em>P(x)</em></p>
            </td>
        </tr>
        <tr>
            <td align="center">0</td>
            <td align="center">$P0</td>
        </tr>
        <tr>
            <td align="center">1</td>
            <td align="center">$P1</td>
        </tr>
        <tr>
            <td align="center">2</td>
            <td align="center">$P2</td>
        </tr>
        <tr>
            <td align="center">3</td>
            <td align="center">$P3</td>
        </tr>
        <tr>
            <td align="center">4</td>
            <td align="center">$P4</td>
        </tr>
        <tr>
            <td align="center">5</td>
            <td align="center">$P5</td>
        </tr>
    </tbody>
</table>
</center></div>
What is the standard deviation for the probability distribution above?</div>@
qu.3.7.answer=1@
qu.3.7.choice.1=$ANS@
qu.3.7.choice.2=$ALT1@
qu.3.7.choice.3=$ALT2@
qu.3.7.choice.4=$ALT3@
qu.3.7.fixed=@

qu.3.8.question=<div title="UW Statistics Bank/Discrete Probability Models/Binomial Distributions/Q$Q">Let X have a Binomial distribution with n = $n and p = $p. Then what is  var($LinCombDisp)? Answer to 2 decimal accuracy please.</div>@
qu.3.8.answer.num=$Ans@
qu.3.8.answer.units=@
qu.3.8.showUnits=false@
qu.3.8.grading=toler_abs@
qu.3.8.err=.1@
qu.3.8.negStyle=minus@
qu.3.8.numStyle=thousands scientific dollars arithmetic@
qu.3.8.mode=Numeric@
qu.3.8.name=31+. Var(aX+b) for Bin@
qu.3.8.comment=<p><font size="3" face="Times New Roman"><em>var</em>($LinCombDisp)</font> <br />
<font size="3" face="Times New Roman">= <em>var</em>($A\\X)</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font size="3" face="Times New Roman"><em>since Var(X + k) = Var(X)<br />
</em>= ($A)<sup>2</sup> <em>var</em>(<em>X</em>)<em>&nbsp;&nbsp;&nbsp; since Var(aX) = a<sup>2</sup>Var(X)</em><br />
= ($A)<sup>2</sup>$n*$p*(1 - $p)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <em>since Variance of Bi(n,p) = np(1 - p)</em><br />
= $Ans</font></p>@
qu.3.8.editing=useHTML@
qu.3.8.solution=@
qu.3.8.algorithm=$Q="31+";
$A=range(1,5)*-1^rint(2);
$AS=if(lt($A,0),"-","+");
$AD=if(eq(abs($A),1),"",abs($A));
$B=range(1,10)*-1^rint(2);
$LinCombDisp=mathml("$B $AS $AD*X");
$n=range(10,50,2);
$p=decimal(2,range(.02,.75,.01));
$VarIs = $n*$p*(1-$p);
$Ans=decimal(2,$A^2*$VarIs);@
qu.3.8.uid=0064070d-c245-4a63-9346-61067075eac9@
qu.3.8.info=  Difficulty=1;
  Type=numeric;
@

qu.3.9.mode=Multiple Choice@
qu.3.9.name=03. Variance@
qu.3.9.comment=<p>First find the mean: $Mean&nbsp; ;</p>
<p>then find the mean of the squares: $MeanOfXSq ;</p>
<p>finally just use Var = E(X<sup>2</sup>) - [E(X)]<sup>2</sup>&nbsp; = $MeanOfXSq - ($Mean)<sup>2</sup>&nbsp; = $Var</p>
<p><strong>Alternately</strong>, you may prefer to use the summation form:</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>Var</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><munderover><mo lspace='0.0em' rspace='0.1666667em' stretchy='true' largeop='true' movablelimits='true'>&Sum;</mo><mrow><mi>All</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>x</mi></mrow><mi></mi></munderover><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>x</mi></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mi>x</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mover><mrow><mi>x</mi></mrow><mi>&minus;</mi></mover></mrow></mfenced><mrow><mn>2</mn></mrow></msup></mrow></mstyle></math>=$P0*(0 - $Mean)<sup>2</sup> + $P1*(1 - $Mean)<sup>2</sup> + $P2*(2 - $Mean)<sup>2</sup> + $P3*(3 - $Mean)<sup>2</sup> + $P4*(4 - $Mean)<sup>2</sup> = $Var</p>@
qu.3.9.editing=useHTML@
qu.3.9.solution=@
qu.3.9.algorithm=$Q=3;
$P0=sig(2,range(0.15,0.30,0.05));
$P1=sig(1,range(0.05,0.1,0.05));
$P2=sig(2,0.55-$P0-$P1);
$P3=sig(2,range(0.15,0.25,0.05));
$P4=sig(2,0.45-$P3);
$Mean=$P1+2*$P2+3*$P3+4*$P4;
$MeanOfXSq=$P1+4*$P2+9*$P3+16*$P4;
$Var=decimal(2,$MeanOfXSq-$Mean^2);
$Alt1=decimal(2,range(1.1,1.7,0.1)*$Var);
$Alt2=decimal(2,range(0.4,0.9,0.1)*$Var);
$Alt3=decimal(2,($Alt2+$Var)/2);@
qu.3.9.uid=1efbcc8d-8c0b-4991-bbcf-5be80cda22b6@
qu.3.9.info=  Difficulty=2;
  Keyword=variance;
  Course=202;
  Course=230;
  Type=MC;
@
qu.3.9.question=<div title="UW Statistics Bank/Numerical Analysis/Measures of Spread/Variance of Random Variables/Q$Q">
Find the variance of the following distribution.<br />
&nbsp;<br />
<div align="center"><center>
<table width="20%" cellspacing="1" bordercolor="#111111" border="0" style="border-collapse: collapse;" id="AutoNumber1">
    <tbody>
        <tr>
            <td>
            <p align="center"><em>x</em></p>
            </td>
            <td>
            <p align="center"><em>P(x)</em></p>
            </td>
        </tr>
        <tr>
            <td align="center">0</td>
            <td align="center">$P0</td>
        </tr>
        <tr>
            <td align="center">1</td>
            <td align="center">$P1</td>
        </tr>
        <tr>
            <td align="center">2</td>
            <td align="center">$P2</td>
        </tr>
        <tr>
            <td align="center">3</td>
            <td align="center">$P3</td>
        </tr>
        <tr>
            <td align="center">4</td>
            <td align="center">$P4</td>
        </tr>
    </tbody>
</table>
</center></div>
</div>@
qu.3.9.answer=4@
qu.3.9.choice.1=$Alt1@
qu.3.9.choice.2=$Alt2@
qu.3.9.choice.3=$Alt3@
qu.3.9.choice.4=$Var@
qu.3.9.fixed=@

qu.3.10.mode=Multiple Choice@
qu.3.10.name=1A. Var of 1 on dice@
qu.3.10.comment=<p>Here you have n = $n and p = 1/6 . Use the approximation:</p>
<p>Var = np(1-p)</p>@
qu.3.10.editing=useHTML@
qu.3.10.solution=@
qu.3.10.algorithm=$Q="1A";
$n=range(25,50,5);
$p=1/6;
$Ans=decimal(3,$p*(1-$p)*$n);
$Alt1=decimal(3,$p*$n);
$Alt2=decimal(3,$n*$p*(1+$p));
$Alt3=range(1.5,$Ans-0.5,0.001);@
qu.3.10.uid=7199c623-0119-4c33-8a34-76eebfa09352@
qu.3.10.question=<div title="STAT202/Test 4/Probability Functions/Q$Q  [23.]"><img hspace="4" height="54" width="51" align="right" alt="A Die" src="__BASE_URI__Test4/PF/legit50.gif" />A die is rolled $n times. Find the variance of the number of "1"s that are obtained.</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="STAT230/Chapter 7/Variance and Standard Deviation/Q1 C7C101">X is a discrete random variable that only takes on the values {-1,0,1}. X has a probability function f(x) with f(-1) = $fx1 and f(0) = $fx2. Find the variance of X. (Please answer to 4 decimals of accuracy.)</div>@
qu.3.11.answer.num=$VarIs@
qu.3.11.answer.units=@
qu.3.11.showUnits=false@
qu.3.11.grading=toler_abs@
qu.3.11.err=.0001@
qu.3.11.negStyle=minus@
qu.3.11.numStyle=thousands scientific dollars arithmetic@
qu.3.11.mode=Numeric@
qu.3.11.name=1A. Simple pdf, find Var(X)@
qu.3.11.comment=First, find the value of f(1):<br><br>f(1) = 1 - f(-1) - f(0) = 1 - $fx1 - $fx2 = $fx3.<br><br>Now:<br><br>E(X) = -1($fx1) + 0($fx2) +1($fx3) = $Ex<br>E(X<sup>2</sup>) = (-1)<sup>2</sup>$fx1 + 0 + (1)<sup>2</sup>4fx3 = $Ex2<br><br>Var(X) = E[(X - E(X))<sup>2</sup>] = E(X<sup>2</sup>) - [E(X)]<sup>2</sup> = $Ex2 - ($Ex)<sup>2</sup> = $VarIs<br><br>@
qu.3.11.editing=useHTML@
qu.3.11.solution=@
qu.3.11.algorithm=$Q="1A";
$fx1=decimal(2,range(.01,.75,.01));
$fx2=decimal(2,range(.01,.75,.01));
condition:lt($fx1+$fx2,1);
$fx3=1-$fx1-$fx2;
$Ex = -$fx1 + $fx3;
$Ex2 = $fx1 + $fx3;
$VarIs = $Ex2 - ($Ex)^2;@
qu.3.11.uid=80999114-b6d8-4b60-8f00-60668c0701bb@

qu.3.12.mode=Multiple Choice@
qu.3.12.name=10. Mean & Var Students@
qu.3.12.comment=<p>First, find the probability that a student is male using the entire population:</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>M</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mo lspace='0.0em' rspace='0.0em'>&num;</mo><mi> males</mi></mrow><mrow><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lpar;</mo><mo lspace='0.0em' rspace='0.0em'>&num;</mo><mi>males)+(# females)</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mi>$M</mi><mrow><mi>$M</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>$F</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>$PM</mi></mrow></mstyle></math></p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>Mean</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>Male</mi></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfenced open='(' close=')' separators=','><mrow><mi>Sample</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>Size</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>$PM</mi><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi>$SS</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>$Mean</mi></mrow></mstyle></math></p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>Variance</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>Male</mi></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><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>Male</mi></mrow></mfenced></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfenced open='(' close=')' separators=','><mrow><mi>Sample</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>Size</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>$PM</mi><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><mi>$PM</mi></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi>SS</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>$Var</mi></mrow></mstyle></math></p>@
qu.3.12.editing=useHTML@
qu.3.12.solution=@
qu.3.12.algorithm=$Q=10;
$Align=switch(rint(2),"Left","Right");
$Which=1+rint(4);
$M=range(2500,5500,100);
$F = range(2500,5500,100);
$T = $M + $F;
$PM=decimal(2,$M/$T);
$SS=range(25,45,5);
$Mean=decimal(2,$PM*$SS);
$Var = decimal(3,$PM*(1-$PM)*$SS);
$AltMean1 = range(0.3,0.7,0.05)*$Mean;
$AltMean2=range(1.2,1.6,0.05)*$Mean;
$AltVar1 = decimal(3,range(0.4,0.8,0.05)*$Var);
$AltVar2 = decimal(3,range(1.2,1.6,0.05)*$Var);@
qu.3.12.uid=2104cfd9-fa41-4886-8bbe-c71786e156a6@
qu.3.12.info=  Difficulty=2;
  Keyword=variance;
  Keyword=mean;
  Course=202;
  Course=230;
@
qu.3.12.question=<p><img hspace="4" align="$Align" src="__BASE_URI__NA/MoS/Students$Which.gif" alt="Students" title="Students [IMG:Students$Which.gif]" /></p>
<div title="UW Statistics Bank/Numerical Analysis/Measures of Spread/Q$Q">A university has $T students of which $M are male and $F are female. If a class of $SS students is chosen at random from the university population, find the mean and variance of the number of male students.</div>@
qu.3.12.answer=1@
qu.3.12.choice.1=Mean = $Mean, Variance = $Var@
qu.3.12.choice.2=Mean = $AltMean1, Variance =$Var@
qu.3.12.choice.3=Mean = $AltMean2, Variance = $AltVar1@
qu.3.12.choice.4=Mean = $Mean, Variance = $AltVar1@
qu.3.12.choice.5=Mean=$AltMean1, Variance=$AltVar2@
qu.3.12.fixed=@

qu.3.13.mode=Multiple Choice@
qu.3.13.name=05. Var of given face on die roll@
qu.3.13.comment=<p>Here you have n = $n and 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><mfrac><mn>1</mn><mrow><mn>6</mn></mrow></mfrac></mrow></mstyle></math> . Use the (binomial) approximation:</p>
<p><font size="3" face="Times New Roman"><em>Var</em> = <em>np</em>(1 - <em>p</em>) = </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><mi mathvariant='normal'>$n</mi><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>1</mn><mrow><mn>6</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo></mrow><mrow><mfrac><mn>5</mn><mrow><mn>6</mn></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math></p>@
qu.3.13.editing=useHTML@
qu.3.13.solution=@
qu.3.13.algorithm=$Q=05;
$Face=rint(1,7);
$n=range(25,50,5);
$p=1/6;
$Ans=decimal(3,$p*(1-$p)*$n);
$Alt1=decimal(3,range(1.1,1.9,0.01)*$Ans);
$Alt2=decimal(3,range(0.5,0.9,0.01)*$Ans);
$Alt3=decimal(3,0.5*($Ans+switch(rint(2),$Alt1,$Alt2)));
$Which=rint(5);
$Align=switch(rint(2),"Left","Right");@
qu.3.13.uid=2b9a580b-bc39-4589-8c59-57ab1819b6eb@
qu.3.13.info=  Keyword=variance;
  Type=MC;
@
qu.3.13.question=<div title="UW Statistics Bank/Numerical Analysis/Measures of Spread/Variance of Random Variables/Q$Q"><img hspace="4" align="$Align" title="A die [IMG:Die$Which.gif]" alt="A Die" src="__BASE_URI__NA/MoS/VarianceOfRandomVariables/Die$Which.gif" />A die is rolled $n times. Find the variance of the number of $Face's</div>@
qu.3.13.answer=1@
qu.3.13.choice.1=$Ans@
qu.3.13.choice.2=$Alt1@
qu.3.13.choice.3=$Alt2@
qu.3.13.choice.4=$Alt3@
qu.3.13.fixed=@

qu.3.14.mode=Multiple Choice@
qu.3.14.name=7. SD of Coin Toss@
qu.3.14.comment=@
qu.3.14.editing=useHTML@
qu.3.14.solution=@
qu.3.14.algorithm=$Q=7;
$N = range(50,100,1);
$ANS = ($N*0.5*0.5)^0.5;
$ALT1 = $N*0.5*0.5;
$ALT2 = ($N*0.5*0.5*0.5)^0.5;
$ALT3 = $N*0.5*0.4;@
qu.3.14.uid=12026526-d256-4b99-a689-cadde9567b08@
qu.3.14.info=  Use=Yes;
@
qu.3.14.question=<div title="STAT202/Test 3/Mean, Variance, &amp; SD/Q$Q  [39.]">A coin is tossed $N times. Find the standard deviation for the number of heads that will be tossed.</div>@
qu.3.14.answer=3@
qu.3.14.choice.1=$ALT1@
qu.3.14.choice.2=$ALT2@
qu.3.14.choice.3=$ANS@
qu.3.14.choice.4=$ALT3@
qu.3.14.fixed=@

qu.3.15.question=<div title="UW Statistics Bank/Numerical Analysis/Measures of Spread/Variance of Random Variables/Q$Q">
Four buses travel to a protest march carrying a total of $B1, $B2, $B3, and $B4 students respectively. A student (call him or her Pat) is chosen at random and X=number of other people on Pat&rsquo;s bus. Find (2 decimals) var(X).</div>@
qu.3.15.answer.num=$VarX@
qu.3.15.answer.units=@
qu.3.15.showUnits=false@
qu.3.15.grading=toler_abs@
qu.3.15.err=0.05@
qu.3.15.negStyle=minus@
qu.3.15.numStyle=thousands scientific dollars arithmetic@
qu.3.15.mode=Numeric@
qu.3.15.name=01. Var(people on bus)@
qu.3.15.comment=<p>The distribution of X is as follows:</p>
<div align="center"><center>
<table cellspacing="0" cellpadding="3" bordercolor="#111111" border="1" id="AutoNumber1" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td width="20%"><em><font size="3" face="Times New Roman">x<sub>i</sub></font></em></td>
            <td width="20%" align="center"><font size="3" face="Times New Roman">$X1&nbsp;</font></td>
            <td width="20%" align="center"><font size="3" face="Times New Roman">$X2</font></td>
            <td width="20%" align="center"><font size="3" face="Times New Roman">$X3</font></td>
            <td width="20%" align="center"><font size="3" face="Times New Roman">$X4</font></td>
        </tr>
        <tr>
            <td width="20%"><font size="3" face="Times New Roman"><em>f</em>(<em>x<sub>i</sub></em>)</font></td>
            <td width="20%" align="center"><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mi mathvariant='normal'>$B1</mi><mrow><mi mathvariant='normal'>$Total</mi></mrow></mfrac></mrow></mstyle></math></td>
            <td width="20%" align="center"><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mi mathvariant='normal'>$B2</mi><mrow><mi mathvariant='normal'>$Total</mi></mrow></mfrac></mrow></mstyle></math>&nbsp;</td>
            <td width="20%" align="center"><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mi mathvariant='normal'>$B3</mi><mrow><mi mathvariant='normal'>$Total</mi></mrow></mfrac></mrow></mstyle></math></td>
            <td width="20%" align="center"><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mi mathvariant='normal'>$B4</mi><mrow><mi mathvariant='normal'>$Total</mi></mrow></mfrac></mrow></mstyle></math></td>
        </tr>
    </tbody>
</table>
</center></div>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>E</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><munderover><mo lspace='0.0em' rspace='0.1666667em' stretchy='true' largeop='true' movablelimits='true'>&Sum;</mo><mrow><mi>i</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn></mrow><mrow><mn>4</mn></mrow></munderover><msub><mi>x</mi><mrow><mi>i</mi></mrow></msub><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi>f</mi><mfenced open='(' close=')' separators=','><mrow><msub><mi>x</mi><mrow><mi>i</mi></mrow></msub></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$EX</mi></mrow></mstyle></math> <br />
<font size="3" face="Times New Roman"><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>E</mi><mfenced open='(' close=')' separators=','><mrow><msup><mi>X</mi><mrow><mn>2</mn></mrow></msup></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><munderover><mo lspace='0.0em' rspace='0.1666667em' stretchy='true' largeop='true' movablelimits='true'>&Sum;</mo><mrow><mi>i</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn></mrow><mrow><mn>4</mn></mrow></munderover><msup><mfenced open='(' close=')' separators=','><mrow><msub><mi>x</mi><mrow><mi>i</mi></mrow></msub></mrow></mfenced><mrow><mn>2</mn></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi>f</mi><mfenced open='(' close=')' separators=','><mrow><msub><mi>x</mi><mrow><mi>i</mi></mrow></msub></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>$EX2</mi></mrow></mstyle></math></font>&nbsp; <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>Var</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><msup><mfenced open='[' close=']' separators=','><mrow><mi>E</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi></mrow></mfenced></mrow></mfenced><mrow><mn>2</mn></mrow></msup><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>E</mi><mfenced open='(' close=')' separators=','><mrow><msup><mi>X</mi><mrow><mn>2</mn></mrow></msup></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$EofX2</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi mathvariant='normal'>$EX2</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$VarX</mi></mrow><mrow></mrow></mstyle></math></p>
<p>&nbsp;</p>@
qu.3.15.editing=useHTML@
qu.3.15.hint.1=<strong>Beware! </strong>The questions asks about the number of people on the bus BESIDES Pat. Reduce the numbers given by 1!@
qu.3.15.solution=@
qu.3.15.algorithm=$Q=1;
$B1=range(25,55,5);
$B2=range(25,55,5);
$B3=range(25,55,5);
$B4=range(25,55,5);
$Total=$B1+$B2+$B3+$B4;
$X1=$B1-1;
$X2=$B2-1;
$X3=$B3-1;
$X4=$B4-1;
$P1=$B1/$Total;
$P2=$B2/$Total;
$P3=$B3/$Total;
$P4=$B4/$Total;
$EX=decimal(4,$X1*$P1+$X2*$P2+$X3*$P3+$X4*$P4);
$EX2=decimal(4,$EX^2);
$EofX2=decimal(4,$X1^2*$P1+$X2^2*$P2+$X3^2*$P3+$X4^2*$P4);
$VarX=decimal(4,$EofX2-$EX2);@
qu.3.15.uid=5f2160fb-de14-49a7-8062-ea05e83e76ce@
qu.3.15.info=  Type=numeric;
  Course=230;
@

