qu.1.topic=Basics@

qu.1.1.mode=Multiple Choice@
qu.1.1.name=04. Joint pdf for coin toss@
qu.1.1.comment=<p>You can easily calculate a, b, and c. For example:</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>c</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>Two</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>heads</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>1st toss head</mi></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>2nd toss head</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><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><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow></mstyle></math></p>
<p>Similarly:</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>b</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>First</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>is</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>head</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>Second</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>is</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>tail</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><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></p>
<p>and by simple arithmetic you find <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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><mrow><mfrac><mn>1</mn><mrow><mn>4</mn></mrow></mfrac></mrow></mrow></mstyle></math> also.</p>@
qu.1.1.editing=useHTML@
qu.1.1.solution=@
qu.1.1.algorithm=$Q=4;
$Align=switch(rint(2),"Left","Right");
$Which=rint(4);@
qu.1.1.uid=dd4c095e-9cb7-4f0a-acb1-4783bf4d9396@
qu.1.1.info=  Diificulty=0;
  Course=230;
  Keyword=joint;
  Type=MC;
  Algorithmic=no;
@
qu.1.1.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Basics/Q$Q"><img hspace="4" align="$Align" title="A coin [IMG:Coin$Which.gif]" alt="A coin" src="__BASE_URI__DMD/Basics/Coin$Which.gif" />Toss a fair coin twice. Define two r.v. as follows: X is the number of Heads. Y is the number of Heads in the first toss (that is 0 or 1). Complete the probability table:<br />
<br />
<table cellspacing="0" cellpadding="0" bordercolor="#111111" border="1" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td>&nbsp;</td>
            <td align="center">&nbsp;</td>
            <td align="center" colspan="3"><strong>X = # heads</strong></td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td align="center">&nbsp;</td>
            <td align="center"><strong>0</strong></td>
            <td align="center"><strong>1</strong></td>
            <td align="center"><strong>2</strong></td>
        </tr>
        <tr>
            <td rowspan="2">
            <p align="center"><strong>Y </strong></p>
            </td>
            <td align="right"><strong>0</strong></td>
            <td align="center">1/4</td>
            <td align="center">a</td>
            <td align="center">0</td>
        </tr>
        <tr>
            <td align="right"><strong>1</strong></td>
            <td align="center">0</td>
            <td align="center">b</td>
            <td align="center">c</td>
        </tr>
    </tbody>
</table>
<p><br />
by selecting which choice is a,b,c :</p>
</div>@
qu.1.1.answer=1@
qu.1.1.choice.1=1/4, 1/4, 1/4@
qu.1.1.choice.2=1/4, 1/2, 1/2@
qu.1.1.choice.3=1/3, 1/4, 1/6@
qu.1.1.choice.4=1/5,1/4, 2/5@
qu.1.1.choice.5=None of the above@
qu.1.1.fixed=4@

qu.1.2.mode=Inline@
qu.1.2.name=05. Joint pdf for unfair coin toss@
qu.1.2.comment=<p>Work out each probability as the product of two probabilities, realizing that the coin tosses are independent.</p>
<p>a = P(TH) = P(1st toss T)P(2nd toss head) = <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mfrac><mrow><mi mathvariant='normal'>$PTop</mi></mrow><mrow><mi mathvariant='normal'>$PBot</mi></mrow></mfrac></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mi mathvariant='normal'>$PTop</mi><mrow><mi mathvariant='normal'>$PBot</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mi mathvariant='normal'>$aTop</mi><mrow><mi mathvariant='normal'>$AnsBot</mi></mrow></mfrac></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow></mstyle></math></p>
<p>b = P(HT) = <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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'>$PTop</mi><mrow><mi mathvariant='normal'>$PBot</mi></mrow></mfrac><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><mfrac><mi mathvariant='normal'>$PTop</mi><mrow><mi mathvariant='normal'>$PBot</mi></mrow></mfrac></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mi mathvariant='normal'>$bTop</mi><mrow><mi mathvariant='normal'>$AnsBot</mi></mrow></mfrac></mrow></mrow></mstyle></math></p>
<p>c = P(HH) = <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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'>$PTop</mi><mrow><mi mathvariant='normal'>$PBot</mi></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mi mathvariant='normal'>$PTop</mi><mrow><mi mathvariant='normal'>$PBot</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mi mathvariant='normal'>$cTop</mi><mrow><mi mathvariant='normal'>$AnsBot</mi></mrow></mfrac></mrow></mrow></mstyle></math></p>@
qu.1.2.editing=useHTML@
qu.1.2.solution=@
qu.1.2.algorithm=$Q=5;
$PPick=rint(5)+1;
$PTop=switch($PPick,1,2,3,4,5);
$PBot=switch($PPick,3,3,5,7,9);
$PHead=$PTop/$PBot;
$PTail=1-$PHead;
$PNoHeads = (1-$PHead)^2;
$Top=($PBot^2-$PTop);
$Bot=$PBot^2;
$PNoDisplay=mathml("$Top/$Bot");
$AnsBot=$PBot^2;
$aTop=($PBot-$PTop)*$PTop;
$bTop=($PBot-$PTop)*$PTop;
$cTop=$PTop^2;
$bAlt1=if(eq($aTop,$bTop),$aTop+1,$aTop);
$aAlt1=$cTop-$bTop;
$cAlt1=$PBot^2-$aAlt1-$bAlt1;
$Which=rint(4);
$Align=switch(rint(2),"Left","Right");@
qu.1.2.uid=a9273147-5ddd-4dc5-82f1-56fe9e05f67a@
qu.1.2.info=  Course=230;
  Diificulty=3;
  Keyword=joint;
@
qu.1.2.weighting=1@
qu.1.2.numbering=alpha@
qu.1.2.part.1.name=sro_id_1@
qu.1.2.part.1.editing=useHTML@
qu.1.2.part.1.choice.5=None of the above@
qu.1.2.part.1.fixed=4@
qu.1.2.part.1.choice.4=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mrow><mi mathvariant='normal'>$aTop</mi></mrow><mrow><mi mathvariant='normal'>$AnsBot</mi></mrow></mfrac><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mfrac><mrow><mi mathvariant='normal'>$cTop</mi></mrow><mrow><mi mathvariant='normal'>$AnsBot</mi></mrow></mfrac><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mn>0</mn></mrow></mstyle></math>@
qu.1.2.part.1.question=null@
qu.1.2.part.1.choice.3=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mi mathvariant='normal'>$aAlt1</mi><mrow><mi mathvariant='normal'>$AnsBot</mi></mrow></mfrac><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mfrac><mi mathvariant='normal'>$bAlt1</mi><mrow><mi mathvariant='normal'>$AnsBot</mi></mrow></mfrac><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mrow><mfrac><mi mathvariant='normal'>$cAlt1</mi><mrow><mi mathvariant='normal'>$AnsBot</mi></mrow></mfrac></mrow></mrow></mstyle></math>@
qu.1.2.part.1.choice.2=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mrow><mi mathvariant='normal'>$aTop</mi></mrow><mrow><mi mathvariant='normal'>$PBot</mi></mrow></mfrac><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mfrac><mrow><mi mathvariant='normal'>$cTop</mi></mrow><mrow><mi mathvariant='normal'>$PBot</mi></mrow></mfrac><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mrow><mfrac><mrow><mi mathvariant='normal'>$bTop</mi></mrow><mrow><mi mathvariant='normal'>$PBot</mi></mrow></mfrac></mrow></mrow></mstyle></math>@
qu.1.2.part.1.choice.1=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mrow><mfrac><mi mathvariant='normal'>$aTop</mi><mrow><mi mathvariant='normal'>$AnsBot</mi></mrow></mfrac></mrow><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mfrac><mrow><mi mathvariant='normal'>$bTop</mi></mrow><mrow><mi mathvariant='normal'>$AnsBot</mi></mrow></mfrac><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mfrac><mrow><mi mathvariant='normal'>$cTop</mi></mrow><mrow><mi mathvariant='normal'>$AnsBot</mi></mrow></mfrac></mrow></mstyle></math>@
qu.1.2.part.1.mode=Multiple Choice@
qu.1.2.part.1.display=vertical@
qu.1.2.part.1.answer=1@
qu.1.2.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Basics/Q$Q"><img hspace="4" align="$Align" src="__BASE_URI__DMD/Basics/Coin$Which.gif" alt="A coin" title="A coin [IMG:Coin$Which.gif]" />A coin is (unfairly) weighted so that the probability of a toss coming up Heads is <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mi mathvariant='normal'>$PTop</mi><mrow><mi mathvariant='normal'>$PBot</mi></mrow></mfrac></mrow></mstyle></math>. Toss this coin twice. Define two r.v. as follows: X is the number of Heads. Y is the number of Heads in the first toss (that is 0 or 1). Complete the probability table:<br /><br /><table cellspacing="0" cellpadding="0" bordercolor="#111111" border="1" style="border-collapse: collapse;">    <tbody>        <tr>            <td>&nbsp;</td>            <td align="center">&nbsp;</td>            <td align="center" colspan="3"><strong>X = # heads</strong></td>        </tr>        <tr>            <td>&nbsp;</td>            <td align="center">&nbsp;</td>            <td align="center"><strong>0</strong></td>            <td align="center"><strong>1</strong></td>            <td align="center"><strong>2</strong></td>        </tr>        <tr>            <td rowspan="2">            <p align="center"><strong>Y </strong></p>            </td>            <td align="right"><strong>0</strong></td>            <td align="center">$PNoDisplay</td>            <td align="center">a</td>            <td align="center">0</td>        </tr>        <tr>            <td align="right"><strong>1</strong></td>            <td align="center">0</td>            <td align="center">b</td>            <td align="center">c</td>        </tr>    </tbody></table><br />by selecting which choice is a,b,c :<p>&nbsp;</p><p><span> </span><1></p></div>@

qu.1.3.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Basics/Q$Q">Shown here is a table for a probability distribution for r.v. X and Y.
<p>
<table cellspacing="0" cellpadding="3" bordercolor="#111111" border="1">
    <tbody>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center" colspan="3"><strong>X</strong></td>
        </tr>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center"><strong>$x1</strong></td>
            <td align="center"><span style="font-weight: bold;">$x2</span></td>
            <td align="center"><span style="font-weight: bold;">$x3</span></td>
        </tr>
        <tr valign="middle">
            <td rowspan="3"><strong>Y</strong></td>
            <td align="right" style="font-weight: bold;">$y1</td>
            <td align="right">$F11</td>
            <td align="right">$F21</td>
            <td align="right">$F31</td>
        </tr>
        <tr valign="bottom">
            <td align="right" x:num="" style="font-weight: bold;">$y2</td>
            <td align="right">$F12</td>
            <td align="right">$F22</td>
            <td align="right">$F32</td>
        </tr>
        <tr valign="bottom">
            <td align="right" style="font-weight: bold;">$y3</td>
            <td align="right">$F13</td>
            <td align="right">$F23</td>
            <td align="right">$F33</td>
        </tr>
    </tbody>
</table>
</p>
<p>Find P(X =  $xProb | Y = $yProb) (4 decimals)</p>
</div>
<p>&nbsp;</p>@
qu.1.3.answer.num=$ans@
qu.1.3.answer.units=@
qu.1.3.showUnits=false@
qu.1.3.grading=toler_abs@
qu.1.3.err=.001@
qu.1.3.negStyle=minus@
qu.1.3.numStyle=thousands scientific dollars arithmetic@
qu.1.3.mode=Numeric@
qu.1.3.name=03. Find P(X=x|Y=y).@
qu.1.3.comment=<p>Use the 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>A</mi><mo lspace='0.1111111em' rspace='0.1111111em' stretchy='true'>&verbar;</mo><mi>B</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&rpar;</mo><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>AB</mi></mrow></mfenced></mrow><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>B</mi></mrow></mfenced></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$xProb</mi></mrow></mfenced><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><mfenced open='(' close=')' separators=','><mrow><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$yProb</mi></mrow></mfenced></mrow></mfenced></mrow><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$yProb</mi></mrow></mfenced></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo></mrow><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></mrow></mstyle></math></p>
<p>Note that P(B) is just the marginal probability - just add up all the probabilities for which Y = $ya.</p>
<p>The top of the expression is just read from the table as the entry where X = $xProb and Y = $yProb.</p>@
qu.1.3.editing=useHTML@
qu.1.3.solution=@
qu.1.3.algorithm=$Q=3;
$x1=range(1,5,1);
$x2=$x1+range(1,3,1);
$x3=$x2+range(1,3,1);
$x=($x1,$x2,$x3);
$y1=range(-5,-1,2);
$y2=0;
$y3=-$y1;
$y=($y1,$y2,$y3);
$fx1=decimal(2,range(0.1,0.5,0.05));
$fx2=decimal(2,range(0.1,0.45,0.05));
$fx3=1-$fx2-$fx1;
$fy1=decimal(2,range(0.1,0.5,0.05));
$fy2=decimal(2,range(0.1,0.45,0.05));
$fy3=1-$fy2-$fy1;
$aSpot=rint(8);
$xa=switch($aSpot,1,1,1,2,2,2,3,3,3);
$ya=switch($aSpot,1,2,3,1,2,3,1,2,3);
$preX=maple("$x[$xa]");
$xProb=int($preX);
$preY=maple("$y[$ya]");
$yProb=int($preY);
$F11=$fx1*$fy1;
$F12=$fx1*$fy2;
$F13=$fx1*$fy3;
$F21=$fx2*$fy1;
$F22=$fx2*$fy2;
$F23=$fx2*$fy3;
$F31=$fx3*$fy1;
$F32=$fx3*$fy2;
$F33=$fx3*$fy3;
$F1n=$fx1*if($ya-1,if($ya-2,$fy3,$fy2),$fy1);
$F2n=$fx2*if($ya-1,if($ya-2,$fy3,$fy2),$fy1);
$F3n=$fx3*if($ya-1,if($ya-2,$fy3,$fy2),$fy1);
$ansTop=if($xa-1,if($xa-2,$F3n,$F2n),$F1n);
$ansBot=if($ya-1,if($ya-2,$fy3,$fy2),$fy1);
$ans=$ansTop/$ansBot;@
qu.1.3.uid=bb587928-ecd8-43cf-b0b6-3add0383ac02@
qu.1.3.info=  Diificulty=1;
  Keyword=joint;
  Keyword=conditional;
  Course=230;
  Type=numeric;
@

qu.1.4.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Basics/Q$Q">Shown here is a table for a probability distribution for r.v. X and Y. The numbers in <span style="color: rgb(255, 0, 0);">red</span> are the marginal probability distributions. <br />
<p>&nbsp;</p>
<table cellspacing="0" cellpadding="3" bordercolor="#111111" border="1">
    <tbody>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center" colspan="3"><strong>X</strong></td>
            <td>&nbsp;</td>
        </tr>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center"><strong>1</strong></td>
            <td align="center"><span style="font-weight: bold;">2</span></td>
            <td align="center"><span style="font-weight: bold;">3</span></td>
            <td>&nbsp;</td>
        </tr>
        <tr valign="middle">
            <td rowspan="3"><strong>Y</strong></td>
            <td align="right" style="font-weight: bold;">0</td>
            <td align="right">$F11</td>
            <td align="right">$F21</td>
            <td align="right">$F31</td>
            <td align="right"><font color="#ff0000">$fy1</font></td>
        </tr>
        <tr valign="bottom">
            <td align="right" x:num="" style="font-weight: bold;">1</td>
            <td align="right">$F12</td>
            <td align="right">$F22</td>
            <td align="right">$F32</td>
            <td align="right"><font color="#ff0000">$fy2</font></td>
        </tr>
        <tr valign="bottom">
            <td align="right" style="font-weight: bold;">2</td>
            <td align="right">$F13</td>
            <td align="right">$F23</td>
            <td align="right">$F33</td>
            <td align="right"><font color="#ff0000">$fy3</font></td>
        </tr>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="right"><font color="#ff0000">$fx1</font></td>
            <td align="right"><font color="#ff0000">$fx2</font></td>
            <td align="right"><font color="#ff0000">$fx3</font></td>
            <td>&nbsp;</td>
        </tr>
    </tbody>
</table>
<p><br />
For what value of "a" can X and Y be independent (4 decimal accuracy please)?</p>
</div>@
qu.1.4.answer.num=$ans@
qu.1.4.answer.units=@
qu.1.4.showUnits=false@
qu.1.4.grading=toler_abs@
qu.1.4.err=.001@
qu.1.4.negStyle=minus@
qu.1.4.numStyle=thousands scientific dollars arithmetic@
qu.1.4.mode=Numeric@
qu.1.4.name=02. a to make X & Y independent.@
qu.1.4.comment=<p>The trick is to remember that <em><font size="3" face="Times New Roman">X</font></em> and <font size="3" face="Times New Roman"><em>Y </em></font>are independent iff <font size="3" face="Times New Roman"><em>f</em>(<em>x</em>,<em>y</em>) = <em>f</em><sub>1</sub>(<em>x</em>)<em>f</em><sub>2</sub>(<em>y</em>)  <img width="19" height="23" align="absmiddle" alt="" src="https://uwangel.uwaterloo.ca/AngelUploadsuwangel/Files/sm3scott/ForAll.gif" /> <em>x</em>,<em>y</em> </font>. Set "<font size="3" face="Times New Roman"><em>a</em></font>" equal to the appropriate product <font size="3" face="Times New Roman"><em>f</em><sub>1</sub>(<em>x</em>)<em>f</em><sub>2</sub>(<em>y</em>)</font> .</p>@
qu.1.4.editing=useHTML@
qu.1.4.solution=@
qu.1.4.algorithm=$Q=2;
$fx1=decimal(2,range(0.1,0.5,0.05));
$fx2=decimal(2,range(0.1,0.5,0.05));
$fx3=1-$fx2-$fx1;
$fy1=decimal(2,range(0.1,0.5,0.05));
$fy2=decimal(2,range(0.1,0.5,0.05));
$fy3=1-$fy2-$fy1;
$aSpot=rint(8);
$xa=switch($aSpot,1,1,1,2,2,2,3,3,3);
$ya=switch($aSpot,1,2,3,1,2,3,1,2,3);
$F11=if(($aSpot-0),$fx1*$fy1,a);
$F12=if(($aSpot-1),$fx1*$fy2,a);
$F13=if(($aSpot-2),$fx1*$fy3,a);
$F21=if(($aSpot-3),$fx2*$fy1,a);
$F22=if(($aSpot-4),$fx2*$fy2,a);
$F23=if(($aSpot-5),$fx2*$fy3,a);
$F31=if(($aSpot-6),$fx3*$fy1,a);
$F32=if(($aSpot-7),$fx3*$fy2,a);
$F33=if(($aSpot-8),$fx3*$fy3,a);
$F1n=$fx1*if($ya-1,if($ya-2,$fy3,$fy2),$fy1);
$F2n=$fx2*if($ya-1,if($ya-2,$fy3,$fy2),$fy1);
$F3n=$fx3*if($ya-1,if($ya-2,$fy3,$fy2),$fy1);
$ans=if($xa-1,if($xa-2,$F3n,$F2n),$F1n);@
qu.1.4.uid=0aef91b6-b407-4539-aded-ac2736f80480@
qu.1.4.info=  Type=numeric;
  Course=230;
  Diificulty=0;
  Keyword=marginal;
  Keyword=independence;
@

qu.1.5.mode=True False@
qu.1.5.name=06. Joint from Marginals?@
qu.1.5.comment=<p>This is easily proven FALSE by counterexample. Simply consider two different joint pdfs  that have these marginal distributions.</p>
<p>The following one does:</p>
<table cellspacing="0" cellpadding="0" bordercolor="#111111" border="1" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td colspan="3"><strong>X = Number Drawn</strong></td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="right"><strong>1</strong></td>
            <td align="right"><strong>2</strong></td>
            <td align="right"><strong>3</strong></td>
            <td align="right"><strong><font color="#ff0000">f<sub>2</sub>(y)</font></strong></td>
        </tr>
        <tr>
            <td rowspan="4">
            <p align="center"><strong>Y = <br />
            Coin   <br />
            Toss</strong></p>
            </td>
            <td align="right"><strong>0</strong></td>
            <td align="center">1/24</td>
            <td align="center">3/24</td>
            <td align="center">3/24</td>
            <td align="right"><strong><font color="#ff0000">7/24</font></strong></td>
        </tr>
        <tr>
            <td align="right"><strong>1</strong></td>
            <td align="center">4/24</td>
            <td align="center">2/24</td>
            <td align="center">5/24</td>
            <td align="right"><strong><font color="#ff0000">11/24</font></strong></td>
        </tr>
        <tr>
            <td align="right"><strong>2</strong></td>
            <td align="center">2/24</td>
            <td align="center">3/24</td>
            <td align="center">0</td>
            <td align="right"><strong><font color="#ff0000">5/24</font></strong></td>
        </tr>
        <tr>
            <td align="right"><strong>3</strong></td>
            <td align="center">1/24</td>
            <td align="center">0</td>
            <td align="center">0</td>
            <td align="right"><strong><font color="#ff0000">1/24</font></strong></td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td><font color="#ff0000"><strong>f<sub>1</sub>(x)</strong></font></td>
            <td align="center"><strong><font color="#ff0000">1/3</font></strong></td>
            <td align="center"><strong><font color="#ff0000">1/3</font></strong></td>
            <td align="center"><strong><font color="#ff0000">1/3</font></strong></td>
            <td>&nbsp;</td>
        </tr>
    </tbody>
</table>
<p>&nbsp;</p>
<p>So does this one:</p>
<table cellspacing="0" cellpadding="0" bordercolor="#111111" border="1" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td colspan="3"><strong>X = Number Drawn</strong></td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="right"><strong>1</strong></td>
            <td align="right"><strong>2</strong></td>
            <td align="right"><strong>3</strong></td>
            <td align="right"><strong><font color="#ff0000">f<sub>2</sub>(y)</font></strong></td>
        </tr>
        <tr>
            <td rowspan="4">
            <p align="center"><strong>Y = <br />
            Coin   <br />
            Toss</strong></p>
            </td>
            <td align="right"><strong>0</strong></td>
            <td align="center">1/24</td>
            <td align="center">3/24</td>
            <td align="center">3/24</td>
            <td align="right"><strong><font color="#ff0000">7/24</font></strong></td>
        </tr>
        <tr>
            <td align="right"><strong>1</strong></td>
            <td align="center">4/24</td>
            <td align="center">2/24</td>
            <td align="center">5/24</td>
            <td align="right"><strong><font color="#ff0000">11/24</font></strong></td>
        </tr>
        <tr>
            <td align="right"><strong>2</strong></td>
            <td align="center">3/24</td>
            <td align="center">1/24</td>
            <td align="center">1/24</td>
            <td align="right"><strong><font color="#ff0000">5/24</font></strong></td>
        </tr>
        <tr>
            <td align="right"><strong>3</strong></td>
            <td align="center">0</td>
            <td align="center">1/24</td>
            <td align="center">0</td>
            <td align="right"><strong><font color="#ff0000">1/24</font></strong></td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td><font color="#ff0000"><strong>f<sub>1</sub>(x)</strong></font></td>
            <td align="center"><strong><font color="#ff0000">1/3</font></strong></td>
            <td align="center"><strong><font color="#ff0000">1/3</font></strong></td>
            <td align="center"><strong><font color="#ff0000">1/3</font></strong></td>
            <td>&nbsp;</td>
        </tr>
    </tbody>
</table>
<p>In fact you could generate an endless stream of different joint pdfs with the  same marginals.</p>@
qu.1.5.editing=useHTML@
qu.1.5.solution=@
qu.1.5.algorithm=$Q=6;@
qu.1.5.uid=5f709818-c8e8-4056-bb35-f761eefe28e0@
qu.1.5.info=  Course=230;
  Algorithmic=no;
  Diificulty=0;
  Keyword=joint;
  Type=TF;
  Keyword=marginal;
@
qu.1.5.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Basics/Q$Q">Consider the following case where you are given the marginal probability distributions for two r.v. :  <br />
<br />
<table cellspacing="0" cellpadding="0" bordercolor="#111111" border="1" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td colspan="3"><strong>X = Number Drawn</strong></td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="right"><strong>1</strong></td>
            <td align="right"><strong>2</strong></td>
            <td align="right"><strong>3</strong></td>
            <td align="right"><strong><font color="#ff0000">f<sub>2</sub>(y)</font></strong></td>
        </tr>
        <tr>
            <td rowspan="4">
            <p align="center"><strong>Y = <br />
            Coin   <br />
            Toss</strong></p>
            </td>
            <td align="right"><strong>0</strong></td>
            <td align="center">&nbsp;</td>
            <td align="center">&nbsp;</td>
            <td align="center">&nbsp;</td>
            <td align="right"><strong><font color="#ff0000">7/24</font></strong></td>
        </tr>
        <tr>
            <td align="right"><strong>1</strong></td>
            <td align="center">&nbsp;</td>
            <td align="center">&nbsp;</td>
            <td align="center">&nbsp;</td>
            <td align="right"><strong><font color="#ff0000">11/24</font></strong></td>
        </tr>
        <tr>
            <td align="right"><strong>2</strong></td>
            <td align="center">&nbsp;</td>
            <td align="center">&nbsp;</td>
            <td align="center">&nbsp;</td>
            <td align="right"><strong><font color="#ff0000">5/24</font></strong></td>
        </tr>
        <tr>
            <td align="right"><strong>3</strong></td>
            <td align="center">&nbsp;</td>
            <td align="center">&nbsp;</td>
            <td align="center">&nbsp;</td>
            <td align="right"><strong><font color="#ff0000">1/24</font></strong></td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td><font color="#ff0000"><strong>f<sub>1</sub>(x)</strong></font></td>
            <td align="center"><strong><font color="#ff0000">1/3</font></strong></td>
            <td align="center"><strong><font color="#ff0000">1/3</font></strong></td>
            <td align="center"><strong><font color="#ff0000">1/3</font></strong></td>
            <td>&nbsp;</td>
        </tr>
    </tbody>
</table>
<br />
True or False: You can always recreate the probability distribution with this information.</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.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Basics/Q$Q">The table below gives the probabilities P(X=x and Y=y) :<br />
<br />
<table cellspacing="0" cellpadding="2" bordercolor="#111111" border="1" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td rowspan="2" colspan="2">&nbsp;</td>
            <td align="center" colspan="3"><strong>X </strong></td>
        </tr>
        <tr>
            <td align="center"><strong>$X1</strong></td>
            <td align="center"><strong>$X2</strong></td>
            <td align="center"><strong>$X3</strong></td>
        </tr>
        <tr>
            <td rowspan="3">
            <p align="center"><strong>Y </strong></p>
            </td>
            <td align="right"><strong>$Y1</strong></td>
            <td align="right">$F_11</td>
            <td align="right">$F_12</td>
            <td align="right">$F_13</td>
        </tr>
        <tr>
            <td align="right"><strong>$Y2</strong></td>
            <td align="right">$F_21</td>
            <td align="right">$F_22</td>
            <td align="right">$F_23</td>
        </tr>
        <tr>
            <td><strong>$Y3</strong></td>
            <td align="right">$F_31</td>
            <td align="right">$F_32</td>
            <td align="right">$F_33</td>
        </tr>
    </tbody>
</table>
<p><br />
Find P(X = $Ask | Y = $AskY) (3 decimals)</p>
</div>@
qu.1.6.answer.num=$Ans@
qu.1.6.answer.units=@
qu.1.6.showUnits=false@
qu.1.6.grading=toler_abs@
qu.1.6.err=.01@
qu.1.6.negStyle=minus@
qu.1.6.numStyle=thousands scientific dollars arithmetic@
qu.1.6.mode=Numeric@
qu.1.6.name=08+. P(X=x|Y=y)@
qu.1.6.comment=<p>Use the 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><mrow><mfenced open='(' close=')' separators=','><mrow><mi>A</mi><mo lspace='0.1111111em' rspace='0.1111111em' stretchy='true'>&verbar;</mo><mi>B</mi></mrow></mfenced></mrow><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>AB</mi></mrow></mfenced></mrow><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>B</mi></mrow></mfenced></mrow></mfrac></mrow><mrow><mi></mi></mrow></mstyle></math></p>
<p>where P(AB) is $AnsTop (the table entry corresponding to X = $Ask and Y = $AskY) and P(B) = P(Y = $AskY) = $AnsBot (the sum of the row for Y = $AskY). <em>The table with marginal probabilities filled in is shown below.&nbsp;</em> Thus:</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 lspace='0.0em' rspace='0.0em'>&#32;</mo><mrow><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ask</mi><mo lspace='0.1111111em' rspace='0.1111111em' stretchy='true'>&verbar;</mo><mi>Y</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>$AskY</mi></mrow></mfenced></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><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></mrow></mstyle></math>&nbsp;&nbsp;</p>
<table cellspacing="0" cellpadding="2" bordercolor="#111111" border="1" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td rowspan="2" colspan="2">&nbsp;</td>
            <td align="center" colspan="4"><strong>X </strong></td>
        </tr>
        <tr>
            <td align="center"><strong>$X1</strong></td>
            <td align="center"><strong>$X2</strong></td>
            <td align="center"><strong>$X3</strong></td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td rowspan="4">
            <p align="center"><strong>Y </strong></p>
            </td>
            <td align="right"><strong>$Y1</strong></td>
            <td align="right">$F_11</td>
            <td align="right">$F_12</td>
            <td align="right">$F_13</td>
            <td align="right"><strong>$F_R1</strong></td>
        </tr>
        <tr>
            <td align="right"><strong>$Y2</strong></td>
            <td align="right">$F_21</td>
            <td align="right">$F_22</td>
            <td align="right">$F_23</td>
            <td align="right"><strong>$F_R2</strong></td>
        </tr>
        <tr>
            <td><strong>$Y3</strong></td>
            <td align="right">$F_31</td>
            <td align="right">$F_32</td>
            <td align="right">$F_33</td>
            <td align="right"><strong>$F_R3</strong></td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td align="right"><strong>&nbsp;$C_1</strong></td>
            <td align="right"><strong>$C_2 <br />
            </strong></td>
            <td align="right"><strong>$C_3 <br />
            </strong></td>
            <td>&nbsp;</td>
        </tr>
    </tbody>
</table>
<p>&nbsp;</p>@
qu.1.6.editing=useHTML@
qu.1.6.solution=@
qu.1.6.algorithm=$Q="08+";
$X1=range(1,7,2);
$X2=$X1+2;
$X3=$X2+2;
$Y1=rint(5);
$Y2=$Y1+1;
$Y3=$Y1+2;
$Which=rint(3);
$WhichY=rint(3);
$Ask=switch($Which,$X1,$X2,$X3);
$AskY=switch($WhichY,$Y1,$Y2,$Y3);
$F_R1=decimal(2,range(0.2,1.0,0.05));
$F_R2=decimal(2,range(0.2,1.0,0.05));
$F_R3=1-$F_R1-$F_R2;
condition:gt($F_R3,0.15);
$F_11=decimal(2,range(0,$F_R1,0.05));
$F_12=decimal(2,range(0,$F_R1-$F_11,0.05));
$F_13=decimal(2,$F_R1-$F_11-$F_12);
$F_21=decimal(2,range(0,$F_R2,0.05));
$F_22=decimal(2,range(0,$F_R2-$F_21,0.05));
$F_23=decimal(2,$F_R2-$F_21-$F_22);
$F_31=decimal(2,range(0,$F_R3,0.05));
$F_32=decimal(2,range(0,$F_R3-$F_31,0.05));
$F_33=decimal(2,$F_R3-$F_31-$F_32);
$C_1=$F_11+$F_21+$F_31;
$C_2=$F_12+$F_22+$F_32;
$C_3=$F_13+$F_23+$F_33;
$All=[abs($F_11),abs($F_12),abs($F_13),abs($F_21),abs($F_22),abs($F_23),abs($F_31),abs($F_32),abs($F_33)];
$ShowMe=1+3*$WhichY+$Which;
$AnsTop1=maple("$All[$ShowMe]");
$AnsTop=decimal(2,$AnsTop1);
$AnsBot=switch($WhichY,$F_R1,$F_R2,$F_R3);
$Ans=decimal(2,$AnsTop/$AnsBot);@
qu.1.6.uid=c223fc3d-ca6d-44b1-826d-a3c26d56bc86@
qu.1.6.info=  Type=numeric;
  Course=230;
  Difficulty=2;
  Keyword=marginal;
  Keyword=joint;
  Author=Sean Scott;
@

qu.1.7.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Basics/Q$Q">The table below gives the probabilities P(X=x and Y=y) :<br />
<br />
<table cellspacing="0" cellpadding="2" bordercolor="#111111" border="1" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td rowspan="2" colspan="2">&nbsp;</td>
            <td align="center" colspan="3"><strong>X </strong></td>
        </tr>
        <tr>
            <td align="center"><strong>$X1</strong></td>
            <td align="center"><strong>$X2</strong></td>
            <td align="center"><strong>$X3</strong></td>
        </tr>
        <tr>
            <td rowspan="3">
            <p align="center"><strong>Y </strong></p>
            </td>
            <td align="right"><strong>$Y1</strong></td>
            <td align="right">$F_11</td>
            <td align="right">$F_12</td>
            <td align="right">$F_13</td>
        </tr>
        <tr>
            <td align="right"><strong>$Y2</strong></td>
            <td align="right">$F_21</td>
            <td align="right">$F_22</td>
            <td align="right">$F_23</td>
        </tr>
        <tr>
            <td><strong>$Y3</strong></td>
            <td align="right">$F_31</td>
            <td align="right">$F_32</td>
            <td align="right">$F_33</td>
        </tr>
    </tbody>
</table>
<p><br />
Find P(X = $Ask) (3 decimals)</p>
</div>@
qu.1.7.answer.num=$Ans@
qu.1.7.answer.units=@
qu.1.7.showUnits=false@
qu.1.7.grading=toler_abs@
qu.1.7.err=.01@
qu.1.7.negStyle=minus@
qu.1.7.numStyle=thousands scientific dollars arithmetic@
qu.1.7.mode=Numeric@
qu.1.7.name=07. Marginal from Joint@
qu.1.7.comment=<p>To find P(X = $Ask), you must sum the entries in the column for the given value of X:</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table cellspacing="0" cellpadding="2" bordercolor="#111111" border="1" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td rowspan="2" colspan="2">&nbsp;</td>
            <td align="center" colspan="3"><strong>X </strong></td>
        </tr>
        <tr>
            <td align="center"><strong>$X1</strong></td>
            <td align="center"><strong>$X2</strong></td>
            <td align="center"><strong>$X3</strong></td>
        </tr>
        <tr>
            <td rowspan="3">
            <p align="center"><strong>Y </strong></p>
            </td>
            <td align="right"><strong>$Y1</strong></td>
            <td align="right">$Col1Color $F_11 $EndFont</td>
            <td align="right">$Col2Color $F_12 $EndFont</td>
            <td align="right">$Col3Color $F_13 $EndFont</td>
        </tr>
        <tr>
            <td align="right"><strong>$Y2</strong></td>
            <td align="right">$Col1Color $F_21 $EndFont</td>
            <td align="right">$Col2Color $F_22 $EndFont</td>
            <td align="right">$Col3Color $F_23 $EndFont</td>
        </tr>
        <tr>
            <td><strong>$Y3</strong></td>
            <td align="right">$Col1Color $F_31 $EndFont</td>
            <td align="right">$Col2Color $F_32 $EndFont</td>
            <td align="right">$Col3Color $F_33 $EndFont</td>
        </tr>
    </tbody>
</table>
<p><br />
<br />
Add up the <font color="#ff0000">red</font> values to obtain the answer P(X=$Ask) = $Ans</p>@
qu.1.7.editing=useHTML@
qu.1.7.solution=@
qu.1.7.algorithm=$Q=7;
$X1=range(1,7,2);
$X2=$X1+2;
$X3=$X2+2;
$Y1=rint(5);
$Y2=$Y1+1;
$Y3=$Y1+2;
$Which=rint(3);
$Ask=switch($Which,$X1,$X2,$X3);
$F_R1=decimal(2,range(0.2,1.0,0.05));
$F_R2=decimal(2,range(0.2,1.0,0.05));
$F_R3=1-$F_R1-$F_R2;
condition:gt($F_R3,0.15);
$F_11=decimal(2,range(0,$F_R1,0.05));
$F_12=decimal(2,range(0,$F_R1-$F_11,0.05));
$F_13=decimal(2,$F_R1-$F_11-$F_12);
$F_21=decimal(2,range(0,$F_R2,0.05));
$F_22=decimal(2,range(0,$F_R2-$F_21,0.05));
$F_23=decimal(2,$F_R2-$F_21-$F_22);
$F_31=decimal(2,range(0,$F_R3,0.05));
$F_32=decimal(2,range(0,$F_R3-$F_31,0.05));
$F_33=decimal(2,$F_R3-$F_31-$F_32);
$F_C1=$F_11+$F_21+$F_31;
$F_C2=$F_12+$F_22+$F_32;
$F_C3=$F_13+$F_23+$F_33;
$Ans=switch($Which,$F_C1,$F_C2,$F_C3);
$Col1Color=if($Which,"<font color=>","<font color=red>");
$Col2Color=if($Which-1,"<font color=>","<font color=red>");
$Col3Color=if($Which-2,"<font color=>","<font color=red>");
$EndFont="</font>";@
qu.1.7.uid=52644ce4-df26-47a4-9c97-b7522533ad24@
qu.1.7.info=  Type=numeric;
  Course=230;
  Difficulty=2;
  Keyword=joint;
  Keyword=marginal;
@

qu.1.8.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Basics/Q$Q">The table below gives the probabilities P(X=x and Y=y) where X takes the possible values <em><font size="3" face="Times New Roman">x<sub>0</sub>, x<sub>1</sub>, x<sub>2</sub></font></em>  and Y takes values <em><font size="3" face="Times New Roman">y<sub>0</sub>, y<sub>1</sub></font></em>:<br />
<br />
<table cellspacing="0" cellpadding="2" bordercolor="#111111" border="1" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td>&nbsp;</td>
            <td align="center">&nbsp;</td>
            <td align="center" colspan="3"><strong>X </strong></td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td align="center">&nbsp;</td>
            <td align="center" style="font-weight: bold;">x<sub>0</sub></td>
            <td align="center" style="font-weight: bold;">x<sub>1</sub></td>
            <td align="center" style="font-weight: bold;">x<sub>2</sub></td>
        </tr>
        <tr>
            <td rowspan="2">
            <p align="center"><strong>Y </strong></p>
            </td>
            <td align="right" style="font-weight: bold;">y<sub>0</sub></td>
            <td style="text-align: center;">0</td>
            <td style="text-align: center;"><span style="font-style: italic;"><em><font size="3" face="Times New Roman">a</font></em><br />
            </span></td>
            <td style="text-align: center;">$c</td>
        </tr>
        <tr>
            <td align="right" style="font-weight: bold;">y<sub>1</sub></td>
            <td align="right"><span style="font-style: italic;">$s1</span></td>
            <td align="right">$s2</td>
            <td align="right" style="font-style: italic;">$s3</td>
        </tr>
    </tbody>
</table>
<p>&nbsp;</p>
<p>Find <em><font size="3" face="Times New Roman">a </font></em>with 4 decimal accuracy.</p>
</div>@
qu.1.8.answer.num=$ans@
qu.1.8.answer.units=@
qu.1.8.showUnits=false@
qu.1.8.grading=toler_abs@
qu.1.8.err=.001@
qu.1.8.negStyle=minus@
qu.1.8.numStyle=thousands scientific dollars arithmetic@
qu.1.8.mode=Numeric@
qu.1.8.name=01. Find <i>a</i> in Joint pdf@
qu.1.8.comment=<p>The point is, of course, that a joint probability distribution has the same property as a single-variate one: the probabilities must sum to 1. Add up all the table entries, set the result to 1 and solve for <em>a</em>.  Here:</p>
<p><font size="3" face="Times New Roman">0 + </font><font size="3" face="Times New Roman"><em>a</em></font><font size="3" face="Times New Roman"> + $c + $s1 + $s2 + $s3 = 1</font>     so collect the <font size="3" face="Times New Roman"><em>a</em></font> coefficients, and take all constants to the RHS:</p>
<p><font size="3" face="Times New Roman"><em>a</em>(1 $k1s $k1a $k2s $k2a $k3s $k3a) = 1 - $c - $b1 - $b2</font><br />
<font size="3" face="Times New Roman"><em>a</em>($SumOfaCoeff) = $SumOfTop</font><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><mi mathvariant='normal'>$SumOfTop</mi><mrow><mi mathvariant='normal'>$SumOfaCoeff</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$ans</mi></mrow></mstyle></math></p>
<p>&nbsp;</p>@
qu.1.8.editing=useHTML@
qu.1.8.solution=@
qu.1.8.algorithm=$Q=1;
$k1=range(-2,2);
$k2=range(-2,2);
$k3=range(0,2);
condition:ne($k1*$k2*$k3,0);
condition:gt($k1+$k2+$k3,0);
$k1a=abs($k1);
$k1s=if(lt($k1,0),"-","+");
$k2a=abs($k2);
$k2s=if(lt($k2,0),"-","+");
$k3a=abs($k3);
$k3s=if(lt($k3,0),"-","+");
$b1=decimal(3,range(0.05,0.25,0.05));
$b2=decimal(3,range(0.05,0.25,0.05));
$c=0.2;
condition:lt($c+$b1+$b2,1);
$ans=(1-$b1-$b2-$c)/(1+$k1+$k2+$k3);
condition:ge($k1*$ans+$b1,0);
condition:ge($k2*$ans+$b2,0);
$s1=mathml("$k1*a+$b1");
$s2=mathml("$k2*a+$b2");
$SumOfaCoeff = 1+$k1+$k2+$k3;
$SumOfTop=1-$c-$b1-$b2;
$s3=mathml("$k3*a");@
qu.1.8.uid=1571a05e-5d4e-405b-8712-382e2b0e2c04@
qu.1.8.info=  Course=230;
  Diificulty=0;
  Keyword=joint;
@

qu.2.topic=Conditional Probability C811@

qu.2.1.mode=Inline@
qu.2.1.name=01. Insurance@
qu.2.1.comment=<p>Let ~D represent the event "policyholder is NOT class D". The question asks for:</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><mrow><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>~D</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&rpar;</mo></mrow><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'>&#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>~D</mi></mrow></mfenced></mrow><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>~D</mi></mrow></mfenced></mrow></mfrac></mrow><mrow><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>A</mi></mrow></mfenced></mrow><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>~D</mi></mrow></mfenced></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mi mathvariant='normal'>$PA</mi><mrow><mi mathvariant='normal'>$PNotD</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math></p>@
qu.2.1.editing=useHTML@
qu.2.1.hint.1=Notice that the event "A and ~D" has the same probabilty as the event "A", since once the event A has occurred you know that ~D (and ~B and ~C) has occurred also.@
qu.2.1.solution=@
qu.2.1.algorithm=$Q="01";
$PA=decimal(2,range(0.1,0.4,.05));
$PB=decimal(2,range(0.1,.8-$PA,0.05));
$PC=decimal(2,range(0.1,0.9-$PA-$PB,0.05));
$PD=1-$PA-$PB-$PC;
$PNotD=1-$PD;
$Ans=decimal(3,$PA/$PNotD);
$Alt1=decimal(3,(1+$Ans)/2);
$Alt2=decimal(3,range(.3,.6,.1)*$Ans);
$Alt3=decimal(3,($Alt1+$Alt2)/2);@
qu.2.1.uid=9deb429b-dd6f-48e4-98c6-5571005bf04d@
qu.2.1.info=  Type=MC;
  Course=230;
  Difficulty=2;
  Keyword=conditional probability;
  Author=Sean Scott;
@
qu.2.1.weighting=1@
qu.2.1.numbering=alpha@
qu.2.1.part.1.name=sro_id_1@
qu.2.1.part.1.editing=useHTML@
qu.2.1.part.1.choice.5=Cannot be determined with the information given.<br>@
qu.2.1.part.1.fixed=4@
qu.2.1.part.1.choice.4=$Alt3<br>@
qu.2.1.part.1.question=null@
qu.2.1.part.1.choice.3=$Alt2<br>@
qu.2.1.part.1.choice.2=$Alt1@
qu.2.1.part.1.choice.1=$Ans@
qu.2.1.part.1.mode=Multiple Choice@
qu.2.1.part.1.display=vertical@
qu.2.1.part.1.answer=1@
qu.2.1.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Conditional Probability/Q$Q">An insurance company classifies policy holders as class A, B, C, or D. The probabilities of a randomly selected policy holder being in these categories are $PA, $PB, $PC and $PD respectively. If a policy holder is selected at random, what is the probability they are class A <u>given that</u> they are NOT class D? <br /><p><span> </span><1><span> </span></p></div>@

qu.2.2.mode=Multiple Choice@
qu.2.2.name=03b. Smoke and gender@
qu.2.2.comment=<p>P($FBFirst | $FBSecond) =&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><mo lspace='0.1111111em' rspace='0.1111111em'>&num;</mo><mi mathvariant='normal'>who are $FBFirst and $FBSecond</mi></mrow><mrow><mo lspace='0.1111111em' rspace='0.1111111em'>&num;</mo><mi mathvariant='normal'>$FBSecond</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><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo></mrow><mrow><mfrac><mi mathvariant='normal'>$FBTop</mi><mrow><mi mathvariant='normal'>$FBBot</mi></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math></p>
<p>&nbsp;</p>@
qu.2.2.editing=useHTML@
qu.2.2.solution=@
qu.2.2.algorithm=$Q="03b";
$Which=rint(4);
$Align=switch(rint(2),"Left","Right");
$MS=range(12,39,1);
$MNS=60-$MS;
$FS=range(7,24,1);
$FNS=40-$FS;
$Smokers=$MS+$FS;
$NonSmokers=$MNS+$FNS;
$Males=$MS+$MNS;
$Females=$FS+$FNS;
$Pick=rint(4);
$QIs=switch($Pick,"randomly selected male is a smoker","randomly selected female is a smoker","randomly selected smoker is male","randomly selected smoker is female");
$Ans=decimal(3,switch($Pick,$MS/$Males,$FS/$Females,$MS/$Smokers,$FS/$Smokers));
$Alt1=decimal(3,range(0.4,0.8,0.05)*$Ans);
$Alt2=decimal(3,$Ans+range(0.4,0.8,0.05)*(1-$Ans));
$Alt3=decimal(3,0.5*($Ans+switch(rint(2),$Alt1,$Alt2)));
$FBFirst=switch($Pick,"smoker","smoker","male","female");
$FBSecond=switch($Pick,"male","female","smoker","smoker");
$FBTop=switch($Pick,$MS,$FS,$MS,$FS);
$FBBot=switch($Pick,$Males,$Females,$Smokers,$Smokers);@
qu.2.2.uid=35bf536b-c860-4bb3-a901-d1f806e03a31@
qu.2.2.info=  Type=MC;
  Author=Sean Scott;
@
qu.2.2.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Conditional Probability/Q$Q"><img hspace="4" align="$Align" src="__BASE_URI__DMD/CP/Smoke$Which.gif" alt="Cigarette" title="Cigarette [IMG:smoke$Which.gif]" />100 persons are surveyed about their smoking habits. The results are shown below:<br />
&nbsp;<br />
<table cellspacing="0" cellpadding="3" bordercolor="#111111" border="1" id="AutoNumber1" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td colspan="4">
            <p align="center"><em>Do you smoke?</em></p>
            </td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td align="center"><strong>Yes</strong></td>
            <td align="center"><strong>No</strong></td>
            <td align="center"><strong>Total</strong></td>
        </tr>
        <tr>
            <td><strong>Male</strong></td>
            <td align="right">$MS</td>
            <td align="right">$MNS</td>
            <td align="right">60</td>
        </tr>
        <tr>
            <td><strong>Female</strong></td>
            <td align="right">$FS</td>
            <td align="right">$FNS</td>
            <td align="right">40</td>
        </tr>
        <tr>
            <td><strong>Total</strong></td>
            <td align="right">$Smokers</td>
            <td align="right">$NonSmokers</td>
            <td align="right">100</td>
        </tr>
    </tbody>
</table>
<p><br />
What is the probability that a $QIs?</p>
</div>@
qu.2.2.answer=1@
qu.2.2.choice.1=$Ans@
qu.2.2.choice.2=$Alt1@
qu.2.2.choice.3=$Alt2@
qu.2.2.choice.4=$Alt3@
qu.2.2.fixed=@

qu.2.3.mode=Inline@
qu.2.3.name=02. f<sub>X|Y</sub>(x|y)@
qu.2.3.comment=<p>First find the marginal probability for Y = $WhichY by adding up the entries in its row:</p>
<p>f<sub>2</sub>($WhichY) = $Base</p>
<p>Now for each x value just divide the table entry f(x,$WhichY) by $Base .</p>@
qu.2.3.editing=useHTML@
qu.2.3.solution=@
qu.2.3.algorithm=$Q=2;
$X1=range(1,7,2);
$X2=$X1+2;
$X3=$X2+2;
$Y1=rint(5);
$Y2=$Y1+1;
$WhichY=$Y2;
$F_R1=decimal(2,range(0.2,1.0,0.05));
$F_R2=1-$F_R1;
condition:gt($F_R2,0.15);
$F_11=decimal(2,range(0.05,$F_R1-0.05,0.05));
$F_12=decimal(2,range(0.05,$F_R1-$F_11,0.05));
$F_13=decimal(2,$F_R1-$F_11-$F_12);
$F_21=decimal(2,range(0.05,$F_R2-0.05,0.05));
$F_22=decimal(2,range(0.05,$F_R2-$F_21,0.05));
$F_23=decimal(2,$F_R2-$F_21-$F_22);
$Base=if($WhichY-$Y1,$F_21+$F_22+$F_23,$F_11+$F_12+$F_13);
$Pre1=if($WhichY-$Y1,$F_21/$Base,$F_11/$Base);
$Ans1=decimal(4,$Pre1);
$Pre2=if($WhichY-$Y1,$F_22/$Base,$F_12/$Base);
$Ans2=decimal(4,$Pre2);
$Pre3=if($WhichY-$Y1,$F_23/$Base,$F_13/$Base);
$Ans3=decimal(4,$Pre3);
$AltA1=$Ans3;
$AltA2=$Ans1;
$AltA3=$Ans2;
$AltB1=$Ans1+0.5*(1-$Ans1);
$AltB2=decimal(4,0.3*(1-$AltB1));
$AltB3=1-$AltB1-$AltB2;
$AltC1=decimal(3,range(0.1,0.7,0.05));
condition:ne($AltC1,$Ans1);
$AltC2=decimal(4,0.4*(1-$AltC1));
$AltC3=1-$AltC1-$AltC2;
$AltD1=$AltC2;
$AltD2=$AltC1;
$AltD3=$AltC3;@
qu.2.3.uid=26499420-df11-407b-b98e-2a66d78f60bc@
qu.2.3.info=  Type=MC;
  Course=230;
  Difficulty=3;
  Keyword=marginal;
  Keyword=joint;
  Keyword=conditional probability;
  Author=Sean Scott;
@
qu.2.3.weighting=1@
qu.2.3.numbering=alpha@
qu.2.3.part.1.name=sro_id_1@
qu.2.3.part.1.editing=useHTML@
qu.2.3.part.1.choice.5=None of the above<br>@
qu.2.3.part.1.fixed=4@
qu.2.3.part.1.choice.4=<table title="AltD" border="1" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber1">  <tr>    <td><b>X = x</b></td>    <td align="center"><b>$X1</b></td>    <td align="center"><b>$X2</b></td>    <td align="center"><b>$X3</b></td>  </tr>  <tr>    <td><b>f<sub>X|Y</sub>(x|$WhichY)</b></td>    <td>$AltD1</td>    <td>$AltD2</td>    <td>$AltD3</td>  </tr></table>@
qu.2.3.part.1.question=null@
qu.2.3.part.1.choice.3=<table title="AltC" border="1" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber1" cellspacing="0">  <tr>    <td><b>X = x</b></td>    <td align="center"><b>$X1</b></td>    <td align="center"><b>$X2</b></td>    <td align="center"><b>$X3</b></td>  </tr>  <tr>    <td><b>f<sub>X|Y</sub>(x|$WhichY)</b></td>    <td>$AltC1</td>    <td>$AltC2</td>    <td>$AltC3</td>  </tr></table>@
qu.2.3.part.1.choice.2=<table border="1" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber1" cellspacing="0">  <tr>    <td><b>X = x</b></td>    <td align="center"><b>$X1</b></td>    <td align="center"><b>$X2</b></td>    <td align="center"><b>$X3</b></td>  </tr>  <tr>    <td><b>f<sub>X|Y</sub>(x|$WhichY)</b></td>    <td>$AltA1</td>    <td>$AltA2</td>    <td>$AltA3</td>  </tr></table>@
qu.2.3.part.1.choice.1=<table border="1" cellpadding="2" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber1" cellspacing="0">  <tr>    <td><b>X = x</b></td>    <td align="center"><b>$X1</b></td>    <td align="center"><b>$X2</b></td>    <td align="center"><b>$X3</b></td>  </tr>  <tr>    <td><b>f<sub>X|Y</sub>(x|$WhichY)</b></td>    <td>$Ans1</td>    <td>$Ans2</td>    <td>$Ans3</td>  </tr></table>@
qu.2.3.part.1.mode=Multiple Choice@
qu.2.3.part.1.display=vertical@
qu.2.3.part.1.answer=1@
qu.2.3.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Conditional Probability/Q$Q">Let X and Y be discrete random variables with the joint probability function f(x,y) given by the table:<br /><table cellspacing="0" cellpadding="2" bordercolor="#111111" border="1" style="border-collapse: collapse;">    <tbody>        <tr>            <td rowspan="2" colspan="2">f(x,y)</td>            <td align="center" colspan="3"><strong>X </strong></td>        </tr>        <tr>            <td align="center"><strong>$X1</strong></td>            <td align="center"><strong>$X2</strong></td>            <td align="center"><strong>$X3</strong></td>        </tr>        <tr>            <td rowspan="2">            <p align="center"><strong>Y </strong></p>            </td>            <td align="right"><strong>$Y1</strong></td>            <td align="right">$F_11</td>            <td align="right">$F_12</td>            <td align="right">$F_13</td>        </tr>        <tr>            <td align="right"><strong>$Y2</strong></td>            <td align="right">$F_21</td>            <td align="right">$F_22</td>            <td align="right">$F_23</td>        </tr>    </tbody></table><p><br />Which of the following is the conditional probability function <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><msub><mi>f</mi><mrow><mi>X</mi><mo lspace='0.1111111em' rspace='0.1111111em' stretchy='true'>&verbar;</mo><mi>Y</mi></mrow></msub><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 mathvariant='normal'>$WhichY</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&rpar;</mo></mrow></mstyle></math> ?</p><span> </span></div><p><span> </span><1></p>@

qu.2.4.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Basics/Q$Q">The table below gives the probabilities P(X=x and Y=y) :<br />
<br />
<table cellspacing="0" cellpadding="2" bordercolor="#111111" border="1" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td rowspan="2" colspan="2">&nbsp;</td>
            <td align="center" colspan="3"><strong>X </strong></td>
        </tr>
        <tr>
            <td align="center"><strong>$X1</strong></td>
            <td align="center"><strong>$X2</strong></td>
            <td align="center"><strong>$X3</strong></td>
        </tr>
        <tr>
            <td rowspan="3">
            <p align="center"><strong>Y </strong></p>
            </td>
            <td align="right"><strong>$Y1</strong></td>
            <td align="right">$F_11</td>
            <td align="right">$F_12</td>
            <td align="right">$F_13</td>
        </tr>
        <tr>
            <td align="right"><strong>$Y2</strong></td>
            <td align="right">$F_21</td>
            <td align="right">$F_22</td>
            <td align="right">$F_23</td>
        </tr>
        <tr>
            <td><strong>$Y3</strong></td>
            <td align="right">$F_31</td>
            <td align="right">$F_32</td>
            <td align="right">$F_33</td>
        </tr>
    </tbody>
</table>
<p><br />
Find P(X = $Ask | Y = $AskY) (3 decimals)</p>
</div>@
qu.2.4.answer.num=$Ans@
qu.2.4.answer.units=@
qu.2.4.showUnits=false@
qu.2.4.grading=toler_abs@
qu.2.4.err=.01@
qu.2.4.negStyle=minus@
qu.2.4.numStyle=thousands scientific dollars arithmetic@
qu.2.4.mode=Numeric@
qu.2.4.name=08+. P(X=x|Y=y)@
qu.2.4.comment=<p>Use the 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><mrow><mfenced open='(' close=')' separators=','><mrow><mi>A</mi><mo lspace='0.1111111em' rspace='0.1111111em' stretchy='true'>&verbar;</mo><mi>B</mi></mrow></mfenced></mrow><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>AB</mi></mrow></mfenced></mrow><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>B</mi></mrow></mfenced></mrow></mfrac></mrow><mrow><mi></mi></mrow></mstyle></math></p>
<p>where P(AB) is $AnsTop (the table entry corresponding to X = $Ask and Y = $AskY) and P(B) = P(Y = $AskY) = $AnsBot (the sum of the row for Y = $AskY). <em>The table with marginal probabilities filled in is shown below.&nbsp;</em> Thus:</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 lspace='0.0em' rspace='0.0em'>&#32;</mo><mrow><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ask</mi><mo lspace='0.1111111em' rspace='0.1111111em' stretchy='true'>&verbar;</mo><mi>Y</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>$AskY</mi></mrow></mfenced></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><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></mrow></mstyle></math>&nbsp;&nbsp;</p>
<table cellspacing="0" cellpadding="2" bordercolor="#111111" border="1" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td rowspan="2" colspan="2">&nbsp;</td>
            <td align="center" colspan="4"><strong>X </strong></td>
        </tr>
        <tr>
            <td align="center"><strong>$X1</strong></td>
            <td align="center"><strong>$X2</strong></td>
            <td align="center"><strong>$X3</strong></td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td rowspan="4">
            <p align="center"><strong>Y </strong></p>
            </td>
            <td align="right"><strong>$Y1</strong></td>
            <td align="right">$F_11</td>
            <td align="right">$F_12</td>
            <td align="right">$F_13</td>
            <td align="right"><strong>$F_R1</strong></td>
        </tr>
        <tr>
            <td align="right"><strong>$Y2</strong></td>
            <td align="right">$F_21</td>
            <td align="right">$F_22</td>
            <td align="right">$F_23</td>
            <td align="right"><strong>$F_R2</strong></td>
        </tr>
        <tr>
            <td><strong>$Y3</strong></td>
            <td align="right">$F_31</td>
            <td align="right">$F_32</td>
            <td align="right">$F_33</td>
            <td align="right"><strong>$F_R3</strong></td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td align="right"><strong>&nbsp;$C_1</strong></td>
            <td align="right"><strong>$C_2 <br />
            </strong></td>
            <td align="right"><strong>$C_3 <br />
            </strong></td>
            <td>&nbsp;</td>
        </tr>
    </tbody>
</table>
<p>&nbsp;</p>@
qu.2.4.editing=useHTML@
qu.2.4.solution=@
qu.2.4.algorithm=$Q="08+";
$X1=range(1,7,2);
$X2=$X1+2;
$X3=$X2+2;
$Y1=rint(5);
$Y2=$Y1+1;
$Y3=$Y1+2;
$Which=rint(3);
$WhichY=rint(3);
$Ask=switch($Which,$X1,$X2,$X3);
$AskY=switch($WhichY,$Y1,$Y2,$Y3);
$F_R1=decimal(2,range(0.2,1.0,0.05));
$F_R2=decimal(2,range(0.2,1.0,0.05));
$F_R3=1-$F_R1-$F_R2;
condition:gt($F_R3,0.15);
$F_11=decimal(2,range(0,$F_R1,0.05));
$F_12=decimal(2,range(0,$F_R1-$F_11,0.05));
$F_13=decimal(2,$F_R1-$F_11-$F_12);
$F_21=decimal(2,range(0,$F_R2,0.05));
$F_22=decimal(2,range(0,$F_R2-$F_21,0.05));
$F_23=decimal(2,$F_R2-$F_21-$F_22);
$F_31=decimal(2,range(0,$F_R3,0.05));
$F_32=decimal(2,range(0,$F_R3-$F_31,0.05));
$F_33=decimal(2,$F_R3-$F_31-$F_32);
$C_1=$F_11+$F_21+$F_31;
$C_2=$F_12+$F_22+$F_32;
$C_3=$F_13+$F_23+$F_33;
$All=[abs($F_11),abs($F_12),abs($F_13),abs($F_21),abs($F_22),abs($F_23),abs($F_31),abs($F_32),abs($F_33)];
$ShowMe=1+3*$WhichY+$Which;
$AnsTop1=maple("$All[$ShowMe]");
$AnsTop=decimal(2,$AnsTop1);
$AnsBot=switch($WhichY,$F_R1,$F_R2,$F_R3);
$Ans=decimal(2,$AnsTop/$AnsBot);@
qu.2.4.uid=c223fc3d-ca6d-44b1-826d-a3c26d56bc86@
qu.2.4.info=  Type=numeric;
  Course=230;
  Difficulty=2;
  Keyword=marginal;
  Keyword=joint;
  Author=Sean Scott;
@

qu.2.5.mode=Inline@
qu.2.5.name=04. Product Good & Bad@
qu.2.5.comment=<p>Calculate the other two manufacturers' market share of good items like the example shows:</p>
<p>$B's "good" market share = <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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'>$BG</mi><mrow><mn>100</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi mathvariant='normal'>$BShare</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$BMSG</mi></mrow></mstyle></math></p>
<p>$B's "good" market share = <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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'>$CG</mi><mrow><mn>100</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi mathvariant='normal'>$CShare</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$CMSG</mi></mrow></mstyle></math></p>
<p>The market share in defective items could be calculated similarly:</p>
<p>$A's "bad" market share = <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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'>$AD</mi><mrow><mn>100</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi mathvariant='normal'>$AShare</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$AMSD</mi></mrow></mstyle></math></p>
<p>or by subtraction:</p>
<p>$B's "bad" market share = $BShare - $BMSG = $BMSD</p>
<p>$C's "bad" market share = $CShare - $CMSG = $CMSD</p>
<center>
<table cellspacing="0" cellpadding="2" bordercolor="#111111" border="1" style="border-collapse: collapse;" id="AutoNumber1">
    <tbody>
        <tr>
            <td>&nbsp;</td>
            <td>Good</td>
            <td>Defective</td>
            <td>Total</td>
        </tr>
        <tr>
            <td>$A</td>
            <td>$AMSG%</td>
            <td>&nbsp;$AMSD%</td>
            <td>&nbsp;$AShare</td>
        </tr>
        <tr>
            <td>$B</td>
            <td>&nbsp;$BMSG%</td>
            <td>&nbsp;$BMSD%</td>
            <td>&nbsp;$BShare</td>
        </tr>
        <tr>
            <td>$C</td>
            <td>&nbsp;$CMSG%</td>
            <td>&nbsp;$CMSD%</td>
            <td>&nbsp;$CShare</td>
        </tr>
        <tr>
            <td>&nbsp;Total</td>
            <td>&nbsp;$MSG</td>
            <td>$MSD</td>
            <td>100</td>
        </tr>
    </tbody>
</table>
</center>@
qu.2.5.editing=useHTML@
qu.2.5.solution=@
qu.2.5.algorithm=$Q="04";
$Which=rint(4);
$Align=switch(rint(2),"Left","Right");
$A=switch(rint(3),"Abelmanns","Apatosaurex","Antimony");
$B=switch(rint(3),"Baryonx","Bolus","Becklespinax");
$C=switch(rint(3),"Colotix","Camerons","Coelophysis");
$AShare=range(30,65,5);
$BShare=range(20,90-$AShare,5);
$CShare=100-$AShare-$BShare;
$AD=range(3,10,1);
$AG=100-$AD;
$BD=range(3,10,1);
$BG=100-$BD;
$CD=range(3,10,1);
$CG=100-$CD;
$AMSG=$AG/100*$AShare;
$AMSD=$AShare-$AMSG;
$BMSG=$BG/100*$BShare;
$BMSD=$BShare-$BMSG;
$CMSG=$CG/100*$CShare;
$CMSD=$CShare-$CMSG;
$MSG=$AMSG+$BMSG+$CMSG;
$MSD=100-$MSG;@
qu.2.5.uid=f37a56f3-be1e-48b1-9458-496f9ba34012@
qu.2.5.info=  Type=numeric;
  Course=202;
@
qu.2.5.weighting=1,1,1,1,1@
qu.2.5.numbering=alpha@
qu.2.5.part.1.name=sro_id_1@
qu.2.5.part.1.answer.units=@
qu.2.5.part.1.numStyle=thousands scientific  arithmetic@
qu.2.5.part.1.editing=useHTML@
qu.2.5.part.1.showUnits=false@
qu.2.5.part.1.err=0.01@
qu.2.5.part.1.question=(Unset)@
qu.2.5.part.1.mode=Numeric@
qu.2.5.part.1.grading=toler_abs@
qu.2.5.part.1.negStyle=minus@
qu.2.5.part.1.answer.num=$AMSD@
qu.2.5.part.2.name=sro_id_2@
qu.2.5.part.2.answer.units=@
qu.2.5.part.2.numStyle=thousands scientific  arithmetic@
qu.2.5.part.2.editing=useHTML@
qu.2.5.part.2.showUnits=false@
qu.2.5.part.2.err=0.01@
qu.2.5.part.2.question=(Unset)@
qu.2.5.part.2.mode=Numeric@
qu.2.5.part.2.grading=toler_abs@
qu.2.5.part.2.negStyle=minus@
qu.2.5.part.2.answer.num=$BMSG@
qu.2.5.part.3.name=sro_id_3@
qu.2.5.part.3.answer.units=@
qu.2.5.part.3.numStyle=thousands scientific  arithmetic@
qu.2.5.part.3.editing=useHTML@
qu.2.5.part.3.showUnits=false@
qu.2.5.part.3.err=0.01@
qu.2.5.part.3.question=(Unset)@
qu.2.5.part.3.mode=Numeric@
qu.2.5.part.3.grading=toler_abs@
qu.2.5.part.3.negStyle=minus@
qu.2.5.part.3.answer.num=$BMSD@
qu.2.5.part.4.name=sro_id_4@
qu.2.5.part.4.answer.units=@
qu.2.5.part.4.numStyle=thousands scientific  arithmetic@
qu.2.5.part.4.editing=useHTML@
qu.2.5.part.4.showUnits=false@
qu.2.5.part.4.err=0.01@
qu.2.5.part.4.question=(Unset)@
qu.2.5.part.4.mode=Numeric@
qu.2.5.part.4.grading=toler_abs@
qu.2.5.part.4.negStyle=minus@
qu.2.5.part.4.answer.num=$CMSG@
qu.2.5.part.5.name=sro_id_5@
qu.2.5.part.5.answer.units=@
qu.2.5.part.5.numStyle=thousands scientific  arithmetic@
qu.2.5.part.5.editing=useHTML@
qu.2.5.part.5.showUnits=false@
qu.2.5.part.5.err=0.01@
qu.2.5.part.5.question=(Unset)@
qu.2.5.part.5.mode=Numeric@
qu.2.5.part.5.grading=toler_abs@
qu.2.5.part.5.negStyle=minus@
qu.2.5.part.5.answer.num=$CMSD@
qu.2.5.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Conditional Probability/Q$Q"><img hspace="4" align="$Align" title="Manufacturing [IMG:Factory$Which.gif]" src="__BASE_URI__DMD/CP/Factory$Which.gif" alt="Manufacturing" />Three manufacturers $A, $B, and $C share a market for a product. Their market shares are $AShare%, $BShare% and $CShare% respectively. Testing has shown that the defective rate of production for the three manufacturers is $AD%, $BD%, and $CD% respectively. Fill in the following table. <strong>Use <u>percent values</u>, not probabilities</strong> (for example enter 31 instead of 0.31)<strong>.</strong> 3 decimal accuracy please<p>Done for you is the market share of non-defective products for Manufacturer $A. It was calculated by determining that 100 - $AD = $AG% of A's product is non-defective, and since A's market share is $AShare% we have A's market share in non-defective product 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'>$AG</mi></mrow><mrow><mn>100</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi mathvariant='normal'>$AShare</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$AMSG</mi></mrow></mstyle></math>% . That is $AMSG% of the total sales in this product consists of non-defective items from $A.&nbsp;</p><center><table cellspacing="0" cellpadding="2" bordercolor="#111111" border="1" id="AutoNumber1" style="border-collapse: collapse;">    <tbody>        <tr>            <td>&nbsp;</td>            <td>Good</td>            <td>Defective</td>            <td>Total</td>        </tr>        <tr>            <td>$A</td>            <td>&nbsp;$AMSG%</td>            <td><span>&nbsp;</span><1><span>&nbsp;</span> %</td>            <td>&nbsp;$AShare</td>        </tr>        <tr>            <td>$B</td>            <td>&nbsp;<span>&nbsp;</span><2><span> </span>%</td>            <td>&nbsp;<span>&nbsp;</span><3><span> </span>%</td>            <td>&nbsp;$BShare</td>        </tr>        <tr>            <td>$C</td>            <td>&nbsp;<span>&nbsp;</span><4><span> </span>%</td>            <td>&nbsp;<span>&nbsp;</span><5><span> %<br />            </span></td>            <td>&nbsp;$CShare</td>        </tr>        <tr>            <td>&nbsp;Total</td>            <td>&nbsp;$MSG</td>            <td>&nbsp;$MSD</td>            <td>&nbsp;100</td>        </tr>    </tbody></table></center></div>@

qu.3.topic=Expected Value@

qu.3.1.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Expected Value/Q$Q">Shown here is a table for a probability distribution for r.v. X and Y. <br />
<br />
<table cellspacing="0" cellpadding="3" bordercolor="#111111" border="1">
    <tbody>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center" colspan="3"><strong>X</strong></td>
        </tr>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center"><strong>$x1</strong></td>
            <td align="center"><span style="font-weight: bold;">$x2</span></td>
            <td align="center"><span style="font-weight: bold;">$x3</span></td>
        </tr>
        <tr valign="middle">
            <td rowspan="3"><strong>Y</strong></td>
            <td align="right" style="font-weight: bold;">$y1</td>
            <td align="right">$F11</td>
            <td align="right">$F21</td>
            <td align="right">$F31</td>
        </tr>
        <tr valign="bottom">
            <td align="right" x:num="" style="font-weight: bold;">$y2</td>
            <td align="right">$F12</td>
            <td align="right">$F22</td>
            <td align="right">$F32</td>
        </tr>
        <tr valign="bottom">
            <td align="right" style="font-weight: bold;">$y3</td>
            <td align="right">$F13</td>
            <td align="right">$F23</td>
            <td align="right">$F33</td>
        </tr>
    </tbody>
</table>
<p><br />
Find E(XY) (3 decimals)</p>
</div>
<p>&nbsp;</p>@
qu.3.1.answer.num=$Ans@
qu.3.1.answer.units=@
qu.3.1.showUnits=false@
qu.3.1.grading=toler_abs@
qu.3.1.err=.01@
qu.3.1.negStyle=minus@
qu.3.1.numStyle=thousands scientific dollars arithmetic@
qu.3.1.mode=Numeric@
qu.3.1.name=04. Find E(XY) with Joint@
qu.3.1.comment=<p>You need to sum up all terms of the form x<sub>i</sub>y<sub>j</sub>f(x<sub>i</sub>,y<sub>j</sub>) for i,j = 1,2,3 . Fortunately since y<sub>2</sub> = 0 we can eliminate terms with j = 2. Thus:</p>
<p>E(XY) = $x1($y1)$F11 + $x1($y3)$F13 + $x2($y1)$F21 + $x2($y3)$F23 + $x3($y1)$F31 + $x3($y3)$F33 = $Ans</p>@
qu.3.1.editing=useHTML@
qu.3.1.solution=@
qu.3.1.algorithm=$Q="04";
$x1=range(1,5,1);
$x2=$x1+range(1,3,1);
$x3=$x2+range(1,3,1);
$x=($x1,$x2,$x3);
$y1=range(-5,-1,2);
$y2=0;
$y3=-$y1;
$y=($y1,$y2,$y3);
$fx1=decimal(2,range(0.1,0.5,0.05));
$fx2=decimal(2,range(0.1,0.5,0.05));
$fx3=1-$fx2-$fx1;
$fy1=decimal(2,range(0.1,0.5,0.05));
$fy2=decimal(2,range(0.1,0.5,0.05));
$fy3=1-$fy2-$fy1;
$F11=$fx1*$fy1;
$F12=$fx1*$fy2;
$F13=$fx1*$fy3;
$F21=$fx2*$fy1;
$F22=$fx2*$fy2;
$F23=$fx2*$fy3;
$F31=$fx3*$fy1;
$F32=$fx3*$fy2;
$F33=$fx3*$fy3;
$Ans=$x1*$y1*$F11 + $x1*$y3*$F13 + $x2*$y1*$F21 + $x2*$y3*$F23 + $x3*$y1*$F31 + $x3*$y3*$F33;@
qu.3.1.uid=e1a301dd-3306-4ec1-850f-f8b3d6a29395@
qu.3.1.info=  Type=numeric;
  Course=230;
  Diificulty=2;
  Keyword=joint;
  Keyword=expected value;
  Author=Sean Scott;
@

qu.3.2.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Expected Value/Q$Q">Shown here is a table for a probability distribution for r.v. X and Y. <br />
<br />
<table cellspacing="0" cellpadding="3" bordercolor="#111111" border="1">
    <tbody>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center" colspan="3"><strong>X</strong></td>
        </tr>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center"><strong>$x1</strong></td>
            <td align="center"><span style="font-weight: bold;">$x2</span></td>
            <td align="center"><span style="font-weight: bold;">$x3</span></td>
        </tr>
        <tr valign="middle">
            <td rowspan="3"><strong>Y</strong></td>
            <td align="right" style="font-weight: bold;">$y1</td>
            <td align="right">$F11</td>
            <td align="right">$F21</td>
            <td align="right">$F31</td>
        </tr>
        <tr valign="bottom">
            <td align="right" style="font-weight: bold;" x:num="">$y2</td>
            <td align="right">$F12</td>
            <td align="right">$F22</td>
            <td align="right">$F32</td>
        </tr>
        <tr valign="bottom">
            <td align="right" style="font-weight: bold;">$y3</td>
            <td align="right">$F13</td>
            <td align="right">$F23</td>
            <td align="right">$F33</td>
        </tr>
    </tbody>
</table>
<p><br />
Find E(Y) (3 decimals)</p>
</div>
<p>&nbsp;</p>@
qu.3.2.answer.num=$Ans@
qu.3.2.answer.units=@
qu.3.2.showUnits=false@
qu.3.2.grading=toler_abs@
qu.3.2.err=.01@
qu.3.2.negStyle=minus@
qu.3.2.numStyle=thousands scientific dollars arithmetic@
qu.3.2.mode=Numeric@
qu.3.2.name=03. Find E(Y) with Joint@
qu.3.2.comment=<p>First, let's recreate the table with the marginals included:</p>
<p>&nbsp;</p>
<p>
<table cellspacing="0" cellpadding="3" bordercolor="#111111" border="1">
    <tbody>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center" colspan="3"><strong>X</strong></td>
            <td align="center">&nbsp;</td>
        </tr>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center"><strong>$x1</strong></td>
            <td align="center"><span style="font-weight: bold;">$x2</span></td>
            <td align="center"><span style="font-weight: bold;">$x3</span></td>
            <td align="center">&nbsp;</td>
        </tr>
        <tr valign="middle">
            <td rowspan="3"><strong>Y</strong></td>
            <td align="right" style="font-weight: bold;">$y1</td>
            <td align="right">$F11</td>
            <td align="right">$F21</td>
            <td align="right">$F31</td>
            <td align="right"><font color="#ff0000">$fy1</font></td>
        </tr>
        <tr valign="bottom">
            <td align="right" x:num="" style="font-weight: bold;">$y2</td>
            <td align="right">$F12</td>
            <td align="right">$F22</td>
            <td align="right">$F32</td>
            <td align="right"><font color="#ff0000">$fy2</font></td>
        </tr>
        <tr valign="bottom">
            <td align="right" style="font-weight: bold;">$y3</td>
            <td align="right">$F13</td>
            <td align="right">$F23</td>
            <td align="right">$F33</td>
            <td align="right"><font color="#ff0000">$fy3</font></td>
        </tr>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td align="right" style="font-weight: bold;">&nbsp;</td>
            <td align="right"><font color="#ff0000">$fx1</font></td>
            <td align="right"><font color="#ff0000">$fx2</font></td>
            <td align="right"><font color="#ff0000">$fx3</font></td>
            <td align="right">&nbsp;</td>
        </tr>
    </tbody>
</table>
<br />
To find E(Y) we just multiply the values of Y by their corresponding marginals, and sum:</p>
<p>E(Y) = $y1*$fy1 + $y2*$fy2 + $y3*$fy3 = $Ans</p>@
qu.3.2.editing=useHTML@
qu.3.2.solution=@
qu.3.2.algorithm=$Q="03";
$x1=range(1,5,1);
$x2=$x1+range(1,3,1);
$x3=$x2+range(1,3,1);
$x=($x1,$x2,$x3);
$y1=range(-5,-1,2);
$y2=0;
$y3=-$y1;
$y=($y1,$y2,$y3);
$fx1=decimal(2,range(0.1,0.5,0.05));
$fx2=decimal(2,range(0.1,0.5,0.05));
$fx3=1-$fx2-$fx1;
$fy1=decimal(2,range(0.1,0.5,0.05));
$fy2=decimal(2,range(0.1,0.5,0.05));
$fy3=1-$fy2-$fy1;
$F11=$fx1*$fy1;
$F12=$fx1*$fy2;
$F13=$fx1*$fy3;
$F21=$fx2*$fy1;
$F22=$fx2*$fy2;
$F23=$fx2*$fy3;
$F31=$fx3*$fy1;
$F32=$fx3*$fy2;
$F33=$fx3*$fy3;
$Ans=$y1*$fy1 + $y2*$fy2 + $y3*$fy3;@
qu.3.2.uid=ff8c0167-898d-40b1-9247-2b8e3b58875f@
qu.3.2.info=  Type=numeric;
  Course=230;
  Diificulty=2;
  Keyword=joint;
  Keyword=expected value;
  Keyword=marginal;
  Author=Sean Scott;
@

qu.3.3.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Expected Value/Q$Q">Shown here is a table for a probability distribution for r.v. X and Y. <br />
<br />
<table cellspacing="0" cellpadding="3" bordercolor="#111111" border="1">
    <tbody>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center" colspan="3"><strong>X</strong></td>
        </tr>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center"><strong>$x1</strong></td>
            <td align="center"><span style="font-weight: bold;">$x2</span></td>
            <td align="center"><span style="font-weight: bold;">$x3</span></td>
        </tr>
        <tr valign="middle">
            <td rowspan="3"><strong>Y</strong></td>
            <td align="right" style="font-weight: bold;">$y1</td>
            <td align="right">$F11</td>
            <td align="right">$F21</td>
            <td align="right">$F31</td>
        </tr>
        <tr valign="bottom">
            <td align="right" style="font-weight: bold;" x:num="">$y2</td>
            <td align="right">$F12</td>
            <td align="right">$F22</td>
            <td align="right">$F32</td>
        </tr>
        <tr valign="bottom">
            <td align="right" style="font-weight: bold;">$y3</td>
            <td align="right">$F13</td>
            <td align="right">$F23</td>
            <td align="right">$F33</td>
        </tr>
    </tbody>
</table>
<p><br />
Find Var(X) (3 decimals)</p>
</div>
<p>&nbsp;</p>@
qu.3.3.answer.num=$Ans@
qu.3.3.answer.units=@
qu.3.3.showUnits=false@
qu.3.3.grading=toler_abs@
qu.3.3.err=.01@
qu.3.3.negStyle=minus@
qu.3.3.numStyle=thousands scientific dollars arithmetic@
qu.3.3.mode=Numeric@
qu.3.3.name=02. Var(X) with Joint@
qu.3.3.comment=<p>First, let's recreate the table with the marginals included:&nbsp;</p>
<p>
<table cellspacing="0" cellpadding="3" bordercolor="#111111" border="1">
    <tbody>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center" colspan="3"><strong>X</strong></td>
            <td align="center">&nbsp;</td>
        </tr>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center"><strong>$x1</strong></td>
            <td align="center"><span style="font-weight: bold;">$x2</span></td>
            <td align="center"><span style="font-weight: bold;">$x3</span></td>
            <td align="center">&nbsp;</td>
        </tr>
        <tr valign="middle">
            <td rowspan="3"><strong>Y</strong></td>
            <td align="right" style="font-weight: bold;">$y1</td>
            <td align="right">$F11</td>
            <td align="right">$F21</td>
            <td align="right">$F31</td>
            <td align="right"><font color="#ff0000">$fy1</font></td>
        </tr>
        <tr valign="bottom">
            <td align="right" style="font-weight: bold;" x:num="">$y2</td>
            <td align="right">$F12</td>
            <td align="right">$F22</td>
            <td align="right">$F32</td>
            <td align="right"><font color="#ff0000">$fy2</font></td>
        </tr>
        <tr valign="bottom">
            <td align="right" style="font-weight: bold;">$y3</td>
            <td align="right">$F13</td>
            <td align="right">$F23</td>
            <td align="right">$F33</td>
            <td align="right"><font color="#ff0000">$fy3</font></td>
        </tr>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td align="right" style="font-weight: bold;">&nbsp;</td>
            <td align="right"><font color="#ff0000">$fx1</font></td>
            <td align="right"><font color="#ff0000">$fx2</font></td>
            <td align="right"><font color="#ff0000">$fx3</font></td>
            <td align="right">&nbsp;</td>
        </tr>
    </tbody>
</table>
<br />
To find E(X) we just multiply the values of X by their corresponding marginals, and sum:</p>
<p>E(X) = $x1*$fx1 + $x2*$fx2 + $x3*$fx3 = $EX</p>
<p>Now find Var(X) by using the definition:</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>3</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><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><msub><mi>x</mi><mrow><mi>i</mi></mrow></msub></mrow></mfenced></mrow></mstyle></math></p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mi mathvariant='normal'>$x1</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi mathvariant='normal'>$EX</mi></mrow></mfenced><mrow><mn>2</mn></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi mathvariant='normal'>$fx1</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mi mathvariant='normal'>$x2</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi mathvariant='normal'>$EX</mi></mrow></mfenced><mrow><mn>2</mn></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi mathvariant='normal'>$fx2</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mi mathvariant='normal'>$x3</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi mathvariant='normal'>$EX</mi></mrow></mfenced><mrow><mn>2</mn></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi mathvariant='normal'>$fx3</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math></p>
<p>&nbsp;</p>@
qu.3.3.editing=useHTML@
qu.3.3.solution=@
qu.3.3.algorithm=$Q="02";
$x1=range(1,5,1);
$x2=$x1+range(1,3,1);
$x3=$x2+range(1,3,1);
$x=($x1,$x2,$x3);
$y1=range(-5,-1,2);
$y2=0;
$y3=-$y1;
$y=($y1,$y2,$y3);
$fx1=decimal(2,range(0.1,0.5,0.05));
$fx2=decimal(2,range(0.1,0.5,0.05));
$fx3=1-$fx2-$fx1;
$fy1=decimal(2,range(0.1,0.5,0.05));
$fy2=decimal(2,range(0.1,0.5,0.05));
$fy3=1-$fy2-$fy1;
$F11=$fx1*$fy1;
$F12=$fx1*$fy2;
$F13=$fx1*$fy3;
$F21=$fx2*$fy1;
$F22=$fx2*$fy2;
$F23=$fx2*$fy3;
$F31=$fx3*$fy1;
$F32=$fx3*$fy2;
$F33=$fx3*$fy3;
$EX=$x1*$fx1 + $x2*$fx2 + $x3*$fx3;
$Ans=$fx1*($x1-$EX)^2+$fx2*($x2-$EX)^2+$fx3*($x3-$EX)^2;@
qu.3.3.uid=1ac51280-5d34-4de2-bf40-0e59c292f9b6@
qu.3.3.info=  Course=230;
  Type=numeric;
  Diificulty=2;
  Keyword=joint;
  Keyword=marginal;
@

qu.3.4.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Expected Value/Q$Q">Shown here is a table for a probability distribution for r.v. X and Y. <br />
<br />
<table cellspacing="0" cellpadding="3" bordercolor="#111111" border="1">
    <tbody>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center" colspan="3"><strong>X</strong></td>
        </tr>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center"><strong>$x1</strong></td>
            <td align="center"><span style="font-weight: bold;">$x2</span></td>
            <td align="center"><span style="font-weight: bold;">$x3</span></td>
        </tr>
        <tr valign="middle">
            <td rowspan="3"><strong>Y</strong></td>
            <td align="right" style="font-weight: bold;">$y1</td>
            <td align="right">$F11</td>
            <td align="right">$F21</td>
            <td align="right">$F31</td>
        </tr>
        <tr valign="bottom">
            <td align="right" style="font-weight: bold;" x:num="">$y2</td>
            <td align="right">$F12</td>
            <td align="right">$F22</td>
            <td align="right">$F32</td>
        </tr>
        <tr valign="bottom">
            <td align="right" style="font-weight: bold;">$y3</td>
            <td align="right">$F13</td>
            <td align="right">$F23</td>
            <td align="right">$F33</td>
        </tr>
    </tbody>
</table>
<p><br />
Find E($AD\\X $BS $BD\\Y)&nbsp;&nbsp; (3 decimals)</p>
</div>
<p>&nbsp;</p>@
qu.3.4.answer.num=$Ans@
qu.3.4.answer.units=@
qu.3.4.showUnits=false@
qu.3.4.grading=toler_abs@
qu.3.4.err=.01@
qu.3.4.negStyle=minus@
qu.3.4.numStyle=thousands scientific dollars arithmetic@
qu.3.4.mode=Numeric@
qu.3.4.name=05. E(aX+bY) with Joint@
qu.3.4.comment=<p>First, let's recreate the table with the marginals included:&nbsp;</p>
<p>
<table cellspacing="0" cellpadding="3" bordercolor="#111111" border="1">
    <tbody>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center" colspan="3"><strong>X</strong></td>
            <td align="center">&nbsp;</td>
        </tr>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center"><strong>$x1</strong></td>
            <td align="center"><span style="font-weight: bold;">$x2</span></td>
            <td align="center"><span style="font-weight: bold;">$x3</span></td>
            <td align="center">&nbsp;</td>
        </tr>
        <tr valign="middle">
            <td rowspan="3"><strong>Y</strong></td>
            <td align="right" style="font-weight: bold;">$y1</td>
            <td align="right">$F11</td>
            <td align="right">$F21</td>
            <td align="right">$F31</td>
            <td align="right"><font color="#ff0000">$fy1</font></td>
        </tr>
        <tr valign="bottom">
            <td align="right" x:num="" style="font-weight: bold;">$y2</td>
            <td align="right">$F12</td>
            <td align="right">$F22</td>
            <td align="right">$F32</td>
            <td align="right"><font color="#ff0000">$fy2</font></td>
        </tr>
        <tr valign="bottom">
            <td align="right" style="font-weight: bold;">$y3</td>
            <td align="right">$F13</td>
            <td align="right">$F23</td>
            <td align="right">$F33</td>
            <td align="right"><font color="#ff0000">$fy3</font></td>
        </tr>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td align="right" style="font-weight: bold;">&nbsp;</td>
            <td align="right"><font color="#ff0000">$fx1</font></td>
            <td align="right"><font color="#ff0000">$fx2</font></td>
            <td align="right"><font color="#ff0000">$fx3</font></td>
            <td align="right">&nbsp;</td>
        </tr>
    </tbody>
</table>
<br />
To find E(X) [ E(Y)] we just multiply the values of X [Y] by their corresponding marginals, and sum:</p>
<p>E(X) = $x1*$fx1 + $x2*$fx2 + $x3*$fx3 = $EX</p>
<p>E(Y) = $y1*$fy1 + $y2*$fy2 + $y3*$fy3 = $EY</p>
<p>Then: <font size="3" face="Times New Roman">E($AD\\X $BS $BD\\Y) = E($AD\\X) $MidSign E($BD\\Y) = $AD\\E(X) $MidSign $BD\\E(Y)</font></p>
<p><font size="3" face="Times New Roman">= $AD($EX) $MidSign $BD($EY) = $Ans</font></p>@
qu.3.4.editing=useHTML@
qu.3.4.solution=@
qu.3.4.algorithm=$Q="05";
$x1=range(1,5,1);
$x2=$x1+range(1,3,1);
$x3=$x2+range(1,3,1);
$x=($x1,$x2,$x3);
$y1=range(-5,-1,2);
$y2=0;
$y3=-$y1;
$y=($y1,$y2,$y3);
$fx1=decimal(2,range(0.1,0.5,0.05));
$fx2=decimal(2,range(0.1,0.5,0.05));
$fx3=1-$fx2-$fx1;
$fy1=decimal(2,range(0.1,0.5,0.05));
$fy2=decimal(2,range(0.1,0.5,0.05));
$fy3=1-$fy2-$fy1;
$F11=$fx1*$fy1;
$F12=$fx1*$fy2;
$F13=$fx1*$fy3;
$F21=$fx2*$fy1;
$F22=$fx2*$fy2;
$F23=$fx2*$fy3;
$F31=$fx3*$fy1;
$F32=$fx3*$fy2;
$F33=$fx3*$fy3;
$EX=$x1*$fx1 + $x2*$fx2 + $x3*$fx3;
$EY=$y1*$fy1 + $y2*$fy2 + $y3*$fy3;
$A=range(1,5)*-1^rint(2);
$B=range(1,5)*-1^rint(2);
$AS=if(lt($A,0),"-","+");
$BS=if(lt($B,0),"-","+");
$AA=abs($A);
$BA=abs($B);
$AD=if(eq($A,-1),"-",if(eq($A,1),"",$A));
$BD=if(eq($BA,1),"",$BA);
$Display1=mathml("$A*X+$B*Y");
$MidSign=if(lt($B,0),"-","+");
$Display2A=mathml("$A*X");
$Ba=abs($B);
$Display2B=mathml("$Ba*Y");
$Ans=$A*$EX+$B*$EY;@
qu.3.4.uid=6ccd8d92-884f-494c-920a-ae3d354a1473@
qu.3.4.info=  Type=numeric;
  Course=230;
  Diificulty=2;
  Keyword=joint;
  Author=Sean Scott;
  Keyword=marginal;
@

qu.3.5.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Expected Value/Q$Q">Suppose X and Y are two random variables with E(X) = $EX; E(Y ) = $EY . Let U = $U. Find E(U) (3 decimal accuracy please).</div>@
qu.3.5.answer.num=$Ans@
qu.3.5.answer.units=@
qu.3.5.showUnits=false@
qu.3.5.grading=toler_abs@
qu.3.5.err=.01@
qu.3.5.negStyle=minus@
qu.3.5.numStyle=thousands scientific dollars arithmetic@
qu.3.5.mode=Numeric@
qu.3.5.name=07. Linear Combination of RVs@
qu.3.5.comment=<p>The Expected Value of a linear combination of R.V. is just the same linear combination of the expected values - remembering that E(constant) = constant. So:</p>
<p>E(U) = $EU = $Ans</p>
<p>&nbsp;</p>@
qu.3.5.editing=useHTML@
qu.3.5.solution=@
qu.3.5.algorithm=$Q="07";
$EX=range(-9,9);
$EY=range(-5,7);
$XCoeff = range(-3,7,1);
$YCoeff=range(-6,6,1);
condition:ne(0,$XCoeff*$YCoeff);
$Const=range(-5,10,1);
$U=maple("printf(MathML:-ExportPresentation($XCoeff*X + ($YCoeff)*Y + ($Const)))");
$EU=maple("printf(MathML:-ExportPresentation($XCoeff*E(X) + ($YCoeff)*E(Y) + ($Const)))");
$Ans=$XCoeff*$EX+$YCoeff*$EY+$Const;@
qu.3.5.uid=4a814b72-972b-4cab-93f2-9ee01883b70c@
qu.3.5.info=  Type=numeric;
  Course=230;
  Difficulty=1;
  Author=Sean Scott;
  Keyword=expected value;
@

qu.3.6.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Expected Value/Q$Q">Shown here is a table for a probability distribution for r.v. X and Y.<br />
<br />
<table cellspacing="0" cellpadding="3" bordercolor="#111111" border="1">
    <tbody>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center" colspan="3"><strong>X</strong></td>
        </tr>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center"><strong>$x1</strong></td>
            <td align="center"><span style="font-weight: bold;">$x2</span></td>
            <td align="center"><span style="font-weight: bold;">$x3</span></td>
        </tr>
        <tr valign="middle">
            <td rowspan="3"><strong>Y</strong></td>
            <td align="right" style="font-weight: bold;">$y1</td>
            <td align="right">$F11</td>
            <td align="right">$F21</td>
            <td align="right">$F31</td>
        </tr>
        <tr valign="bottom">
            <td align="right" x:num="" style="font-weight: bold;">$y2</td>
            <td align="right">$F12</td>
            <td align="right">$F22</td>
            <td align="right">$F32</td>
        </tr>
        <tr valign="bottom">
            <td align="right" style="font-weight: bold;">$y3</td>
            <td align="right">$F13</td>
            <td align="right">$F23</td>
            <td align="right">$F33</td>
        </tr>
    </tbody>
</table>
<p><br />
Find E(X) (3 decimals)</p>
</div>
<p>&nbsp;</p>@
qu.3.6.answer.num=$Ans@
qu.3.6.answer.units=@
qu.3.6.showUnits=false@
qu.3.6.grading=toler_abs@
qu.3.6.err=.01@
qu.3.6.negStyle=minus@
qu.3.6.numStyle=thousands scientific dollars arithmetic@
qu.3.6.mode=Numeric@
qu.3.6.name=01. Find E(X) with Joint@
qu.3.6.comment=<p>First, let's recreate the table with the marginals included:</p>
<p>&nbsp;</p>
<p>
<table cellspacing="0" cellpadding="3" bordercolor="#111111" border="1">
    <tbody>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center" colspan="3"><strong>X</strong></td>
            <td align="center">&nbsp;</td>
        </tr>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center"><strong>$x1</strong></td>
            <td align="center"><span style="font-weight: bold;">$x2</span></td>
            <td align="center"><span style="font-weight: bold;">$x3</span></td>
            <td align="center">&nbsp;</td>
        </tr>
        <tr valign="middle">
            <td rowspan="3"><strong>Y</strong></td>
            <td align="right" style="font-weight: bold;">$y1</td>
            <td align="right">$F11</td>
            <td align="right">$F21</td>
            <td align="right">$F31</td>
            <td align="right"><font color="#ff0000">$fy1</font></td>
        </tr>
        <tr valign="bottom">
            <td align="right" style="font-weight: bold;" x:num="">$y2</td>
            <td align="right">$F12</td>
            <td align="right">$F22</td>
            <td align="right">$F32</td>
            <td align="right"><font color="#ff0000">$fy2</font></td>
        </tr>
        <tr valign="bottom">
            <td align="right" style="font-weight: bold;">$y3</td>
            <td align="right">$F13</td>
            <td align="right">$F23</td>
            <td align="right">$F33</td>
            <td align="right"><font color="#ff0000">$fy3</font></td>
        </tr>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td align="right" style="font-weight: bold;">&nbsp;</td>
            <td align="right"><font color="#ff0000">$fx1</font></td>
            <td align="right"><font color="#ff0000">$fx2</font></td>
            <td align="right"><font color="#ff0000">$fx3</font></td>
            <td align="right">&nbsp;</td>
        </tr>
    </tbody>
</table>
<br />
To find E(X) we just multiply the values of X by their corresponding marginals, and sum:</p>
<p>E(X) = $x1*$fx1 + $x2*$fx2 + $x3*$fx3 = $Ans</p>@
qu.3.6.editing=useHTML@
qu.3.6.solution=@
qu.3.6.algorithm=$Q="01";
$x1=range(1,5,1);
$x2=$x1+range(1,3,1);
$x3=$x2+range(1,3,1);
$x=($x1,$x2,$x3);
$y1=range(-5,-1,2);
$y2=0;
$y3=-$y1;
$y=($y1,$y2,$y3);
$fx1=decimal(2,range(0.1,0.5,0.05));
$fx2=decimal(2,range(0.1,0.5,0.05));
$fx3=1-$fx2-$fx1;
$fy1=decimal(2,range(0.1,0.5,0.05));
$fy2=decimal(2,range(0.1,0.5,0.05));
$fy3=1-$fy2-$fy1;
$F11=$fx1*$fy1;
$F12=$fx1*$fy2;
$F13=$fx1*$fy3;
$F21=$fx2*$fy1;
$F22=$fx2*$fy2;
$F23=$fx2*$fy3;
$F31=$fx3*$fy1;
$F32=$fx3*$fy2;
$F33=$fx3*$fy3;
$Ans=$x1*$fx1 + $x2*$fx2 + $x3*$fx3;@
qu.3.6.uid=8211f75c-e60f-46f9-9860-073bcf52f31e@
qu.3.6.info=  Course=230;
  Type=numeric;
  Diificulty=2;
  Keyword=joint;
  Keyword=expected value;
  Keyword=marginal;
@

qu.3.7.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Expected Value/Q$Q">Given the following joint probability distribution of X and Y : <br />
&nbsp;<br />
<table cellspacing="0" cellpadding="3" bordercolor="#111111" border="1">
    <tbody>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center" colspan="3"><strong>X</strong></td>
        </tr>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center"><strong>$x1</strong></td>
            <td align="center"><span style="font-weight: bold;">$x2</span></td>
            <td align="center"><span style="font-weight: bold;">$x3</span></td>
        </tr>
        <tr valign="middle">
            <td rowspan="3"><strong>Y</strong></td>
            <td align="right" style="font-weight: bold;">$y1</td>
            <td align="right">$F11</td>
            <td align="right">$F21</td>
            <td align="right">$F31</td>
        </tr>
        <tr valign="bottom">
            <td align="right" style="font-weight: bold;" x:num="">$y2</td>
            <td align="right">$F12</td>
            <td align="right">$F22</td>
            <td align="right">$F32</td>
        </tr>
        <tr valign="bottom">
            <td align="right" style="font-weight: bold;">$y3</td>
            <td align="right">$F13</td>
            <td align="right">$F23</td>
            <td align="right">$F33</td>
        </tr>
    </tbody>
</table>
<p><br />
Find E(X + Y). Answer to 3 decimal accuracy.</p>
<p>Hint: X + Y takes on values 2,3,4,5, and 6. Build the probability distribution for Z = X + Y.</p>
</div>@
qu.3.7.answer.num=$EZ@
qu.3.7.answer.units=@
qu.3.7.showUnits=false@
qu.3.7.grading=toler_abs@
qu.3.7.err=.01@
qu.3.7.negStyle=minus@
qu.3.7.numStyle=thousands scientific dollars arithmetic@
qu.3.7.mode=Numeric@
qu.3.7.name=06. Find E(X+Y)@
qu.3.7.comment=<p>With Z = X + Y this question is answered by exhaustively calculating each value of P(Z = z) for z = 2,3,4,5,6.</p>
<p>P(Z = 2) = P(X=1,Y=1) = $F11<br />
P(Z = 3) = P(X=1,Y=2) + P(X=2,Y=1) = $F12 + $F21 = $pz3<br />
P(Z = 4) = P(X=1,Y=3) + P(X=2,Y=2) + P(X=3,Y=1)&nbsp; + P(X=1,Y=3) = $F13 + $F22 + $F31 = $pz4<br />
P(Z = 5) = P(X=2,Y=3) + P(X=3,Y=2) = $F23 + $F32 = $pz5<br />
P(Z = 6) = P(X=3,Y=3) = $F33</p>
<p>That gives you the pdf for Z. The Expected Value is then determined as usual:</p>
<p>E(Z) = 2*$pz2+3*$pz3+4*$pz4+5*$pz5+6*$pz6 = $EZ</p>@
qu.3.7.editing=useHTML@
qu.3.7.solution=@
qu.3.7.algorithm=$Q="06";
$x1=1;
$x2=2;
$x3=3;
$x=($x1,$x2,$x3);
$y1=1;
$y2=2;
$y3=3;
$y=($y1,$y2,$y3);
$fx1=decimal(2,range(0.1,0.5,0.05));
$fx2=decimal(2,range(0.1,0.5,0.05));
$fx3=1-$fx2-$fx1;
$fy1=decimal(2,range(0.1,0.5,0.05));
$fy2=decimal(2,range(0.1,0.5,0.05));
$fy3=1-$fy2-$fy1;
$F11=$fx1*$fy1;
$F12=$fx1*$fy2;
$F13=$fx1*$fy3;
$F21=$fx2*$fy1;
$F22=$fx2*$fy2;
$F23=$fx2*$fy3;
$F31=$fx3*$fy1;
$F32=$fx3*$fy2;
$F33=$fx3*$fy3;
$pz2=$F11;
$pz3=$F12+$F21;
$pz4=$F13+$F22+$F31;
$pz5=$F23+$F32;
$pz6=$F33;
$EZ=2*$pz2+3*$pz3+4*$pz4+5*$pz5+6*$pz6;@
qu.3.7.uid=79ec6d8e-b895-43a2-9ae5-0e247bf28170@
qu.3.7.info=  Course=230;
  Author=Sean Scott;
  Type=numeric;
@

qu.4.topic=Markov Chains C891@

qu.4.1.mode=Multiple Choice@
qu.4.1.name=05b. Stock: P(up in the longterm)@
qu.4.1.comment=<p>With states ("up","down"), the transition probability matrix can be written as follows where the values labelled with * are not given but are determined so that the row sums of <span style="font-style: italic;">P</span> are all equal to one.</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 lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfenced open='[' close=']' separators=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$A11</mi></mrow></mtd><mtd><mrow><mo lspace='0.1666667em' rspace='0.1666667em'>&ast;</mo></mrow></mtd></mtr><mtr><mtd><mrow><mo lspace='0.1666667em' rspace='0.1666667em'>&ast;</mo></mrow></mtd><mtd><mrow><mi mathvariant='normal'>$A22</mi></mrow></mtd></mtr></mtable></mfenced></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><mfenced open='[' close=']' separators=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$A11</mi></mrow></mtd><mtd><mrow><mi mathvariant='normal'>$Alpha</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi mathvariant='normal'>$Beta</mi></mrow></mtd><mtd><mrow><mi mathvariant='normal'>$A22</mi></mrow></mtd></mtr></mtable></mfenced></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><mrow><mfenced open='[' close=']' separators=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><mi>&alpha;</mi></mrow></mrow></mtd><mtd><mrow><mi>&alpha;</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>&beta;</mi></mrow></mtd><mtd><mrow><mn mathvariant='italic'>1</mn><mo mathvariant='italic' lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mo mathvariant='italic' lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>&beta;</mi></mrow></mtd></mtr></mtable></mfenced></mrow></mrow></mstyle></math></p>
<p>The stationary distribution <span style="font-family: times new roman,times"><font size="3"><em>&pi;' = </em>(<em>&pi;</em><sub>0</sub>, <em>&pi;</em><sub>1</sub>)</font></span> is obtained by solving the equation <span style="font-family: times new roman,times; font-style: italic;"><font size="3">&pi;'P = &pi;'</font></span> , which can be determined from&nbsp; the off-diagonal&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>&pi;</mi><mo mathvariant='italic' lspace='0.1111111em' rspace='0.0em'>&apos;</mo><mo mathvariant='italic' lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mn mathvariant='italic'>1</mn><mrow><mi>&alpha;</mi><mo mathvariant='italic' lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mrow><mi>&beta;</mi></mrow></mrow></mfrac><mfenced open='(' close=')' separators=','><mrow><mi>&beta;</mi><mo mathvariant='italic' separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>&alpha;</mi></mrow></mfenced></mrow></mstyle></math> and 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><msub><mi>&pi;</mi><mrow><mn>0</mn></mrow></msub><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mi>&beta;</mi><mrow><mi>&alpha;</mi><mo mathvariant='italic' lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mrow><mi>&beta;</mi></mrow></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mrow><mi mathvariant='normal'>$Beta</mi></mrow><mrow><mi mathvariant='normal'>$Denom</mi></mrow></mfrac></mrow></mrow></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math>.</p>@
qu.4.1.editing=useHTML@
qu.4.1.solution=@
qu.4.1.algorithm=$Q="05b";
$A11=range(0.2,0.9,0.1);
$A22=range(0.2,0.9,0.1);
$Alpha=1-$A11;
$Beta=1-$A22;
$Denom=$Alpha+$Beta;
$Pi0=$Beta/$Denom;
$Ans=decimal(3,$Pi0);
$Alt1=decimal(3,range(0.25,0.75,0.05)*$Ans);
$Alt2=decimal(3,$Ans+range(0.25,0.75,0.05)*(1-$Ans));
$Alt3=decimal(3,0.5*($Ans+switch(rint(2),$Alt1,$Alt2)));
$GoesUp="if stock goes up on day";
$GoesDown="if stock goes down on day";
$Which=rint(5);
$Align=switch(rint(2),"Left","Right");@
qu.4.1.uid=be8922e4-d8c2-4432-9f7b-a03761338824@
qu.4.1.info=  Type=MC;
  Course=230;
  Keyword=markov;
@
qu.4.1.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Markov Chains/Q$Q"><img hspace="4" align="$Align" src="__BASE_URI__DMD/MarkovChains/Stock$Which.gif" alt="Stock Market" title="Stock Market [IMG:Stock$Which.gif]" />If a stock went up yesterday, then the probability that it goes up today is $A11. If it went down yesterday then the probability it goes down today is $A22. Let:&nbsp;
<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><msub><mi>X</mi><mrow><mi>n</mi></mrow></msub><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lcub;</mo><mfrac linethickness='0'><mrow><mn>0</mn><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow><mrow><mn>1</mn><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow></mfrac><mfrac linethickness='0'><mrow><mi mathvariant='normal'>$GoesUp</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>n</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&period;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow><mrow><mi mathvariant='normal'>$GoesDown</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>n</mi><mo lspace='0.0em' rspace='0.0em'>&period;</mo></mrow></mfrac></mrow></mstyle></math></p>
<p>and assume<em><font size="3" face="Times New Roman"> X<sub>n</sub></font></em> is a Markov Chain. Over the long-run, the probability that the stock goes up is:</p>
</div>@
qu.4.1.answer=1@
qu.4.1.choice.1=$Ans@
qu.4.1.choice.2=$Alt1@
qu.4.1.choice.3=$Alt2@
qu.4.1.choice.4=$Alt3@
qu.4.1.fixed=@

qu.4.2.mode=Multiple Choice@
qu.4.2.name=08. Stock: P(down tomorrow | up yesterday)@
qu.4.2.comment=<p>With states ("up","down"), the transition probability matrix can be written as follows where the values labelled with * are not given but are determined so that the row sums of <span style="font-style: italic;">P</span> are all equal to one.</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 lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfenced open='[' close=']' separators=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$A11</mi></mrow></mtd><mtd><mrow><mo lspace='0.1666667em' rspace='0.1666667em'>&ast;</mo></mrow></mtd></mtr><mtr><mtd><mrow><mo lspace='0.1666667em' rspace='0.1666667em'>&ast;</mo></mrow></mtd><mtd><mrow><mi mathvariant='normal'>$A22</mi></mrow></mtd></mtr></mtable></mfenced></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><mfenced open='[' close=']' separators=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$A11</mi></mrow></mtd><mtd><mrow><mi mathvariant='normal'>$Alpha</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi mathvariant='normal'>$Beta</mi></mrow></mtd><mtd><mrow><mi mathvariant='normal'>$A22</mi></mrow></mtd></mtr></mtable></mfenced></mrow></mrow></mstyle></math></p>
<p>The    two-step transition probabilities are given by the matrix&nbsp;<span class="inline-math-graphics"><span style="font-style: italic;">P<sup>2</sup></span></span>.    That is <span style="font-style: italic;" class="displayed">P(S<sub>t+2</sub> = "up"|S<sub>t</sub> = "down") </span>is    given by the (1,0) component of the matrix:</p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><msup><mi>P</mi><mrow><mn>2</mn></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><msup><mfenced open='[' close=']' separators=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$A11</mi></mrow></mtd><mtd><mrow><mi mathvariant='normal'>$Alpha</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi mathvariant='normal'>$Beta</mi></mrow></mtd><mtd><mrow><mi mathvariant='normal'>$A22</mi></mrow></mtd></mtr></mtable></mfenced><mrow><mn>2</mn></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfenced open='[' close=']' separators=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$P211</mi></mrow></mtd><mtd><mrow><mi mathvariant='normal'>$P212</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi mathvariant='normal'>$P221</mi></mrow></mtd><mtd><mrow><mi mathvariant='normal'>$P222</mi></mrow></mtd></mtr></mtable></mfenced></mrow></mrow></mstyle></math></p>
<p>So the answer is $P212 .</p>
<p>&nbsp;</p>@
qu.4.2.editing=useHTML@
qu.4.2.solution=@
qu.4.2.algorithm=$Q="08";
$A11=range(0.2,0.9,0.1);
$A22=range(0.2,0.9,0.1);
$Alpha=1-$A11;
$Beta=1-$A22;
$P211=$A11^2+$Alpha*$Beta;
$P212=$A11*$Alpha+$Alpha*$A22;
$P221=$Beta*$A11+$A22*$Beta;
$P222=$Beta*$Alpha+$A22^2;
$Ans=decimal(3,$P212);
$Alt1=decimal(3,range(0.25,0.75,0.05)*$Ans);
$Alt2=decimal(3,$Ans+range(0.25,0.75,0.05)*(1-$Ans));
$Alt3=decimal(3,0.5*($Ans+switch(rint(2),$Alt1,$Alt2)));
$GoesUp="if stock goes up on day";
$GoesDown="if stock goes down on day";
$Which=rint(5);
$Align=switch(rint(2),"Left","Right");@
qu.4.2.uid=4ab20dba-f7dc-4986-83e1-ead42dbc9e84@
qu.4.2.info=  Course=230;
  Type=MC;
  Keyword=markov;
@
qu.4.2.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Markov Chains/Q$Q"><img hspace="4" align="$Align" title="Stock Market [IMG:Stock$Which.gif]" alt="Stock Market" src="__BASE_URI__DMD/MarkovChains/Stock$Which.gif" />If a stock went up yesterday, then the probability that it goes up today is $A11.  If it went down yesterday then the probability it does down today is $A22.  Assume the process with states:<br />
<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><msub><mi>X</mi><mrow><mi>n</mi></mrow></msub><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lcub;</mo><mfrac linethickness='0'><mrow><mn>0</mn><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow><mrow><mn>1</mn><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow></mfrac><mfrac linethickness='0'><mrow><mi mathvariant='normal'>$GoesUp</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>n</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&period;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow><mrow><mi mathvariant='normal'>$GoesDown</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>n</mi><mo lspace='0.0em' rspace='0.0em'>&period;</mo></mrow></mfrac></mrow></mstyle></math>
<p>is a Markov chain. Given that the stock went up yesterday, what is the          probability that it will go down tomorrow?</p>
</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.choice.5=None of the above.@
qu.4.2.fixed=4@

qu.4.3.mode=True False@
qu.4.3.name=01. Identical rows in transition matrix@
qu.4.3.comment=<p>Since the rows of the transition matrix are identical we have:</p>
<p><font size="3" face="Times New Roman"><em>P</em>(<em>X<sub>n</sub></em><sub>+1</sub> = 1 | <em>X<sub>n</sub></em> = 0) = $A12 = <em>P</em>(<em>X<sub>n</sub></em><sub>+1</sub> = 1 | <em>X<sub>n</sub></em> = 1)</font></p>
<p>This means that for this chain the conditional distribution of <font size="3" face="Times New Roman"><em>X<sub>n</sub></em><sub>+1</sub></font> given<font size="3" face="Times New Roman"> <em>X<sub>n</sub></em> = <em>i</em></font> does not depend on<em><font size="3" face="Times New Roman"> i</font></em>, thus each<font size="3" face="Times New Roman"><em> X<sub>n</sub></em></font> is independent of the value of <font size="3" face="Times New Roman"><em>X<sub>n</sub></em><sub>-1</sub></font>.</p>@
qu.4.3.editing=useHTML@
qu.4.3.solution=@
qu.4.3.algorithm=$Q="01";
$A11=range(0.15,0.85,0.05);
$A12=1-$A11;@
qu.4.3.uid=f6828262-fb9c-4135-8f44-a24270ab50be@
qu.4.3.info=  Type=TF;
  Course=230;
@
qu.4.3.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Markov Chains/Q$Q">Consider a Markox Chain <span style="font-style: italic;">X<sub>n</sub></span> with states {0,1} and transition probability matrix:
<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 lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfenced open='[' close=']' separators=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$A11</mi></mrow></mtd><mtd><mrow><mi mathvariant='normal'>$A12</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi mathvariant='normal'>$A11</mi></mrow></mtd><mtd><mrow><mi mathvariant='normal'>$A12</mi></mrow></mtd></mtr></mtable></mfenced></mrow></mrow></mstyle></math></p>
<p>TRUE or FALSE: <span style="font-style: italic;">X<sub>n</sub> </span>is independent of <span style="font-style: italic;">X<sub>n-1</sub>.</span></p>
</div>@
qu.4.3.answer=1@
qu.4.3.choice.1=True@
qu.4.3.choice.2=False@
qu.4.3.fixed=@

qu.4.4.mode=Multiple Selection@
qu.4.4.name=09. Markov Chain Probabilities@
qu.4.4.comment=<p>In no particular order:</p>
<ul>
    <li>X<sub>n</sub> is independent of X<sub>n-1&nbsp;&nbsp; </sub><strong>TRUE</strong><sub><strong> </strong></sub>because the rows of the transition matrix are identical. That implies independence which means each state is independent of the previous state.</li>
    <li>P(X<sub>n</sub> = 1 | X<sub>0</sub> = 0) = $P1&nbsp; <strong>TRUE</strong> As above since the states are independent this is the same as P(X<sub>n</sub> = 1) which can be read from the matrix as $P1 .</li>
    <li>P(X<sub>n </sub>=1 | X<sub>0</sub> = 0) = $PNot&nbsp; <strong>FALSE</strong>&nbsp; Just refer to the previous point, and the matrix.</li>
    <li>lim<sub>n&rarr;&infin;</sub>P[X<sub>n</sub> = 1] = $P1&nbsp; <strong>TRUE</strong>&nbsp; Again, the independence of states tells us this.</li>
</ul>@
qu.4.4.editing=useHTML@
qu.4.4.solution=@
qu.4.4.algorithm=$Q=9;
$P1 = range(0.2,0.9,0.1);
$P0=1-$P1;
$PNot=min($P0,$P1)+0.1;@
qu.4.4.uid=bdb8a0d1-79a6-4fe5-aa8d-cd3ad4467ee0@
qu.4.4.info=  Course=230;
  Keyword=markov;
  Type=MS;
@
qu.4.4.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Markov Chains/Q$Q">Consider a Markov Chain X<sub>n</sub> with states {0,1} and transition probability matrix: <br />
<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 lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfenced open='[' close=']' separators=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$P0</mi></mrow></mtd><mtd><mrow><mi mathvariant='normal'>$P1</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi mathvariant='normal'>$P0</mi></mrow></mtd><mtd><mrow><mi mathvariant='normal'>$P1</mi></mrow></mtd></mtr></mtable></mfenced></mrow></mrow></mstyle></math></p>
<p>Select all of the following which are true:</p>
</div>@
qu.4.4.answer=1, 2, 4@
qu.4.4.choice.1=X<sub>n</sub> is independent of X<sub>n-1</sub>@
qu.4.4.choice.2=P(X<sub>n</sub> =1 | X<sub>0</sub> = 0) = $P1@
qu.4.4.choice.3=P(X<sub>n</sub> =1 | X<sub>0</sub> = 0) = $PNot@
qu.4.4.choice.4=lim<sub>n&#8594;&#8734;</sub>P[X<sub>n</sub> = 1] = $P1@
qu.4.4.fixed=@

qu.4.5.mode=Multiple Choice@
qu.4.5.name=06. Stock: P(up n & n+1 | down n-1)@
qu.4.5.comment=<p>Given that the stock went down at time <font size="3" face="Times New Roman"><em>t</em> = 0</font> (yesterday), the probability that it goes up at time <font size="3" face="Times New Roman"><em>t</em> = 1</font> (today) is <font size="3" face="Times New Roman">$A12</font>. Given that it goes up at time<font size="3" face="Times New Roman"> <em>t</em> = 1</font> the probability that it goes up at time <font size="3" face="Times New Roman"><em>t</em> = 2</font> (tomorrow) is <font size="3" face="Times New Roman">$A11</font> . Therefore, <font size="3" face="Times New Roman"><em>P</em>(up,up) = $A12($A11) = $Ans</font> .</p>
<p>&nbsp;</p>@
qu.4.5.editing=useHTML@
qu.4.5.solution=@
qu.4.5.algorithm=$Q="06";
$A11=range(0.2,0.9,0.1);
$A22=range(0.2,0.9,0.1);
$A12=1-$A22;
$Ans=decimal(3,$A11*$A12);
$Alt1=decimal(3,range(0.25,0.75,0.05)*$Ans);
$Alt2=decimal(3,$Ans+range(0.25,0.75,0.05)*(1-$Ans));
$Alt3=decimal(3,0.5*($Ans+switch(rint(2),$Alt1,$Alt2)));
$GoesUp="if stock goes up on day";
$GoesDown="if stock goes down on day";
$Which=rint(5);
$Align=switch(rint(2),"Left","Right");@
qu.4.5.uid=7bffe9c5-63e6-44e7-820d-7fc3d134297d@
qu.4.5.info=  Course=230;
  Type=MC;
  Keyword=markov;
@
qu.4.5.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Markov Chains/Q$Q"><img hspace="4" align="$Align" title="Stock Market [IMG:Stock$Which.gif]" alt="Stock Market" src="__BASE_URI__DMD/MarkovChains/Stock$Which.gif" />If a stock went up yesterday, then the probability that it goes up today is $A11.  If it went down yesterday then the probability it does down today is $A22.  Assume the process with states:<br />
<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><msub><mi>X</mi><mrow><mi>n</mi></mrow></msub><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lcub;</mo><mfrac linethickness='0'><mrow><mn>0</mn><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow><mrow><mn>1</mn><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow></mfrac><mfrac linethickness='0'><mrow><mi mathvariant='normal'>$GoesUp</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>n</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&period;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow><mrow><mi mathvariant='normal'>$GoesDown</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>n</mi><mo lspace='0.0em' rspace='0.0em'>&period;</mo></mrow></mfrac></mrow></mstyle></math>
<p>is a Markov chain. Given that the stock went down yesterday, what is the probability that it will go up today and tomorrow?</p>
</div>@
qu.4.5.answer=1@
qu.4.5.choice.1=$Ans@
qu.4.5.choice.2=$Alt1@
qu.4.5.choice.3=$Alt2@
qu.4.5.choice.4=$Alt3@
qu.4.5.choice.5=None of the above@
qu.4.5.fixed=4@

qu.4.6.mode=Multiple Choice@
qu.4.6.name=04. Stock: P(Up 2 days in a row)@
qu.4.6.comment=<p>With states ("up","down"), the transition probability matrix can be written as follows where the values labelled with * are not given but are determined so that the row sums of <span style="font-style: italic;">P</span> are all equal to one.</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 lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfenced open='[' close=']' separators=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$A11</mi></mrow></mtd><mtd><mrow><mo lspace='0.1666667em' rspace='0.1666667em'>&ast;</mo></mrow></mtd></mtr><mtr><mtd><mrow><mo lspace='0.1666667em' rspace='0.1666667em'>&ast;</mo></mrow></mtd><mtd><mrow><mi mathvariant='normal'>$A22</mi></mrow></mtd></mtr></mtable></mfenced></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><mfenced open='[' close=']' separators=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$A11</mi></mrow></mtd><mtd><mrow><mi mathvariant='normal'>$Alpha</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi mathvariant='normal'>$Beta</mi></mrow></mtd><mtd><mrow><mi mathvariant='normal'>$A22</mi></mrow></mtd></mtr></mtable></mfenced></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><mrow><mfenced open='[' close=']' separators=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><mi>&alpha;</mi></mrow></mrow></mtd><mtd><mrow><mi>&alpha;</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>&beta;</mi></mrow></mtd><mtd><mrow><mn mathvariant='italic'>1</mn><mo mathvariant='italic' lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mo mathvariant='italic' lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>&beta;</mi></mrow></mtd></mtr></mtable></mfenced></mrow></mrow></mstyle></math></p>
<p>The stationary distribution <span style="font-family: times new roman,times"><font size="3"><em>&pi;' = </em>(<em>&pi;</em><sub>0</sub>, <em>&pi;</em><sub>1</sub>)</font></span> is obtained by solving the equation <span style="font-family: times new roman,times; font-style: italic;"><font size="3">&pi;'P = &pi;'</font></span> , which can be determined from the off-diagonal&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>&pi;</mi><mo mathvariant='italic' lspace='0.1111111em' rspace='0.0em'>&apos;</mo><mo mathvariant='italic' lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mn mathvariant='italic'>1</mn><mrow><mi>&alpha;</mi><mo mathvariant='italic' lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mrow><mi>&beta;</mi></mrow></mrow></mfrac><mfenced open='(' close=')' separators=','><mrow><mi>&beta;</mi><mo mathvariant='italic' separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>&alpha;</mi></mrow></mfenced></mrow></mstyle></math> and 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><msub><mi>&pi;</mi><mrow><mn>0</mn></mrow></msub><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mi>&beta;</mi><mrow><mi>&alpha;</mi><mo mathvariant='italic' lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mrow><mi>&beta;</mi></mrow></mrow></mfrac><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mrow><mi mathvariant='normal'>$Beta</mi></mrow><mrow><mi mathvariant='normal'>$Denom</mi></mrow></mfrac></mrow></mrow></mrow></mstyle></math>.<br />
This is the probability that it goes up on a given day (say day <span style="font-style: italic;">t</span><span class="inline-math-graphics">)</span>    in the long run. The probability that it does up again the next day, given    that it went up on day <em>t</em> is $A11. Therefore the probability it goes up on both days 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'>$Beta</mi><mrow><mi mathvariant='normal'>$Denom</mi></mrow></mfrac><mfenced open='(' close=')' separators=','><mrow><mi mathvariant='normal'>$A11</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math>.</p>@
qu.4.6.editing=useHTML@
qu.4.6.solution=@
qu.4.6.algorithm=$Q="04";
$A11=range(0.2,0.9,0.1);
$A22=range(0.2,0.9,0.1);
$Alpha=1-$A11;
$Beta=1-$A22;
$Denom=$Alpha+$Beta;
$Pi0=$Beta/$Denom;
$Ans=decimal(3,$Pi0*$A11);
$Alt1=decimal(3,range(0.25,0.75,0.05)*$Ans);
$Alt2=decimal(3,$Ans+range(0.25,0.75,0.05)*(1-$Ans));
$Alt3=decimal(3,0.5*($Ans+switch(rint(2),$Alt1,$Alt2)));
$GoesUp="if stock goes up on day";
$GoesDown="if stock goes down on day";
$Which=rint(5);
$Align=switch(rint(2),"Left","Right");@
qu.4.6.uid=a816069a-8610-4e72-8f99-0b3ae0e8edf8@
qu.4.6.info=  Type=MC;
  Course=230;
  Keyword=markov;
@
qu.4.6.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Markov Chains/Q$Q"><img hspace="4" align="$Align" title="Stock Market [IMG:Stock$Which.gif]" alt="Stock Market" src="__BASE_URI__DMD/MarkovChains/Stock$Which.gif" />If a stock went up yesterday, then the probability that it goes up today is $A11.  If it went down yesterday then the probability it does down today is $A22.  Assume the process with states:<br />
<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><msub><mi>X</mi><mrow><mi>n</mi></mrow></msub><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lcub;</mo><mfrac linethickness='0'><mrow><mn>0</mn><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow><mrow><mn>1</mn><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow></mfrac><mfrac linethickness='0'><mrow><mi mathvariant='normal'>$GoesUp</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>n</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&period;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow><mrow><mi mathvariant='normal'>$GoesDown</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>n</mi><mo lspace='0.0em' rspace='0.0em'>&period;</mo></mrow></mfrac></mrow></mstyle></math>
<p>is a Markov chain.Then in the long-run, the probability that the stock goes up two days in a row is:</p>
</div>@
qu.4.6.answer=1@
qu.4.6.choice.1=$Ans@
qu.4.6.choice.2=$Alt1@
qu.4.6.choice.3=$Alt2@
qu.4.6.choice.4=$Alt3@
qu.4.6.fixed=@

qu.4.7.mode=Multiple Choice@
qu.4.7.name=9A. Stock up & down@
qu.4.7.comment=<p>With states ("up","down"), the transition probability matrix can be written as follows where the values labelled with * are not given but are determined so that the row sums of <span style="font-style: italic;">P</span> are all equal to one.</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 lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfenced open='[' close=']' separators=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi>$A11</mi></mrow></mtd><mtd><mrow><mo lspace='0.1666667em' rspace='0.1666667em'>&ast;</mo></mrow></mtd></mtr><mtr><mtd><mrow><mo lspace='0.1666667em' rspace='0.1666667em'>&ast;</mo></mrow></mtd><mtd><mrow><mi>$A22</mi></mrow></mtd></mtr></mtable></mfenced></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><mfenced open='[' close=']' separators=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi>$A11</mi></mrow></mtd><mtd><mrow><mi>$Alpha</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>$Beta</mi></mrow></mtd><mtd><mrow><mi>$A22</mi></mrow></mtd></mtr></mtable></mfenced></mrow></mrow></mstyle></math></p>
<p>The    two-step transition probabilities are given by the matrix&nbsp;<span class="inline-math-graphics"><span style="font-style: italic;">P<sup>2</sup></span></span>.    That is <span class="displayed" style="font-style: italic;">P(S<sub>t+2</sub> = "up"|S<sub>t</sub> = "down") </span>is    given by the (1,0) component of the matrix:</p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><msup><mi>P</mi><mrow><mn>2</mn></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><msup><mfenced open='[' close=']' separators=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi>$A11</mi></mrow></mtd><mtd><mrow><mi>$Alpha</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>$Beta</mi></mrow></mtd><mtd><mrow><mi>$A22</mi></mrow></mtd></mtr></mtable></mfenced><mrow><mn>2</mn></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfenced open='[' close=']' separators=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi>$P211</mi></mrow></mtd><mtd><mrow><mi>$P212</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>$P221</mi></mrow></mtd><mtd><mrow><mi>$P222</mi></mrow></mtd></mtr></mtable></mfenced></mrow></mrow></mstyle></math></p>
<p>So the correct answer is $P212 . Since that is not one of the choices, "None of the above" is the answer.</p>
<p>&nbsp;</p>@
qu.4.7.editing=useHTML@
qu.4.7.solution=@
qu.4.7.algorithm=$Q="8A";
$A11=range(0.2,0.9,0.1);
$A22=range(0.2,0.9,0.1);
$Alpha=1-$A11;
$Beta=1-$A22;
$P211=$A11^2+$Alpha*$Beta;
$P212=$A11*$Alpha+$Alpha*$A22;
$P221=$Beta*$A11+$A22*$Beta;
$P222=$Beta*$Alpha+$A22^2;
$Ans=decimal(3,$P212);
$NotAns=decimal(3,0.85*$Ans);
$Alt1=decimal(3,range(0.25,0.75,0.05)*$Ans);
$Alt2=decimal(3,$Ans+range(0.25,0.75,0.05)*(1-$Ans));
$Alt3=decimal(3,0.5*($Ans+switch(rint(2),$Alt1,$Alt2)));@
qu.4.7.uid=5bd3193a-aa0f-4718-8528-bda381861f57@
qu.4.7.question=<div title="STAT230/Discrete Multivariate Distributions (C8)/Markov Chains/Q$Q">If a stock went up yesterday, then the probability that it goes up today is $A11.  If it went down yesterday then the probability it does down today is $A22.  Assume the process with states: <br />
<div style="margin-left: 40px;">0 = stock goes up<br />
1 = stock goes down</div>
<p>is          a Markov chain. Given that the stock went up yesterday, what is the          probability that it will go down tomorrow?</p>
</div>@
qu.4.7.answer=5@
qu.4.7.choice.1=$NotAns@
qu.4.7.choice.2=$Alt1@
qu.4.7.choice.3=$Alt2@
qu.4.7.choice.4=$Alt3@
qu.4.7.choice.5=None of the above.@
qu.4.7.fixed=4@

qu.4.8.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Markov Chains/Q$Q"><img hspace="4" align="$Align" title="Stock Market [IMG:Stock$Which.gif]" alt="Stock Market" src="__BASE_URI__DMD/MarkovChains/Stock$Which.gif" />If a stock went up yesterday, then the probability that it goes up today is $a. If it went down<br />
yesterday then the probability it goes down today is $b. Let:&nbsp;
<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><msub><mi>X</mi><mrow><mi>n</mi></mrow></msub><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lcub;</mo><mfrac linethickness='0'><mrow><mn>0</mn><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow><mrow><mn>1</mn><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow></mfrac><mfrac linethickness='0'><mrow><mi mathvariant='normal'>$GoesUp</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>n</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&period;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow><mrow><mi mathvariant='normal'>$GoesDown</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>n</mi><mo lspace='0.0em' rspace='0.0em'>&period;</mo></mrow></mfrac></mrow></mstyle></math></p>
<p>and assume X<sub>n</sub> is a Markov Chain. Find <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><munder><mo lspace='0.0em' rspace='0.1666667em' movablelimits='true'>lim</mo><mrow><mi>n</mi><mo lspace='0.2777778em' rspace='0.2777778em' stretchy='true'>&rightarrow;</mo><mi>&infin;</mi></mrow></munder><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='[' close=']' separators=','><mrow><msub><mi>X</mi><mrow><mi>n</mi></mrow></msub><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn></mrow></mfenced></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow></mstyle></math> (4 decimals)</p>
</div>@
qu.4.8.answer.num=$Ans@
qu.4.8.answer.units=@
qu.4.8.showUnits=false@
qu.4.8.grading=toler_abs@
qu.4.8.err=.001@
qu.4.8.negStyle=minus@
qu.4.8.numStyle=thousands scientific dollars arithmetic@
qu.4.8.mode=Numeric@
qu.4.8.name=03. Limit value of stock model.@
qu.4.8.comment=<p>Note that the transition matrix of this Markov chain 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><mi>P</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfenced open='[' close=']' separators=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$a</mi></mrow></mtd><mtd><mrow><mi mathvariant='normal'>$OneMa</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi mathvariant='normal'>$OneMb</mi></mrow></mtd><mtd><mrow><mi mathvariant='normal'>$b</mi></mrow></mtd></mtr></mtable></mfenced></mrow></mrow></mstyle></math></p>
<p>We are asked for &pi;<sub>1</sub> where the equilibrium distribution<em> </em><font size="3" face="Times New Roman"><em>&pi;<sup>T</sup></em>=( <em>&pi;</em><sub>0</sub>, <em>&pi;</em><sub>1</sub>)</font> is the probability distribution which satisfies:</p>
<div align="center"><font size="3" face="Times New Roman"><em>&pi;<sup>T</sup>P</em> =  <em>&pi;<sup>T</sup></em></font>.</div>
<p align="left">Which means:</p>
<p align="left"><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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><msub><mi>&pi;</mi><mrow><mn>0</mn></mrow></msub></mrow></mtd><mtd><mrow><msub><mi>&pi;</mi><mrow><mn>1</mn></mrow></msub></mrow></mtd></mtr></mtable></mfenced><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='[' close=']' separators=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$a</mi></mrow></mtd><mtd><mrow><mi mathvariant='normal'>$OneMa</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi mathvariant='normal'>$OneMb</mi></mrow></mtd><mtd><mrow><mi mathvariant='normal'>$b</mi></mrow></mtd></mtr></mtable></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfenced open='[' close=']' separators=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><msub><mi>&pi;</mi><mrow><mn>0</mn></mrow></msub></mrow></mtd><mtd><mrow><msub><mi>&pi;</mi><mrow><mn>1</mn></mrow></msub></mrow></mtd></mtr></mtable></mfenced></mrow></mstyle></math></p>
<p align="left">Multiplying and setting entries equals gives a system of equations:</p>
<p align="left"><strong>[1] </strong> $a<em>&pi;</em><sub>0</sub> + $OneMb<em>&pi;</em><sub>1 </sub>= <em>&pi;</em><sub>0<br />
</sub><strong>[2] </strong><em> &pi;</em><sub>0</sub> + <em>&pi;</em><sub>1</sub> = 1</p>
<p align="left">From <strong>[1]</strong> we get: <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><msub><mi>&pi;</mi><mrow><mn>0</mn></mrow></msub><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mrow><mi mathvariant='normal'>$OneMb</mi></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'>$a</mi></mrow></mfrac></mrow><mrow><msub><mi>&pi;</mi><mrow><msub><mn>1</mn><mi></mi></msub></mrow></msub></mrow></mrow></mstyle></math></p>
<p align="left">Substitute this in <strong>[2]</strong> to find <em>&pi;</em><sub>1</sub>, then back-substitute to find <em>&pi;</em><sub>0</sub>:&nbsp;</p>
<p align="left"><em>&pi;</em><sub>1</sub> = $Ans,  <em>&pi;</em><sub>0</sub> = $Pi0</p>
<p align="left">The solution is:</p>
<p align="left"><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><munder><mo lspace='0.0em' rspace='0.1666667em' movablelimits='true'>lim</mo><mrow><mi>n</mi><mo lspace='0.2777778em' rspace='0.2777778em' stretchy='true'>&rightarrow;</mo><mrow><mi>&infin;</mi></mrow></mrow></munder><mi>P</mi><mfenced open='[' close=']' separators=','><mrow><msub><mi>X</mi><mrow><mi>n</mi></mrow></msub><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><msub><mi>&pi;</mi><mrow><mn>1</mn></mrow></msub><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math></p>@
qu.4.8.editing=useHTML@
qu.4.8.solution=@
qu.4.8.algorithm=$Q=3;
$a=decimal(2,range(0.01,0.99,0.01));
$OneMa=1-$a;
$b=decimal(2,range(0.01,0.99,0.01));
$OneMb=1-$b;
$Ans=decimal(3,$OneMa/(2-$a-$b));
$Coeff0=decimal(3,$OneMb/$OneMa);
$Pi0=decimal(3,$OneMb/(2-$a-$b));
$GoesUp="if stock goes up on day";
$GoesDown="if stock goes down on day";
$Which=rint(5);
$Align=switch(rint(2),"Left","Right");@
qu.4.8.uid=9aef7fc0-1d1e-4f2b-b9de-d6579b2bd528@
qu.4.8.info=  Course=230;
  Type=numeric;
  Difficulty=3;
  Keyword=markov;
@

qu.4.9.mode=Multiple Choice@
qu.4.9.name=07b. Stock: P(up tomorrow | down yesterday)@
qu.4.9.comment=<p>With states ("up","down"), the transition probability matrix can be written as follows where the values labelled with * are not given but are determined so that the row sums of <span style="font-style: italic;">P</span> are all equal to one.</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 lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfenced open='[' close=']' separators=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$A11</mi></mrow></mtd><mtd><mrow><mo lspace='0.1666667em' rspace='0.1666667em'>&ast;</mo></mrow></mtd></mtr><mtr><mtd><mrow><mo lspace='0.1666667em' rspace='0.1666667em'>&ast;</mo></mrow></mtd><mtd><mrow><mi mathvariant='normal'>$A22</mi></mrow></mtd></mtr></mtable></mfenced></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><mfenced open='[' close=']' separators=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$A11</mi></mrow></mtd><mtd><mrow><mi mathvariant='normal'>$Alpha</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi mathvariant='normal'>$Beta</mi></mrow></mtd><mtd><mrow><mi mathvariant='normal'>$A22</mi></mrow></mtd></mtr></mtable></mfenced></mrow></mrow></mstyle></math></p>
<p>The    two-step transition probabilities are given by the matrix&nbsp;<span class="inline-math-graphics"><span style="font-style: italic;">P<sup>2</sup></span></span>.    That is <span style="font-style: italic;" class="displayed">P(S<sub>t+2</sub> = "up"|S<sub>t</sub> = "down") </span>is    given by the (1,0) component of the matrix:</p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><msup><mi>P</mi><mrow><mn>2</mn></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><msup><mfenced open='[' close=']' separators=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$A11</mi></mrow></mtd><mtd><mrow><mi mathvariant='normal'>$Alpha</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi mathvariant='normal'>$Beta</mi></mrow></mtd><mtd><mrow><mi mathvariant='normal'>$A22</mi></mrow></mtd></mtr></mtable></mfenced><mrow><mn>2</mn></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfenced open='[' close=']' separators=','><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>$P211</mi></mrow></mtd><mtd><mrow><mi mathvariant='normal'>$P212</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi mathvariant='normal'>$P221</mi></mrow></mtd><mtd><mrow><mi mathvariant='normal'>$P222</mi></mrow></mtd></mtr></mtable></mfenced></mrow></mrow></mstyle></math></p>
<p>So the answer is $Ans .</p>
<p>&nbsp;</p>@
qu.4.9.editing=useHTML@
qu.4.9.solution=@
qu.4.9.algorithm=$Q="07b";
$A11=range(0.2,0.9,0.1);
$A22=range(0.2,0.9,0.1);
$Alpha=1-$A11;
$Beta=1-$A22;
$P211=$A11^2+$Alpha*$Beta;
$P212=$A11*$Alpha+$Alpha*$A22;
$P221=$Beta*$A11+$A22*$Beta;
$P222=$Beta*$Alpha+$A22^2;
$Ans=decimal(3,$P221);
$Alt1=decimal(3,range(0.25,0.75,0.05)*$Ans);
$Alt2=decimal(3,$Ans+range(0.25,0.75,0.05)*(1-$Ans));
$Alt3=decimal(3,0.5*($Ans+switch(rint(2),$Alt1,$Alt2)));
$GoesUp="if stock goes up on day";
$GoesDown="if stock goes down on day";
$Which=rint(5);
$Align=switch(rint(2),"Left","Right");@
qu.4.9.uid=c6c0d60b-fd86-453b-9ab9-d62ac5bc69f8@
qu.4.9.info=  Course=230;
  Type=MC;
  Keyword=markov;
@
qu.4.9.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Markov Chains/Q$Q"><img hspace="4" align="$Align" title="Stock Market [IMG:Stock$Which.gif]" alt="Stock Market" src="__BASE_URI__DMD/MarkovChains/Stock$Which.gif" />If a stock went up yesterday, then the probability that it goes up today is $A11.  If it went down yesterday then the probability it does down today is $A22.  Assume the process with states:<br />
<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><msub><mi>X</mi><mrow><mi>n</mi></mrow></msub><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lcub;</mo><mfrac linethickness='0'><mrow><mn>0</mn><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow><mrow><mn>1</mn><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow></mfrac><mfrac linethickness='0'><mrow><mi mathvariant='normal'>$GoesUp</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>n</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&period;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow><mrow><mi mathvariant='normal'>$GoesDown</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>n</mi><mo lspace='0.0em' rspace='0.0em'>&period;</mo></mrow></mfrac></mrow></mstyle></math>
<p>is a Markov chain. Given that the stock went down yesterday, what is the probability that it will go up tomorrow?</p>
</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.choice.5=None of the above@
qu.4.9.fixed=4@

qu.4.10.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Markov Chains/Q$Q">Suppose you model the behavior of $NumKids children with a Markov Process. The children have an opportunity at the start of each 20-minute time period to move from inside to outside, or vice-versa, or to not move at all. From a large number of observations you conclude: <br />
<ul>
    <li>If a child is outside now, the probability they will move inside in the next time period is $POutIn</li>
    <li>If a child is inside now, the probability they will move outside in the next time period is $PInOut</li>
</ul>
<p>If currently $NumOut children are outside and $NumIn are inside, how many will be outside in the next time period (20 minutes from now)?</p>
</div>@
qu.4.10.answer.num=$Ans@
qu.4.10.answer.units=@
qu.4.10.showUnits=false@
qu.4.10.grading=exact_value@
qu.4.10.negStyle=minus@
qu.4.10.numStyle=thousands scientific dollars arithmetic@
qu.4.10.mode=Numeric@
qu.4.10.name=02. Children in-out@
qu.4.10.comment=<p>Let <em>p</em> = $POutIn be P(outside child moves in) and <em>q </em>= $PInOut be P(inside child moves out)  . All you  have to do here is determine how many children stay or move outside.</p>
<ul>
    <li>Of the $NumOut outside now, <font size="3" face="Times New Roman">$NumOut(1-$POutIn)</font> will stay outside.</li>
    <li>Of the $NumIn inside now, <font size="3" face="Times New Roman">$NumIn($PInOut)</font> will come outside.</li>
</ul>
<p>Thus $Ans children will be outside in the next time period.</p>@
qu.4.10.editing=useHTML@
qu.4.10.solution=@
qu.4.10.algorithm=$Q=2;
$POutIn=decimal(1,range(0.1,0.9,0.1));
$PInOut=decimal(1,range(0.1,0.9,0.1));
$NumOut=100*range(1,3);
$NumIn=$NumOut;
$NumKids=$NumIn+$NumOut;
$Ans=$NumOut*(1-$POutIn+$PInOut);@
qu.4.10.uid=1789bab3-446d-43bb-b4bb-4a7e2765e0a6@
qu.4.10.info=  Course=230;
  Difficulty=1;
  Keyword=markov;
  Type=numeric;
@

qu.5.topic=Indicator Variables C861@

qu.5.1.mode=Inline@
qu.5.1.name=01. Birthdays I E(Xi)@
qu.5.1.comment=<p>This is actually quite easy, since X<sub>i</sub> only takes on two values, and one of them is 0!<br />
<br />
E(X<sub>i</sub>) = 0P(X<sub>i</sub>=0) + 1P(X<sub>i</sub>=1) = P(X<sub>i</sub>=1) <br />
<br />
= P(no birthdays fall in month i) <br />
<br />
= P(member 1 not born in month i)P(member 2 not born in month i)...P(member $NumMembers not born in month i)&nbsp; <span style="font-style: italic;">since they're independent</span></p>
<p><span style="font-style: italic;"><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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><mn>11</mn><mrow><mn>12</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.2222222em' rspace='0.0em'>..</mo><mo lspace='0.0em' rspace='0.0em'>&period;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>$NumMembers</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>times</mi></mrow></mstyle></math></span></p>
<p><span style="font-style: italic;"><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mrow></mstyle></math></span></p>@
qu.5.1.editing=useHTML@
qu.5.1.solution=@
qu.5.1.algorithm=$Q=1;
$NumMembers=range(10,40,5);
$AltTop=365-$NumMembers+1;@
qu.5.1.uid=73d99964-5b2b-4271-9dbb-45cf6eae26ff@
qu.5.1.info=  Type=MC;
  Course=230;
  Difficulty=2;
  Keyword=expected value;
  Keyword=indicator variable;
  Author=Sean Scott;
  Source=Don McLeish;
@
qu.5.1.weighting=1@
qu.5.1.numbering=alpha@
qu.5.1.part.1.name=sro_id_1@
qu.5.1.part.1.editing=useHTML@
qu.5.1.part.1.fixed=@
qu.5.1.part.1.choice.4=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mn>364</mn><mrow><mn>365</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>363</mn><mrow><mn>365</mn></mrow></mfrac><mo lspace='0.2222222em' rspace='0.0em'>..</mo><mo lspace='0.0em' rspace='0.0em'>&period;</mo><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mi mathvariant='normal'>$AltTop</mi><mrow><mn>365</mn></mrow></mfrac></mrow></mstyle></math>@
qu.5.1.part.1.question=null@
qu.5.1.part.1.choice.3=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>29</mn><mrow><mn>30</mn></mrow></mfrac></mrow></mfenced><mrow><mn>4</mn></mrow></msup><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>30</mn><mrow><mn>31</mn></mrow></mfrac></mrow></mfenced><mrow><mn>7</mn></mrow></msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>27</mn><mrow><mn>28</mn></mrow></mfrac></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>assuming</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>non</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>leap</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>year</mi></mrow></mstyle></math>@
qu.5.1.part.1.choice.2=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mn>2</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo></mrow><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mstyle></math>@
qu.5.1.part.1.choice.1=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mstyle></math>@
qu.5.1.part.1.mode=Non Permuting Multiple Choice@
qu.5.1.part.1.display=vertical@
qu.5.1.part.1.answer=1@
qu.5.1.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Indicator Variables/Q$Q">Birthdays of $NumMembers members of a club are assumed to be independently and uniformly distributed over the twelve months of the year. Define <br /><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><msub><mi>X</mi><mrow><mi>i</mi></mrow></msub><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lcub;</mo><mfrac linethickness='0'><mrow><mn>1</mn></mrow><mrow><mn>0</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfrac linethickness='0'><mrow><mi>if</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>no</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>member</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>of</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>the</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>club</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>has</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>a</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>birthday</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>in</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>month</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>i</mi></mrow><mrow><mi>otherwise</mi></mrow></mfrac></mrow></mstyle></math> for i = 1, 2, .., 12</p><p>&nbsp;</p><p>Then E(X<sub>i</sub>) is:</p><p><span> </span><1><span> </span></p></div>@

qu.5.2.mode=Inline@
qu.5.2.name=06. MGF for an Indicator@
qu.5.2.comment=<p>Work directly from the definition of m.g.f.:</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>M</mi><mfenced open='(' close=')' separators=','><mrow><mi>t</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>E</mi><mfenced open='(' close=')' separators=','><mrow><msup><mi>e</mi><mrow><mi>t</mi><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi>I</mi></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&#32;</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><msup><mi>e</mi><mrow><mi>t</mi><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mn>0</mn></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>I</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>0</mn></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><msup><mi>e</mi><mrow><mi>t</mi><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mn>1</mn></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>t</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn></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><mfenced open='(' close=')' separators=','><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>p</mi></mrow></mfenced><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><msup><mi>e</mi><mrow><mi>t</mi></mrow></msup><mi>p</mi></mrow></mstyle></math></p>@
qu.5.2.editing=useHTML@
qu.5.2.solution=@
qu.5.2.algorithm=@
qu.5.2.uid=85854385-5b34-4163-8667-f36b1ac0b510@
qu.5.2.info=  Course=230;
  Author=Sean Scott;
  Difficulty=3;
  Keyword=indicator variable;
  Keyword=m.g.f.;
  Source=DMc;
  Type=MC;
  Algorithmic=no;
@
qu.5.2.weighting=1@
qu.5.2.numbering=alpha@
qu.5.2.part.1.name=sro_id_1@
qu.5.2.part.1.editing=useHTML@
qu.5.2.part.1.choice.5=An indicator Variable has no m.g.f.<br>@
qu.5.2.part.1.fixed=4@
qu.5.2.part.1.choice.4=p + t -pt<br>@
qu.5.2.part.1.question=null@
qu.5.2.part.1.choice.3=1 - pt<br>@
qu.5.2.part.1.choice.2=t - p + 1@
qu.5.2.part.1.choice.1=1-p+e<sup>t</sup>p<br>@
qu.5.2.part.1.mode=Multiple Choice@
qu.5.2.part.1.display=vertical@
qu.5.2.part.1.answer=1@
qu.5.2.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Indicator Variables/Q06">If I is an indicator variable with P(I = 1) = p, then the m.g.f. for I is: <br /><p><span> </span><1><span> </span></p></div>@

qu.5.3.mode=Inline@
qu.5.3.name=03. Birthdays I cov(Xi,Xj))@
qu.5.3.comment=<p>a) This is actually quite easy, since X<sub>i</sub> only takes on two values, and one of them is 0!<br />
<br />
<font size="3" face="Times New Roman"><em>E</em>(<em>X<sub>i</sub></em>) = 0<em>P</em>(<em>X<sub>i</sub></em>=0) + 1<em>P</em>(<em>X<sub>i</sub></em>=1) = <em>P</em>(<em>X<sub>i</sub></em>=1) </font><br />
<br />
<font size="3" face="Times New Roman">= <em>P</em>(no birthdays fall in month <em>i</em>) <br />
<br />
= <em>P</em>(member 1 not born in month <em>i</em>)<em>P</em>(member 2 not born in month <em>i</em>)...<em>P</em>(member $NumMembers not born in month <em>i</em>)</font>  <span style="font-style: italic;">since they are independent</span></p>
<p><span style="font-style: italic;"><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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><mn>11</mn><mrow><mn>12</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.2222222em' rspace='0.0em'>..</mo><mo lspace='0.0em' rspace='0.0em'>&period;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>$NumMembers</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>times</mi></mrow></mstyle></math></span></p>
<p><span style="font-style: italic;"><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mrow></mstyle></math></span></p>
<p>b) Use the Covariance formula:</p>
<p><font size="3" face="Times New Roman"><em>Cov</em>(<em>X<sub>i</sub></em>, <em>X<sub>j</sub></em>) = <em>E</em>(<em>X<sub>i</sub>X<sub>j</sub></em>) - <em>E</em>(<em>X<sub>i</sub></em>)<em>E</em>(<em>X<sub>j</sub></em>)</font></p>
<p>we have the second term = <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mfenced><mrow><mn>2</mn></mrow></msup></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><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NMTimes2</mi></mrow></msup></mrow></mstyle></math>from part (a).</p>
<p>To find <font size="3" face="Times New Roman"><em>E</em>(<em>X<sub>i</sub>X<sub>j</sub></em>)</font> realize that <em><font size="3" face="Times New Roman">X<sub>i</sub>X<sub>j</sub></font></em> only takes on 0 and 1 values, and all we care about is when it's 1. <em><font size="3" face="Times New Roman"> X<sub>i</sub>X</font></em><sub><em><font size="3" face="Times New Roman">j</font></em> </sub>is 1 when both factors are, or when no member has a birthday in month <em><font size="3" face="Times New Roman">i</font></em> or month <font size="3" face="Times New Roman"><em>j</em></font>. The probability of a person not having a birthday in either month 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>10</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mstyle></math>so the probability of no member having a birthday in either month 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>10</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mstyle></math> and this is <font size="3" face="Times New Roman"><em>E</em>(<em>X<sub>i</sub>X<sub>j</sub></em>)</font>.</p>
<p>So :</p>
<p><font size="3" face="Times New Roman"><em>Cov</em>(<em>X<sub>i</sub></em>,<em>X<sub>j</sub></em>) = <em>E</em>(<em>X<sub>i</sub>X<sub>j</sub></em>) - <em>E</em>(<em>X<sub>i</sub></em>)<em>E</em>(<em>X<sub>j</sub></em>)</font></p>
<p>= <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>10</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></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><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NMTimes2</mi></mrow></msup></mrow></mstyle></math></p>@
qu.5.3.editing=useHTML@
qu.5.3.solution=@
qu.5.3.algorithm=$Q=3;
$NumMembers=range(10,40,5);
$NMTimes2 = 2*$NumMembers;
$AltTop=365-$NumMembers+1;@
qu.5.3.uid=72a9f1b4-97c2-4e10-ae2e-9a12c4475629@
qu.5.3.info=  Type=MC;
  Course=230;
  Difficulty=3;
  Keyword=covariance;
  Keyword=indicator variable;
  Author=Sean Scott;
  Source=Don McLeish;
@
qu.5.3.weighting=1,1@
qu.5.3.numbering=alpha@
qu.5.3.part.1.name=sro_id_1@
qu.5.3.part.1.editing=useHTML@
qu.5.3.part.1.fixed=@
qu.5.3.part.1.choice.4=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mn>364</mn><mrow><mn>365</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>363</mn><mrow><mn>365</mn></mrow></mfrac><mo lspace='0.2222222em' rspace='0.0em'>..</mo><mo lspace='0.0em' rspace='0.0em'>&period;</mo><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mi mathvariant='normal'>$AltTop</mi><mrow><mn>365</mn></mrow></mfrac></mrow></mstyle></math><br>@
qu.5.3.part.1.question=null@
qu.5.3.part.1.choice.3=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>29</mn><mrow><mn>30</mn></mrow></mfrac></mrow></mfenced><mrow><mn>4</mn></mrow></msup><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>30</mn><mrow><mn>31</mn></mrow></mfrac></mrow></mfenced><mrow><mn>7</mn></mrow></msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>27</mn><mrow><mn>28</mn></mrow></mfrac></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>assuming</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>non</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>leap</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>year</mi></mrow></mstyle></math><br>@
qu.5.3.part.1.choice.2=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mn>2</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo></mrow><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mstyle></math>@
qu.5.3.part.1.choice.1=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mstyle></math>@
qu.5.3.part.1.mode=Non Permuting Multiple Choice@
qu.5.3.part.1.display=vertical@
qu.5.3.part.1.answer=1@
qu.5.3.part.2.name=sro_id_2@
qu.5.3.part.2.editing=useHTML@
qu.5.3.part.2.choice.5=0<br>@
qu.5.3.part.2.fixed=@
qu.5.3.part.2.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><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>10</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NMTimes2</mi></mrow></msup><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mrow></mstyle></math><br>@
qu.5.3.part.2.question=null@
qu.5.3.part.2.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><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>10</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced></mrow></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mrow><msup><mfenced open='[' close=']' separators=','><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><mfenced open='(' close=')' separators=','><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mfenced></mrow></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mrow></mstyle></math><br>@
qu.5.3.part.2.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><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>10</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mrow><mfenced open='[' close=']' separators=','><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mrow></mfenced></mrow></mrow></mstyle></math><br>@
qu.5.3.part.2.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><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>10</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NMTimes2</mi></mrow></msup></mrow></mrow></mstyle></math><br>@
qu.5.3.part.2.mode=Non Permuting Multiple Choice@
qu.5.3.part.2.display=vertical@
qu.5.3.part.2.answer=1@
qu.5.3.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Indicator Variables/Q$Q">Birthdays of $NumMembers members of a club are assumed to be independently and uniformly distributed over the twelve months of the year. Define <br /><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><msub><mi>X</mi><mrow><mi>i</mi></mrow></msub><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lcub;</mo><mfrac linethickness='0'><mrow><mn>1</mn></mrow><mrow><mn>0</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfrac linethickness='0'><mrow><mi>if</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>no</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>member</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>of</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>the</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>club</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>has</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>a</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>birthday</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>in</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>month</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>i</mi></mrow><mrow><mi>otherwise</mi></mrow></mfrac></mrow></mstyle></math> for i = 1, 2, .., 12&nbsp;</p><p>a) <font size="3" face="Times New Roman"><em>E</em>(<em>X<sub>i</sub></em>)</font> is:</p><p><span> </span><1></p><p>b) Find <font size="3" face="Times New Roman"><em>Cov</em>(<em>X<sub>i</sub></em>, <em>X<sub>j</sub></em>)</font> for <font size="3" face="Times New Roman"><em>i</em>,<em>j</em> = 1,..,12</font> and <font size="3" face="Times New Roman"><em>i</em> &ne; <em>j</em></font></p><p><span> </span><2><span> </span></p><p>&nbsp;</p></div>@

qu.5.4.mode=Inline@
qu.5.4.name=04. E(Sum of Birthdays)@
qu.5.4.comment=<p>Define</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><msub><mi>X</mi><mrow><mi>i</mi></mrow></msub><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lcub;</mo><mfrac linethickness='0'><mrow><mn>1</mn></mrow><mrow><mn>0</mn><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow></mfrac><mfrac linethickness='0'><mrow><mi>if</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>at</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>least</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>one</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>member</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>of</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>the</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>club</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>has</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>a</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>birthday</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>in</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>month</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>i</mi></mrow><mrow><mi>otherwise</mi></mrow></mfrac></mrow></mstyle></math></p>
<p>Notice 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><mi>Z</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 mathcolor='#800080'>i</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn></mrow><mrow><mn>12</mn></mrow></munderover><msub><mi>X</mi><mrow><mi>i</mi></mrow></msub></mrow></mstyle></math> 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>E</mi><mfenced open='(' close=')' separators=','><mrow><mi>Z</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>E</mi><mfenced open='(' close=')' separators=','><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>12</mn></mrow></munderover><msub><mi>X</mi><mrow><mi>i</mi></mrow></msub></mrow></mfenced><mo mathcolor='#0000ff' 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>12</mn></mrow></munderover><mi>E</mi><mfenced open='(' close=')' separators=','><mrow><msub><mi>X</mi><mrow><mi>i</mi></mrow></msub></mrow></mfenced></mrow></mstyle></math></p>
<p>by the properties of Expected Value.</p>
<p>In fact assuming birthdays are uniformly spread throughout  the year we can see that <br />
<font size="3" face="Times New Roman"><em>E</em>(<em>X<sub>i</sub></em>) = <em>E</em>(<em>X<sub>j</sub></em>)</font> for any <font size="3" face="Times New Roman"><em>i</em>, <em>j</em></font> in <font size="3" face="Times New Roman">{1,2,&hellip;,12}</font> so <font size="3" face="Times New Roman"><em>E</em>(<em>Z</em>) = 12<em>E</em>(<em>X<sub>i</sub></em>)</font> for any <em><font size="3" face="Times New Roman">i</font></em> in <font size="3" face="Times New Roman">{1,2,...,12}</font>  .<br />
<em>You could use a specific value for <font size="3" face="Times New Roman">i</font> here if you want.</em></p>
<p>What is <font size="3" face="Times New Roman"><em>E</em>(<em>X<sub>i</sub></em>) </font>?</p>
<p><font size="3" face="Times New Roman"><em>E</em>(<em>X<sub>i</sub></em>) = 0<em>P</em>(<em>X<sub>i</sub></em> = 0) + 1<em>P</em>(<em>X<sub>i</sub></em> = 1)<br />
= <em>P</em>(<em>X<sub>i</sub></em> = 1)<br />
= 1 - <em>P</em>(<em>X<sub>i</sub></em> = 0)  <span style="font-style: italic;">or 1 - P(no-one has a birthday in month i)</span></font><br />
<font size="3" face="Times New Roman">= 1 - <em>P</em>(member 1 not born in month <em>i</em>)<em>P</em>(member 2 not born in month <em>i</em>)...<em>P</em>(member $NumMembers not born in month <em>i</em>)</font>  <span style="font-style: italic;">since they are independent</span></p>
<p><span style="font-style: italic;"><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.2222222em' rspace='0.0em'>..</mo><mo lspace='0.0em' rspace='0.0em'>&period;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>$NumMembers</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>times</mi></mrow></mstyle></math></span></p>
<p><span style="font-style: italic;"><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mstyle></math></span></p>
<p><br />
Thus</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>Z</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>12</mn><mrow><mfenced open='[' close=']' separators=','><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mrow></mfenced></mrow></mrow></mstyle></math></p>
<p>&nbsp;</p>@
qu.5.4.editing=useHTML@
qu.5.4.hint.1=Write Z as a sum of indicator variables.@
qu.5.4.solution=@
qu.5.4.algorithm=$Q=4;
$NumMembers=range(10,40,5);
$AltTop=365-$NumMembers+1;@
qu.5.4.uid=8804ee56-f2e0-4634-a8b6-3578eed640a4@
qu.5.4.info=  Type=MC;
  Course=230;
  Difficulty=2;
  Keyword=expected value;
  Keyword=indicator variable;
  Author=Sean Scott;
  Source=Don McLeish;
@
qu.5.4.weighting=1@
qu.5.4.numbering=alpha@
qu.5.4.part.1.name=sro_id_1@
qu.5.4.part.1.editing=useHTML@
qu.5.4.part.1.fixed=@
qu.5.4.part.1.choice.4=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mn>12</mn><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><mn>11</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mrow><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>364</mn><mrow><mn>365</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>363</mn><mrow><mn>365</mn></mrow></mfrac><mo lspace='0.2222222em' rspace='0.0em'>..</mo><mo lspace='0.0em' rspace='0.0em'>&period;</mo><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mi mathvariant='normal'>$AltTop</mi><mrow><mn>365</mn></mrow></mfrac></mrow></mfenced></mrow></mrow></mstyle></math>@
qu.5.4.part.1.question=null@
qu.5.4.part.1.choice.3=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mn>12</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>11</mn></mrow><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mstyle></math>@
qu.5.4.part.1.choice.2=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mn>12</mn></mrow><mrow><mfenced open='[' close=']' separators=','><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>2</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mfenced></mrow></mstyle></math>@
qu.5.4.part.1.choice.1=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mn>12</mn></mrow><mrow><mfenced open='[' close=']' separators=','><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mfenced></mrow></mstyle></math>@
qu.5.4.part.1.mode=Non Permuting Multiple Choice@
qu.5.4.part.1.display=vertical@
qu.5.4.part.1.answer=1@
qu.5.4.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Indicator Variables/Q$Q">Birthdays of $NumMembers members of a club are assumed to be independently and uniformly distributed over the twelve months of the year. Let <em><font size="3" face="Times New Roman">Z</font></em> be the number of months in which at least one member has a birthday. Find <font size="3" face="Times New Roman"><em>E</em>(<em>Z</em>)</font>. <br /><p><1><span> </span></p></div>@

qu.5.5.mode=Inline@
qu.5.5.name=02. Birthdays I Var(Xi)@
qu.5.5.comment=<p>Use the Variance formula:<br />
<font size="3" face="Times New Roman"><em>Var</em>(<em>X<sub>i</sub></em>) = <em>E</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><msubsup><mi>X</mi><mrow><mi>i</mi></mrow><mrow><mn>2</mn></mrow></msubsup></mrow></mstyle></math>) - [<em>E</em>(<em>X<sub>i</sub></em>)]<sup>2</sup></font></p>
<p>Finding <font size="3" face="Times New Roman"><em>E</em>(<em>X<sub>i</sub></em>)</font> is fairly easy, since it only takes on values 0 or 1 :</p>
<p><font size="3" face="Times New Roman"><em>E</em>(<em>X<sub>i</sub></em>) = 0<em>P</em>(<em>X<sub>i</sub></em>=0) + 1<em>P</em>(<em>X<sub>i</sub></em>=1) = <em>P</em>(<em>X<sub>i</sub></em>=1) </font><br />
<br />
<font size="3" face="Times New Roman">= <em>P</em>(no birthdays fall in month i) </font><br />
<br />
= <font size="3" face="Times New Roman"><em>P</em>(member 1 not born in month i)<em>P</em>(member 2 not born in month i)...<em>P</em>(member $NumMembers not born in month i)</font>  <span style="font-style: italic;">since they are independent</span></p>
<p><span style="font-style: italic;"><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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><mn>11</mn><mrow><mn>12</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.2222222em' rspace='0.0em'>..</mo><mo lspace='0.0em' rspace='0.0em'>&period;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>$NumMembers</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>times</mi></mrow></mstyle></math></span></p>
<p><span style="font-style: italic;"><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mrow></mstyle></math></span></p>
<p>Now, <font size="3" face="Times New Roman"><em>E</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><msubsup><mi>X</mi><mrow><mi>i</mi></mrow><mrow><mn>2</mn></mrow></msubsup></mrow></mstyle></math>)</font> is just the same thing, since the same argument can be used. Thus:</p>
<p><font size="3" face="Times New Roman"><em>Var</em>(<em>X<sub>i</sub></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><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><msup><mfenced open='[' close=']' separators=','><mrow><msup><mfenced open='(' close=')' separators=','><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></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><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mrow><mfenced open='[' close=']' separators=','><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mrow></mfenced></mrow></mrow></mstyle></math></p>@
qu.5.5.editing=useHTML@
qu.5.5.solution=@
qu.5.5.algorithm=$Q=2;
$NumMembers=range(10,40,5);
$AltTop=365-$NumMembers+1;@
qu.5.5.uid=f7db3a2f-632c-4be0-aa7a-157e7cdcd993@
qu.5.5.info=  Type=MC;
  Course=230;
  Difficulty=2;
  Keyword=variance;
  Keyword=indicator variable;
  Author=Sean Scott;
  Source=Don McLeish;
@
qu.5.5.weighting=1@
qu.5.5.numbering=alpha@
qu.5.5.part.1.name=sro_id_1@
qu.5.5.part.1.editing=useHTML@
qu.5.5.part.1.fixed=@
qu.5.5.part.1.choice.4=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>10</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mrow></mstyle></math>@
qu.5.5.part.1.question=null@
qu.5.5.part.1.choice.3=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mrow><mfenced open='[' close=']' separators=','><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mrow></mfenced></mrow></mrow></mstyle></math>@
qu.5.5.part.1.choice.2=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mn>2</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo></mrow><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mstyle></math>@
qu.5.5.part.1.choice.1=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mstyle></math>@
qu.5.5.part.1.mode=Non Permuting Multiple Choice@
qu.5.5.part.1.display=vertical@
qu.5.5.part.1.answer=3@
qu.5.5.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Indicator Variables/Q$Q">Birthdays of $NumMembers members of a club are assumed to be independently and uniformly distributed over the twelve months of the year. Define <br /><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><msub><mi>X</mi><mrow><mi>i</mi></mrow></msub><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lcub;</mo><mfrac linethickness='0'><mrow><mn>1</mn></mrow><mrow><mn>0</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfrac linethickness='0'><mrow><mi>if</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>no</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>member</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>of</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>the</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>club</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>has</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>a</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>birthday</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>in</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>month</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>i</mi></mrow><mrow><mi>otherwise</mi></mrow></mfrac></mrow></mstyle></math> for i = 1, 2, .., 12</p><p>Then <font size="3" face="Times New Roman"><em>Var</em>(<em>X<sub>i</sub></em>)</font> is:</p><p><span> </span><1><span> </span></p></div>@

qu.5.6.mode=Inline@
qu.5.6.name=05. E(Xi) I cov(Xi,Xj))|Var(Z)@
qu.5.6.comment=<p>a) This is actually quite easy, since X<sub>i</sub> only takes on two values, and one of them is 0!<br />
<br />
E(X<sub>i</sub>) = 0P(X<sub>i</sub>=0) + 1P(X<sub>i</sub>=1) = P(X<sub>i</sub>=1) <br />
<br />
= P(no birthdays fall in month i) <br />
<br />
= P(member 1 not born in month i)P(member 2 not born in month i)...P(member $NumMembers not born in month i)  <span style="font-style: italic;">since they're independent</span></p>
<p><span style="font-style: italic;"><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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><mn>11</mn><mrow><mn>12</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.2222222em' rspace='0.0em'>..</mo><mo lspace='0.0em' rspace='0.0em'>&period;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>$NumMembers</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>times</mi></mrow></mstyle></math></span></p>
<p><span style="font-style: italic;"><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mrow></mstyle></math></span></p>
<p>b) Notice 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><msubsup><mi>X</mi><mrow><mi>i</mi></mrow><mrow><mn>2</mn></mrow></msubsup></mrow></mstyle></math>is the same as X<sub>i</sub> ! You have E(X<sub>i</sub>) from (a), 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>Var</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>E</mi><mfenced open='(' close=')' separators=','><mrow><msubsup><mi>X</mi><mrow><mi>i</mi></mrow><mrow><mn>2</mn></mrow></msubsup></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><msub><mi>X</mi><mrow><mi>i</mi></mrow></msub></mrow></mfenced></mrow></mfenced><mrow><mn>2</mn></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><msup><mfenced open='[' close=']' separators=','><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mfenced><mrow><mn>2</mn></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup><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><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mfenced></mrow></mstyle></math></p>
<p>c) Use the Covariance formula:</p>
<p>Cov(X<sub>i</sub>,X<sub>j</sub>) = E(X<sub>i</sub>X<sub>j</sub>) - E(X<sub>i</sub>)E(X<sub>j</sub>)</p>
<p>we have the second term = <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mfenced><mrow><mn>2</mn></mrow></msup></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><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NMTimes2</mi></mrow></msup></mrow></mstyle></math>from part (a).</p>
<p>To find E(X<sub>i</sub>X<sub>j</sub>) realize that X<sub>i</sub>X<sub>j</sub> only takes on 0 and 1 values, and all we care about is when it's 1.  X<sub>i</sub>X<sub>j </sub>is 1 when both factors are, or when no member has a birthday in month i or month j. The probability of a person not having a birthday in either month 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>10</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mstyle></math>so the probability of no member having a birthday in either month 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>10</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mstyle></math> and this is E(X<sub>i</sub>X<sub>j</sub>).</p>
<p>So :</p>
<p>Cov(X<sub>i</sub>,X<sub>j</sub>) = E(X<sub>i</sub>X<sub>j</sub>) - E(X<sub>i</sub>)E(X<sub>j</sub>)</p>
<p>= <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>10</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></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><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NMTimes2</mi></mrow></msup></mrow></mstyle></math></p>
<p>d) As a first step: <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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>Z</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>Var</mi><mfenced open='(' close=')' separators=','><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>12</mn></mrow></munderover><msub><mi>X</mi><mrow><mi>i</mi></mrow></msub></mrow></mfenced></mrow></mstyle></math></p>
<p>Since the X<sub>i</sub> are correlated, this expression will involve the Covariances. In fact the formula to use 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><mi>Var</mi><mfenced open='(' close=')' separators=','><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>12</mn></mrow></munderover><msub><mi>X</mi><mrow><mi>i</mi></mrow></msub></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>12</mn></mrow></munderover><mi>Var</mi><mfenced open='(' close=')' separators=','><mrow><msub><mi>X</mi><mrow><mi>i</mi></mrow></msub></mrow></mfenced><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mn>2</mn><munderover><mo lspace='0.0em' rspace='0.1666667em' stretchy='true' largeop='true' movablelimits='true'>&Sum;</mo><mrow><mi mathcolor='#800080'>i</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>j</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&colon;</mo><mi>i</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&lt;</mo><mi>j</mi></mrow><mi></mi></munderover><mi>Cov</mi><mfenced open='(' close=')' separators=','><mrow><msub><mi>X</mi><mrow><mi>i</mi></mrow></msub><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><msub><mi>X</mi><mrow><mi>j</mi></mrow></msub></mrow></mfenced></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><mn>12</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup><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><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mfenced><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mn>2</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mrow><mn>11</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mn>12</mn></mrow><mrow><mn>2</mn></mrow></mfrac><mfenced open='[' close=']' separators=','><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>10</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NMTimes2</mi></mrow></msup></mrow></mfenced></mrow></mstyle></math></p>
<p><em>(The second sum has 11+10+9+...+1 terms all with the same value, thus the <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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>11</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mn>12</mn></mrow><mrow><mn>2</mn></mrow></mfrac></mrow></mstyle></math> factor.)</em></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><mn>12</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfenced open='[' close=']' separators=','><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NMTimes2</mi></mrow></msup><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mn>11</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>10</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>11</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NMTimes2</mi></mrow></msup></mrow></mfenced></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><mn>12</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfenced open='[' close=']' separators=','><mrow><mn>11</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>10</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>12</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NMTimes2</mi></mrow></msup></mrow></mfenced></mrow></mstyle></math></p>@
qu.5.6.editing=useHTML@
qu.5.6.solution=@
qu.5.6.algorithm=$Q=5;
$NumMembers=range(10,40,5);
$NMTimes2 = 2*$NumMembers;
$AltTop=365-$NumMembers+1;@
qu.5.6.uid=f1097a1d-a6d5-4f05-87d1-339e09903287@
qu.5.6.info=  Type=MC;
  Course=230;
  Difficulty=4;
  Keyword=covariance;
  Keyword=indicator variable;
  Author=Sean Scott;
  Source=Don McLeish;
  Keyword=expected value;
  Keyword=variance;
@
qu.5.6.weighting=1,1,1,1@
qu.5.6.numbering=alpha@
qu.5.6.part.1.name=sro_id_1@
qu.5.6.part.1.editing=useHTML@
qu.5.6.part.1.fixed=@
qu.5.6.part.1.choice.4=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfrac><mn>364</mn><mrow><mn>365</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mn>363</mn><mrow><mn>365</mn></mrow></mfrac><mo lspace='0.2222222em' rspace='0.0em'>..</mo><mo lspace='0.0em' rspace='0.0em'>&period;</mo><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfrac><mi mathvariant='normal'>$AltTop</mi><mrow><mn>365</mn></mrow></mfrac></mrow></mstyle></math><br>@
qu.5.6.part.1.question=null@
qu.5.6.part.1.choice.3=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>29</mn><mrow><mn>30</mn></mrow></mfrac></mrow></mfenced><mrow><mn>4</mn></mrow></msup><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>30</mn><mrow><mn>31</mn></mrow></mfrac></mrow></mfenced><mrow><mn>7</mn></mrow></msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>27</mn><mrow><mn>28</mn></mrow></mfrac></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>assuming</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>non</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>leap</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>year</mi></mrow></mstyle></math><br>@
qu.5.6.part.1.choice.2=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mn>2</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo></mrow><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mstyle></math>@
qu.5.6.part.1.choice.1=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mstyle></math>@
qu.5.6.part.1.mode=Non Permuting Multiple Choice@
qu.5.6.part.1.display=vertical@
qu.5.6.part.1.answer=1@
qu.5.6.part.2.name=sro_id_2@
qu.5.6.part.2.editing=useHTML@
qu.5.6.part.2.fixed=@
qu.5.6.part.2.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><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>10</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mstyle></math><br>@
qu.5.6.part.2.question=null@
qu.5.6.part.2.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>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup><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><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mfenced></mrow></mstyle></math><br>@
qu.5.6.part.2.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><mn>2</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mrow></mstyle></math><br>@
qu.5.6.part.2.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><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mstyle></math><br>@
qu.5.6.part.2.mode=Multiple Choice@
qu.5.6.part.2.display=vertical@
qu.5.6.part.2.answer=3@
qu.5.6.part.3.name=sro_id_3@
qu.5.6.part.3.editing=useHTML@
qu.5.6.part.3.choice.5=0<br>@
qu.5.6.part.3.fixed=@
qu.5.6.part.3.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><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>10</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NMTimes2</mi></mrow></msup><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mrow></mstyle></math><br>@
qu.5.6.part.3.question=null@
qu.5.6.part.3.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><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>10</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced></mrow></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mrow><msup><mfenced open='[' close=']' separators=','><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><mfenced open='(' close=')' separators=','><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mfenced></mrow></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mrow></mstyle></math><br>@
qu.5.6.part.3.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><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>10</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mrow><mfenced open='[' close=']' separators=','><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mrow></mfenced></mrow></mrow></mstyle></math><br>@
qu.5.6.part.3.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><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>10</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NMTimes2</mi></mrow></msup></mrow></mrow></mstyle></math><br>@
qu.5.6.part.3.mode=Non Permuting Multiple Choice@
qu.5.6.part.3.display=vertical@
qu.5.6.part.3.answer=1@
qu.5.6.part.4.name=sro_id_4@
qu.5.6.part.4.editing=useHTML@
qu.5.6.part.4.fixed=@
qu.5.6.part.4.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><mn>11</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfenced open='[' close=']' separators=','><mrow><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>10</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>12</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NMTimes2</mi></mrow></msup></mrow></mfenced></mrow></mstyle></math><br>@
qu.5.6.part.4.question=null@
qu.5.6.part.4.choice.3=<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mn>12</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NMTimes2</mi></mrow></msup><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>11</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mstyle></math><br>@
qu.5.6.part.4.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><mn>12</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>10</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NMTimes2</mi></mrow></msup><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>11</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup></mrow></mstyle></math><br>@
qu.5.6.part.4.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><mn>12</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfenced open='[' close=']' separators=','><mrow><mn>11</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>10</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NumMembers</mi></mrow></msup><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>12</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>11</mn><mrow><mn>12</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$NMTimes2</mi></mrow></msup></mrow></mfenced></mrow></mstyle></math><br>@
qu.5.6.part.4.mode=Non Permuting Multiple Choice@
qu.5.6.part.4.display=vertical@
qu.5.6.part.4.answer=1@
qu.5.6.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Indicator Variables/Q$Q">Birthdays of $NumMembers members of a club are assumed to be independently and uniformly distributed over the twelve months of the year. Define&nbsp;<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><msub><mi>X</mi><mrow><mi>i</mi></mrow></msub><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lcub;</mo><mfrac linethickness='0'><mrow><mn>1</mn></mrow><mrow><mn>0</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfrac linethickness='0'><mrow><mi>if</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>no</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>member</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>of</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>the</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>club</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>has</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>a</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>birthday</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>in</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>month</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>i</mi></mrow><mrow><mi>otherwise</mi></mrow></mfrac></mrow></mstyle></math> for i = 1, 2, .., 12</p><p>&nbsp;</p><p>a) E(X<sub>i</sub>) is:</p><p><span> </span><1></p><p>b) Var(X<sub>i</sub>) is:</p><p><span> </span><2><span> </span></p><p>&nbsp;</p><p>c) Find Cov(X<sub>i</sub>, X<sub>j</sub>) for i,j = 1,..,12 and i &ne; j</p><p><span> </span><3></p><p>d) Let Z be the number of months in which no club member has a birthday. Find Var(Z)</p><p><span> </span><4><span> </span></p><p>&nbsp;</p></div>@

qu.6.topic=Variance and Covariance C8E1@

qu.6.1.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Variance and Covariance/Q$Q">Suppose X and Y are random variables with a joint probability function f(x,y) as given in the following table: <br />
<div>
<p>
<table cellspacing="0" cellpadding="2" border="1">
    <tbody>
        <tr>
            <td colspan="2">f(x,y)</td>
            <td align="center" colspan="3">Y</td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="right">$Y0</td>
            <td align="right">$Y1</td>
            <td align="right">$Y2</td>
        </tr>
        <tr>
            <td valign="center" rowspan="2">X</td>
            <td align="right">$X0</td>
            <td align="right">$P00</td>
            <td align="right">$P01</td>
            <td align="right">$P02</td>
        </tr>
        <tr>
            <td align="right">$X1</td>
            <td align="right">$P10</td>
            <td align="right">$P11</td>
            <td align="right">$P12</td>
        </tr>
    </tbody>
</table>
<br />
Find Cov(X,Y) (Three decimal accuracy please).</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</div>
</div>@
qu.6.1.answer.num=$Ans@
qu.6.1.answer.units=@
qu.6.1.showUnits=false@
qu.6.1.grading=toler_abs@
qu.6.1.err=.01@
qu.6.1.negStyle=minus@
qu.6.1.numStyle=thousands scientific dollars arithmetic@
qu.6.1.mode=Numeric@
qu.6.1.name=01a. Find Cov(X,Y)@
qu.6.1.comment=<p>Recall that cov(X,Y) = E(XY) - E(X)E(Y) so find E(X), E(Y) and E(XY).</p>
<p>E(X):  First find the marginal probability function for X: <br />
P(X = $X0) = $P00+$P01+$P02 = $PXEQ0<br />
P(X = $X1) = $P10+$P11+$P12 = $PXEQ1.</p>
<p>Then E(X) = $X0($PXEQ0) + $X1($PXEQ1) = $EX</p>
<p>E(Y):<br />
P(Y = $Y0) = $P00+$P10 = $PYEQ0<br />
P(Y = $Y1) = $P01+$P11 = $PYEQ1<br />
P(Y = $Y2) = $P02+$P12 = $PYEQ2</p>
<p>E(Y) = $Y0*$PYEQ0 + $Y1*$PYEQ1 + $Y2*$PYEQ2 = $EY</p>
<p>E(XY):<br />
You COULD write out the entire probability table for XY, but it's actual  easier to do the following: <br />
<br />
There are only two combinations where XY &ne; 0, when X = 1 and Y = 1 and when X = 1 and Y = 2. So E(XY) = 1P(X=1,  Y=1) + 2P(X=1, Y=2) = $EXY</p>
<p>Now just use the formula: cov(X,Y) = $EXY - $EX*$EY = $Ans!</p>@
qu.6.1.editing=useHTML@
qu.6.1.solution=@
qu.6.1.algorithm=$Q="01a";
$X0=0;
$X1=1;
$Y0=0;
$Y1=1;
$Y2=2;
$X0Y0=$X0*$Y0;
$X0Y1=$X0*$Y1;
$X0Y2=$X0*$Y2;
$X1Y0=$X1*$Y0;
$X1Y1=$X1*$Y1;
$X1Y2=$X1*$Y2;
$P00=decimal(2,range(0,0.50,0.05));
$P01=decimal(2,range(0,0.7-$P00,0.05));
$P02=decimal(2,range(0,0.85-$P00-$P01,0.05));
$PXEQ0=$P00+$P01+$P02;
$P10=decimal(2,range(0,1-$PXEQ0,0.05));
$P11=decimal(2,range(0,1-$PXEQ0-$P10,0.05));
$P12=decimal(2,1-$PXEQ0-$P10-$P11);
$PXEQ1=$P10+$P11+$P12;
$PYEQ0=$P00+$P10;
$PYEQ1=$P01+$P11;
$PYEQ2=$P02+$P12;
$EX=$X0*$PXEQ0+$X1*$PXEQ1;
$EY=$Y0*$PYEQ0+$Y1*$PYEQ1+$Y2*$PYEQ2;
$EXY=$X1*$Y1*$P11+$X1*$Y2*$P12;
$Ans=$EXY-$EX*$EY;@
qu.6.1.uid=3159d1ff-ebc8-4b2f-a65a-d32b4cfdd7f8@
qu.6.1.info=  Type=numeric;
  Course=230;
  Difficulty=3;
  Keyword=covariance;
@

qu.6.2.mode=Multiple Choice@
qu.6.2.name=01b. Find Cov(X,Y)@
qu.6.2.comment=<p>Recall that cov(X,Y) = E(XY) - E(X)E(Y) so find E(X), E(Y) and E(XY).</p>
<p>E(X):  First find the marginal probability function for X: <br />
P(X = $X0) = $P00+$P01+$P02 = $PXEQ0<br />
P(X = $X1) = $P10+$P11+$P12 = $PXEQ1.</p>
<p>Then E(X) = $X0($PXEQ0) + $X1($PXEQ1) = $EX</p>
<p>E(Y):<br />
P(Y = $Y0) = $P00+$P10 = $PYEQ0<br />
P(Y = $Y1) = $P01+$P11 = $PYEQ1<br />
P(Y = $Y2) = $P02+$P12 = $PYEQ2</p>
<p>E(Y) = $Y0*$PYEQ0 + $Y1*$PYEQ1 + $Y2*$PYEQ2 = $EY</p>
<p>E(XY):<br />
You COULD write out the entire probability table for XY, but it's actual  easier to do the following: <br />
<br />
There are only two combinations where XY &ne; 0, when X = 1 and Y = 1 and when X = 1 and Y = 2. So E(XY) = 1P(X=1,  Y=1) + 2P(X=1, Y=2) = $EXY</p>
<p>Now just use the formula: cov(X,y) = $EXY - $EX*$EY = $Ans!</p>@
qu.6.2.editing=useHTML@
qu.6.2.solution=@
qu.6.2.algorithm=$Q="01b";
$X0=0;
$X1=1;
$Y0=0;
$Y1=1;
$Y2=2;
$X0Y0=$X0*$Y0;
$X0Y1=$X0*$Y1;
$X0Y2=$X0*$Y2;
$X1Y0=$X1*$Y0;
$X1Y1=$X1*$Y1;
$X1Y2=$X1*$Y2;
$P00=decimal(2,range(0,0.50,0.05));
$P01=decimal(2,range(0,0.7-$P00,0.05));
$P02=decimal(2,range(0,0.85-$P00-$P01,0.05));
$PXEQ0=$P00+$P01+$P02;
$P10=decimal(2,range(0,1-$PXEQ0,0.05));
$P11=decimal(2,range(0,1-$PXEQ0-$P10,0.05));
$P12=decimal(2,1-$PXEQ0-$P10-$P11);
$PXEQ1=$P10+$P11+$P12;
$PYEQ0=$P00+$P10;
$PYEQ1=$P01+$P11;
$PYEQ2=$P02+$P12;
$EX=$X0*$PXEQ0+$X1*$PXEQ1;
$EY=$Y0*$PYEQ0+$Y1*$PYEQ1+$Y2*$PYEQ2;
$EXY=$X1*$Y1*$P11+$X1*$Y2*$P12;
$Ans=$EXY-$EX*$EY;
$Alt1=-1*$Ans+0.1;
$Alt2=$Ans+range(0.2,1,0.05);
$Alt3=decimal(3,if($Ans,1/$Ans,1));
$Alt4=$Ans+$EX*$EY;@
qu.6.2.uid=65359249-8813-4873-ad57-2951702275cb@
qu.6.2.info=  Course=230;
  Type=MC;
  Difficulty=3;
  Keyword=covariance;
@
qu.6.2.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Variance and Covariance/Q$Q">Suppose X and Y are random variables with a joint probability function f(x,y) as given in the following table:
<div>
<p>
<table cellspacing="0" cellpadding="2" border="1">
    <tbody>
        <tr>
            <td colspan="2">f(x,y)</td>
            <td align="center" colspan="3">Y</td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="right">$Y0</td>
            <td align="right">$Y1</td>
            <td align="right">$Y2</td>
        </tr>
        <tr>
            <td valign="center" rowspan="2">X</td>
            <td align="right">$X0</td>
            <td align="right">$P00</td>
            <td align="right">$P01</td>
            <td align="right">$P02</td>
        </tr>
        <tr>
            <td align="right">$X1</td>
            <td align="right">$P10</td>
            <td align="right">$P11</td>
            <td align="right">$P12</td>
        </tr>
    </tbody>
</table>
<br />
Then Cov(X,Y) is:</p>
</div>
</div>@
qu.6.2.answer=1@
qu.6.2.choice.1=$Ans@
qu.6.2.choice.2=$Alt1@
qu.6.2.choice.3=$Alt2@
qu.6.2.choice.4=$Alt3@
qu.6.2.choice.5=$Alt4@
qu.6.2.fixed=@

qu.6.3.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Variance and Covariance/Q$Q">Let X and Y be random variables with Var(X) = $VarX, Var(Y) = $VarY and Cov(X,Y) = $CovXY. <br />
<p>Suppose&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>U</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ad</mi><mi>X</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>$Sign1</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>$Bd</mi><mi>Y</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>$Sign2</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>$Consta</mi></mrow></mstyle></math> . Find Var(U) (3 decimal accuracy).</p>
</div>@
qu.6.3.answer.num=$Ans@
qu.6.3.answer.units=@
qu.6.3.showUnits=false@
qu.6.3.grading=toler_abs@
qu.6.3.err=.01@
qu.6.3.negStyle=minus@
qu.6.3.numStyle=thousands scientific dollars arithmetic@
qu.6.3.mode=Numeric@
qu.6.3.name=02. Var(aX+bY+c)@
qu.6.3.comment=<p>You are given everything you need here to use the result:<br />
<br />
<em><strong>If U = aX + bY + c, then Var(U) = a<sup>2</sup>Var(X) + b<sup>2</sup>Var(Y) +  2abCov(X,Y)</strong></em></p>
<p>So Var(U) = $ASquared($VarX) + $BSquared*($VarY) + ($TwoAB)*($CovXY) = $Ans</p>@
qu.6.3.editing=useHTML@
qu.6.3.solution=@
qu.6.3.algorithm=$Q=2;
$VarX=decimal(1,range(0.2,6,0.1));
$VarY=decimal(1,range(0.2,6,0.1));
$CovXY=decimal(2,range(-2,2.5,0.05));
$A=range(1,5)*-1^rint(2);
$Ad=if(eq($A,-1),"-",if(eq($A,1),"",$A));
$B=range(1,5)*-1^rint(2);
$Ba=abs($B);
$Sign1=if(lt($B,0),"-","+");
$Bd=if(eq($Ba,1),"",$Ba);
$Const=range(-5,5);
$Consta=abs($Const);
$Sign2=if(lt($Const,0),"-","+");
$ASquared=$A^2;
$BSquared=$B^2;
$TwoAB=2*$A*$B;
$Ans=$ASquared*$VarX+$BSquared*$VarY+$TwoAB*$CovXY;@
qu.6.3.uid=b556bd38-566e-4445-a390-f6cf6c0cdda1@
qu.6.3.info=  Type=numeric;
  Course=230;
  Difficulty=2;
  Keyword=covariance;
  Keyword=variance;
@

qu.6.4.mode=Multiple Choice@
qu.6.4.name=08. Covariance of grades@
qu.6.4.comment=<p>This requires a fair amount of work, none of it difficult. Make your life easier by noticing that the distribution is symmetric in X and Y, that is anything we work out for X will be the same for Y.<br />
<br />
Start by determining the marginal distribution of X by adding up the columns:</p>
<table cellspacing="2" cellpadding="2" border="1">
    <tbody>
        <tr>
            <td style="font-weight: bold;">&nbsp;X</td>
            <td style="text-align: center; font-weight: bold;">$x1</td>
            <td style="text-align: center; font-weight: bold;">$x2</td>
            <td style="text-align: center; font-weight: bold;">$x3</td>
        </tr>
        <tr>
            <td>&nbsp;<span style="font-weight: bold;">f</span><sub style="font-weight: bold;">1</sub><span style="font-weight: bold;">(x)</span></td>
            <td>&nbsp;$fx1</td>
            <td>$fx2</td>
            <td>$fx3</td>
        </tr>
    </tbody>
</table>
<p><br />
From this we can find E(X) = $x1($fx1) + $x2($fx2) + $x3($fx3) = $EX<br />
<br />
For Cov(X,Y) we'll use the formula E(XY) - E(X)E(Y). List out the distribution for XY:</p>
<table cellspacing="2" cellpadding="2" border="1">
    <tbody>
        <tr>
            <td style="font-weight: bold;">XY</td>
            <td style="text-align: center; font-weight: bold;">0</td>
            <td style="text-align: center; font-weight: bold;">1</td>
            <td style="text-align: center; font-weight: bold;">2</td>
            <td style="text-align: center; font-weight: bold;">4</td>
        </tr>
        <tr>
            <td><span style="font-weight: bold;">f(x,y)</span></td>
            <td>$FXY0</td>
            <td>$FXY1</td>
            <td>$FXY2</td>
            <td>$FXY4</td>
        </tr>
    </tbody>
</table>
<p><br />
Then E(XY) = 0($FXY0) + 1($FXY1) + 2($FXY2) + 4($FXY4) = $EXY&nbsp; and Cov(X,Y) = 1.4 - $EX($EY) = $CovXY</p>@
qu.6.4.editing=useHTML@
qu.6.4.solution=@
qu.6.4.algorithm=$Q="08";
$x1=0;
$x2=1;
$x3=2;
$y1=0;
$y2=1;
$y3=2;
$F11=switch(rint(3),0,0.1,0.2);
$F12=if($F11,0,switch(rint(2),0.1,0.2));
$F13=0.3-$F11-$F12;
$F21=abs($F12);
$F22=0.3-$F21;
$F23=0.4-$F22-$F21;
$F31=$F13;
$F32=$F23;
$F33=decimal(1,0.3-$F31-$F32);
$fx1=$F11+$F12+$F13;
$fx2=$F21+$F22+$F23;
$fx3=$F31+$F32+$F33;
$fy1=$F11+$F21+$F31;
$fy2=$F12+$F22+$F32;
$fy3=$F13+$F23+$F33;
$EX=$x1*$fx1+$x2*$fx2+$x3*$fx3;
$EY=$y1*$fy1+$y2*$fy2+$y3*$fy3;
$x1sq=$x1^2;
$x2sq=$x2^2;
$x3sq=$x3^2;
$EX2=$x1sq*$fx1+$x2sq*$fx2+$x3sq*$fx3;
$VarCheck=$EX2-$EX^2;
$VarX=($x1-$EX)^2*$fx1+($x2-$EX)^2*$fx2+($x3-$EX)^2*$fx3;
$Varsq=$VarX^2;
$FXY0=$fx1+$F21+$F31;
$FXY1=$F22;
$FXY2=$F23+$F32;
$FXY4=abs($F33);
$EXY=$FXY1+2*$FXY2+4*$FXY4;
$CovXY=$EXY-$EX*$EY;
$Ans=decimal(4,$CovXY);
$Alt1=decimal(4,range(0.35,0.75,0.05)*$Ans);
$Alt2=decimal(4,$Ans+range(0.35,0.65,0.05)*(1-$Ans));
$Alt3=decimal(4,0.5*($Ans+switch(rint(2),$Alt1,$Alt2)));@
qu.6.4.uid=71e3ee81-7b9a-4fed-b3ec-c7212f2a227a@
qu.6.4.info=  Course=230;
  Type=MC;
@
qu.6.4.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Variance and Covariance/Q$Q">
Grades in math and stats courses are coded as 0, 1, 2, representing "upper class", "middle class", and "lower class". Let X and Y be the grades of STAT230 and MATH135 of a student who takes both courses. The joint probability function of (X,Y ) is given by <br />
<p>
<table cellspacing="0" cellpadding="3" bordercolor="#111111" border="1">
    <tbody>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center" colspan="3"><strong>X</strong></td>
        </tr>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center"><strong>$x1</strong></td>
            <td align="center"><span style="font-weight: bold;">$x2</span></td>
            <td align="center"><span style="font-weight: bold;">$x3</span></td>
        </tr>
        <tr valign="middle">
            <td rowspan="3"><strong>Y</strong></td>
            <td align="right" style="font-weight: bold;">$y1</td>
            <td align="right">$F11</td>
            <td align="right">$F21</td>
            <td align="right">$F31</td>
        </tr>
        <tr valign="bottom">
            <td align="right" style="font-weight: bold;" x:num="">$y2</td>
            <td align="right">$F12</td>
            <td align="right">$F22</td>
            <td align="right">$F32</td>
        </tr>
        <tr valign="bottom">
            <td align="right" style="font-weight: bold;">$y3</td>
            <td align="right">$F13</td>
            <td align="right">$F23</td>
            <td align="right">$F33</td>
        </tr>
    </tbody>
</table>
</p>
<p>Cov(X,Y) is:</p>
</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="UW Statistics Bank/Discrete Multivariate Distributions/Variance and Covariance/Q$Q"><img hspace="4" align="$Align" title="Voting [IMG:Vote$Which.gif]" alt="Voting" src="__BASE_URI__DMD/VarianceAndCovariance/Vote$Which.gif" />$Wn voters are drawn at random from a large population consisting of $C%  $P1 , $L% $P2&nbsp; and $S% $P3 . Let X be the number of $P1 in the sample  and let Y be the number of $P2. Find (3 decimals) Var(X + Y).</div>@
qu.6.5.answer.num=$Ans@
qu.6.5.answer.units=@
qu.6.5.showUnits=false@
qu.6.5.grading=toler_abs@
qu.6.5.err=0.01@
qu.6.5.negStyle=minus@
qu.6.5.numStyle=thousands scientific dollars arithmetic@
qu.6.5.mode=Numeric@
qu.6.5.name=03. Voters: Var(Party 1 + Party 2)@
qu.6.5.comment=<p>X + Y is Binomial with n = $n and p = $p so Var(X + Y) = np(1-p) = $n*$p(1 - $p) =$Ans.</p>@
qu.6.5.editing=useHTML@
qu.6.5.solution=@
qu.6.5.algorithm=$Q="03";
$PName=rint(3);
$P1=switch($PName,"Tories","Conservatives","Republicans");
$P2=switch($PName,"Whigs","Liberals","Democrats");
$P3=switch($PName,"Liberal-Democrats","NDP","Socialists");
$C=range(20,55,5);
$L=range(15,70-$C,5);
$S=100-$C-$L;
$n=range(5,15);
$p=($C+$L)/100;
$Ans=$n*$p*(1-$p);
$Wn=switch($n-5,["Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen"]);

$Which=rint(5);
$Align=switch(rint(2),"Left","Right");@
qu.6.5.uid=80d9869e-d5c5-4a82-aa66-ed7ce19ccee0@
qu.6.5.info=  Type=numeric;
  Course=230;
@

qu.6.6.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Variance and Covariance/Q$Q"><img hspace="4" align="$Align" src="__BASE_URI__DMD/VarianceAndCovariance/Vote$Which.gif" alt="Voting" title="Voting [IMG:Vote$Which.gif]" />$Wn voters are drawn at random from a large population consisting of $C%  $P1 , $L% $P2&nbsp; and $S% $P3 . Let X be the number of $P1 in the sample  and let Y be the number of $P2. Find (3 decimals) Find Cov(X,Y) .</div>@
qu.6.6.answer.num=$Ans@
qu.6.6.answer.units=@
qu.6.6.showUnits=false@
qu.6.6.grading=toler_abs@
qu.6.6.err=0.01@
qu.6.6.negStyle=minus@
qu.6.6.numStyle=thousands scientific dollars arithmetic@
qu.6.6.mode=Numeric@
qu.6.6.name=06. Voters: Cov(Party 1, Party 2)@
qu.6.6.comment=<p><span style="font-style: italic;">(The answer is reached in a rather indirect way, so read the whole solution!)<br />
<br />
</span>X + Y is Binomial with n = $n and p = $p so Var(X + Y) = np(1 &minus; p) = $n*$p*(1-$p) = $VarXpY . <br />
<br />
Also X is Binomial with n = $n and p = $pX so Var(X) = $n($pX)(1-$pX) = $VarX <br />
<br />
and Y is Binomial with n = $n and p = $pY so Var(Y ) = $n($pY)(1-$pY) = $VarY&nbsp; <br />
<br />
Finally since Var(X + Y) = Var(X) + Var(Y) + 2Cov(X, Y) 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>Cov</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>Y</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mn>1</mn><mrow><mn>2</mn></mrow></mfrac><mfenced open='(' close=')' separators=','><mrow><mi>Var</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>Y</mi></mrow></mfenced><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>Var</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi></mrow></mfenced><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>Var</mi><mfenced open='(' close=')' separators=','><mrow><mi>Y</mi></mrow></mfenced></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mn>1</mn><mrow><mn>2</mn></mrow></mfrac><mfenced open='(' close=')' separators=','><mrow><mi mathvariant='normal'>$VarXpY</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi mathvariant='normal'>$VarX</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi mathvariant='normal'>$VarY</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math></p>@
qu.6.6.editing=useHTML@
qu.6.6.solution=@
qu.6.6.algorithm=$Q="06";
$C=range(20,55,5);
$L=range(15,70-$C,5);
$S=100-$C-$L;
$n=range(5,15,1);
$p=($C+$L)/100;
$pX=$C/100;
$pY=$L/100;
$ps=1-$p;
$VarXpY=$n*$p*$ps;
$VarX=$n*$pX*(1-$pX);
$VarY=$n*$pY*(1-$pY);
$Ans=0.5*($VarXpY-$VarX-$VarY);
$Wn=switch($n-5, ["Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen"]);
$Which=rint(5);
$Align=switch(rint(2),"Left","Right");
$PName=rint(3);
$P1=switch($PName,"Tories","Conservatives","Republicans");
$P2=switch($PName,"Whigs","Liberals","Democrats");
$P3=switch($PName,"Liberal-Democrats","NDP","Socialists");@
qu.6.6.uid=210a7e77-0843-48df-9043-1c8d253b568e@
qu.6.6.info=  Type=numeric;
  Course=230;
@

qu.6.7.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Variance and Covariance/Q$Q"><img hspace="4" align="$Align" title="Voting [IMG:Vote$Which.gif]" alt="Voting" src="__BASE_URI__DMD/VarianceAndCovariance/Vote$Which.gif" />$Wn voters are drawn at random from a large population consisting of $C%  $P1 , $L% $P2&nbsp; and $S% $P3 . Let X be the number of $P1 in the sample  and let Y be the number of $P2. Find (3 decimals) Var($n - X - Y)</div>@
qu.6.7.answer.num=$Ans@
qu.6.7.answer.units=@
qu.6.7.showUnits=false@
qu.6.7.grading=toler_abs@
qu.6.7.err=0.01@
qu.6.7.negStyle=minus@
qu.6.7.numStyle=thousands scientific dollars arithmetic@
qu.6.7.mode=Numeric@
qu.6.7.name=05. Voters: E(n - Party 1 + Party 2)@
qu.6.7.comment=<p>$n - X + Y is the number of $P3 in the sample and is Binomial with n = $n and p = $ps so Var($n - X - Y ) = np(1 - p) = $n*$ps*(1-$ps) =$Ans.</p>@
qu.6.7.editing=useHTML@
qu.6.7.solution=@
qu.6.7.algorithm=$Q="05";
$C=range(20,55,5);
$L=range(15,70-$C,5);
$S=100-$C-$L;
$n=range(5,15,1);
$p=($C+$L)/100;
$ps=1-$p;
$Ans=$n*$ps*(1-$ps);
$Wn=switch($n-5,["Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen"]);
$Which=rint(5);
$Align=switch(rint(2),"Left","Right");
$PName=rint(3);
$P1=switch($PName,"Tories","Conservatives","Republicans");
$P2=switch($PName,"Whigs","Liberals","Democrats");
$P3=switch($PName,"Liberal-Democrats","NDP","Socialists");@
qu.6.7.uid=5e228ed5-5e77-4164-8df7-643a1cb01d59@
qu.6.7.info=  Type=numeric;
  Course=230;
@

qu.6.8.mode=Multiple Choice@
qu.6.8.name=07. Correlation of grades@
qu.6.8.comment=<p>This requires a fair amount of work, none of it difficult. Make your life easier by noticing that the distribution is symmetric in X and Y, that is anything we work out for X will be the same for Y.<br />
<br />
We need to find&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>&rho;</mi><mo mathvariant='italic' lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mi>Cov</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo mathvariant='italic' separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>Y</mi></mrow></mfenced></mrow><mrow><mrow><msub><mi>&sigma;</mi><mrow><mi>X</mi></mrow></msub></mrow><mrow><msub><mi>&sigma;</mi><mrow><mi>Y</mi></mrow></msub></mrow></mrow></mfrac></mrow></mstyle></math>. <br />
First find the denominator. Start by determining the marginal distribution of X by adding up the columns:</p>
<table cellspacing="2" cellpadding="2" border="1">
    <tbody>
        <tr>
            <td style="font-weight: bold;">&nbsp;X</td>
            <td style="text-align: center; font-weight: bold;">$x1</td>
            <td style="text-align: center; font-weight: bold;">$x2</td>
            <td style="text-align: center; font-weight: bold;">$x3</td>
        </tr>
        <tr>
            <td>&nbsp;<span style="font-weight: bold;">f</span><sub style="font-weight: bold;">1</sub><span style="font-weight: bold;">(x)</span></td>
            <td>&nbsp;$fx1</td>
            <td>$fx2</td>
            <td>$fx3</td>
        </tr>
    </tbody>
</table>
<p><br />
From this we can find E(X) = $x1($fx1) + $x2($fx2) + $x3($fx3) = $EX<br />
<br />
This also gives us the distribution for X<sup>2</sup>:</p>
<table cellspacing="2" cellpadding="2" border="1">
    <tbody>
        <tr>
            <td style="font-weight: bold;">&nbsp;X<sup>2</sup></td>
            <td style="text-align: center; font-weight: bold;">$x1sq</td>
            <td style="text-align: center; font-weight: bold;">$x2sq</td>
            <td style="text-align: center; font-weight: bold;">$x3sq</td>
        </tr>
        <tr>
            <td>&nbsp;<span style="font-weight: bold;">f</span><span style="font-weight: bold;">(x<sup>2</sup>)</span></td>
            <td>&nbsp;$fx1</td>
            <td>$fx2</td>
            <td>$fx3</td>
        </tr>
    </tbody>
</table>
<p><br />
So E(X<sup>2</sup>) = $x1sq($fx1) + $x2sq($fx2) + $x3sq($fx3) = $EX2&nbsp;</p>
<p>so Var(X) = E(X<sup>2</sup>) - [E(X)]<sup>2</sup> = $EX2 - ($EX)<sup>2</sup> = $VarX, 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><msub><mi>&sigma;</mi><mrow><mi>X</mi></mrow></msub><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><msqrt><mrow><mi mathvariant='normal'>$VarX</mi></mrow></msqrt><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$SDX</mi></mrow></mstyle></math><br />
<br />
A similar argument tells us Var(Y) = $VarX, <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><msub><mi>&sigma;</mi><mrow><mi>Y</mi></mrow></msub><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$SDY</mi></mrow></mstyle></math>. Thus &sigma;<sub>X</sub>&sigma;<sub>Y</sub> =&nbsp; $Den<br />
<br />
For Cov(X,Y) we'll use the formula E(XY) - E(X)E(Y). First list out the distribution for XY:</p>
<table cellspacing="2" cellpadding="2" border="1">
    <tbody>
        <tr>
            <td style="font-weight: bold;">XY</td>
            <td style="text-align: center; font-weight: bold;">0</td>
            <td style="text-align: center; font-weight: bold;">1</td>
            <td style="text-align: center; font-weight: bold;">2</td>
            <td style="text-align: center; font-weight: bold;">4</td>
        </tr>
        <tr>
            <td><span style="font-weight: bold;">f(x,y)</span></td>
            <td>$FXY0</td>
            <td>$FXY1</td>
            <td>$FXY2</td>
            <td>$FXY4</td>
        </tr>
    </tbody>
</table>
<p><br />
Then E(XY) = 0($FXY0) + 1($FXY1) + 2($FXY2) + 4($FXY4) = $EXY&nbsp; and Cov(X,Y) = 1.4 - $EX($EY) = $CovXY<br />
<br />
So &rho; = <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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'>$CovXY</mi><mrow><mi mathvariant='normal'>$Den</mi></mrow></mfrac></mrow></mstyle></math> = $Ans</p>@
qu.6.8.editing=useHTML@
qu.6.8.solution=@
qu.6.8.algorithm=$Q="07";
$x1=0;
$x2=1;
$x3=2;
$y1=0;
$y2=1;
$y3=2;
$F11=switch(rint(3),0,0.1,0.2);
$F12=if($F11,0,switch(rint(2),0.1,0.2));
$F13=0.3-$F11-$F12;
$F21=abs($F12);
$F22=0.3-$F21;
$F23=0.4-$F22-$F21;
$F31=$F13;
$F32=$F23;
$F33=decimal(1,0.3-$F31-$F32);
$fx1=$F11+$F12+$F13;
$fx2=$F21+$F22+$F23;
$fx3=$F31+$F32+$F33;
$fy1=$F11+$F21+$F31;
$fy2=$F12+$F22+$F32;
$fy3=$F13+$F23+$F33;
$EX=$x1*$fx1+$x2*$fx2+$x3*$fx3;
$EY=$y1*$fy1+$y2*$fy2+$y3*$fy3;
$x1sq=$x1^2;
$x2sq=$x2^2;
$x3sq=$x3^2;
$EX2=$x1sq*$fx1+$x2sq*$fx2+$x3sq*$fx3;
$VarCheck=$EX2-$EX^2;
$VarX=($x1-$EX)^2*$fx1+($x2-$EX)^2*$fx2+($x3-$EX)^2*$fx3;
$SDX=decimal(3,sqrt($VarX));
$SDY=$SDX;
$Den=$SDX*$SDY;
$FXY0=$fx1+$F21+$F31;
$FXY1=$F22;
$FXY2=$F23+$F32;
$FXY4=abs($F33);
$EXY=$FXY1+2*$FXY2+4*$FXY4;
$CovXY=$EXY-$EX*$EY;
$Ans=decimal(4,$CovXY/($SDX*$SDY));
$Alt1=decimal(4,range(0.35,0.75,0.05)*$Ans);
$Alt2=decimal(4,$Ans+range(0.35,0.65,0.05)*(1-$Ans));
$Alt3=decimal(4,0.5*($Ans+switch(rint(2),$Alt1,$Alt2)));@
qu.6.8.uid=8506639d-5d8b-40bd-ba79-92e64cb30155@
qu.6.8.info=  Type=MC;
  Course=230;
@
qu.6.8.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Variance and Covariance/Q$Q">Grades in math and stats courses are coded as 0, 1, 2, representing "upper class", "middle class", and "lower class". Let X and Y be the grades of STAT230 and MATH135 of a student who takes both courses. The joint probability function of (X,Y ) is given by
<p>&nbsp;</p>
<p>
<table cellspacing="0" cellpadding="3" bordercolor="#111111" border="1">
    <tbody>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center" colspan="3"><strong>X</strong></td>
        </tr>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center"><strong>$x1</strong></td>
            <td align="center"><span style="font-weight: bold;">$x2</span></td>
            <td align="center"><span style="font-weight: bold;">$x3</span></td>
        </tr>
        <tr valign="middle">
            <td rowspan="3"><strong>Y</strong></td>
            <td align="right" style="font-weight: bold;">$y1</td>
            <td align="right">$F11</td>
            <td align="right">$F21</td>
            <td align="right">$F31</td>
        </tr>
        <tr valign="bottom">
            <td align="right" x:num="" style="font-weight: bold;">$y2</td>
            <td align="right">$F12</td>
            <td align="right">$F22</td>
            <td align="right">$F32</td>
        </tr>
        <tr valign="bottom">
            <td align="right" style="font-weight: bold;">$y3</td>
            <td align="right">$F13</td>
            <td align="right">$F23</td>
            <td align="right">$F33</td>
        </tr>
    </tbody>
</table>
</p>
<p>The correlation coefficient &rho; of X and Y is:</p>
</div>@
qu.6.8.answer=1@
qu.6.8.choice.1=$Ans@
qu.6.8.choice.2=$Alt1@
qu.6.8.choice.3=$Alt2@
qu.6.8.choice.4=$Alt3@
qu.6.8.fixed=@

qu.6.9.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Variance and Covariance/Q$Q"><img hspace="4" align="$Align" src="__BASE_URI__DMD/VarianceAndCovariance/Vote$Which.gif" alt="Voting" title="Voting [IMG:Vote$Which.gif]" />$Wn voters are drawn at random from a large population consisting of $C%  $P1 , $L% $P2&nbsp; and $S% $P3 . Let X be the number of $P1 in the sample  and let Y be the number of $P2. Find (3 decimals) E(X + Y)</div>@
qu.6.9.answer.num=$Ans@
qu.6.9.answer.units=@
qu.6.9.showUnits=false@
qu.6.9.grading=toler_abs@
qu.6.9.err=0.01@
qu.6.9.negStyle=minus@
qu.6.9.numStyle=thousands scientific dollars arithmetic@
qu.6.9.mode=Numeric@
qu.6.9.name=04. Voters: E(Party 1 + Party 2)@
qu.6.9.comment=<p>X + Y is Binomial with n = $n and p = $p so E(X + Y) = np = $n*$p =$Ans.</p>@
qu.6.9.editing=useHTML@
qu.6.9.solution=@
qu.6.9.algorithm=$Q="04";
$PName=rint(3);
$P1=switch($PName,"Tories","Conservatives","Republicans");
$P2=switch($PName,"Whigs","Liberals","Democrats");
$P3=switch($PName,"Liberal-Democrats","NDP","Socialists");
$C=range(20,55,5);
$L=range(15,70-$C,5);
$S=100-$C-$L;
$n=range(5,15,1);
$p=($C+$L)/100;
$Ans=$n*$p;
$Wn=switch($n-5,["Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen"]);
$Which=rint(5);
$Align=switch(rint(2),"Left","Right");@
qu.6.9.uid=4a83c14d-7182-44d3-b726-9e7598bf4184@
qu.6.9.info=  Course=230;
  Type=numeric;
@

qu.7.topic=Joint and Marginal Distributions C881@

qu.7.1.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Joint and Marginal Distributions/Q$Q">Suppose X and Y are independent and uniform on the set <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfenced open='{' close='}' separators=','><mrow><mn>1</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mn>2</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.2222222em' rspace='0.0em'>..</mo><mo lspace='0.0em' rspace='0.0em'>&period;</mo><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi mathvariant='normal'>$a</mi></mrow></mfenced><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>
<p>Find <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>5</mn><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>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&GreaterEqual;</mo><mn>5</mn></mrow></mfenced><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> (to 3 decimals)</p>
</div>@
qu.7.1.answer.num=1/$a@
qu.7.1.answer.units=@
qu.7.1.showUnits=false@
qu.7.1.grading=toler_abs@
qu.7.1.err=.005@
qu.7.1.negStyle=minus@
qu.7.1.numStyle=thousands scientific dollars arithmetic@
qu.7.1.mode=Numeric@
qu.7.1.name=12. Find P(X=5 | Y>=5)@
qu.7.1.comment=<p>X and Y are independent 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>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lpar;</mo><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>5</mn><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>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&GreaterEqual;</mo><mn>5</mn><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&rpar;</mo><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>5</mn></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mn>1</mn><mrow><mi mathvariant='normal'>$a</mi></mrow></mfrac></mrow></mrow></mstyle></math>= <font size="3" face="Times New Roman">$Ans</font></p>@
qu.7.1.editing=useHTML@
qu.7.1.solution=@
qu.7.1.algorithm=$Q=12;
$a=range(5,10);
$Ans=decimal(3,1/$a);@
qu.7.1.uid=79a93fda-6d0c-41f1-93ef-27f85c4a6efc@
qu.7.1.info=  Difficulty=0;
  Author=Sean Scott;
  Type=numeric;
@

qu.7.2.mode=Multiple Choice@
qu.7.2.name=17. Coins & Joint PDF@
qu.7.2.comment=<p>First build the Joint Distribution Table:</p>
<table cellspacing="0" cellpadding="3" border="1">
    <tbody>
        <tr>
            <td colspan="2" rowspan="2">&nbsp;f(x,y)</td>
            <td align="center" colspan="4">X</td>
        </tr>
        <tr>
            <td align="center"><strong>0</strong></td>
            <td align="center"><strong>1</strong></td>
            <td align="center"><strong>2</strong></td>
            <td align="center"><strong>3</strong></td>
        </tr>
        <tr>
            <td rowspan="2">Y</td>
            <td><strong>1</strong></td>
            <td align="center">0</td>
            <td align="center">3/8</td>
            <td align="center">3/8</td>
            <td align="center">0</td>
        </tr>
        <tr>
            <td><strong>3</strong></td>
            <td align="center">1/8</td>
            <td align="center">0</td>
            <td align="center">0</td>
            <td align="center">1/8</td>
        </tr>
    </tbody>
</table>
<p>In no particular order:</p>
<ul>
    <li>f(0,1) > f(0,3) is FALSE. From the table, f(0,1) = 0 < 1/8 = f(0,3).</li>
    <li>"f(1,y) = f(2,y) for all y for which f(x,y) is defined" is TRUE. Just compare the second and third columns of the table.</li>
    <li>"Possible Y values are 1 and 3." is TRUE. You can have all 3 dice the same (Y = 3), or 2 of one type and 1 of the other (so Y = 1).</li>
    <li>"f<sub>2</sub>(1) = 0.75" is TRUE, just add up row 1 of the table.</li>
    <li>It is TRUE that f<sub>2</sub>(3) < f<sub>1</sub>(1), just add up row 2 and column 2 respectively of the table and compare them.</li>
</ul>@
qu.7.2.editing=useHTML@
qu.7.2.solution=@
qu.7.2.algorithm=@
qu.7.2.uid=a95748fb-6fab-4b40-951e-05225bc2c52f@
qu.7.2.info=  Type=TF;
  Algorithmic=no;
@
qu.7.2.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Joint and Marginal Distributions/Q17">Suppose a fair coin is tossed 3 times. Define the random variables <br />
<ul>
    <li>X = number of Heads</li>
    <li>Y = |(# Tails) - (#Heads)|&nbsp;&nbsp;&nbsp; (absolute value).</li>
</ul>
<p>Let f(x,y) be the joint probability function for (X, Y ). Which of the following is NOT true?</p>
</div>@
qu.7.2.answer=1@
qu.7.2.choice.1=f(0,1) >  f(0,3)@
qu.7.2.choice.2=f(1,y) = f(2,y) for all y for which f(x,y) is defined.@
qu.7.2.choice.3=Possible Y values are 1 and 3.@
qu.7.2.choice.4=f<sub>2</sub>(1) = 0.75@
qu.7.2.choice.5=f<sub>2</sub>(3) < f<sub>1</sub>(1)@
qu.7.2.fixed=@

qu.7.3.mode=Multiple Choice@
qu.7.3.name=02. pdf for |X+Y|@
qu.7.3.comment=<p>Determine the possible (x,y) pairs that give each value of Z, and add their probabilities up. <br />
<br />
For example Z = 1 for (x,y)&nbsp; in {(1,2), (2,1),(3,2)} so P(Z = 1) = f(1,2) + f(2,1) + f(3,2) = $F12 + $F21 + $F23 = $pz1</p>@
qu.7.3.editing=useHTML@
qu.7.3.solution=@
qu.7.3.algorithm=$Q=2;
$x1=1;
$x2=2;
$x3=3;
$x=($x1,$x2,$x3);
$y1=1;
$y2=2;
$y=($y1,$y2);
$fx1=decimal(2,range(0.1,0.5,0.05));
$fx2=decimal(2,range(0.1,0.5,0.05));
$fx3=1-$fx2-$fx1;
$fy1=decimal(2,range(0.1,0.65,0.05));
$fy2=1-$fy1;
$F11=decimal(2,$fx1*$fy1);
$F12=decimal(2,$fy1*$fx2);
$F13=decimal(2,$fy1-$F11-$F12);
$F21=decimal(2,$fy2*$fx1);
$F22=decimal(2,$fx2*$fy2);
$F23=decimal(2,$fy2-$F21-$F22);
$pz0=$F11+$F22;
$pz1=abs($F12+$F21+$F23);
$pz2=abs($F13);
$Ans=[$pz0,abs($pz1),abs($pz2)];
$Alt11=decimal(3,$pz0/switch(rint(2),2,4));
$Alt12=decimal(3,0.65*$pz1);
$Alt1=[$Alt11,$pz1,decimal(3,1-$Alt11-$pz1)];
$Alt2=[$Alt12,$Alt12,decimal(3,1-2*$Alt12)];
$Alt3=[abs($pz2),$Alt11,decimal(3,1-$pz2-$Alt11)];
$Alt4=[$pz0,$Alt12,decimal(3,1-$pz0-$Alt12)];@
qu.7.3.uid=0b982132-30b1-41bf-972f-6c9126a3573e@
qu.7.3.info=  Quiz=Quiz;
@
qu.7.3.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Joint and Marginal Distributions/Q$Q"><img width="50" hspace="4" height="50" align="right" src="__BASE_URI__Tools/TestGuy.gif" title="This question is drawn from a STAT 230 quiz [IMG:Testguy.gif]" alt="This question is drawn from a STAT 230 quiz" /> Let X and Y be discrete random variables with the joint probability function  f(x,y) given by the table:<br />
<br />
<table width="162" cellspacing="0" cellpadding="0" border="0" style="border-collapse: collapse; width: 121pt;" x:str="">
    <colgroup>     <col width="15" style="width: 11pt;"></col><col width="39" style="width: 29pt;"></col>     <col width="36" span="3" style="width: 27pt;"></col>   </colgroup>
    <tbody>
        <tr height="18" style="height: 13.2pt;">
            <td width="15" height="18" style="border: medium none ; height: 13.2pt; width: 11pt; color: windowtext; font-size: 10pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Arial; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;">&nbsp;</td>
            <td width="39" style="border-style: none solid none none; border-color: -moz-use-text-color windowtext -moz-use-text-color -moz-use-text-color; border-width: medium 0.5pt medium medium; width: 29pt; color: windowtext; font-size: 10pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Arial; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;">&nbsp;</td>
            <td width="108" style="border: medium none ; width: 81pt; font-weight: 700; font-family: Arial,sans-serif; text-align: center; color: windowtext; font-size: 10pt; font-style: normal; text-decoration: none; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;" colspan="3">X</td>
        </tr>
        <tr height="18" style="height: 13.2pt;">
            <td height="18" style="border-style: none none solid; border-color: -moz-use-text-color -moz-use-text-color windowtext; border-width: medium medium 0.5pt; height: 13.2pt; font-weight: 700; font-family: Arial,sans-serif; color: windowtext; font-size: 10pt; font-style: normal; text-decoration: none; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;">&nbsp;</td>
            <td style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 0.5pt 0.5pt medium; font-weight: 700; font-family: Arial,sans-serif; text-align: center; color: windowtext; font-size: 10pt; font-style: normal; text-decoration: none; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;">f(x,y)</td>
            <td x:num="" style="border-style: none none solid; border-color: -moz-use-text-color -moz-use-text-color windowtext; border-width: medium medium 0.5pt; font-weight: 700; font-family: Arial,sans-serif; text-align: center; color: windowtext; font-size: 10pt; font-style: normal; text-decoration: none; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;">1</td>
            <td style="border-style: none none solid; border-color: -moz-use-text-color -moz-use-text-color windowtext; border-width: medium medium 0.5pt; font-weight: 700; font-family: Arial,sans-serif; text-align: center; color: windowtext; font-size: 10pt; font-style: normal; text-decoration: none; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;" x:num="">2</td>
            <td style="border-style: none none solid; border-color: -moz-use-text-color -moz-use-text-color windowtext; border-width: medium medium 0.5pt; font-weight: 700; font-family: Arial,sans-serif; text-align: center; color: windowtext; font-size: 10pt; font-style: normal; text-decoration: none; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;" x:num="">3</td>
        </tr>
        <tr height="18" style="height: 13.2pt;">
            <td height="36" style="border: medium none ; height: 26.4pt; font-weight: 700; font-family: Arial,sans-serif; text-align: center; vertical-align: middle; color: windowtext; font-size: 10pt; font-style: normal; text-decoration: none; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;" rowspan="2">Y</td>
            <td x:num="" style="border-style: none solid none none; border-color: -moz-use-text-color windowtext -moz-use-text-color -moz-use-text-color; border-width: medium 0.5pt medium medium; font-weight: 700; font-family: Arial,sans-serif; text-align: center; color: windowtext; font-size: 10pt; font-style: normal; text-decoration: none; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;">1</td>
            <td style="border: medium none ; text-align: center; color: windowtext; font-size: 10pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Arial; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;" x:num="">$F11</td>
            <td style="border: medium none ; text-align: center; color: windowtext; font-size: 10pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Arial; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;" x:num="">$F12</td>
            <td style="border: medium none ; text-align: center; color: windowtext; font-size: 10pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Arial; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;" x:num="">$F13</td>
        </tr>
        <tr height="18" style="height: 13.2pt;">
            <td height="18" x:num="" style="border-style: none solid none none; border-color: -moz-use-text-color windowtext -moz-use-text-color -moz-use-text-color; border-width: medium 0.5pt medium medium; height: 13.2pt; font-weight: 700; font-family: Arial,sans-serif; text-align: center; color: windowtext; font-size: 10pt; font-style: normal; text-decoration: none; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;">2</td>
            <td style="border: medium none ; text-align: center; color: windowtext; font-size: 10pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Arial; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;" x:num="">$F21</td>
            <td style="border: medium none ; text-align: center; color: windowtext; font-size: 10pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Arial; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;" x:num="">$F22</td>
            <td style="border: medium none ; text-align: center; color: windowtext; font-size: 10pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Arial; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;" x:num="">$F23</td>
        </tr>
    </tbody>
</table>
<p><br />
Let Z be a r.v. defined by Z = |X - Y| . Notice that Z takes on values 0, 1,  and 2. Which of the following are the probabilities for these values (in the  order given)?</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.choice.5=$Alt4@
qu.7.3.fixed=@

qu.7.4.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Joint and Marginal Distributions/Q$Q">Suppose X is uniform on <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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><mn>1</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mn>2</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mn>3</mn></mrow></mfenced></mrow></mstyle></math> and given <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>x</mi></mrow></mstyle></math>,&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>Y~Binomial</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>x</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>$a</mi></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow></mstyle></math>
<p>Find <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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.0em' rspace='0.0em'>&#32;</mo><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lpar;</mo><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$b</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>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&rpar;</mo></mrow></mstyle></math>(to 3 decimal places)</p>
<div>&nbsp;</div>
</div>@
qu.7.4.answer.num=$Ans@
qu.7.4.answer.units=@
qu.7.4.showUnits=false@
qu.7.4.grading=toler_abs@
qu.7.4.err=.01@
qu.7.4.negStyle=minus@
qu.7.4.numStyle=thousands scientific dollars arithmetic@
qu.7.4.mode=Numeric@
qu.7.4.name=15. P(X [U] = x | Y [Bin] = 1)@
qu.7.4.comment=<p>The joint probability function 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>p</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>x</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>y</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>x</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>y</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lpar;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>y</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>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>x</mi><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&rpar;</mo><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>x</mi></mrow></mfenced></mrow></mstyle></math></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><mn>1</mn><mrow><mn>3</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</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>x</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>y</mi></mrow></mtd></mtr></mtable></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mi mathvariant='normal'>$a</mi><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>y</mi></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi mathvariant='normal'>$a</mi></mrow></mfenced><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>x</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>y</mi></mrow></msup><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mn>0</mn><mo lspace='0.2777778em' rspace='0.2777778em'>&leq;</mo><mi>y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&leq;</mo><mi>x</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&leq;</mo><mn>3</mn></mrow></mstyle></math></p>
<p>So&nbsp;<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lpar;</mo><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$b</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>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn><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><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$b</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn></mrow></mfenced></mrow><mrow><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn></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><mrow><mi>p</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi mathvariant='normal'>$b</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mn>1</mn></mrow></mfenced></mrow><mrow><mi>p</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mn>1</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mn>1</mn></mrow></mfenced><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>p</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mn>2</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mn>1</mn></mrow></mfenced><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>p</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mn>3</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mn>1</mn></mrow></mfenced></mrow></mfrac></mrow></mstyle></math>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mfrac><mn>1</mn><mrow><mn>3</mn></mrow></mfrac><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 mathvariant='normal'>$b</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>1</mn></mrow></mtd></mtr></mtable></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mi mathvariant='normal'>$a</mi><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mn>1</mn></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi mathvariant='normal'>$a</mi></mrow></mfenced><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>$b</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>1</mn></mrow></msup></mrow><mrow><mfrac><mrow><mn>1</mn></mrow><mrow><mn>3</mn></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</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><mn>1</mn></mrow></mtd></mtr><mtr><mtd><mrow><mn>1</mn></mrow></mtd></mtr></mtable></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mi mathvariant='normal'>$a</mi><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mn>1</mn></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi mathvariant='normal'>$a</mi></mrow></mfenced><mrow><mn>0</mn></mrow></msup><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mfrac><mn>1</mn><mrow><mn>3</mn></mrow></mfrac><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><mn>2</mn></mrow></mtd></mtr><mtr><mtd><mrow><mn>1</mn></mrow></mtd></mtr></mtable></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mi mathvariant='normal'>$a</mi><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mn>1</mn></mrow></msup><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 mathvariant='normal'>$a</mi></mrow></mfenced><msup><mi></mi><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mn>1</mn></mrow></msup><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mfrac><mn>1</mn><mrow><mn>3</mn></mrow></mfrac><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><mn>3</mn></mrow></mtd></mtr><mtr><mtd><mrow><mn>1</mn></mrow></mtd></mtr></mtable></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mi mathvariant='normal'>$a</mi><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mn>1</mn></mrow></msup><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi mathvariant='normal'>$a</mi></mrow></mfenced><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mn>2</mn></mrow></msup></mrow></mfrac></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow></mstyle></math>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mi mathvariant='normal'>$b</mi><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi mathvariant='normal'>$a</mi></mrow></mfenced><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>$b</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mn>1</mn></mrow></msup></mrow><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mn>2</mn><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 mathvariant='normal'>$a</mi></mrow></mfenced><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mn>3</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi mathvariant='normal'>$a</mi></mrow></mfenced><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mn>2</mn></mrow></msup></mrow></mfrac></mrow></mstyle></math>= $Ans</p>@
qu.7.4.editing=useHTML@
qu.7.4.solution=@
qu.7.4.algorithm=$Q=15;
$a=decimal(1,range(0.1,0.9,0.1));
$b=range(1,3,1);
$Ans= decimal(3,$b*((1-$a)^($b-1))/(1+2*(1-$a)+3*(1-$a)^2));@
qu.7.4.uid=3effcd4b-7f9b-4ff9-9f3d-cafde37b255a@
qu.7.4.info=  Difficulty=4;
  Type=numeric;
@

qu.7.5.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Joint and Marginal Distributions/Q$Q">Suppose a box contains 6 Red, 2 Green and $a White balls. Two balls are selected at random without replacement. X is the number of red and Y is the number of green balls in the sample.
<p>&nbsp;Find&nbsp;<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>0</mn><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>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn></mrow></mfenced></mrow><mrow></mrow></mstyle></math> (to 3 decimal places).</p>
</div>@
qu.7.5.answer.num=$a/($a+6)@
qu.7.5.answer.units=@
qu.7.5.showUnits=false@
qu.7.5.grading=toler_abs@
qu.7.5.err=.005@
qu.7.5.negStyle=minus@
qu.7.5.numStyle=thousands scientific dollars arithmetic@
qu.7.5.mode=Numeric@
qu.7.5.name=09. Find P( X=0 | Y=1 )@
qu.7.5.comment=<p>The joint pdf is best thought of as: <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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><mi>Choose</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>x</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>of</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mn>6</mn><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>red</mi></mrow></mfenced><mfenced open='(' close=')' separators=','><mrow><mi>Choose</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>y</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>of</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mn>2</mn><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>green</mi></mrow></mfenced><mfenced open='(' close=')' separators=','><mrow><mi>Choose</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mn>2</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>x</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>y from</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>$a</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>white</mi></mrow></mfenced></mrow><mrow><mfenced open='(' close=')' separators=','><mrow><mi>Choose</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mn>2 from</mn><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>$Total</mi></mrow></mfenced></mrow></mfrac></mrow></mstyle></math><br />
<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>x</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>y</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mn>6</mn></mrow></mtd></mtr><mtr><mtd><mrow><mi>x</mi></mrow></mtd></mtr></mtable></mrow></mfenced><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><mn>2</mn></mrow></mtd></mtr><mtr><mtd><mrow><mi>y</mi></mrow></mtd></mtr></mtable></mrow></mfenced><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'>$a</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>2</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>x</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>y</mi></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'>$Total</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>2</mn></mrow></mtd></mtr></mtable></mrow></mfenced></mrow></mfrac><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>x</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&GreaterEqual;</mo><mn>0</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&GreaterEqual;</mo><mn>0</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>x</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&leq;</mo><mn>2</mn></mrow></mstyle></math></p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&lpar;</mo><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>0</mn><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>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn><mo fence='true' lspace='0.1666667em' rspace='0.1666667em' stretchy='true'>&rpar;</mo><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfrac><mrow><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>0</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn></mrow></mfenced></mrow><mrow><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn></mrow></mfenced></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></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><mrow><mfrac><mrow><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>0</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn></mrow></mfenced></mrow><mrow><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>0</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn></mrow></mfenced><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn></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><mrow><mi mathvariant='normal'>$a</mi></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>$a</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mn>6</mn></mrow></mfrac></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow></mstyle></math>= $Ans</p>@
qu.7.5.editing=useHTML@
qu.7.5.solution=@
qu.7.5.algorithm=$Q=9;
$a=range(2,5);
$Total=8+$a;
$Ans=decimal(3,$a/($a+6));@
qu.7.5.uid=71183329-8e2f-420e-83ac-f54b23f1d727@
qu.7.5.info=  Difficulty=3;
  Type=numeric;
  Author=Sean Scott;
  Course=230;
@

qu.7.6.mode=Multiple Choice@
qu.7.6.name=14. Coins & Joint PDF I@
qu.7.6.comment=<p>First build the Joint Distribution Table:</p>
<table cellspacing="0" cellpadding="3" border="1">
    <tbody>
        <tr>
            <td colspan="2" rowspan="2">&nbsp;f(x,y)</td>
            <td align="center" colspan="4">X</td>
        </tr>
        <tr>
            <td align="center"><strong>0</strong></td>
            <td align="center"><strong>1</strong></td>
            <td align="center"><strong>2</strong></td>
            <td align="center"><strong>3</strong></td>
        </tr>
        <tr>
            <td rowspan="2">Y</td>
            <td><strong>1</strong></td>
            <td align="center">0</td>
            <td 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><mn>3</mn><mrow><mn>8</mn></mrow></mfrac></mrow></mstyle></math></td>
            <td 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><mn>3</mn><mrow><mn>8</mn></mrow></mfrac></mrow></mstyle></math></td>
            <td align="center">0</td>
        </tr>
        <tr>
            <td><strong>3</strong></td>
            <td 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><mn>1</mn><mrow><mn>8</mn></mrow></mfrac></mrow></mstyle></math></td>
            <td align="center">0</td>
            <td align="center">0</td>
            <td 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><mn>1</mn><mrow><mn>8</mn></mrow></mfrac></mrow></mstyle></math></td>
        </tr>
    </tbody>
</table>
<p>In no particular order:</p>
<ul>
    <li>f(0,1) < f(0,3) is TRUE. From the table, f(0,1) = 0 < <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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>8</mn></mrow></mfrac></mrow></mstyle></math> = f(0,3).</li>
    <li>"f(1,y) = f(3,y) for all y for which f(x,y) is defined" is FALSE. Just compare the second and fourth columns of the table.</li>
    <li>"Possible Y values are 1 and 3." is TRUE. You can have all 3 dice the same (Y = 3), or 2 of one type and 1 of the other (so Y = 1).</li>
    <li>"f<sub>2</sub>(1) = 0.75" is TRUE, just add up row 1 of the table.</li>
    <li>It is TRUE that f<sub>2</sub>(3) < f<sub>1</sub>(1), just add up row 2 and column 2 respectively of the table and compare them.</li>
</ul>@
qu.7.6.editing=useHTML@
qu.7.6.solution=@
qu.7.6.algorithm=@
qu.7.6.uid=cf9ac7c9-069d-4731-98bc-b5cd8643a455@
qu.7.6.info=  Type=MC;
  Algorithmic=no;
@
qu.7.6.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Joint and Marginal Distributions/Q14">Suppose a fair coin is tossed 3 times. Define the random variables <br />
<ul>
    <li>X = number of Heads</li>
    <li>Y = |(# Tails) - (#Heads)|&nbsp;&nbsp;&nbsp; (absolute value).</li>
</ul>
<p>Let f(x,y) be the joint probability function for (X, Y ). Which of the following is NOT true?</p>
</div>@
qu.7.6.answer=2@
qu.7.6.choice.1=f(0,1) < f(0,3)@
qu.7.6.choice.2=f(1,y) = f(3,y) for all y for which f(x,y) is defined.@
qu.7.6.choice.3=Possible Y values are 1 and 3.@
qu.7.6.choice.4=f<sub>2</sub>(1) = 0.75@
qu.7.6.choice.5=f<sub>2</sub>(3) < f<sub>1</sub>(1)@
qu.7.6.fixed=@

qu.7.7.mode=Inline@
qu.7.7.name=03b. Find k for a joint pdf@
qu.7.7.comment=<p>Use the fact that any (discrete) probability function must sum up to 1. So add up all  terms of the form <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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>k</mi></mrow></mfrac><mfenced open='(' close=')' separators=','><mrow><mi>x</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>y</mi></mrow></mfenced></mrow></mstyle></math> for the range of x and y values given, set the  sum to 1 and solve for k.</p>
<p>In particular here the joint probability distribution written out explicitly is<br />
&nbsp;</p>
<center>
<table cellspacing="0" cellpadding="0" bordercolor="#111111" border="1" style="border-collapse: collapse;" id="AutoNumber1">
    <tbody>
        <tr>
            <td colspan="2">&nbsp;&nbsp;</td>
            <td align="center" colspan="3">x</td>
        </tr>
        <tr>
            <td colspan="2">&nbsp;f(x,y)</td>
            <td align="center">$x0</td>
            <td align="center">$x1</td>
            <td align="center">$x2</td>
        </tr>
        <tr>
            <td rowspan="2">y</td>
            <td>$y0</td>
            <td><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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>k</mi></mrow></mfrac><mi mathvariant='normal'>$T00</mi></mrow></mstyle></math></td>
            <td><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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>k</mi></mrow></mfrac><mi mathvariant='normal'>$T01</mi></mrow></mstyle></math></td>
            <td><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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>k</mi></mrow></mfrac><mi mathvariant='normal'>$T02</mi></mrow></mstyle></math></td>
        </tr>
        <tr>
            <td>$y1</td>
            <td><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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>k</mi></mrow></mfrac><mi mathvariant='normal'>$T10</mi></mrow></mstyle></math></td>
            <td><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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>k</mi></mrow></mfrac><mi mathvariant='normal'>$T11</mi></mrow></mstyle></math></td>
            <td><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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>k</mi></mrow></mfrac><mi mathvariant='normal'>$T12</mi></mrow></mstyle></math></td>
        </tr>
    </tbody>
</table>
</center>
<p align="left">As with any discrete probability distribution, the sum of probabilities must be 1, so that lets us setup and solve and equation in <font size="3" face="Times New Roman"><em>k</em></font> :<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>k</mi></mrow></mfrac><mfenced open='(' close=')' separators=','><mrow><mi mathvariant='normal'>$T00</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi mathvariant='normal'>$T01</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi mathvariant='normal'>$T02</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi mathvariant='normal'>$T10</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi mathvariant='normal'>$T11</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi mathvariant='normal'>$T12</mi></mrow></mfenced></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><mn>1</mn></mrow></mstyle></math></p>
<p align="left"><font size="3" face="Times New Roman"><em>k</em> = $k</font></p>
<p>&nbsp;</p>@
qu.7.7.editing=useHTML@
qu.7.7.solution=@
qu.7.7.algorithm=$Q="03b";
$x0=range(0,4,1);
$x1=$x0+1;
$x2=$x0+2;
$y0=range(1,6,1);
$y1=$y0+1;
$T00=$x0+$y0;
$T01=$x1+$y0;
$T02=$x2+$y0;
$T10=$x0+$y1;
$T11=$x1+$y1;
$T12=$x2+$y1;
$k=3*(2*$x0+2*$y0)+9;
$Alt1=range($k-9,$k+9,3);
condition:ne($Alt1,$k);
$Alt2=$k+$Alt1;
$Alt3=range(5,2*$k,5);
$Alt4=range(4,$k,2);@
qu.7.7.uid=9990ce4d-7d19-43e4-b95c-61cf3aeea8a6@
qu.7.7.info=  Type=MC;
  Course=230;
  Difficulty=2;
  Keyword=joint;
  Author=Sean Scott;
  Source=SMS;
@
qu.7.7.weighting=1@
qu.7.7.numbering=alpha@
qu.7.7.part.1.name=sro_id_1@
qu.7.7.part.1.editing=useHTML@
qu.7.7.part.1.choice.5=$Alt4<br>@
qu.7.7.part.1.fixed=@
qu.7.7.part.1.choice.4=$Alt3<br>@
qu.7.7.part.1.question=null@
qu.7.7.part.1.choice.3=$Alt2<br>@
qu.7.7.part.1.choice.2=$Alt1<br>@
qu.7.7.part.1.choice.1=$k@
qu.7.7.part.1.mode=Multiple Choice@
qu.7.7.part.1.display=vertical@
qu.7.7.part.1.answer=1@
qu.7.7.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Joint and Marginal Distributions/Q$Q">Let X and Y be discrete random variables with the joint probability function: <br /><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>f</mi><mfenced open='(' close=')' separators=','><mrow><mi>x</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>y</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mn>1</mn><mrow><mi>k</mi></mrow></mfrac><mfenced open='(' close=')' separators=','><mrow><mi>x</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>y</mi></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>x</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$x0</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi mathvariant='normal'>$x1</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi mathvariant='normal'>$x2</mi><mo separator='true' lspace='0.0em' rspace='0.2777778em'>&semi;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>$y0</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>$y1</mi></mrow></mstyle></math><br />What is k?</p><p><span> </span><1><span> </span></p></div>@

qu.7.8.mode=Multiple Choice@
qu.7.8.name=18. Marginals for X@
qu.7.8.comment=<p>The marginal probability distribution for X is <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><msub><mi>f</mi><mrow><mn>1</mn></mrow></msub><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>y</mi></mrow><mi></mi></munderover><mi mathcolor='#0000ff'>f</mi><mfenced open='(' close=')' separators=','><mrow><mi>x</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>y</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>f</mi><mfenced open='(' close=')' separators=','><mrow><mi>x</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><msub><mi>y</mi><mrow><mn>1</mn></mrow></msub></mrow></mfenced><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>f</mi><mfenced open='(' close=')' separators=','><mrow><mi>x</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><msub><mi>y</mi><mrow><mn>2</mn></mrow></msub></mrow></mfenced><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>f</mi><mfenced open='(' close=')' separators=','><mrow><mi>x</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><msub><mi>y</mi><mrow><mn>3</mn></mrow></msub></mrow></mfenced></mrow></mstyle></math>&nbsp;</p>
<p>In other words just add up each column . Here's the table with the marginals included:&nbsp;</p>
<p>
<table cellspacing="0" cellpadding="3" bordercolor="#111111" border="1">
    <tbody>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center" colspan="3"><strong>X</strong></td>
            <td align="center">&nbsp;</td>
        </tr>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center"><strong>$x1</strong></td>
            <td align="center"><span style="font-weight: bold;">$x2</span></td>
            <td align="center"><span style="font-weight: bold;">$x3</span></td>
            <td align="center">&nbsp;</td>
        </tr>
        <tr valign="middle">
            <td rowspan="3"><strong>Y</strong></td>
            <td align="right" style="font-weight: bold;">$y1</td>
            <td align="right">$F11</td>
            <td align="right">$F21</td>
            <td align="right">$F31</td>
            <td align="right"><font color="#ff0000">$fy1</font></td>
        </tr>
        <tr valign="bottom">
            <td align="right" style="font-weight: bold;" x:num="">$y2</td>
            <td align="right">$F12</td>
            <td align="right">$F22</td>
            <td align="right">$F32</td>
            <td align="right"><font color="#ff0000">$fy2</font></td>
        </tr>
        <tr valign="bottom">
            <td align="right" style="font-weight: bold;">$y3</td>
            <td align="right">$F13</td>
            <td align="right">$F23</td>
            <td align="right">$F33</td>
            <td align="right"><font color="#ff0000">$fy3</font></td>
        </tr>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td align="right" style="font-weight: bold;">&nbsp;</td>
            <td align="right"><font color="#ff0000">$fx1</font></td>
            <td align="right"><font color="#ff0000">$fx2</font></td>
            <td align="right"><font color="#ff0000">$fx3</font></td>
            <td align="right">&nbsp;</td>
        </tr>
    </tbody>
</table>
</p>
<p>So the marginal distribution of X is:</p>
<table cellpadding="3" bordercolor="#111111" border="1" style="border-collapse: collapse;" id="AutoNumber1">
    <tbody>
        <tr>
            <td align="center">x</td>
            <td align="center">$x1</td>
            <td align="center">$x2</td>
            <td align="center">$x3</td>
        </tr>
        <tr>
            <td>f<sub>1</sub>(x)</td>
            <td>$fx1</td>
            <td>$fx2</td>
            <td>$fx3</td>
        </tr>
    </tbody>
</table>@
qu.7.8.editing=useHTML@
qu.7.8.solution=@
qu.7.8.algorithm=$Q="18";
$x1=range(1,5,1);
$x2=$x1+range(1,3,1);
$x3=$x2+range(1,3,1);
$x=($x1,$x2,$x3);
$y1=range(-5,-1,2);
$y2=0;
$y3=-$y1;
$y=($y1,$y2,$y3);
$fx1=decimal(2,range(0.1,0.5,0.05));
$fx2=decimal(2,range(0.1,0.5,0.05));
$fx3=1-$fx2-$fx1;
$fy1=decimal(2,range(0.1,0.5,0.05));
$fy2=decimal(2,range(0.1,0.5,0.05));
$fy3=1-$fy2-$fy1;
$F11=$fx1*$fy1;
$F12=$fx1*$fy2;
$F13=$fx1*$fy3;
$F21=$fx2*$fy1;
$F22=$fx2*$fy2;
$F23=$fx2*$fy3;
$F31=$fx3*$fy1;
$F32=$fx3*$fy2;
$F33=$fx3*$fy3;
$Alt2fx1=decimal(3,range(0.25,0.75,0.05)*$fx1);
$Alt2fx2=$fx2;
$Alt2fx3=1-$Alt2fx1-$Alt2fx2;
$Alt3fx2=decimal(3,range(0.25,0.75,0.05)*$fx2);
$Alt3fx1=$fx1;
$Alt3fx3=1-$Alt3fx1-$Alt3fx2;
$Alt4fx1=decimal(3,range(0.25,0.75,0.05)*$fx3);
$Alt4fx3=$fx1;
$Alt4fx2=1-$Alt4fx1-$Alt4fx3;@
qu.7.8.uid=30b461a2-a8c8-4bc1-9389-6b7b44f23a24@
qu.7.8.info=  Course=230;
  Type=MC;
  Diificulty=2;
  Keyword=joint;
  Author=Sean Scott;
  Keyword=marginal;
@
qu.7.8.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Joint and Marginal Distributions/Q$Q">
Shown here is a table for a probability distribution for r.v. X and Y.
<table cellspacing="0" cellpadding="3" bordercolor="#111111" border="1">
    <tbody>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center" colspan="3"><strong>X</strong></td>
        </tr>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center"><strong>$x1</strong></td>
            <td align="center"><span style="font-weight: bold;">$x2</span></td>
            <td align="center"><span style="font-weight: bold;">$x3</span></td>
        </tr>
        <tr valign="middle">
            <td rowspan="3"><strong>Y</strong></td>
            <td align="right" style="font-weight: bold;">$y1</td>
            <td align="right">$F11</td>
            <td align="right">$F21</td>
            <td align="right">$F31</td>
        </tr>
        <tr valign="bottom">
            <td align="right" x:num="" style="font-weight: bold;">$y2</td>
            <td align="right">$F12</td>
            <td align="right">$F22</td>
            <td align="right">$F32</td>
        </tr>
        <tr valign="bottom">
            <td align="right" style="font-weight: bold;">$y3</td>
            <td align="right">$F13</td>
            <td align="right">$F23</td>
            <td align="right">$F33</td>
        </tr>
    </tbody>
</table>
<p><br />
Which of the following is the <em>marginal probability distribution</em> of X?</p>
</div>
<p>&nbsp;</p>@
qu.7.8.answer=1@
qu.7.8.choice.1=   <table border="1" cellpadding="3" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber1">     <tr>       <td align="center">x</td>       <td align="center">$x1</td>       <td align="center">$x2</td>       <td align="center">$x3</td>     </tr>     <tr>       <td>f<sub>1</sub>(x)</td>       <td>$fx1</td>       <td>$fx2</td>       <td>$fx3</td>     </tr>   </table>   </center>@
qu.7.8.choice.2=   <table border="1" cellpadding="3" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber1">     <tr>       <td align="center">x</td>       <td align="center">$x1</td>       <td align="center">$x2</td>       <td align="center">$x3</td>     </tr>     <tr>       <td>f<sub>1</sub>(x)</td>       <td>$fx2</td>       <td>$fx3</td>       <td>$fx1</td>     </tr>   </table>   </center>@
qu.7.8.choice.3=   <table border="1" cellpadding="3" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber1">     <tr>       <td align="center">x</td>       <td align="center">$x1</td>       <td align="center">$x2</td>       <td align="center">$x3</td>     </tr>     <tr>       <td>f<sub>1</sub>(x)</td>       <td>$Alt2fx2</td>       <td>$Alt2fx3</td>       <td>$Alt2fx1</td>     </tr>   </table>   </center>@
qu.7.8.choice.4=   <table border="1" cellpadding="3" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber1">     <tr>       <td align="center">x</td>       <td align="center">$x1</td>       <td align="center">$x2</td>       <td align="center">$x3</td>     </tr>     <tr>       <td>f<sub>1</sub>(x)</td>       <td>$Alt3fx2</td>       <td>$Alt3fx3</td>       <td>$Alt3fx1</td>     </tr>   </table>   </center>@
qu.7.8.choice.5=   <table border="1" cellpadding="3" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber1">     <tr>       <td align="center">x</td>       <td align="center">$x1</td>       <td align="center">$x2</td>       <td align="center">$x3</td>     </tr>     <tr>       <td>f<sub>1</sub>(x)</td>       <td>$Alt4fx1</td>       <td>$Alt4fx2</td>       <td>$Alt4fx3</td>     </tr>   </table>   </center>@
qu.7.8.fixed=@

qu.7.9.mode=True False@
qu.7.9.name=21. X and Y independent ?@
qu.7.9.comment=<p>Just add up the row for each Y value.</p>
<p>Y=1: f<sub>2</sub>(1) = $F11 + $F12 + $F13 = $fy1</p>
<p>Y=2: f<sub>2</sub>(2) = $F21 + $F22 + $F23 = $fy2</p>
<p>and column for each x value and show that the cross products give you the table entries.</p>@
qu.7.9.editing=useHTML@
qu.7.9.solution=@
qu.7.9.algorithm=$Q=21;
$x1=1;
$x2=2;
$x3=3;
$x=($x1,$x2,$x3);
$y1=1;
$y2=2;
$y=($y1,$y2);
$fx1=decimal(2,range(0.1,0.5,0.05));
$fx2=decimal(2,range(0.1,0.5,0.05));
$fx3=1-$fx2-$fx1;
$fy1=decimal(2,range(0.1,0.65,0.05));
$fy2=1-$fy1;
$F11=decimal(4,$fx1*$fy1);
$F12=decimal(4,$fy1*$fx2);
$F13=decimal(4,$fy1-$F11-$F12);
$F21=decimal(4,$fy2*$fx1);
$F22=decimal(4,$fx2*$fy2);
$F23=decimal(4,$fy2-$F21-$F22);@
qu.7.9.uid=febeaa87-6892-409a-8672-e338ec718030@
qu.7.9.info=  Course=230;
  Type=TF;
@
qu.7.9.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Joint and Marginal Distributions/Q$Q">Let X and Y be discrete random variables with the joint probability function  f(x,y) given by the table:<br />
<br />
<table cellpadding="4" border="1">
    <tbody>
        <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td colspan="3">X</td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td>f(x,y)</td>
            <td>1</td>
            <td>2</td>
            <td>3</td>
        </tr>
        <tr>
            <td rowspan="2">Y</td>
            <td>1</td>
            <td>$F11</td>
            <td>$F12</td>
            <td>$F13</td>
        </tr>
        <tr>
            <td>2</td>
            <td>$F21</td>
            <td>$F22</td>
            <td>$F23</td>
        </tr>
    </tbody>
</table>
<p><br />
True or False: X and Y are independent .</p>
</div>@
qu.7.9.answer=1@
qu.7.9.choice.1=True@
qu.7.9.choice.2=False@
qu.7.9.fixed=@

qu.7.10.question=<div title="University of Waterloo Statistics Bank/Discrete Multivariate Distributions/Joint and Marginal Distributions/Q$Q">Suppose a box contains 6 Red, 2 Green and $a White balls. Two balls are selected at random without replacement. X is the number of red and Y is the number of green balls in the sample.&nbsp;
<p>Find <font size="3" face="Times New Roman"><em>P</em>(<em>X</em>=1, <em>Y</em>=1)</font> (to 3 decimal places).</p>
<div>&nbsp;</div>
</div>@
qu.7.10.answer.num=24/((8+$a)*(7+$a))@
qu.7.10.answer.units=@
qu.7.10.showUnits=false@
qu.7.10.grading=toler_abs@
qu.7.10.err=.01@
qu.7.10.negStyle=minus@
qu.7.10.numStyle=thousands scientific dollars arithmetic@
qu.7.10.mode=Numeric@
qu.7.10.name=05. Find P(1 red & 1 green ball)@
qu.7.10.comment=<p>The joint pdf 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>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>x</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>y</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi>6</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>x</mi></mrow></mtd></mtr></mtable></mrow></mfenced><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><mn>2</mn></mrow></mtd></mtr><mtr><mtd><mrow><mi>y</mi></mrow></mtd></mtr></mtable></mrow></mfenced><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'>$a</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>2</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>x</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>y</mi></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><mn>8</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>$a</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>2</mn></mrow></mtd></mtr></mtable></mrow></mfenced></mrow></mfrac><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>x</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&GreaterEqual;</mo><mn>0</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&GreaterEqual;</mo><mn>0</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>x</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&leq;</mo><mn>2</mn></mrow></mstyle></math></p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mn>6</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mn>2</mn></mrow><mrow><mfrac><mrow><mfenced open='(' close=')' separators=','><mrow><mn>8</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi mathvariant='normal'>$a</mi></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfenced open='(' close=')' separators=','><mrow><mn>7</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi mathvariant='normal'>$a</mi></mrow></mfenced></mrow><mrow><mn>2</mn></mrow></mfrac></mrow></mfrac><mspace height='0.0ex' width='0.0em' depth='0.0ex' linebreak='newline'/><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mn>24</mn><mrow><mfenced open='(' close=')' separators=','><mrow><mn>8</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi mathvariant='normal'>$a</mi></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfenced open='(' close=')' separators=','><mrow><mn>7</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi mathvariant='normal'>$a</mi></mrow></mfenced></mrow></mfrac></mrow></mrow></mstyle></math>= $Ans</p>@
qu.7.10.editing=useHTML@
qu.7.10.solution=@
qu.7.10.algorithm=$Q=5;
$a=range(2,5,1);
$Ans=decimal(4,24/((8+$a)*(7+$a)));@
qu.7.10.uid=e7a8fcc3-2781-4c2d-a688-35936c5e4410@
qu.7.10.info=  Difficulty=2;
  Type=numeric;
  Author=Sean Scott;
  Course=230;
@

qu.7.11.mode=True False@
qu.7.11.name=08. Are X and Y Independent?@
qu.7.11.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>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>2</mn></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&gt;</mo><mn>0</mn></mrow></mstyle></math> 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>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>2</mn></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&gt;</mo><mn>0</mn></mrow></mstyle></math> but <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>2</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>2</mn></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>0</mn></mrow></mstyle></math></p>
<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><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>2</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>2</mn></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&ne;</mo><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>2</mn></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>2</mn></mrow></mfenced></mrow></mstyle></math></p>
<p>So X and Y are not independent</p>@
qu.7.11.editing=useHTML@
qu.7.11.solution=@
qu.7.11.algorithm=$Q=8;
$a=range(2,5);@
qu.7.11.uid=f3a11cfa-98da-4ce7-b3f9-1886bde84470@
qu.7.11.info=  Difficulty=2;
  Type=T/F;
  Course=230;
  Author=Sean Scott;
@
qu.7.11.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Joint and Marginal Distributions/Q$Q">Suppose a box contains 6 Red, 2 Green and $a White balls. Two balls are selected at random without replacement. X is the number of red and Y is the number of green balls in the sample. <br />
<p>X and Y are independent: True or False?</p>
</div>@
qu.7.11.answer=2@
qu.7.11.choice.1=True@
qu.7.11.choice.2=False@
qu.7.11.fixed=@

qu.7.12.mode=Multiple Choice@
qu.7.12.name=19. Marginals for Y@
qu.7.12.comment=<p>The marginal probability distribution for Y 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><msub><mi>f</mi><mrow><mn>2</mn></mrow></msub><mfenced open='(' close=')' separators=','><mrow><mi>y</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><munderover><mo lspace='0.0em' rspace='0.1666667em' stretchy='true' largeop='true' movablelimits='true'>&Sum;</mo><mrow><mi>x</mi></mrow><mi></mi></munderover><mi mathcolor='#0000ff'>f</mi><mfenced open='(' close=')' separators=','><mrow><mi>x</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>y</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>f</mi><mfenced open='(' close=')' separators=','><mrow><msub><mi>x</mi><mrow><mn>1</mn></mrow></msub><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><msub><mi>y</mi><mrow></mrow></msub></mrow></mfenced><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>f</mi><mfenced open='(' close=')' separators=','><mrow><msub><mi>x</mi><mrow><mn>2</mn></mrow></msub><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><msub><mi>y</mi><mrow></mrow></msub></mrow></mfenced><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>f</mi><mfenced open='(' close=')' separators=','><mrow><msub><mi>x</mi><mrow><mn>3</mn></mrow></msub><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><msub><mi>y</mi><mrow></mrow></msub></mrow></mfenced></mrow><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow></mstyle></math>&nbsp;</p>
<p>In other words just add up each row . Here's the table with the marginals included:&nbsp;</p>
<p>
<table cellspacing="0" cellpadding="3" bordercolor="#111111" border="1">
    <tbody>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center" colspan="3"><strong>X</strong></td>
            <td align="center">&nbsp;</td>
        </tr>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center"><strong>$x1</strong></td>
            <td align="center"><span style="font-weight: bold;">$x2</span></td>
            <td align="center"><span style="font-weight: bold;">$x3</span></td>
            <td align="center">&nbsp;</td>
        </tr>
        <tr valign="middle">
            <td rowspan="3"><strong>Y</strong></td>
            <td align="right" style="font-weight: bold;">$y1</td>
            <td align="right">$F11</td>
            <td align="right">$F21</td>
            <td align="right">$F31</td>
            <td align="right"><font color="#ff0000">$fy1</font></td>
        </tr>
        <tr valign="bottom">
            <td align="right" x:num="" style="font-weight: bold;">$y2</td>
            <td align="right">$F12</td>
            <td align="right">$F22</td>
            <td align="right">$F32</td>
            <td align="right"><font color="#ff0000">$fy2</font></td>
        </tr>
        <tr valign="bottom">
            <td align="right" style="font-weight: bold;">$y3</td>
            <td align="right">$F13</td>
            <td align="right">$F23</td>
            <td align="right">$F33</td>
            <td align="right"><font color="#ff0000">$fy3</font></td>
        </tr>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td align="right" style="font-weight: bold;">&nbsp;</td>
            <td align="right"><font color="#ff0000">$fx1</font></td>
            <td align="right"><font color="#ff0000">$fx2</font></td>
            <td align="right"><font color="#ff0000">$fx3</font></td>
            <td align="right">&nbsp;</td>
        </tr>
    </tbody>
</table>
</p>
<p>So the marginal distribution of Y is:</p>
<table cellpadding="3" bordercolor="#111111" border="1" id="AutoNumber1" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td align="center">y</td>
            <td align="center">$y1</td>
            <td align="center">$y2</td>
            <td align="center">$y3</td>
        </tr>
        <tr>
            <td>f<sub>2</sub>(y)</td>
            <td>$fy1</td>
            <td>$fy2</td>
            <td>$fy3</td>
        </tr>
    </tbody>
</table>@
qu.7.12.editing=useHTML@
qu.7.12.solution=@
qu.7.12.algorithm=$Q="19";
$x1=range(1,5,1);
$x2=$x1+range(1,3,1);
$x3=$x2+range(1,3,1);
$x=($x1,$x2,$x3);
$y1=range(-5,-1,2);
$y2=0;
$y3=-$y1;
$y=($y1,$y2,$y3);
$fx1=decimal(2,range(0.1,0.5,0.05));
$fx2=decimal(2,range(0.1,0.5,0.05));
$fx3=1-$fx2-$fx1;
$fy1=decimal(2,range(0.1,0.5,0.05));
$fy2=decimal(2,range(0.1,0.5,0.05));
$fy3=1-$fy2-$fy1;
$F11=$fx1*$fy1;
$F12=$fx1*$fy2;
$F13=$fx1*$fy3;
$F21=$fx2*$fy1;
$F22=$fx2*$fy2;
$F23=$fx2*$fy3;
$F31=$fx3*$fy1;
$F32=$fx3*$fy2;
$F33=$fx3*$fy3;
$Alt2fy1=decimal(3,range(0.25,0.75,0.05)*$fy1);
$Alt2fy2=$fy2;
$Alt2fy3=1-$Alt2fy1-$Alt2fy2;
$Alt3fy2=decimal(3,range(0.25,0.75,0.05)*$fy2);
$Alt3fy1=$fy1;
$Alt3fy3=1-$Alt3fy1-$Alt3fy2;
$Alt4fy1=decimal(3,range(0.25,0.75,0.05)*$fy3);
$Alt4fy3=$fy1;
$Alt4fy2=1-$Alt4fy1-$Alt4fy3;@
qu.7.12.uid=6ab9d8e6-5c44-49c1-bb1b-dceff843b455@
qu.7.12.info=  Course=230;
  Type=MC;
  Diificulty=2;
  Keyword=joint;
  Author=Sean Scott;
  Keyword=marginal;
@
qu.7.12.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Joint and Marginal Distributions/Q$Q">
Shown here is a table for a probability distribution for r.v. X and Y.
<table cellspacing="0" cellpadding="3" bordercolor="#111111" border="1">
    <tbody>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center" colspan="3"><strong>X</strong></td>
        </tr>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center"><strong>$x1</strong></td>
            <td align="center"><span style="font-weight: bold;">$x2</span></td>
            <td align="center"><span style="font-weight: bold;">$x3</span></td>
        </tr>
        <tr valign="middle">
            <td rowspan="3"><strong>Y</strong></td>
            <td align="right" style="font-weight: bold;">$y1</td>
            <td align="right">$F11</td>
            <td align="right">$F21</td>
            <td align="right">$F31</td>
        </tr>
        <tr valign="bottom">
            <td align="right" style="font-weight: bold;" x:num="">$y2</td>
            <td align="right">$F12</td>
            <td align="right">$F22</td>
            <td align="right">$F32</td>
        </tr>
        <tr valign="bottom">
            <td align="right" style="font-weight: bold;">$y3</td>
            <td align="right">$F13</td>
            <td align="right">$F23</td>
            <td align="right">$F33</td>
        </tr>
    </tbody>
</table>
<p><br />
Which of the following is the <em>marginal probability distribution</em> of Y?</p>
</div>
<p>&nbsp;</p>@
qu.7.12.answer=1@
qu.7.12.choice.1=<table border="1" cellpadding="3" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber1">     <tr>       <td align="center">      y</td>       <td align="center">$y1</td>       <td align="center">$y2</td>       <td align="center">$y3</td>     </tr>     <tr>       <td>f<sub>2</sub>(y)</td>       <td>$fy1</td>       <td>$fy2</td>       <td>$fy3</td>     </tr>   </table>   </center> @
qu.7.12.choice.2=<table border="1" cellpadding="3" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber1">     <tr>       <td align="center">           y</td>       <td align="center">$y1</td>       <td align="center">$y2</td>       <td align="center">$y3</td>     </tr>     <tr>       <td>f<sub>2</sub>(y)</td>       <td>$fy2</td>       <td>$fy3</td>       <td>$fy1</td>     </tr>   </table>   </center> @
qu.7.12.choice.3=<table border="1" cellpadding="3" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber1">     <tr>       <td align="center">              y</td>       <td align="center">$y1</td>       <td align="center">$y2</td>       <td align="center">$y3</td>     </tr>     <tr>       <td>f<sub>2</sub>(y)</td>       <td>$Alt2fy2</td>       <td>$Alt2fy3</td>       <td>$Alt2fy1</td>     </tr>   </table>   </center>@
qu.7.12.choice.4=<table border="1" cellpadding="3" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber1">     <tr>       <td align="center">                 y</td>       <td align="center">$y1</td>       <td align="center">$y2</td>       <td align="center">$y3</td>     </tr>     <tr>       <td>f<sub>2</sub>(y)</td>       <td>$Alt3fy2</td>       <td>$Alt3fy3</td>       <td>$Alt3fy1</td>     </tr>   </table>   </center>@
qu.7.12.choice.5=<table border="1" cellpadding="3" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber1">     <tr>       <td align="center">                    y</td>       <td align="center">$y1</td>       <td align="center">$y2</td>       <td align="center">$y3</td>     </tr>     <tr>       <td>f<sub>2</sub>(y)</td>       <td>$Alt4fy1</td>       <td>$Alt4fy2</td>       <td>$Alt4fy3</td>     </tr>   </table>   </center>@
qu.7.12.fixed=@

qu.7.13.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Joint and Marginal Distributions/Q$Q">Suppose a box contains 6 Red, 2 Green and $a White balls. Two balls are selected at random without replacement. X is the number of red and Y is the number of green balls in the sample.
<p>&nbsp;Find&nbsp;<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&leq;</mo><mn>1</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&leq;</mo><mn>1</mn></mrow></mfenced></mrow></mstyle></math> (to 3 decimal places).</p>
</div>@
qu.7.13.answer.num=$Ans@
qu.7.13.answer.units=@
qu.7.13.showUnits=false@
qu.7.13.grading=toler_abs@
qu.7.13.err=.01@
qu.7.13.negStyle=minus@
qu.7.13.numStyle=thousands scientific dollars arithmetic@
qu.7.13.mode=Numeric@
qu.7.13.name=06. Find P(X≤1,Y≤1)@
qu.7.13.comment=<p>The joint pdf 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>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>x</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>y</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mn>6</mn></mrow></mtd></mtr><mtr><mtd><mrow><mi>x</mi></mrow></mtd></mtr></mtable></mrow></mfenced><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><mn>2</mn></mrow></mtd></mtr><mtr><mtd><mrow><mi>y</mi></mrow></mtd></mtr></mtable></mrow></mfenced><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'>$a</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>2</mn><mi>-x-y</mi></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'>8+$a</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>2</mn></mrow></mtd></mtr></mtable></mrow></mfenced></mrow></mfrac><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>x</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&GreaterEqual;</mo><mn>0</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&GreaterEqual;</mo><mn>0</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>x</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&leq;</mo><mn>2</mn></mrow></mstyle></math></p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&leq;</mo><mn>1</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&leq;</mo><mn>1</mn></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>2</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>0</mn></mrow></mfenced><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>0</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>2</mn></mrow></mfenced><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></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><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mfrac><mfenced open='(' close=')' separators=','><mrow><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mn>6</mn></mrow></mtd></mtr><mtr><mtd><mrow><mn>2</mn></mrow></mtd></mtr></mtable></mrow></mfenced><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mn>2</mn></mrow></mtd></mtr><mtr><mtd><mrow><mn>2</mn></mrow></mtd></mtr></mtable></mrow></mfenced></mrow></mfenced><mrow><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>8+$a</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>2</mn></mrow></mtd></mtr></mtable></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><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mrow><mfrac><mn>32</mn><mrow><mfenced open='(' close=')' separators=','><mrow><mn>8</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi mathvariant='normal'>$a</mi></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfenced open='(' close=')' separators=','><mrow><mn>7</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi mathvariant='normal'>$a</mi></mrow></mfenced></mrow></mfrac></mrow></mrow></mstyle></math>= $Ans</p>@
qu.7.13.editing=useHTML@
qu.7.13.solution=@
qu.7.13.algorithm=$Q=6;
$a=range(2,5,1);
$Ans=decimal(4,1-(32/((8+$a)*(7+$a))));@
qu.7.13.uid=8c7c5dd1-3db1-4352-881f-584a05896621@
qu.7.13.info=  Difficulty=3;
  Course=230;
  Type=numeric;
  Author=Sean Scott;
@

qu.7.14.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Joint and Marginal Distributions/Q$Q">Suppose a box contains 6 Red, 2 Green and $a White balls. Two balls are selected at random without replacement. X is the number of red and Y is the number of green balls in the sample.
<p>&nbsp;Find&nbsp;<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn></mrow></mfenced></mrow><mrow><mi></mi></mrow></mstyle></math> (to 3 decimal places).</p>
<div>&nbsp;</div>
</div>@
qu.7.14.answer.num=$Ans@
qu.7.14.answer.units=@
qu.7.14.showUnits=false@
qu.7.14.grading=toler_abs@
qu.7.14.err=.01@
qu.7.14.negStyle=minus@
qu.7.14.numStyle=thousands scientific dollars arithmetic@
qu.7.14.mode=Numeric@
qu.7.14.name=07. Find P(X+Y=1)@
qu.7.14.comment=<p>The joint pdf 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>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>x</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>y</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi>6</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>x</mi></mrow></mtd></mtr></mtable></mrow></mfenced><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>2</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>y</mi></mrow></mtd></mtr></mtable></mrow></mfenced><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'>$a</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>2-x-y</mi></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'>8+$a</mi></mrow></mtd></mtr><mtr><mtd><mrow><mi>2</mi></mrow></mtd></mtr></mtable></mrow></mfenced></mrow></mfrac><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>x</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&GreaterEqual;</mo><mn>0</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&GreaterEqual;</mo><mn>0</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>x</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&leq;</mo><mn>2</mn></mrow></mstyle></math></p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>0</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn></mrow></mfenced><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>0</mn></mrow></mfenced><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></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><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mn>6</mn></mrow></mtd></mtr><mtr><mtd><mrow><mn>0</mn></mrow></mtd></mtr></mtable></mrow></mfenced><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><mn>2</mn></mrow></mtd></mtr><mtr><mtd><mrow><mn>1</mn></mrow></mtd></mtr></mtable></mrow></mfenced><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'>$a</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>1</mn></mrow></mtd></mtr></mtable></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</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><mn>6</mn></mrow></mtd></mtr><mtr><mtd><mrow><mn>1</mn></mrow></mtd></mtr></mtable></mrow></mfenced><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><mn>2</mn></mrow></mtd></mtr><mtr><mtd><mrow><mn>0</mn></mrow></mtd></mtr></mtable></mrow></mfenced><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'>$a</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>1</mn></mrow></mtd></mtr></mtable></mrow></mfenced></mrow></mfenced><mrow><mfenced open='(' close=')' separators=','><mrow><mtable rowalign='baseline' columnalign='center' groupalign='{left}' rowspacing='1.0ex'><mtr><mtd><mrow><mi mathvariant='normal'>8+$a</mi></mrow></mtd></mtr><mtr><mtd><mrow><mn>2</mn></mrow></mtd></mtr></mtable></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><mrow><mn>16</mn><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi mathvariant='normal'>$a</mi></mrow><mrow><mfenced open='(' close=')' separators=','><mrow><mn>8</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi mathvariant='normal'>$a</mi></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mfenced open='(' close=')' separators=','><mrow><mn>7</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi mathvariant='normal'>$a</mi></mrow></mfenced></mrow></mfrac></mrow></mstyle></math>= $Ans</p>@
qu.7.14.editing=useHTML@
qu.7.14.solution=@
qu.7.14.algorithm=$Q=7;
$a=range(2,5,1);
$Ans=decimal(4,16*$a/((8+$a)*(7+$a)));@
qu.7.14.uid=c602ba82-d9d1-48cb-8090-1186259510aa@
qu.7.14.info=  Difficulty=3;
  Type=numeric;
  Author=Sean Scott;
  Course=230;
@

qu.7.15.mode=Inline@
qu.7.15.name=03a. Find k for a joint pdf@
qu.7.15.comment=<p>Use the fact that any (discrete) probability function must sum up to 1. So add up all  terms of the form <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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>k</mi></mrow></mfrac><mfenced open='(' close=')' separators=','><mrow><mi>x</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>y</mi></mrow></mfenced></mrow></mstyle></math> for the range of x and y values given, set the  sum to 1 and solve for k.</p>
<p>In particular here the joint probability distribution written out explicitly is<br />
&nbsp;</p>
<center>
<table cellspacing="0" cellpadding="0" bordercolor="#111111" border="1" id="AutoNumber1" style="border-collapse: collapse;">
    <tbody>
        <tr>
            <td colspan="2">&nbsp;&nbsp;</td>
            <td align="center" colspan="3">x</td>
        </tr>
        <tr>
            <td colspan="2">&nbsp;f(x,y)</td>
            <td align="center">$x0</td>
            <td align="center">$x1</td>
            <td align="center">$x2</td>
        </tr>
        <tr>
            <td rowspan="2">y</td>
            <td>$y0</td>
            <td><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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>k</mi></mrow></mfrac><mi mathvariant='normal'>$T00</mi></mrow></mstyle></math></td>
            <td><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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>k</mi></mrow></mfrac><mi mathvariant='normal'>$T01</mi></mrow></mstyle></math></td>
            <td><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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>k</mi></mrow></mfrac><mi mathvariant='normal'>$T02</mi></mrow></mstyle></math></td>
        </tr>
        <tr>
            <td>$y1</td>
            <td><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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>k</mi></mrow></mfrac><mi mathvariant='normal'>$T10</mi></mrow></mstyle></math></td>
            <td><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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>k</mi></mrow></mfrac><mi mathvariant='normal'>$T11</mi></mrow></mstyle></math></td>
            <td><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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>k</mi></mrow></mfrac><mi mathvariant='normal'>$T12</mi></mrow></mstyle></math></td>
        </tr>
    </tbody>
</table>
</center>
<p align="left">As with any discrete probability distribution, the sum of probabilities must be 1, so that lets us setup and solve and equation in <font size="3" face="Times New Roman"><em>k</em></font> :<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>k</mi></mrow></mfrac><mfenced open='(' close=')' separators=','><mrow><mi mathvariant='normal'>$T00</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi mathvariant='normal'>$T01</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi mathvariant='normal'>$T02</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi mathvariant='normal'>$T10</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi mathvariant='normal'>$T11</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi mathvariant='normal'>$T12</mi></mrow></mfenced></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><mn>1</mn></mrow></mstyle></math></p>
<p align="left"><font size="3" face="Times New Roman"><em>k</em> = $Ans</font></p>
<p>&nbsp;</p>@
qu.7.15.editing=useHTML@
qu.7.15.solution=@
qu.7.15.algorithm=$Q="03a";
$x0=rint(5);
$x1=$x0+1;
$x2=$x0+2;
$y0=range(1,6,1);
$y1=$y0+1;
$T00=$x0+$y0;
$T01=$x1+$y0;
$T02=$x2+$y0;
$T10=$x0+$y1;
$T11=$x1+$y1;
$T12=$x2+$y1;
$Ans=3*(2*$x0+2*$y0)+9;@
qu.7.15.uid=43495531-2f69-4aea-af36-6245c99bfeca@
qu.7.15.info=  Type=MC;
  Course=230;
  Difficulty=2;
  Keyword=joint;
  Author=Sean Scott;
@
qu.7.15.weighting=1@
qu.7.15.numbering=alpha@
qu.7.15.part.1.name=sro_id_1@
qu.7.15.part.1.answer.units=@
qu.7.15.part.1.numStyle=thousands scientific  arithmetic@
qu.7.15.part.1.editing=useHTML@
qu.7.15.part.1.showUnits=false@
qu.7.15.part.1.question=(Unset)@
qu.7.15.part.1.mode=Numeric@
qu.7.15.part.1.grading=exact_value@
qu.7.15.part.1.negStyle=minus@
qu.7.15.part.1.answer.num=$Ans@
qu.7.15.question=<div title="University of Waterloo Statistics Bank/Discrete Multivariate Distributions/Joint and Marginal Distributions/Q$Q">Let X and Y be discrete random variables with the joint probability function: <br /><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>f</mi><mfenced open='(' close=')' separators=','><mrow><mi>x</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>y</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mn>1</mn><mrow><mi>k</mi></mrow></mfrac><mfenced open='(' close=')' separators=','><mrow><mi>x</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>y</mi></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>x</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$x0</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi mathvariant='normal'>$x1</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi mathvariant='normal'>$x2</mi><mo separator='true' lspace='0.0em' rspace='0.2777778em'>&semi;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>$y0</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>$y1</mi></mrow></mstyle></math><br />What is k?</p><p><span> </span><1><span> </span></p></div>@

qu.7.16.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Joint and Marginal Distributions/Q$Q">
Suppose X and Y are independent and uniform on the set <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfenced open='{' close='}' separators=','><mrow><mn>1</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mn>2</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.2222222em' rspace='0.0em'>..</mo><mo lspace='0.0em' rspace='0.0em'>&period;</mo><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi mathvariant='normal'>$a</mi></mrow></mfenced></mrow></mstyle></math>
<p>If <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>T</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>max</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>Y</mi></mrow></mfenced></mrow></mstyle></math>, find <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>T</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&leq;</mo><mi mathvariant='normal'>$t</mi></mrow></mfenced></mrow></mstyle></math> (to 3 decimal places)</p>

</div>@
qu.7.16.answer.num=($t/$a)^2@
qu.7.16.answer.units=@
qu.7.16.showUnits=false@
qu.7.16.grading=toler_abs@
qu.7.16.err=.005@
qu.7.16.negStyle=minus@
qu.7.16.numStyle=thousands scientific dollars arithmetic@
qu.7.16.mode=Numeric@
qu.7.16.name=13. Find P(max(X,Y) ≤ t)@
qu.7.16.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>T</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&leq;</mo><mi mathvariant='normal'>$t</mi></mrow></mstyle></math> if and only if both X and Y are less than or equal to $t, 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 lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>T</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&leq;</mo><mi mathvariant='normal'>$t</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&leq;</mo><mi mathvariant='normal'>$t</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&leq;</mo><mi mathvariant='normal'>$t</mi></mrow></mfenced></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><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&leq;</mo><mi mathvariant='normal'>$t</mi></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&leq;</mo><mi mathvariant='normal'>$t</mi></mrow></mfenced></mrow></mstyle></math> (independence)</p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mi mathvariant='normal'>$t</mi><mrow><mi mathvariant='normal'>$a</mi></mrow></mfrac></mrow></mfenced><mrow><mn>2</mn></mrow></msup><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>= $Ans</p>@
qu.7.16.editing=useHTML@
qu.7.16.solution=@
qu.7.16.algorithm=$Q=13;
$a=range(5,10);
$t=range(1,$a-1);
$Ans=decimal(3,($t/$a)^2);@
qu.7.16.uid=103e2867-2588-452e-95f8-6a3952991705@
qu.7.16.info=  Difficulty=0;
  Type=numeric;
  Author=Sean Scott;
@

qu.7.17.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Joint and Marginal Distributions/Q$Q">
Suppose X and Y are independent and uniform on the set <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfenced open='{' close='}' separators=','><mrow><mn>1</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mn>2</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.2222222em' rspace='0.0em'>..</mo><mo lspace='0.0em' rspace='0.0em'>&period;</mo><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi mathvariant='normal'>$a</mi></mrow></mfenced><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>
<p>Find <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>Y</mi></mrow></mfenced><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> (to 3 decimals)</p>
</div>@
qu.7.17.answer.num=1/$a@
qu.7.17.answer.units=@
qu.7.17.showUnits=false@
qu.7.17.grading=toler_abs@
qu.7.17.err=.01@
qu.7.17.negStyle=minus@
qu.7.17.numStyle=thousands scientific dollars arithmetic@
qu.7.17.mode=Numeric@
qu.7.17.name=11. Find P(X = Y)@
qu.7.17.comment=<p>The joint probability function 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>p</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>x</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>y</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mn>1</mn><mrow><msup><mi mathvariant='normal'>$a</mi><mrow><mn>2</mn></mrow></msup></mrow></mfrac><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mn>1</mn><mo lspace='0.2777778em' rspace='0.2777778em'>&leq;</mo><mi>x</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&leq;</mo><mi mathvariant='normal'>$a</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mn>1</mn><mo lspace='0.2777778em' rspace='0.2777778em'>&leq;</mo><mi>y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&leq;</mo><mi mathvariant='normal'>$a</mi></mrow></mstyle></math></p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>Y</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn></mrow></mfenced><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>2</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>2</mn></mrow></mfenced><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><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><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$a</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$a</mi></mrow></mfenced></mrow><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><mrow><mfrac><mrow><mi mathvariant='normal'>$a</mi></mrow><mrow><msup><mi mathvariant='normal'>$a</mi><mrow><mn>2</mn></mrow></msup></mrow></mfrac></mrow></mrow><mrow><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mn>1</mn><mrow><mi mathvariant='normal'>$a</mi></mrow></mfrac></mrow></mrow></mstyle></math>= $Ans</p>@
qu.7.17.editing=useHTML@
qu.7.17.solution=@
qu.7.17.algorithm=$Q=11;
$a=range(5,10);
$Ans=decimal(3,1/$a);@
qu.7.17.uid=01454c8b-ce1f-44f3-bebe-795251a608bf@
qu.7.17.info=  Difficulty=2;
  Type=numeric;
  Author=Sean Scott;
@

qu.7.18.mode=Multiple Choice@
qu.7.18.name=16. Marginal given joint@
qu.7.18.comment=<p>Just add up the column for each X value.</p>
<p>X=1: f<sub>1</sub>(1) = $F11 + $F21 = $fx1</p>
<p>X=2: f<sub>1</sub>(2) = $F12 + $F22&nbsp; = $fx2</p>
<p>X=3: f<sub>1</sub>(3) = $F13 + $F23&nbsp; = $fx3</p>@
qu.7.18.editing=useHTML@
qu.7.18.solution=@
qu.7.18.algorithm=$Q=16;
$x1=1;
$x2=2;
$x3=3;
$x=($x1,$x2,$x3);
$y1=1;
$y2=2;
$y=($y1,$y2);
$fx1=decimal(3,range(0.1,0.5,0.005));
$fx2=decimal(3,range(0.1,0.5,0.005));
$fx3=decimal(3,1-$fx2-$fx1);
$fy1=decimal(3,range(0.1,0.65,0.005));
$fy2=1-$fy1;
$F11=decimal(3,$fx1*$fy1);
$F12=decimal(3,$fy1*$fx2);
$F13=decimal(3,$fy1-$F11-$F12);
$F21=decimal(3,$fy2*$fx1);
$F22=decimal(3,$fx2*$fy2);
$F23=decimal(3,$fy2-$F21-$F22);
$Alt1=decimal(3,range(0.35,0.65,0.05)*$fx1);
$Alt1A=decimal(3,range(0.4,0.8,0.05)*(1-$Alt1));
$Alt1B=decimal(3,1-$Alt1-$Alt1A);
$Alt2=decimal(2,$fx1+range(0.35,0.65,0.05)*(1-$fx1));
$Alt2A=decimal(2,range(0.4,0.8,0.05)*(1-$Alt2));
$Alt2B=1-$Alt2-$Alt2A;
$Alt3=decimal(2,0.5*($fx1+switch(rint(2),$Alt1,$Alt2)));
$Alt3A=decimal(2,range(0.4,0.8,0.05)*(1-$Alt3));
$Alt3B=1-$Alt3-$Alt3A;@
qu.7.18.uid=c31e3a33-cfd8-4da1-af22-820683ab4292@
qu.7.18.info=  Type=MC;
  Course=230;
@
qu.7.18.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Joint and Marginal Distributions/Q$Q"><img width="50" hspace="4" height="50" align="right" src="__BASE_URI__Tools/TestGuy.gif" title="This question is drawn from a quiz [QUIZ:STAT230, W01, Quiz 5, Q2b]" alt="This question is drawn from a quiz [QUIZ:STAT230, W01, Quiz 5, Q2b]" />Let X and Y be discrete random variables with the joint probability function  f(x,y) given by the table:<br />
<br />
<table cellspacing="0" cellpadding="3" border="1">
    <tbody>
        <tr>
            <td style="">&nbsp;</td>
            <td>&nbsp;</td>
            <td style="text-align: center;" colspan="3">X</td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td style="text-align: center;">f(x,y)</td>
            <td style="text-align: center;">1</td>
            <td style="text-align: center;">2</td>
            <td style="text-align: center;">3</td>
        </tr>
        <tr>
            <td rowspan="2">Y</td>
            <td>1</td>
            <td style="text-align: center;">$F11</td>
            <td style="text-align: center;">$F12</td>
            <td style="text-align: center;">$F13</td>
        </tr>
        <tr>
            <td>2</td>
            <td style="text-align: center;">$F21</td>
            <td style="text-align: center;">$F22</td>
            <td style="text-align: center;">$F23</td>
        </tr>
    </tbody>
</table>
<p><br />
Which of the following is the marginal probability function for X, f<sub>1</sub>(x) ?</p>
</div>@
qu.7.18.answer=1@
qu.7.18.choice.1=<table border="1" cellspacing="0" cellpadding="3">   <tr>     <td><b>X=x</b></td>     <td align="center"><b>1</b></td>     <td align="center"><b>2</b></td>     <td align="center">   <b>3</b></td>   </tr>   <tr>     <td><b>f<sub>1</sub>(x)</b></td>     <td>$fx1</td>     <td>$fx2</td>     <td>     $fx3</td>   </tr> </table>@
qu.7.18.choice.2=<table border="1" cellspacing="0" cellpadding="3">   <tr>     <td><b>X=x</b></td>     <td align="center"><b>1</b></td>     <td align="center"><b>2</b></td>     <td align="center">   <b>3</b></td>   </tr>   <tr>     <td><b>f<sub>1</sub>(x)</b></td>     <td>$Alt1</td>     <td>$Alt1A</td>     <td>     $Alt1B</td>   </tr> </table>@
qu.7.18.choice.3=<table border="1" cellspacing="0" cellpadding="3">   <tr>     <td><b>X=x</b></td>     <td align="center"><b>1</b></td>     <td align="center"><b>2</b></td>     <td align="center">   <b>3</b></td>   </tr>   <tr>     <td><b>f<sub>1</sub>(x)</b></td>     <td>     $Alt2</td>     <td>$Alt2A</td>     <td>$Alt2B</td>   </tr> </table>@
qu.7.18.choice.4=<table border="1" cellspacing="0" cellpadding="3">   <tr>     <td><b>X=x</b></td>     <td align="center"><b>1</b></td>     <td align="center"><b>2</b></td>     <td align="center">   <b>3</b></td>   </tr>   <tr>     <td><b>f<sub>1</sub>(x)</b></td>     <td>     $Alt3</td>     <td>$Alt3A</td>     <td>$Alt3B</td>   </tr> </table>@
qu.7.18.choice.5=None of the above@
qu.7.18.fixed=4@

qu.7.19.mode=True False@
qu.7.19.name=04. Sum of Domain@
qu.7.19.comment=<p>It is false. As an example consider X = {3} and Y = {-1, -2}.</p>@
qu.7.19.editing=useHTML@
qu.7.19.solution=@
qu.7.19.algorithm=@
qu.7.19.uid=490c4fb9-a7bb-4f5b-8467-e2d233a65939@
qu.7.19.info=  Course=230;
  Author=Sean Scott;
  Type=TF;
  Algorithmic=no;
@
qu.7.19.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Joint and Marginal Distributions/Q4">Suppose x and y have a joint probability distribution:<br />
<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>f</mi><mfenced open='(' close=')' separators=','><mrow><mi>x</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>y</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mn>1</mn><mrow><mi>k</mi></mrow></mfrac><mfenced open='(' close=')' separators=','><mrow><mi>x</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>y</mi></mrow></mfenced><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>x in X</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>y in Y</mi></mrow></mstyle></math>
<p>where X and Y are sets of integers (for example X could be {1,2,3} and Y could be {-1,0,1}). <br />
<br />
The example given shows that negative numbers can be in the domain of this function. <br />
True or False: The sum of all x and y in this function's domain - that 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><munderover><mo lspace='0.0em' rspace='0.1666667em' stretchy='true' largeop='true' movablelimits='true'>&Sum;</mo><mrow><mi>x&epsilon;X</mi></mrow><mi></mi></munderover><mi>x</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><munderover><mo lspace='0.0em' rspace='0.1666667em' stretchy='true' largeop='true' movablelimits='true'>&Sum;</mo><mrow><mi>y&epsilon;Y</mi></mrow><mi></mi></munderover><mi>y</mi></mrow></mstyle></math> must be a non-zero number.</p>
</div>@
qu.7.19.answer=2@
qu.7.19.choice.1=True@
qu.7.19.choice.2=False@
qu.7.19.fixed=@

qu.7.20.mode=Multiple Choice@
qu.7.20.name=01. f<sub>2</sub>(y) ?@
qu.7.20.comment=<p>Just add up the row for each Y value.</p>
<p>Y=1: f<sub>2</sub>(1) = $F11 + $F12 + $F13 = $fy1</p>
<p>Y=2: f<sub>2</sub>(2) = $F21 + $F22 + $F23 = $fy2</p>@
qu.7.20.editing=useHTML@
qu.7.20.solution=@
qu.7.20.algorithm=$Q=1;
$x1=1;
$x2=2;
$x3=3;
$x=($x1,$x2,$x3);
$y1=1;
$y2=2;
$y=($y1,$y2);
$fx1=decimal(2,range(0.1,0.5,0.05));
$fx2=decimal(2,range(0.1,0.5,0.05));
$fx3=1-$fx2-$fx1;
$fy1=decimal(2,range(0.1,0.65,0.05));
$fy2=1-$fy1;
$F11=decimal(2,$fx1*$fy1);
$F12=decimal(2,$fy1*$fx2);
$F13=decimal(2,$fy1-$F11-$F12);
$F21=decimal(2,$fy2*$fx1);
$F22=decimal(2,$fx2*$fy2);
$F23=decimal(2,$fy2-$F21-$F22);
$Alt1=decimal(2,range(0.35,0.65,0.05)*$fy1);
$Alt1A=1-$Alt1;
$Alt2=decimal(2,$fy1+range(0.35,0.65,0.05)*(1-$fy1));
$Alt2A=1-$Alt2;
$Alt3=decimal(2,0.5*($fy1+switch(rint(2),$Alt1,$Alt2)));
$Alt3A=1-$Alt3;@
qu.7.20.uid=512424db-1a65-46f9-8925-64ade0dc5a58@
qu.7.20.info=  Course=230;
  Type=MC;
@
qu.7.20.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Joint and Marginal Distributions/Q$Q"><img width="50" hspace="4" height="50" align="right" alt="This question is drawn from a STAT 230 quiz" title="This question is drawn from a STAT 230 quiz [IMG:Testguy.gif]" src="__BASE_URI__Tools/TestGuy.gif" />Let X and Y be discrete random variables with the joint probability function  f(x,y) given by the table:<br />
<br />
<table width="162" cellspacing="0" cellpadding="0" border="0" x:str="" style="border-collapse: collapse; width: 121pt;">
    <colgroup>     <col width="15" style="width: 11pt;"></col><col width="39" style="width: 29pt;"></col>     <col width="36" span="3" style="width: 27pt;"></col>   </colgroup>
    <tbody>
        <tr height="18" style="height: 13.2pt;">
            <td width="15" height="18" style="border: medium none ; height: 13.2pt; width: 11pt; color: windowtext; font-size: 10pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Arial; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;">&nbsp;</td>
            <td width="39" style="border-style: none solid none none; border-color: -moz-use-text-color windowtext -moz-use-text-color -moz-use-text-color; border-width: medium 0.5pt medium medium; width: 29pt; color: windowtext; font-size: 10pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Arial; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;">&nbsp;</td>
            <td width="108" colspan="3" style="border: medium none ; width: 81pt; font-weight: 700; font-family: Arial,sans-serif; text-align: center; color: windowtext; font-size: 10pt; font-style: normal; text-decoration: none; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;">X</td>
        </tr>
        <tr height="18" style="height: 13.2pt;">
            <td height="18" style="border-style: none none solid; border-color: -moz-use-text-color -moz-use-text-color windowtext; border-width: medium medium 0.5pt; height: 13.2pt; font-weight: 700; font-family: Arial,sans-serif; color: windowtext; font-size: 10pt; font-style: normal; text-decoration: none; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;">&nbsp;</td>
            <td style="border-style: none solid solid none; border-color: -moz-use-text-color windowtext windowtext -moz-use-text-color; border-width: medium 0.5pt 0.5pt medium; font-weight: 700; font-family: Arial,sans-serif; text-align: center; color: windowtext; font-size: 10pt; font-style: normal; text-decoration: none; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;">f(x,y)</td>
            <td style="border-style: none none solid; border-color: -moz-use-text-color -moz-use-text-color windowtext; border-width: medium medium 0.5pt; font-weight: 700; font-family: Arial,sans-serif; text-align: center; color: windowtext; font-size: 10pt; font-style: normal; text-decoration: none; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;" x:num="">1</td>
            <td x:num="" style="border-style: none none solid; border-color: -moz-use-text-color -moz-use-text-color windowtext; border-width: medium medium 0.5pt; font-weight: 700; font-family: Arial,sans-serif; text-align: center; color: windowtext; font-size: 10pt; font-style: normal; text-decoration: none; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;">2</td>
            <td x:num="" style="border-style: none none solid; border-color: -moz-use-text-color -moz-use-text-color windowtext; border-width: medium medium 0.5pt; font-weight: 700; font-family: Arial,sans-serif; text-align: center; color: windowtext; font-size: 10pt; font-style: normal; text-decoration: none; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;">3</td>
        </tr>
        <tr height="18" style="height: 13.2pt;">
            <td height="36" rowspan="2" style="border: medium none ; height: 26.4pt; font-weight: 700; font-family: Arial,sans-serif; text-align: center; vertical-align: middle; color: windowtext; font-size: 10pt; font-style: normal; text-decoration: none; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;">Y</td>
            <td style="border-style: none solid none none; border-color: -moz-use-text-color windowtext -moz-use-text-color -moz-use-text-color; border-width: medium 0.5pt medium medium; font-weight: 700; font-family: Arial,sans-serif; text-align: center; color: windowtext; font-size: 10pt; font-style: normal; text-decoration: none; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;" x:num="">1</td>
            <td x:num="" style="border: medium none ; text-align: center; color: windowtext; font-size: 10pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Arial; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;">$F11</td>
            <td x:num="" style="border: medium none ; text-align: center; color: windowtext; font-size: 10pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Arial; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;">$F12</td>
            <td x:num="" style="border: medium none ; text-align: center; color: windowtext; font-size: 10pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Arial; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;">$F13</td>
        </tr>
        <tr height="18" style="height: 13.2pt;">
            <td height="18" style="border-style: none solid none none; border-color: -moz-use-text-color windowtext -moz-use-text-color -moz-use-text-color; border-width: medium 0.5pt medium medium; height: 13.2pt; font-weight: 700; font-family: Arial,sans-serif; text-align: center; color: windowtext; font-size: 10pt; font-style: normal; text-decoration: none; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;" x:num="">2</td>
            <td x:num="" style="border: medium none ; text-align: center; color: windowtext; font-size: 10pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Arial; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;">$F21</td>
            <td x:num="" style="border: medium none ; text-align: center; color: windowtext; font-size: 10pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Arial; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;">$F22</td>
            <td x:num="" style="border: medium none ; text-align: center; color: windowtext; font-size: 10pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Arial; vertical-align: bottom; white-space: nowrap; padding-left: 1px; padding-right: 1px; padding-top: 1px;">$F23</td>
        </tr>
    </tbody>
</table>
<p><br />
Which of the following is the marginal probability function for Y, f<sub>2</sub>(y) ?</p>
</div>@
qu.7.20.answer=1@
qu.7.20.choice.1=<table border="1" cellspacing="0" cellpadding="3">   <tr>     <td><b>Y=y</b></td>     <td align="center"><b>1</b></td>     <td align="center"><b>2</b></td>   </tr>   <tr>     <td><b>f<sub>2</sub>(y)</b></td>     <td>$fy1</td>     <td>$fy2</td>   </tr> </table>  @
qu.7.20.choice.2=<table border="1" cellspacing="0" cellpadding="3">   <tr>     <td><b>Y=y</b></td>     <td align="center"><b>1</b></td>     <td align="center"><b>2</b></td>   </tr>   <tr>     <td><b>f<sub>2</sub>(y)</b></td>     <td>$Alt1</td>     <td>$Alt1A</td>   </tr> </table>  @
qu.7.20.choice.3=<table border="1" cellspacing="0" cellpadding="3">   <tr>     <td><b>Y=y</b></td>     <td align="center"><b>1</b></td>     <td align="center"><b>2</b></td>   </tr>   <tr>     <td><b>f<sub>2</sub>(y)</b></td>     <td>$Alt2</td>     <td>$Alt2A</td>   </tr> </table>  @
qu.7.20.choice.4=<table border="1" cellspacing="0" cellpadding="3">   <tr>     <td><b>Y=y</b></td>     <td align="center"><b>1</b></td>     <td align="center"><b>2</b></td>   </tr>   <tr>     <td><b>f<sub>2</sub>(y)</b></td>     <td>$Alt3</td>     <td>$Alt3A</td>   </tr> </table>  @
qu.7.20.choice.5=None of the above@
qu.7.20.fixed=4@

qu.7.21.mode=Matching@
qu.7.21.name=20. Build pdf for Z=X+Y@
qu.7.21.comment=<div title="STAT230/Chapter 8/Joint and Marginal Distributions/Q$Q">With Z = X + Y this question is answered by exhaustively calculating each value of P(Z = z) for z = 2,3,4,5,6.
<p>&nbsp;</p>
<p>P(Z = 2) = P(X=1,Y=1) = $F11<br />
P(Z = 3) = P(X=1,Y=2) + P(X=2,Y=1) = $F12 + $F21 = $pz3<br />
P(Z = 4) = P(X=1,Y=3) + P(X=2,Y=2) + P(X=3,Y=1)&nbsp; + P(X=1,Y=3) = $F13 + $F22 + $F31 = $pz4<br />
P(Z = 5) = P(X=2,Y=3) + P(X=3,Y=2) = $F23 + $F32 = $pz5<br />
P(Z = 6) = P(X=3,Y=3) = $F33</p>
</div>@
qu.7.21.editing=useHTML@
qu.7.21.solution=@
qu.7.21.algorithm=$Q="20";
$fx1=decimal(2,range(0.1,0.45,0.05));
$fx2=decimal(2,range(0.1,0.45,0.05));
$fx3=1-$fx2-$fx1;
$fy1=decimal(2,range(0.1,0.45,0.05));
$fy2=decimal(2,range(0.1,0.45,0.05));
$fy3=1-$fy2-$fy1;
$F11=range(0.005,2*$fx1/5,0.005);
$F12=range(0.005,2*$fx1/5,0.005);
$F13=$fx1-$F11-$F12;
$F21=range(0.005,2*$fx2/5,0.005);
$F22=range(0.005,2*$fx2/5,0.005);
$F23=$fx2-$F11-$F12;
$F31=range(0.005,2*$fx3/5,0.005);
$F32=range(0.005,2*$fx3/5,0.005);
$F33=$fx3-$F31-$F32;
$x1=1;
$x2=2;
$x3=3;
$x=($x1,$x2,$x3);
$y1=1;
$y2=2;
$y3=3;
$y=($y1,$y2,$y3);
$pz2=$F11;
$pz3=$F12+$F21;
$pz4=$F13+$F22+$F31;
$pz5=$F23+$F32;
$pz6=$F33;@
qu.7.21.uid=87b21298-260e-471a-a974-2eb766cb6b5c@
qu.7.21.info=  Course=230;
  Type=matching;
  Author=Sean Scott;
@
qu.7.21.format.columns=3@
qu.7.21.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Joint and Marginal Distributions/Q$Q">Given the following joint probability distribution of X and Y : <br />
&nbsp;<br />
<table cellspacing="0" cellpadding="3" bordercolor="#111111" border="1">
    <tbody>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center" colspan="3"><strong>X</strong></td>
        </tr>
        <tr valign="bottom">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td align="center"><strong>$x1</strong></td>
            <td align="center"><span style="font-weight: bold;">$x2</span></td>
            <td align="center"><span style="font-weight: bold;">$x3</span></td>
        </tr>
        <tr valign="middle">
            <td rowspan="3"><strong>Y</strong></td>
            <td align="right" style="font-weight: bold;">$y1</td>
            <td align="right">$F11</td>
            <td align="right">$F21</td>
            <td align="right">$F31</td>
        </tr>
        <tr valign="bottom">
            <td align="right" style="font-weight: bold;" x:num="">$y2</td>
            <td align="right">$F12</td>
            <td align="right">$F22</td>
            <td align="right">$F32</td>
        </tr>
        <tr valign="bottom">
            <td align="right" style="font-weight: bold;">$y3</td>
            <td align="right">$F13</td>
            <td align="right">$F23</td>
            <td align="right">$F33</td>
        </tr>
    </tbody>
</table>
<p><br />
Then X + Y takes on values 2,3,4,5, and 6. Build the probability distribution for Z = X + Y by matching the appropriate probability to each value of Z.</p>
</div>@
qu.7.21.term.1=Z = 3@
qu.7.21.term.1.def.1=$pz3@
qu.7.21.term.2=Z = 6@
qu.7.21.term.2.def.1=$pz6@
qu.7.21.term.3=Z = 2@
qu.7.21.term.3.def.1=$pz2@
qu.7.21.term.4=Z = 5@
qu.7.21.term.4.def.1=$pz5@
qu.7.21.term.5=Z = 4@
qu.7.21.term.5.def.1=$pz4@

qu.7.22.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Joint and Marginal Distributions/Q$Q">
Suppose X and Y are independent and uniform on the set <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mfenced open='{' close='}' separators=','><mrow><mn>1</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mn>2</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.2222222em' rspace='0.0em'>..</mo><mo lspace='0.0em' rspace='0.0em'>&period;</mo><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi mathvariant='normal'>$a</mi></mrow></mfenced><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>
<p>Find <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000' veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>5</mn></mrow></mfenced><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> (to 3 decimals)</p>
<div>&nbsp;</div>
</div>@
qu.7.22.answer.num=4/($a^2)@
qu.7.22.answer.units=@
qu.7.22.showUnits=false@
qu.7.22.grading=toler_abs@
qu.7.22.err=.01@
qu.7.22.negStyle=minus@
qu.7.22.numStyle=thousands scientific dollars arithmetic@
qu.7.22.mode=Numeric@
qu.7.22.name=10. Find P(X+Y=5)@
qu.7.22.comment=<p>The joint probability function 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>p</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>x</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>y</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mn>1</mn><mrow><msup><mi mathvariant='normal'>$a</mi><mrow><mn>2</mn></mrow></msup></mrow></mfrac><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mn>1</mn><mo lspace='0.2777778em' rspace='0.2777778em'>&leq;</mo><mi>x</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&leq;</mo><mi mathvariant='normal'>$a</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mn>1</mn><mo lspace='0.2777778em' rspace='0.2777778em'>&leq;</mo><mi>y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&leq;</mo><mi mathvariant='normal'>$a</mi></mrow><mrow><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo></mrow></mstyle></math></p>
<p><math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>5</mn></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>4</mn></mrow></mfenced><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>2</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>3</mn></mrow></mfenced><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>3</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>2</mn></mrow></mfenced><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>P</mi><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>4</mn><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mn>1</mn></mrow></mfenced></mrow><mrow><mi></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><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mrow><mfrac><mrow><mn>4</mn></mrow><mrow><msup><mi mathvariant='normal'>$a</mi><mrow><mn>2</mn></mrow></msup></mrow></mfrac></mrow></mrow></mstyle></math>= $Ans</p>@
qu.7.22.editing=useHTML@
qu.7.22.solution=@
qu.7.22.algorithm=$Q=10;
$a=range(5,10);
$Ans=decimal(3,4/($a^2));@
qu.7.22.uid=d5b4e04e-3b1e-4fd6-8b4b-994d8a7ed940@
qu.7.22.info=  Difficulty=2;
  Type=numeric;
  Author=Sean Scott;
@

qu.8.topic=Multinomial@

qu.8.1.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Multinomial/Q$Q"><img hspace="4" align="$Align" title="A die [IMG:Dice$Which.gif]" alt="A die" src="__BASE_URI__DMD/Multinomial/Die$Which.gif" />$NDW <strong><u>un</u></strong>fair six-sided dice are rolled. The dice are "unfair" because they are weighted so the probability of an even number occurring is $PEW%. Find the probability that $Evens even and $Odds odd numbers appear. (four decimal accuracy)</div>@
qu.8.1.answer.num=$Ans@
qu.8.1.answer.units=@
qu.8.1.showUnits=false@
qu.8.1.grading=toler_abs@
qu.8.1.err=0.0010@
qu.8.1.negStyle=minus@
qu.8.1.numStyle=thousands scientific dollars arithmetic@
qu.8.1.mode=Numeric@
qu.8.1.name=04. Unfair Dice: m even, n odd@
qu.8.1.comment=<p>Model this with two types of outcomes: an even is rolled; an odd is rolled.&nbsp; Use the multinomial distribution with k = 2, p<sub>1</sub> = $PE, p<sub>2</sub> = $PO . Then <br />
<br />
<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><msub><mi>x</mi><mrow><mn>1</mn></mrow></msub><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Evens</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><msub><mi>x</mi><mrow><mn>2</mn></mrow></msub><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Odds</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mi mathvariant='normal'>$NumDice</mi><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow><mrow><mi mathvariant='normal'>$Evens</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo><mi mathvariant='normal'>$Odds</mi><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow></mfrac><msup><mi mathvariant='normal'>$PE</mi><mrow><mi mathvariant='normal'>$Evens</mi></mrow></msup><msup><mi mathvariant='normal'>$PO</mi><mrow><mi mathvariant='normal'>$Odds</mi></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math></p>@
qu.8.1.editing=useHTML@
qu.8.1.solution=@
qu.8.1.algorithm=$Q=4;
$PE=range(0.25,0.75,0.05);
condition:not(eq($PE,0.50));
$NumDice=range(5,12,1);
$NDW=switch($NumDice,"error","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve");
$Evens=range(2,$NumDice-2,1);
$Odds=$NumDice-$Evens;
$PEW=100*$PE;
$PO=1-$PE;
$Ans=decimal(4,fact($NumDice)/(fact($Evens)*fact($Odds))*$PE^$Evens*$PO^$Odds);
$Which=rint(5);
$Align=switch(rint(2),"Left","Right");@
qu.8.1.uid=105e1f9e-4e8c-49cd-918c-d3cb0969340f@
qu.8.1.info=  Type=n;
  Course=230;
@

qu.8.2.mode=Multiple Choice@
qu.8.2.name=08. Voters, P(L = Y)@
qu.8.2.comment=<p>Y is Binomial with n = $NumDrawn and p = $PPL 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><mfenced open='(' close=')' separators=','><mrow><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$L</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfenced open='(' close=')' separators=','><mrow><msubsup><mo mathcolor='#0000ff' lspace='0.0em' rspace='0.0em'>&#32;</mo><mrow><mi mathvariant='normal'>$L</mi></mrow><mrow><mi mathvariant='normal'>$NumDrawn</mi></mrow></msubsup></mrow></mfenced><msup><mfenced open='(' close=')' separators=','><mrow><mi mathvariant='normal'>$PPL</mi></mrow></mfenced><mrow><mi mathvariant='normal'>$L</mi></mrow></msup><msup><mfenced open='(' close=')' separators=','><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi mathvariant='normal'>$PPL</mi></mrow></mfenced><mrow><mi mathvariant='normal'>$NumDrawn</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi mathvariant='normal'>$L</mi></mrow></msup></mrow><mrow><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.8.2.editing=useHTML@
qu.8.2.solution=@
qu.8.2.algorithm=$Q="08";
$NumDrawn=range(5,12,1);
$NDW=switch($NumDrawn,"error","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve");
$L=range(2,$NumDrawn/2+1,1);
$PC=range(15,50,5);
$PPC=$PC/100;
$PL=range(15,50,5);
$PPL=$PL/100;
$PN=100-$PC-$PL;
$Ans=decimal(4,fact($NumDrawn)/(fact($L)*fact($NumDrawn-$L))*($PPL)^$L*(1-$PPL)^($NumDrawn-$L));
$Alt1=decimal(4,range(0.3,0.8,0.05)*$Ans);
$Alt2=decimal(4,$Ans+range(0.3,0.7,0.1)*(1-$Ans));
$Alt3=decimal(4,0.5*($Ans+switch(rint(2),$Alt1,$Alt2)));
$Which=rint(5);
$Align=switch(rint(2),"Left","Right");@
qu.8.2.uid=ebe88611-5043-442e-81e0-0782faca932d@
qu.8.2.info=  Course=230;
  Type=MC;
@
qu.8.2.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Multinomial/Q$Q">
<img hspace="4" align="$Align" src="__BASE_URI__DMD/Multinomial/Vote$Which.gif" alt="Voting" title="Voting [IMG:Vote$Which.gif]" />$NDW voters are drawn at random from a large population consisting of $PC% Conservatives (C), $PL% Liberals (L) and $PN% New Democrats (N). Let Y be the number of Liberals in the sample. Then P(Y = $L) is:</div>@
qu.8.2.answer=1@
qu.8.2.choice.1=$Ans@
qu.8.2.choice.2=$Alt1@
qu.8.2.choice.3=$Alt2@
qu.8.2.choice.4=$Alt3@
qu.8.2.fixed=@

qu.8.3.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Multinomial/Q$Q"><img hspace="4" align="$Align" title="Voting [IMG:Vote$Which.gif]" alt="Voting" src="__BASE_URI__DMD/Multinomial/Vote$Which.gif" />$NDW voters are drawn at random from a large population consisting of $PC% Conservatives (C), $PL% Liberals (L) and $PN% New Democrats (N). Let X be the number of Conservatives in the sample and let Y be the number of Liberals. Find P(X = $C, Y = $L) (four decimal accuracy)</div>@
qu.8.3.answer.num=$Ans@
qu.8.3.answer.units=@
qu.8.3.showUnits=false@
qu.8.3.grading=toler_abs@
qu.8.3.err=0.0010@
qu.8.3.negStyle=minus@
qu.8.3.numStyle=thousands scientific dollars arithmetic@
qu.8.3.mode=Numeric@
qu.8.3.name=02. Voters@
qu.8.3.comment=<p>The joint distribution of (X, Y, $NumDrawn &minus; X &minus; Y ) is multinomial and so<br />
<br />
<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$C</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$L</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mi mathvariant='normal'>$NumDrawn</mi><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow><mrow><mi mathvariant='normal'>$C</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo><mi mathvariant='normal'>$L</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo><mi mathvariant='normal'>$N</mi><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow></mfrac><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mi mathvariant='normal'>$PC</mi><mrow><mn>100</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$C</mi></mrow></msup><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mi mathvariant='normal'>$PL</mi><mrow><mn>100</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$L</mi></mrow></msup><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mi mathvariant='normal'>$PN</mi><mrow><mn>100</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.8.3.editing=useHTML@
qu.8.3.solution=@
qu.8.3.algorithm=$Q=2;
$NumDrawn=range(5,12,1);
$NDW=switch($NumDrawn,"error","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve");
$C=range(2,$NumDrawn/2+1,1);
$L=range(1,($NumDrawn-$C-1),1);
$N=$NumDrawn-$C-$L;
$PC=range(15,50,5);
$PL=range(15,50,5);
$PN=100-$PC-$PL;
$Ans=decimal(4,fact($NumDrawn)/(fact($C)*fact($L)*fact($N))*($PC/100)^$C*($PL/100)^$L*($PN/100)^$N);
$Which=rint(5);
$Align=switch(rint(2),"Left","Right");@
qu.8.3.uid=13b00a27-0822-4da1-85e7-61711b1c48f4@
qu.8.3.info=  Type=numeric;
  Course=230;
@

qu.8.4.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Multinomial/Q$Q"><img hspace="4" align="$Align" src="__BASE_URI__DMD/Multinomial/Vote$Which.gif" alt="Voting" title="Voting [IMG:Vote$Which.gif]" />$NDW voters are drawn at random from a large population consisting of $PC% Conservatives (C), $PL% Liberals (L) and $PN% New Democrats (N). Let X be the number of Conservatives in the sample and let Y be the number of Liberals. Find P(X+Y = $NAdd) (four decimal accuracy)</div>@
qu.8.4.answer.num=$Ans@
qu.8.4.answer.units=@
qu.8.4.showUnits=false@
qu.8.4.grading=toler_abs@
qu.8.4.err=0.0010@
qu.8.4.negStyle=minus@
qu.8.4.numStyle=thousands scientific dollars arithmetic@
qu.8.4.mode=Numeric@
qu.8.4.name=05. Voting P(L+C=X)@
qu.8.4.comment=<p>X + Y is Binomial with n = $NumDrawn and p = $PPC+$PPL = $PPAdd so P(X + Y = $NAdd) =<br />
<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&plus;</mo><mi>Y</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$NAdd</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><msup><mfenced open='(' close=')' separators=','><mrow><munderover><mrow><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo></mrow><mrow><mi mathvariant='normal'>$NAdd</mi></mrow><mrow><mi mathvariant='normal'>$NumDrawn</mi></mrow></munderover></mrow></mfenced><mrow></mrow></msup><msup><mfenced open='(' close=')' separators=','><mrow><mi mathvariant='normal'>$PAdd</mi></mrow></mfenced><mrow><mi mathvariant='normal'>$NAdd</mi></mrow></msup><msup><mfenced open='(' close=')' separators=','><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi mathvariant='normal'>$PAdd</mi></mrow></mfenced><mrow><mi mathvariant='normal'>$NumDrawn</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi mathvariant='normal'>$NAdd</mi></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math></p>@
qu.8.4.editing=useHTML@
qu.8.4.solution=@
qu.8.4.algorithm=$Q="05";
$NumDrawn=range(5,12,1);
$NDW=switch($NumDrawn,"error","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve");
$C=range(2,$NumDrawn/2+1,1);
$L=range(1,($NumDrawn-$C-1),1);
$NAdd=$C+$L;
$PC=range(15,50,5);
$PPC=$PC/100;
$PL=range(15,50,5);
$PPL=$PL/100;
$PN=100-$PC-$PL;
$PAdd=$PC+$PL;
$PPAdd=$PAdd/100;
$Ans=decimal(4,fact($NumDrawn)/(fact($NAdd)*fact($NumDrawn-$NAdd))*($PAdd/100)^$NAdd*(1-$PAdd/100)^($NumDrawn-$NAdd));
$Which=rint(5);
$Align=switch(rint(2),"Left","Right");@
qu.8.4.uid=62b6dbbd-ad57-46a3-8d3b-a5dbb80fd768@
qu.8.4.info=  Type=numeric;
  Course=230;
@

qu.8.5.mode=Multiple Choice@
qu.8.5.name=01. Transmission@
qu.8.5.comment=<p>If<em><font size="3" face="Times New Roman"> x</font></em> attempts are needed to obtain a successful transmission, then <font size="3" face="Times New Roman"><em>f</em>(<em>x</em>) = ($PSucc)<sup><em>x</em>-1</sup>($OneMPSucc)</font> (Geometric Distribution)<br />
<br />
<font size="3" face="Times New Roman"><em>f</em>(1) = $P0, <em>f</em>(2) = $P1</font> and <font size="3" face="Times New Roman"><em>P</em>(<em>X</em> &ge; 3) = 1 - <em>f</em>(1) - <em>f</em>(2) = $P2</font><br />
<br />
Now use the <span style="font-weight: bold;">multinomial distribution</span> to get: <math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' 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'>$Sent</mi><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow><mrow><mi mathvariant='normal'>$Fail0</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo><mi mathvariant='normal'>$Fail1</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo><mi mathvariant='normal'>$Fail2</mi><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow></mfrac><msup><mi mathvariant='normal'>$P0</mi><mrow><mi mathvariant='normal'>$Fail0</mi></mrow></msup><msup><mi mathvariant='normal'>$P1</mi><mrow><mi mathvariant='normal'>$Fail1</mi></mrow></msup><msup><mi mathvariant='normal'>$P2</mi><mrow><mi mathvariant='normal'>$Fail2</mi></mrow></msup></mrow></mstyle></math></p>@
qu.8.5.editing=useHTML@
qu.8.5.solution=@
qu.8.5.algorithm=$Q=1;
$Sent=range(10,20,1);
$Fail0=range(3,3+$Sent/2,1);
$Fail1=range(2,$Sent-$Fail0-1,1);
$Fail2=$Sent-$Fail0-$Fail1;
$PSucc=range(0.70,0.95,0.05);
$OneMPSucc=1-$PSucc;
$P0=$PSucc;
$P1=$PSucc*$OneMPSucc;
$P2=1-$P0-$P1;
$Ans=fact($Sent)/(fact($Fail0)*fact($Fail1)*fact($Fail2))*$P0^$Fail0*$P1*$Fail1*$P2^$Fail2;
$AltP1=range(0.05,.35,0.05);
$AltP2=range(0.10,0.40,0.05);
$AltP3=1-$AltP1-$AltP2;@
qu.8.5.uid=7bfb1f2e-b30b-42ac-845c-ddc9d4b4f718@
qu.8.5.info=  Difficulty=4;
  Type=MC;
  Course=230;
@
qu.8.5.question=<div title="University of Waterloo Statistics Bank/Discrete Multivariate Distributions/Multinomial/Q$Q">A message sent by a transmitter has probability $PSucc of successful transmission on any attempt. Assume that transmission attempts act independently, and that message will be repeatedly sent until transmission is successful. <br />
<br />
Suppose $Sent messages have been successfully transmitted. Which of the following is the probability that, of the $Sent messages, $Fail0 were transmitted successfully on the first attempt, $Fail1 required two attempts, and $Fail2 required three or more attempts?</div>@
qu.8.5.answer=1@
qu.8.5.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'>$Sent</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow><mrow><mi mathvariant='normal'>$Fail0</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo><mi mathvariant='normal'>$Fail1</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo><mi mathvariant='normal'>$Fail2</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac><msup><mi mathvariant='normal'>$P0</mi><mrow><mi mathvariant='normal'>$Fail0</mi></mrow></msup><msup><mi mathvariant='normal'>$P1</mi><mrow><mi mathvariant='normal'>$Fail1</mi></mrow></msup><msup><mi mathvariant='normal'>$P2</mi><mrow><mi mathvariant='normal'>$Fail2</mi></mrow></msup></mrow></mstyle></math>@
qu.8.5.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'>$Fail0</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo><mi mathvariant='normal'>$Fail1</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo><mi mathvariant='normal'>$Fail2</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow><mrow><mi mathvariant='normal'>$Sent</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo></mrow></mfrac><msup><mi mathvariant='normal'>$P0</mi><mrow><mi mathvariant='normal'>$Fail0</mi></mrow></msup><msup><mi mathvariant='normal'>$P1</mi><mrow><mi mathvariant='normal'>$Fail1</mi></mrow></msup><msup><mi mathvariant='normal'>$P2</mi><mrow><mi mathvariant='normal'>$Fail2</mi></mrow></msup></mrow></mstyle></math>@
qu.8.5.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><mrow><mi mathvariant='normal'>$Sent</mi><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow><mrow><mi mathvariant='normal'>$Fail0</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo><mi mathvariant='normal'>$Fail1</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo><mi mathvariant='normal'>$Fail2</mi><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow></mfrac><msup><mi mathvariant='normal'>$AltP1</mi><mrow><mi mathvariant='normal'>$Fail0</mi></mrow></msup><msup><mi mathvariant='normal'>$P1</mi><mrow><mi mathvariant='normal'>$Fail1</mi></mrow></msup><msup><mi mathvariant='normal'>$AltP2</mi><mrow><mi mathvariant='normal'>$Fail2</mi></mrow></msup></mrow></mstyle></math>@
qu.8.5.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'>$Fail0</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo><mi mathvariant='normal'>$Fail1</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo><mi mathvariant='normal'>$Fail2</mi><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow><mrow><mi mathvariant='normal'>$Sent</mi><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow></mfrac><msup><mi mathvariant='normal'>$AltP2</mi><mrow><mi mathvariant='normal'>$Fail0</mi></mrow></msup><msup><mi mathvariant='normal'>$AltP1</mi><mrow><mi mathvariant='normal'>$Fail2</mi></mrow></msup><msup><mi mathvariant='normal'>$P2</mi><mrow><mi mathvariant='normal'>$Fail1</mi></mrow></msup></mrow></mstyle></math>@
qu.8.5.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><mrow><mi mathvariant='normal'>$Sent</mi><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow><mrow><mi mathvariant='normal'>$Fail0</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo><mi mathvariant='normal'>$Fail1</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo><mi mathvariant='normal'>$Fail2</mi><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow></mfrac><msup><mi mathvariant='normal'>$OneMPSucc</mi><mrow><mi mathvariant='normal'>$Fail0</mi></mrow></msup><msup><mi mathvariant='normal'>$P0</mi><mrow><mi mathvariant='normal'>$Fail1</mi></mrow></msup><msup><mi mathvariant='normal'>$P2</mi><mrow><mi mathvariant='normal'>$Fail2</mi></mrow></msup></mrow></mstyle></math>@
qu.8.5.fixed=@

qu.8.6.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Multinomial/Q$Q"><img hspace="4" align="$Align" title="A die [IMG:Dice$Which.gif]" alt="A die" src="__BASE_URI__DMD/Multinomial/Die$Which.gif" />$NDW fair six-sided dice are rolled ("fair" meaning each side has equal probability of being the result of a roll). Find the probability that $Evens even and $Odds odd numbers appear. (four decimal accuracy)</div>@
qu.8.6.answer.num=$Ans@
qu.8.6.answer.units=@
qu.8.6.showUnits=false@
qu.8.6.grading=toler_abs@
qu.8.6.err=0.0010@
qu.8.6.negStyle=minus@
qu.8.6.numStyle=thousands scientific dollars arithmetic@
qu.8.6.mode=Numeric@
qu.8.6.name=03. Dice: n even, m odd@
qu.8.6.comment=<p>Model this with two types of outcomes: an even is rolled; an odd is rolled.&nbsp; Use the multinomial distribution with k = 2, p<sub>1</sub> = $PE, p<sub>2</sub> = $PO . Then <br />
<br />
<math xmlns='http://www.w3.org/1998/Math/MathML'><mstyle fontfamily='Times New Roman' mathsize='12' mathcolor='#000000'  veryverythinmathspace='0.0555556em' verythinmathspace='0.111111em' thinmathspace='0.166667em' mediummathspace='0.222222em' thickmathspace='0.277778em' verythickmathspace='0.333333em' veryverythickmathspace='0.388889em' scriptlevel='0' scriptsizemultiplier='0.71' scriptminsize='8.0pt'><mrow><mi>P</mi><mfenced open='(' close=')' separators=','><mrow><msub><mi>x</mi><mrow><mn>1</mn></mrow></msub><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Evens</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><msub><mi>x</mi><mrow><mn>2</mn></mrow></msub><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Odds</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfrac><mrow><mi mathvariant='normal'>$NumDice</mi><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow><mrow><mi mathvariant='normal'>$Evens</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo><mi mathvariant='normal'>$Odds</mi><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow></mfrac><msup><mi mathvariant='normal'>$PE</mi><mrow><mi mathvariant='normal'>$Evens</mi></mrow></msup><msup><mi mathvariant='normal'>$PO</mi><mrow><mi mathvariant='normal'>$Odds</mi></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math></p>@
qu.8.6.editing=useHTML@
qu.8.6.solution=@
qu.8.6.algorithm=$Q="03";
$NumDice=range(5,12,1);
$NDW=switch($NumDice,"error","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve");
$Evens=range(2,$NumDice-2,1);
$Odds=$NumDice-$Evens;
$PE=0.5;
$PO=1-$PE;
$Ans=decimal(4,fact($NumDice)/(fact($Evens)*fact($Odds))*$PE^$Evens*$PO^$Odds);
$Which=rint(5);
$Align=switch(rint(2),"Left","Right");@
qu.8.6.uid=9d470a8d-ee25-4405-baba-f590a13779e1@
qu.8.6.info=  Type=numeric;
  Course=230;
@

qu.8.7.mode=Multiple Choice@
qu.8.7.name=07. Voters, P(X=n)@
qu.8.7.comment=<p>X is Binomial with n = $NumDrawn and p = $PPC 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><mfenced open='(' close=')' separators=','><mrow><mi>X</mi><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$C</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mfenced open='(' close=')' separators=','><mrow><msubsup><mo mathcolor='#0000ff' lspace='0.0em' rspace='0.0em'>&#32;</mo><mrow><mi mathvariant='normal'>$C</mi></mrow><mrow><mi mathvariant='normal'>$NumDrawn</mi></mrow></msubsup></mrow></mfenced><msup><mfenced open='(' close=')' separators=','><mrow><mi mathvariant='normal'>$PPC</mi></mrow></mfenced><mrow><mi mathvariant='normal'>$C</mi></mrow></msup><msup><mfenced open='(' close=')' separators=','><mrow><mn>1</mn><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi mathvariant='normal'>$PPC</mi></mrow></mfenced><mrow><mi mathvariant='normal'>$NumDrawn</mi><mo lspace='0.2222222em' rspace='0.2222222em'>&minus;</mo><mi mathvariant='normal'>$C</mi></mrow></msup></mrow><mrow><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math></p>@
qu.8.7.editing=useHTML@
qu.8.7.solution=@
qu.8.7.algorithm=$Q="07";
$NumDrawn=range(5,12,1);
$NDW=switch($NumDrawn,"error","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve");
$C=range(2,$NumDrawn/2+1,1);
$PC=range(15,50,5);
$PPC=$PC/100;
$PL=range(15,50,5);
$PPL=$PL/100;
$PN=100-$PC-$PL;
$Ans=decimal(4,fact($NumDrawn)/(fact($C)*fact($NumDrawn-$C))*($PPC)^$C*(1-$PPC)^($NumDrawn-$C));
$Alt1=decimal(4,range(0.3,0.8,0.05)*$Ans);
$Alt2=decimal(4,$Ans+range(0.3,0.7,0.1)*(1-$Ans));
$Alt3=decimal(4,0.5*($Ans+switch(rint(2),$Alt1,$Alt2)));
$Which=rint(5);
$Align=switch(rint(2),"Left","Right");@
qu.8.7.uid=a185bba2-abdf-4508-9b70-b7d75e362f6b@
qu.8.7.info=  Type=MC;
  Course=230;
@
qu.8.7.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Multinomial/Q$Q"><img hspace="4" align="$Align" title="Voting [IMG:Vote$Which.gif]" alt="Voting" src="__BASE_URI__DMD/Multinomial/Vote$Which.gif" />$NDW voters are drawn at random from a large population consisting of $PC% Conservatives (C), $PL% Liberals (L) and $PN% New Democrats (N). Let X be the number of Conservatives in the sample.&nbsp;
<p>Then P(X = $C) is:</p>
</div>@
qu.8.7.answer=1@
qu.8.7.choice.1=$Ans@
qu.8.7.choice.2=$Alt1@
qu.8.7.choice.3=$Alt2@
qu.8.7.choice.4=$Alt3@
qu.8.7.fixed=@

qu.8.8.mode=Multiple Choice@
qu.8.8.name=06. Dice: P(Set outcome)@
qu.8.8.comment=<p>Use the multinomial distribution with k = 6, p<sub>i</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><mfrac><mn>1</mn><mrow><mn>6</mn></mrow></mfrac></mrow></mstyle></math> for i = 1,..,6 and  x<sub>$Oner1</sub> = x<sub>$Oner2</sub> = 1, x<sub>i</sub> = 2 otherwise. 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>f</mi><mfenced open='(' close=')' separators=','><mrow><mi mathvariant='normal'>$d1</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi mathvariant='normal'>$d2</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi mathvariant='normal'>$d3</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi mathvariant='normal'>$d4</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mi mathvariant='normal'>$d5</mi><mo separator='true' lspace='0.0em' rspace='0.3333333em'>&comma;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mi mathvariant='normal'>$d6</mi></mrow></mfenced><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mo lspace='0.0em' rspace='0.0em'>&#32;</mo><mfrac><mrow><mn>10</mn><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow><mrow><mi mathvariant='normal'>$d1</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo><mi mathvariant='normal'>$d2</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo><mi mathvariant='normal'>$d3</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo><mi mathvariant='normal'>$d4</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo><mi mathvariant='normal'>$d5</mi><mo lspace='0.1111111em' rspace='0.1111111em'>&excl;</mo><mi mathvariant='normal'>$d6</mi><mo lspace='0.1111111em' rspace='0.0em'>&excl;</mo></mrow></mfrac><mo lspace='0.0em' rspace='0.0em'>&sdot;</mo><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>1</mn><mrow><mn>6</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$d1</mi></mrow></msup><msubsup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>1</mn><mrow><mn>6</mn></mrow></mfrac></mrow></mfenced><mrow></mrow><mrow><mi mathvariant='normal'>$d2</mi></mrow></msubsup><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>1</mn><mrow><mn>6</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$d3</mi></mrow></msup><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>1</mn><mrow><mn>6</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$d4</mi></mrow></msup><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>1</mn><mrow><mn>6</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$d5</mi></mrow></msup><msup><mfenced open='(' close=')' separators=','><mrow><mfrac><mn>1</mn><mrow><mn>6</mn></mrow></mfrac></mrow></mfenced><mrow><mi mathvariant='normal'>$d6</mi></mrow></msup><mo lspace='0.2777778em' rspace='0.2777778em'>&equals;</mo><mi mathvariant='normal'>$Ans</mi></mrow></mstyle></math></p>@
qu.8.8.editing=useHTML@
qu.8.8.solution=@
qu.8.8.algorithm=$Q="06";
$Hold1=rint(1,6);
$Hold2=rint(1,6);
condition:ne($Hold1,$Hold2);
$Oner1=min($Hold1,$Hold2);
$Oner2=max($Hold1,$Hold2);
$Say1=switch($Oner1,"error","first","second","third","fourth","fifth","sixth");
$Say2=switch($Oner2,"error","first","second","third","fourth","fifth","sixth");
$d1=if(ne($Oner1,1),if(ne($Oner2,1),2,1),1);
$d2=if(ne($Oner1,2),if(ne($Oner2,2),2,1),1);
$d3=if(ne($Oner1,3),if(ne($Oner2,3),2,1),1);
$d4=if(ne($Oner1,4),if(ne($Oner2,4),2,1),1);
$d5=if(ne($Oner1,5),if(ne($Oner2,5),2,1),1);
$d6=if(ne($Oner1,6),if(ne($Oner2,6),2,1),1);
$Ans=decimal(4,(fact(10)/2^4)*(1/6)^10);
$Alt1=decimal(4,range(0.4,0.8,0.05)*$Ans);
$Alt2=decimal(4,$Ans+range(0.2,0.6,0.1)*(1-$Ans));
$Alt3=decimal(4,0.5*($Ans+$Alt2));
$Which=rint(5);
$Align=switch(rint(2),"Left","Right");@
qu.8.8.uid=bc6dacc8-f861-40f1-8a9b-9aea450bfab0@
qu.8.8.info=  Type=MC;
  Course=230;
@
qu.8.8.question=<div title="UW Statistics Bank/Discrete Multivariate Distributions/Multinomial/Q$Q"><img hspace="4" align="$Align" title="A die [IMG:Dice$Which.gif]" alt="A die" src="__BASE_URI__DMD/Multinomial/Die$Which.gif" />Suppose that we roll 10 fair six-sided dice. Find the probability that the $Say1 and $Say2 dice occur once each and the other scores occur twice each.</div>@
qu.8.8.answer=1@
qu.8.8.choice.1=$Ans@
qu.8.8.choice.2=$Alt1@
qu.8.8.choice.3=$Alt2@
qu.8.8.choice.4=$Alt3@
qu.8.8.fixed=@

