]> code.communitydata.science - stats_class_2020.git/blobdiff - psets/pset2-worked_solution.html
initial commit
[stats_class_2020.git] / psets / pset2-worked_solution.html
index 7d426b08d3adc0e7baa5d0e6fd0c7388ec5c75c5..8b9ac29378309e95382c9824d6bede998d54631a 100644 (file)
@@ -1814,8 +1814,8 @@ p + geom_point() </code></pre>
 <div id="sq2.1-which-bet" class="section level4">
 <h4>SQ2.1 Which bet?</h4>
 <p>If you are willing to assume that birthdays in the class are independent (not a terrible assumption) and that birthdays are distributed randomly throughout the year (a terrible assumption, as it turns out!), you should take Bet #2. Here’s a way to explain why:</p>
-<p>Consider that 25 people can be combined into pairs <span class="math inline">\({25 \choose 2}\)</span> ways (which you can read “as 25 choose 2”), which is equal to <span class="math inline">\(\frac{25 \times 24}{2} = 300\)</span> (and that little calculation is where those <a href="https://en.wikipedia.org/wiki/Binomial_coefficient">binomial coefficients</a> I mentioned in my hint come in handy).</p>
-<p>Generalizing the logic from part b of the textbook exercise last week problem, I have assumed that each of these possible pairings are independent and thus each one has a probability <span class="math inline">\(P = (\frac{364}{365})\)</span> of producing an <em>unmatched</em> set of birthdays.</p>
+<p>Consider that 25 people can be combined into pairs <span class="math inline">\({25 \choose 2}\)</span> ways (which you can read as “25 choose 2”), which is equal to <span class="math inline">\(\frac{25 \times 24}{2} = 300\)</span> (and that little calculation is where those <a href="https://en.wikipedia.org/wiki/Binomial_coefficient">binomial coefficients</a> I mentioned in my hint come in handy).</p>
+<p>Generalizing the logic from part b of the textbook exercise last week, I have assumed that each of these possible pairings are independent and thus each one has a probability <span class="math inline">\(P = (\frac{364}{365})\)</span> of producing an <em>unmatched</em> set of birthdays.</p>
 <p>Putting everything together, I can employ the multiplication rule from <em>OpenIntro</em> Ch. 3 and get the following: <span class="math display">\[P(any~match) = 1 - P(no~matches)\]</span><br />
 <span class="math display">\[P(no~matches) = (\frac{364}{365})^{300}\]</span><br />
 And I can let R do the arithmetic:</p>

Community Data Science Collective || Want to submit a patch?