<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>#Prob ECSE-2500 Engineering Probability, Spring 2019, Rensselaer Polytechnic Institute (Posts about class)</title><link>https://wrf.ecse.rpi.edu/Teaching/probability-s2019/</link><description></description><atom:link href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/categories/cat_class.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2019 &lt;a href="mailto:frankwr@rpi.edu"&gt;W Randolph Franklin (WRF), RPI&lt;/a&gt; </copyright><lastBuildDate>Sat, 04 May 2019 15:56:26 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Engineering Probability Class 28 Thu 2019-04-25</title><link>https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class28/</link><dc:creator>W Randolph Franklin (WRF), RPI</dc:creator><description>&lt;div&gt;&lt;div class="contents topic" id="table-of-contents"&gt;
&lt;p class="topic-title first"&gt;Table of contents&lt;/p&gt;
&lt;ul class="auto-toc simple"&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class28/#exam-3" id="id1"&gt;1   Exam 3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class28/#grade-to-date" id="id2"&gt;2   Grade to date&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class28/#piazza-and-iclicker" id="id3"&gt;3   Piazza and iclicker&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;!--  --&gt;
&lt;div class="section" id="exam-3"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class28/#id1"&gt;1   Exam 3&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Bring 3 2-sided crib sheets.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="grade-to-date"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class28/#id2"&gt;2   Grade to date&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Lingyu computed piazza and iclicker grades.&lt;/p&gt;
&lt;p&gt;For iclickers:&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;They were used in 13 classes.&lt;/li&gt;
&lt;li&gt;You got 1 point for each class that you used your iclicker.&lt;/li&gt;
&lt;li&gt;Multiply the total by 10/13.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For piazza:&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;For each of 3 months, 1 point per contribution, up to 2 points.&lt;/li&gt;
&lt;li&gt;Then multiply by 10/6.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I computed a percent grade to date.&lt;/p&gt;
&lt;p&gt;I uploaded it in column &lt;strong&gt;Tot1&lt;/strong&gt; to LMS.&lt;/p&gt;
&lt;p&gt;It cannot fall, but may rise, because:&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;You got knowitall points.   I haven't yet included them.&lt;/li&gt;
&lt;li&gt;Your homework 11 grade is higher than your lowest grade from hw1-10.&lt;/li&gt;
&lt;li&gt;You write exam 3 and it helps.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If the class wishes, I can lower the weight of the piazza grade from 10% to 5%, and scale everything else up.   Do you wish?&lt;/p&gt;
&lt;p&gt;The letter grades will be at least as generous as the syllabus shows.   I may lower the cutoffs.&lt;/p&gt;
&lt;p&gt;I believe my courses to have higher GPAs than average.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="piazza-and-iclicker"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class28/#id3"&gt;3   Piazza and iclicker&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;They're a mess to compute.&lt;/p&gt;
&lt;p&gt;I use them because I believe them to be pedagogically good.&lt;/p&gt;
&lt;p&gt;However what do you, the class, think?&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;</description><category>mathjax</category><guid>https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class28/</guid><pubDate>Thu, 25 Apr 2019 04:00:00 GMT</pubDate></item><item><title>Engineering Probability Class 27 Mon 2019-04-22</title><link>https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class27/</link><dc:creator>W Randolph Franklin (WRF), RPI</dc:creator><description>&lt;div&gt;&lt;div class="contents topic" id="table-of-contents"&gt;
&lt;p class="topic-title first"&gt;Table of contents&lt;/p&gt;
&lt;ul class="auto-toc simple"&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class27/#grades" id="id1"&gt;1   Grades&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class27/#statistics-videos" id="id2"&gt;2   Statistics videos&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class27/#confidence-intervals-p-430" id="id3"&gt;3   8.4 Confidence intervals, p 430&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class27/#worked-out-problems" id="id4"&gt;4   Worked out problems&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;!--  --&gt;
&lt;div class="section" id="grades"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class27/#id1"&gt;1   Grades&lt;/a&gt;&lt;/h2&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;The 3rd exam will be the same length as the first two: 80 minutes.&lt;/li&gt;
&lt;li&gt;I will distribute a guaranteed minimum grade at the end of the semester.  If you are satisfied with that, you do not need to write the third exam.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="statistics-videos"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class27/#id2"&gt;2   Statistics videos&lt;/a&gt;&lt;/h2&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Regression: Crash Course Statistics #32 (12:40)
&lt;a class="reference external" href="https://www.youtube.com/watch?v=WWqE7YHR4Jc"&gt;https://www.youtube.com/watch?v=WWqE7YHR4Jc&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="confidence-intervals-p-430"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class27/#id3"&gt;3   8.4 Confidence intervals, p 430&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The earlier videos introduced you to this.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="worked-out-problems"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class27/#id4"&gt;4   Worked out problems&lt;/a&gt;&lt;/h2&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;7.14a, p 403.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;8.4 p 471.&lt;/p&gt;
&lt;p&gt;Normal probability tables were given in class 20.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;8.10, p 472.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;8.24, p 474.&lt;/p&gt;
&lt;p&gt;TABLE 3.1 Discrete random variables is page 115.&lt;/p&gt;
&lt;p&gt;TABLE 4.1 Continuous random variables is page 164.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;&lt;/div&gt;</description><category>mathjax</category><guid>https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class27/</guid><pubDate>Mon, 22 Apr 2019 04:00:00 GMT</pubDate></item><item><title>Engineering Probability Class 26 Thu 2019-04-18</title><link>https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class26/</link><dc:creator>W Randolph Franklin (WRF), RPI</dc:creator><description>&lt;div&gt;&lt;div class="contents topic" id="table-of-contents"&gt;
&lt;p class="topic-title first"&gt;Table of contents&lt;/p&gt;
&lt;ul class="auto-toc simple"&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class26/#homework-11" id="id1"&gt;1   Homework 11&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class26/#statistics" id="id2"&gt;2   Statistics&lt;/a&gt;&lt;ul class="auto-toc"&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class26/#statistics-videos" id="id3"&gt;2.1   Statistics videos&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;!--  --&gt;
&lt;div class="section" id="homework-11"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class26/#id1"&gt;1   Homework 11&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;is online.&lt;/p&gt;
&lt;p&gt;Sample book problems.&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;8.3, p 471.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="statistics"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class26/#id2"&gt;2   Statistics&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Here's a sampling of this large topic.   There are many other tests, each for a particular purpose.&lt;/p&gt;
&lt;div class="section" id="statistics-videos"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class26/#id3"&gt;2.1   Statistics videos&lt;/a&gt;&lt;/h3&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;10-1 Guinness, Student, and the History of t Tests (16:58)
&lt;a class="reference external" href="https://www.youtube.com/watch?v=bqfcFCjaE1c"&gt;https://www.youtube.com/watch?v=bqfcFCjaE1c&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;12-2 ANOVA – Variance Between and Within (12:51)
&lt;a class="reference external" href="https://www.youtube.com/watch?v=fK_l63PJ7Og"&gt;https://www.youtube.com/watch?v=fK_l63PJ7Og&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;15-1 Why Non Parametric Statistics? (6.52)
&lt;a class="reference external" href="https://www.youtube.com/watch?v=xA0QcbNxENs"&gt;https://www.youtube.com/watch?v=xA0QcbNxENs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Regression: Crash Course Statistics #32 (12:40)
&lt;a class="reference external" href="https://www.youtube.com/watch?v=WWqE7YHR4Jc"&gt;https://www.youtube.com/watch?v=WWqE7YHR4Jc&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;</description><category>mathjax</category><guid>https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class26/</guid><pubDate>Thu, 18 Apr 2019 04:00:00 GMT</pubDate></item><item><title>Engineering Probability Class 25 Mon 2019-04-15</title><link>https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class25/</link><dc:creator>W Randolph Franklin (WRF), RPI</dc:creator><description>&lt;div&gt;&lt;div class="contents topic" id="table-of-contents"&gt;
&lt;p class="topic-title first"&gt;Table of contents&lt;/p&gt;
&lt;ul class="auto-toc simple"&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class25/#iclicker" id="id1"&gt;1   Iclicker&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class25/#statistics" id="id2"&gt;2   Statistics&lt;/a&gt;&lt;ul class="auto-toc"&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class25/#hypothesis-testing-from-text-plus-extras" id="id3"&gt;2.1   Hypothesis testing, from text (plus extras)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class25/#dr-nic-s-videos" id="id4"&gt;2.2   Dr Nic's videos&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class25/#research-by-design-videos" id="id5"&gt;2.3   Research By Design videos&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;!--  --&gt;
&lt;div class="section" id="iclicker"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class25/#id1"&gt;1   Iclicker&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;All these questions concern math SAT scores, which we assume have a mean of 500 and standard deviation of 100.&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;What is the probability that one particular score is between 400 and 600?&lt;ol class="upperalpha"&gt;
&lt;li&gt;.34&lt;/li&gt;
&lt;li&gt;.68&lt;/li&gt;
&lt;li&gt;.96&lt;/li&gt;
&lt;li&gt;.98&lt;/li&gt;
&lt;li&gt;.9974&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;I take a random sample of 4 students, and compute the mean of their 4 scores.
What is the probability that that mean is between 400 and 600?&lt;ol class="upperalpha"&gt;
&lt;li&gt;.34&lt;/li&gt;
&lt;li&gt;.68&lt;/li&gt;
&lt;li&gt;.96&lt;/li&gt;
&lt;li&gt;.98&lt;/li&gt;
&lt;li&gt;.9974&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;I take a random sample of 9 students, and compute the mean of their 9 scores.
What is the probability that that mean is between 400 and 600?&lt;ol class="upperalpha"&gt;
&lt;li&gt;.34&lt;/li&gt;
&lt;li&gt;.68&lt;/li&gt;
&lt;li&gt;.96&lt;/li&gt;
&lt;li&gt;.98&lt;/li&gt;
&lt;li&gt;.9974&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;What is the standard deviation of the 4-student sample?&lt;ol class="upperalpha"&gt;
&lt;li&gt;25&lt;/li&gt;
&lt;li&gt;33&lt;/li&gt;
&lt;li&gt;50&lt;/li&gt;
&lt;li&gt;100&lt;/li&gt;
&lt;li&gt;200&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;What is the standard deviation of the 9-student sample?&lt;ol class="upperalpha"&gt;
&lt;li&gt;25&lt;/li&gt;
&lt;li&gt;33&lt;/li&gt;
&lt;li&gt;50&lt;/li&gt;
&lt;li&gt;100&lt;/li&gt;
&lt;li&gt;200&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="statistics"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class25/#id2"&gt;2   Statistics&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Now, we  learn &lt;strong&gt;statistics&lt;/strong&gt;.   That means, determining parameters of a population by sampling it.   In &lt;strong&gt;probability&lt;/strong&gt;, we already know that parameters, and calculate things from them.&lt;/p&gt;
&lt;p&gt;We'll start with Leon-Garcia Chapter 8, and add stuff to it.&lt;/p&gt;
&lt;p&gt;This course module fits with RPI's goal of a data dexterity requirement for undergrads.  Pres Jackson mentioned this at the spring town meet; see &lt;a class="reference external" href="https://president.rpi.edu/speeches/2019/remarks-spring-town-meeting"&gt;https://president.rpi.edu/speeches/2019/remarks-spring-town-meeting&lt;/a&gt; .&lt;/p&gt;
&lt;p&gt;Disclosure:  Prof Dave Mendonca and I are co-chairs of the SoE Data Dexterity Task Force,  working out details of this.&lt;/p&gt;
&lt;div class="section" id="hypothesis-testing-from-text-plus-extras"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class25/#id3"&gt;2.1   Hypothesis testing, from text (plus extras)&lt;/a&gt;&lt;/h3&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Say we want to test whether the average height of an RPI student (called the population) is 2m.&lt;/li&gt;
&lt;li&gt;We assume that the distribution is Gaussian (normal) and that the standard deviation of heights is, say, 0.2m.&lt;/li&gt;
&lt;li&gt;However we don't know the mean.&lt;/li&gt;
&lt;li&gt;We do an experiment and measure the heights of n=100 random students.   Their mean height is, say, 1.9m.&lt;/li&gt;
&lt;li&gt;The question on the table is, is the population mean 2m?&lt;/li&gt;
&lt;li&gt;This is different from the earlier question that we analyzed, which was this: What is the most likely population mean?  (Answer: 1.9m.)&lt;/li&gt;
&lt;li&gt;Now we have a hypothesis (that the population mean is 2m) that we're testing.&lt;/li&gt;
&lt;li&gt;The standard way that this is handled is as follows.&lt;/li&gt;
&lt;li&gt;Define a null hypothesis, called H0, that the population mean is 2m.&lt;/li&gt;
&lt;li&gt;Define an alternate hypothesis, called HA, that the population mean is not 2m.&lt;/li&gt;
&lt;li&gt;Note that we observed our sample mean to be $0.5 \sigma$ below the population mean, if H0 is true.&lt;/li&gt;
&lt;li&gt;Each time we rerun the experiment (measure 100 students) we'll observe a different number.&lt;/li&gt;
&lt;li&gt;We compute the probability that, if H0 is true, our sample mean would be this far from 2m.&lt;/li&gt;
&lt;li&gt;Depending on what our underlying model of students is, we might use a 1-tail or a 2-tail probability.&lt;/li&gt;
&lt;li&gt;Perhaps we think that the population mean might be less than 2m but it's not going to be more.  Then a 1-tail distribution makes sense.&lt;/li&gt;
&lt;li&gt;That is, our assumptions affect the results.&lt;/li&gt;
&lt;li&gt;The probability is Q(5), which is very small.&lt;/li&gt;
&lt;li&gt;Therefore we reject H0 and accept HA.&lt;/li&gt;
&lt;li&gt;We make a type-1 error if we reject H0 and it was really true.  See &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Type_I_and_type_II_errors"&gt;http://en.wikipedia.org/wiki/Type_I_and_type_II_errors&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;We make a type-2 error if we accept H0 and it was really false.&lt;/li&gt;
&lt;li&gt;These two errors trade off: by reducing the probability of one we increase the probability of the other, for a given sample size.&lt;/li&gt;
&lt;li&gt;E.g. in a criminal trial we prefer that a guilty person go free to having an innocent person convicted.&lt;/li&gt;
&lt;li&gt;Rejecting H0 says nothing about what the population mean really is, just that it's not likely 2m.&lt;/li&gt;
&lt;li&gt;Enrichment.  Random sampling is hard.  The US government got it wrong here:
&lt;a class="reference external" href="http://politics.slashdot.org/story/11/05/13/2249256/Algorithm-Glitch-Voids-Outcome-of-US-Green-Card-Lottery"&gt;http://politics.slashdot.org/story/11/05/13/2249256/Algorithm-Glitch-Voids-Outcome-of-US-Green-Card-Lottery&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The above tests, called &lt;strong&gt;z-tests&lt;/strong&gt;, assumed that we know the population variance.&lt;/li&gt;
&lt;li&gt;If we don't know the population variance, we can estimate it by sampling.&lt;/li&gt;
&lt;li&gt;We can combine estimating the population variance with testing the hypothesis into one test, called the &lt;strong&gt;t-test&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="dr-nic-s-videos"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class25/#id4"&gt;2.2   Dr Nic's videos&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Understanding the Central Limit Theorem
&lt;a class="reference external" href="https://www.youtube.com/watch?v=_YOr_yYPytM"&gt;https://www.youtube.com/watch?v=_YOr_yYPytM&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Variation and Sampling Error
&lt;a class="reference external" href="https://www.youtube.com/watch?v=y3A0lUkpAko"&gt;https://www.youtube.com/watch?v=y3A0lUkpAko&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Understanding Statistical Inference
&lt;a class="reference external" href="https://www.youtube.com/watch?v=tFRXsngz4UQ"&gt;https://www.youtube.com/watch?v=tFRXsngz4UQ&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Understanding Hypothesis testing, p-value, t-test - Statistics Help
&lt;a class="reference external" href="https://www.youtube.com/watch?v=0zZYBALbZgg"&gt;https://www.youtube.com/watch?v=0zZYBALbZgg&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="research-by-design-videos"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class25/#id5"&gt;2.3   Research By Design videos&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;10-1 Guinness, Student, and the History of t Tests
&lt;a class="reference external" href="https://www.youtube.com/watch?v=bqfcFCjaE1c"&gt;https://www.youtube.com/watch?v=bqfcFCjaE1c&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;</description><category>mathjax</category><guid>https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class25/</guid><pubDate>Mon, 15 Apr 2019 04:00:00 GMT</pubDate></item><item><title>Engineering Probability Class 24 Thu 2019-04-11</title><link>https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class24/</link><dc:creator>W Randolph Franklin (WRF), RPI</dc:creator><description>&lt;div&gt;&lt;div class="contents topic" id="table-of-contents"&gt;
&lt;p class="topic-title first"&gt;Table of contents&lt;/p&gt;
&lt;ul class="auto-toc simple"&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class24/#iclicker-questions" id="id1"&gt;1   Iclicker questions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class24/#material-from-text" id="id2"&gt;2   Material from text&lt;/a&gt;&lt;ul class="auto-toc"&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class24/#chapter-7-p-359-sums-of-random-variables" id="id3"&gt;2.1   Chapter 7, p 359, Sums of Random Variables&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class24/#sums-of-random-variables-ctd" id="id4"&gt;2.2   Sums of random variables ctd&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class24/#counterintuitive-things-in-statistics" id="id5"&gt;3   Counterintuitive things in statistics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class24/#relevant-xkcd-comics" id="id6"&gt;4   Relevant Xkcd comics&lt;/a&gt;&lt;ul class="auto-toc"&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class24/#chapter-8-statistics" id="id7"&gt;4.1   Chapter 8, Statistics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class24/#hypothesis-testing" id="id8"&gt;4.2   Hypothesis testing&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;!--  --&gt;
&lt;div class="section" id="iclicker-questions"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class24/#id1"&gt;1   Iclicker questions&lt;/a&gt;&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="section" id="material-from-text"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class24/#id2"&gt;2   Material from text&lt;/a&gt;&lt;/h2&gt;
&lt;div class="section" id="chapter-7-p-359-sums-of-random-variables"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class24/#id3"&gt;2.1   Chapter 7, p 359, Sums of Random Variables&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The long term goal of this section is to summarize information from a large
group of random variables.  E.g., the mean is one way.  We will start with
that, and go farther.&lt;/p&gt;
&lt;p&gt;The next step is to infer the true mean of a large set of variables from a
small &lt;strong&gt;sample&lt;/strong&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="sums-of-random-variables-ctd"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class24/#id4"&gt;2.2   Sums of random variables ctd&lt;/a&gt;&lt;/h3&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;Let Z=X+Y.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;$f_Z$ is convolution of  $f_X$ and  $f_Y$:  $$f_Z(z) = (f_X * f_Y)(z)$$ $$f_Z(z) = \int f_X(x) f_Y(z-x) dx$$&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Characteristic functions are useful.  They are covered in Section 4.7.1 on page 184.&lt;/p&gt;
&lt;p&gt;$$\Phi_X(\omega) = E[e^{j\omega X} ]$$&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;$\Phi_Z = \Phi_X \Phi_Y$.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;This extends to the sum of n random variables:  if $Z=\sum_i X_i$ then $\Phi_Z (\omega) = \Pi_i \Phi_{X_i} (\omega)$&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;E.g. Exponential with  $\lambda=1$:   $\Phi_1(\omega) = 1/(1-j\omega)$  (page 164).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Sum of m exponentials has  $\Phi(\omega)= 1/{(1-j\omega)}^m$.  That's called an m-Erlang.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Example 2: sum of n iid Bernoullis.  Probability generating function is more useful for discrete random variables.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Example 3: sum of n iid Gaussians.  $$\Phi_{X_1} = e^{j\mu\omega - \frac{1}{2} \sigma^2 \omega^2}$$   $$\Phi_{Z} = e^{jn\mu\omega - \frac{1}{2}n \sigma^2 \omega^2}$$  I.e., mean and variance sum.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;As the number increases, no matter what distribution the initial random variance is (provided that its moments are finite), for the sum   $\Phi$ starts looking like a Gaussian.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;The mean  $M_n$ of n random variables is itself a random variable.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;As $n\rightarrow\infty$  $M_n \rightarrow \mu$.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;That's a &lt;strong&gt;law of large numbers&lt;/strong&gt; (LLN).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;$E[ M_n ] = \mu$.  It's an &lt;strong&gt;unbiased estimator&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;$VAR[ M_n ] = n \sigma ^2$&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;strong&gt;Weak law of large numbers&lt;/strong&gt; $$\forall \epsilon &amp;gt;0 \lim_{n\rightarrow\infty} P[ |M_n-\mu| &amp;lt; \epsilon] = 1$$&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;How fast does it happen?   We can use Chebyshev, though that is very conservative.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;&lt;strong&gt;Strong law of large numbers&lt;/strong&gt; $$P [ \lim _ {n\rightarrow\infty} M_n = \mu ] =1$$&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;As $n\rightarrow\infty$, $F_{M_n}$ becomes Gaussian.  That's the &lt;strong&gt;Central Limit Theorem&lt;/strong&gt; (CLT).&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="section" id="counterintuitive-things-in-statistics"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class24/#id5"&gt;3   Counterintuitive things in statistics&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Statistics has some surprising examples, which would appear to be impossible.    Here are some.&lt;/p&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;Average income can increase faster in a whole country than in any part of the country.&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;Consider a country with two parts: east and west.&lt;/li&gt;
&lt;li&gt;Each part has 100 people.&lt;/li&gt;
&lt;li&gt;Each person in the west makes \$100 per year; each person in the east \$200.&lt;/li&gt;
&lt;li&gt;The total income in the west is \$10K, in the east \$20K,  and in the whole country \$30K.&lt;/li&gt;
&lt;li&gt;The average income in the west is \$100, in the east \$200, and in the whole country \$150.&lt;/li&gt;
&lt;li&gt;Assume that next year nothing changes except that one westerner moves east and gets an average eastern job, so he now makes \$200 instead of \$100.&lt;/li&gt;
&lt;li&gt;The west now has 99 people @ \$100; its average income didn't change.&lt;/li&gt;
&lt;li&gt;The east now has 101 people @ \$200; its average income didn't change.&lt;/li&gt;
&lt;li&gt;The whole country's income is \$30100 for an average of \$150.50; that went up.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;College acceptance rate surprise.&lt;/p&gt;
&lt;ol class="loweralpha"&gt;
&lt;li&gt;&lt;p class="first"&gt;Imagine that we have two groups of people: Albanians and Bostonians.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;They're applying to two programs at the university: Engineering and Humanities.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Here are the numbers.    The fractions are accepted/applied.&lt;/p&gt;
&lt;table border="1" class="docutils"&gt;
&lt;colgroup&gt;
&lt;col width="40%"&gt;
&lt;col width="20%"&gt;
&lt;col width="20%"&gt;
&lt;col width="20%"&gt;
&lt;/colgroup&gt;
&lt;thead valign="bottom"&gt;
&lt;tr&gt;&lt;th class="head"&gt;city-major&lt;/th&gt;
&lt;th class="head"&gt;Engin&lt;/th&gt;
&lt;th class="head"&gt;Human&lt;/th&gt;
&lt;th class="head"&gt;Total&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;&lt;td&gt;Albanians&lt;/td&gt;
&lt;td&gt;11/15&lt;/td&gt;
&lt;td&gt;2/5&lt;/td&gt;
&lt;td&gt;13/20&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Bostonians&lt;/td&gt;
&lt;td&gt;4/5&lt;/td&gt;
&lt;td&gt;7/15&lt;/td&gt;
&lt;td&gt;11/20&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Total&lt;/td&gt;
&lt;td&gt;15/20&lt;/td&gt;
&lt;td&gt;9/20&lt;/td&gt;
&lt;td&gt;24/40&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;E.g, 15 Albanians applied to Engin; 11 were accepted.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Note that in Engineering, a &lt;em&gt;smaller&lt;/em&gt; fraction of Albanian applicants were accepted than Bostonian applicants.  &lt;em&gt;(corrected)&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Ditto in Humanities.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;However in all, a &lt;em&gt;larger&lt;/em&gt; fraction of Albanian applicants were accepted than Bostonian applicants.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;I could go on.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="relevant-xkcd-comics"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class24/#id6"&gt;4   Relevant Xkcd comics&lt;/a&gt;&lt;/h2&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;a class="reference external" href="https://xkcd.com/1985/"&gt;Meteorologist&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://xkcd.com/882/"&gt;Significant&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://xkcd.com/1478/"&gt;P-Values&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://xkcd.com/552/"&gt;Correlation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://xkcd.com/1725/"&gt;Linear Regression&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://xkcd.com/925/"&gt;Cell Phones&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://xkcd.com/1132/"&gt;Frequentists vs. Bayesians&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://xkcd.com/1236/"&gt;Seashell&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://xkcd.com/795/"&gt;Conditional Risk&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://xkcd.com/892/"&gt;Null Hypothesis&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="section" id="chapter-8-statistics"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class24/#id7"&gt;4.1   Chapter 8, Statistics&lt;/a&gt;&lt;/h3&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;We have a population.  &lt;strong&gt;(E.g., voters in next election, who will vote Democrat or Republican).&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;We don't know the population mean.  &lt;strong&gt;(E.g., fraction of voters who will vote Democrat).&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;We take several samples (observations).  From them we want to estimate the population mean and standard deviation.  &lt;strong&gt;(Ask 1000 potential voters; 520 say they will vote Democrat.  Sample mean is .52)&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;We want error bounds on our estimates.   &lt;strong&gt;(.52 plus or minus .04, 95 times out of 100)&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Another application: testing whether 2 populations have the same mean.  &lt;strong&gt;(Is this batch of Guiness as good as the last one?)&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Observations cost money, so we want to do as few as possible.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;This gets beyond this course, but the biggest problems may be non-math ones.  E.g., how do you pick a random likely voter?  In the past phone books were used.  In a famous 1936 Presidential poll, that biased against poor people, who voted for Roosevelt.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;In &lt;strong&gt;probability&lt;/strong&gt;, we know the parameters (e.g., mean and standard deviation) of a distribution and use them to compute the probability of some event.&lt;/p&gt;
&lt;p&gt;E.g., if we toss a fair coin 4 times what's the probability of exactly 4 heads?  Answer: 1/16.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;In &lt;strong&gt;statistics&lt;/strong&gt; we do not know all the parameters, though we usually know that type the distribution is, e.g., normal.  (We often know the standard deviation.)&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;We make observations about some members of the distribution, i.e., draw some samples.&lt;/li&gt;
&lt;li&gt;From them we &lt;strong&gt;estimate&lt;/strong&gt; the unknown parameters.&lt;/li&gt;
&lt;li&gt;We often also compute a confidence interval on that estimate.&lt;/li&gt;
&lt;li&gt;E.g., we toss an unknown coin 100 times and see 60 heads.  A good estimate for the probability of that coin coming up heads is 0.6.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Some estimators are better than others, though that gets beyond this course.&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Suppose I want to estimate the average height of an RPI student by measuring the heights of N random students.&lt;/li&gt;
&lt;li&gt;The mean of the highest and lowest heights of my N students would converge to the population mean as N increased.&lt;/li&gt;
&lt;li&gt;However the median of my sample would converge faster.  Technically, the variance of the sample median is smaller than the variance of the sample hi-lo mean.&lt;/li&gt;
&lt;li&gt;The mean of my whole sample would converge the fastest.  Technically, the variance of the sample mean is smaller than the variance of any other estimator of the population mean.  That's why we use it.&lt;/li&gt;
&lt;li&gt;However perhaps the population's distribution is not normal.  Then one of the other estimators might be better.  It would be more &lt;strong&gt;robust&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;(Enrichment) How to tell if the population is normal?  We can do various plots of the observations and look.  We can compute the probability that the observations would be this uneven if the population were normal.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;An estimator may be &lt;strong&gt;biased&lt;/strong&gt;.  We have an distribution that is U[0,b] for unknown b.  We take a sample.  The max of the sample has a mean n/(n+1)b though it converges to b as n increases.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Example 8.2, page 413: One-tailed probability.  This is the probability that the mean of our sample is at least so far above the population mean.  $$\alpha = P[\overline{X_n}-\mu &amp;gt; c] = Q\left( \frac{c}{\sigma_x / \sqrt{n} } \right)$$  Q is defined on page 169:  $$Q(x) = \int_x^ { \infty} \frac{1}{\sqrt{2\pi} } e^{-\frac{x^2}{2} } dx$$&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Application: You sample n=100 students' verbal SAT scores, and see $ \overline{X} = 550$.  You know that $\sigma=100$.  If $\mu = 525$, what is the probability that $\overline{X_n} &amp;gt; 550$ ?&lt;/p&gt;
&lt;p&gt;Answer: Q(2.5) = 0.006&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;This means that if we take 1000 random sample of students, each with 100 students, and measure each sample's mean, then, on average, 6 of those 1000 samples will have a mean over 550.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;This is often worded as the probability of the population's mean being under 525 is 0.006, which is different.  The problem with saying that is that presumes some probability distribution for the population mean.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;The formula also works for the other tail, computing the probability that our sample mean is at least so far &lt;strong&gt;below&lt;/strong&gt; the population mean.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;The &lt;strong&gt;2-tail probability&lt;/strong&gt; is the probability that our sample mean is at least this far away from the sample mean in either direction.   It is twice the 1-tail probability.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;All this also works when you know the probability and want to know c, the cutoff.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="hypothesis-testing"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class24/#id8"&gt;4.2   Hypothesis testing&lt;/a&gt;&lt;/h3&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Say we want to test whether the average height of an RPI student (called the population) is 2m.&lt;/li&gt;
&lt;li&gt;We assume that the distribution is Gaussian (normal) and that the standard deviation of heights is, say, 0.2m.&lt;/li&gt;
&lt;li&gt;However we don't know the mean.&lt;/li&gt;
&lt;li&gt;We do an experiment and measure the heights of n=100 random students.   Their mean height is, say, 1.9m.&lt;/li&gt;
&lt;li&gt;The question on the table is, is the population mean 2m?&lt;/li&gt;
&lt;li&gt;This is different from the earlier question that we analyzed, which was this: What is the most likely population mean?  (Answer: 1.9m.)&lt;/li&gt;
&lt;li&gt;Now we have a hypothesis (that the population mean is 2m) that we're testing.&lt;/li&gt;
&lt;li&gt;The standard way that this is handled is as follows.&lt;/li&gt;
&lt;li&gt;Define a null hypothesis, called H0, that the population mean is 2m.&lt;/li&gt;
&lt;li&gt;Define an alternate hypothesis, called HA, that the population mean is not 2m.&lt;/li&gt;
&lt;li&gt;Note that we observed our sample mean to be $0.5 \sigma$ below the population mean, if H0 is true.&lt;/li&gt;
&lt;li&gt;Each time we rerun the experiment (measure 100 students) we'll observe a different number.&lt;/li&gt;
&lt;li&gt;We compute the probability that, if H0 is true, our sample mean would be this far from 2m.&lt;/li&gt;
&lt;li&gt;Depending on what our underlying model of students is, we might use a 1-tail or a 2-tail probability.&lt;/li&gt;
&lt;li&gt;Perhaps we think that the population mean might be less than 2m but it's not going to be more.  Then a 1-tail distribution makes sense.&lt;/li&gt;
&lt;li&gt;That is, our assumptions affect the results.&lt;/li&gt;
&lt;li&gt;The probability is Q(5), which is very small.&lt;/li&gt;
&lt;li&gt;Therefore we reject H0 and accept HA.&lt;/li&gt;
&lt;li&gt;We make a type-1 error if we reject H0 and it was really true.  See &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Type_I_and_type_II_errors"&gt;http://en.wikipedia.org/wiki/Type_I_and_type_II_errors&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;We make a type-2 error if we accept H0 and it was really false.&lt;/li&gt;
&lt;li&gt;These two errors trade off: by reducing the probability of one we increase the probability of the other, for a given sample size.&lt;/li&gt;
&lt;li&gt;E.g. in a criminal trial we prefer that a guilty person go free to having an innocent person convicted.&lt;/li&gt;
&lt;li&gt;Rejecting H0 says nothing about what the population mean really is, just that it's not likely 2m.&lt;/li&gt;
&lt;li&gt;&lt;dl class="first docutils"&gt;
&lt;dt&gt;(Enrichment)  Random sampling is hard.  The US government got it wrong here:&lt;/dt&gt;
&lt;dd&gt;&lt;a class="reference external" href="http://politics.slashdot.org/story/11/05/13/2249256/Algorithm-Glitch-Voids-Outcome-of-US-Green-Card-Lottery"&gt;http://politics.slashdot.org/story/11/05/13/2249256/Algorithm-Glitch-Voids-Outcome-of-US-Green-Card-Lottery&lt;/a&gt;&lt;/dd&gt;
&lt;/dl&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;</description><category>mathjax</category><guid>https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class24/</guid><pubDate>Thu, 11 Apr 2019 04:00:00 GMT</pubDate></item><item><title>Engineering Probability Class 23 Mon 2019-04-08</title><link>https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class23/</link><dc:creator>W Randolph Franklin (WRF), RPI</dc:creator><description>&lt;div&gt;&lt;div class="contents topic" id="table-of-contents"&gt;
&lt;p class="topic-title first"&gt;Table of contents&lt;/p&gt;
&lt;ul class="auto-toc simple"&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class23/#iclicker-questions" id="id1"&gt;1   Iclicker questions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class23/#mathematica-demos" id="id2"&gt;2   Mathematica demos&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class23/#material-from-text" id="id3"&gt;3   Material from text&lt;/a&gt;&lt;ul class="auto-toc"&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class23/#section-6-5-page-332-estimation-of-random-variables" id="id4"&gt;3.1   Section 6.5, page 332: Estimation of random variables&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class23/#chapter-7-p-359-sums-of-random-variables" id="id5"&gt;3.2   Chapter 7, p 359, Sums of Random Variables&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class23/#sums-of-random-variables-ctd" id="id6"&gt;3.3   Sums of random variables ctd&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class23/#counterintuitive-things-in-statistics" id="id7"&gt;4   Counterintuitive things in statistics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class23/#relevant-xkcd-comics" id="id8"&gt;5   Relevant Xkcd comics&lt;/a&gt;&lt;ul class="auto-toc"&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class23/#chapter-8-statistics" id="id9"&gt;5.1   Chapter 8, Statistics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class23/#hypothesis-testing" id="id10"&gt;5.2   Hypothesis testing&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;!--  --&gt;
&lt;div class="section" id="iclicker-questions"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class23/#id1"&gt;1   Iclicker questions&lt;/a&gt;&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="section" id="mathematica-demos"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class23/#id2"&gt;2   Mathematica demos&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;I put last class's mathematica demo online under Files - Mathematica.   There are 2 versions: class22.pdf, a PDF file,  you can view, and class22.nb, a Mathematica workbook,  you can open in Mathematica and play with.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="material-from-text"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class23/#id3"&gt;3   Material from text&lt;/a&gt;&lt;/h2&gt;
&lt;div class="section" id="section-6-5-page-332-estimation-of-random-variables"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class23/#id4"&gt;3.1   Section 6.5, page 332: Estimation of random variables&lt;/a&gt;&lt;/h3&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;Assume that we want to know X but can only see Y, which depends on X.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;This is a generalization of our long-running noisy communication channel example.  We'll do things a little more precisely now.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Another application would be to estimate tomorrow's price of GOOG (X) given the prices to date (Y).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Sometimes, but not always, we have a prior probability for X.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;For the communication channel we do, for GOOG, we don't.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;If we do, it's a ''maximum a posteriori estimator''.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;If we don't, it's a ''maximum likelihood estimator''.  We effectively assume that that prior probability of X is uniform, even though that may not completely make sense.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;You toss a fair coin 3 times.  X is the number of heads, from 0 to 3.  Y is the position of the 1st head. from 0 to 3.  If there are no heads, we'll say that the first head's position is 0.&lt;/p&gt;
&lt;table border="1" class="docutils"&gt;
&lt;colgroup&gt;
&lt;col width="46%"&gt;
&lt;col width="54%"&gt;
&lt;/colgroup&gt;
&lt;thead valign="bottom"&gt;
&lt;tr&gt;&lt;th class="head"&gt;(X,Y)&lt;/th&gt;
&lt;th class="head"&gt;p(X,Y)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;&lt;td&gt;(0,0)&lt;/td&gt;
&lt;td&gt;1/8&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;(1,1)&lt;/td&gt;
&lt;td&gt;1/8&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;(1,2)&lt;/td&gt;
&lt;td&gt;1/8&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;(1,3)&lt;/td&gt;
&lt;td&gt;1/8&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;(2,1)&lt;/td&gt;
&lt;td&gt;2/8&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;(2,2)&lt;/td&gt;
&lt;td&gt;1/8&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;(3,1)&lt;/td&gt;
&lt;td&gt;1/8&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;E.g., 1 head can occur 3 ways (out of 8): HTT, THT, TTH.  The 1st (and only) head occurs in position 1, one of those ways.  p=1/8.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Conditional probabilities:&lt;/p&gt;
&lt;table border="1" class="docutils"&gt;
&lt;colgroup&gt;
&lt;col width="48%"&gt;
&lt;col width="10%"&gt;
&lt;col width="10%"&gt;
&lt;col width="23%"&gt;
&lt;col width="10%"&gt;
&lt;/colgroup&gt;
&lt;thead valign="bottom"&gt;
&lt;tr&gt;&lt;th class="head"&gt;p(x|y)&lt;/th&gt;
&lt;th class="head"&gt;y=0&lt;/th&gt;
&lt;th class="head"&gt;y=1&lt;/th&gt;
&lt;th class="head"&gt;y=2&lt;/th&gt;
&lt;th class="head"&gt;y=3&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;&lt;td&gt;x=0&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;x=1&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1/4&lt;/td&gt;
&lt;td&gt;1/2&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;x=2&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1/2&lt;/td&gt;
&lt;td&gt;1/2&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;x=3&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1/4&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;$g_{MAP}(y)$&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;1 or 2&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;$P_{error}(y)$&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1/2&lt;/td&gt;
&lt;td&gt;1/2&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;p(y)&lt;/td&gt;
&lt;td&gt;1/8&lt;/td&gt;
&lt;td&gt;1/2&lt;/td&gt;
&lt;td&gt;1/4&lt;/td&gt;
&lt;td&gt;1/8&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The total probability of error is 3/8.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;We observe Y and want to guess X from Y.  E.g., If we observe  $$\small y= \begin{pmatrix}0\\1\\2\\3\end{pmatrix} \text{then } x= \begin{pmatrix}0\\ 2 \text{ most likely} \\ 1, 2 \text{ equally likely} \\ 1 \end{pmatrix}$$&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;There are different formulae.  The above one was the MAP, maximum a posteriori probability.&lt;/p&gt;
&lt;p&gt;$$g_{\text{MAP}} (y) = \max_x p_x(x|y) \text{ or } f_x(x|y)$$&lt;/p&gt;
&lt;p&gt;That means, the value of $x$ that maximizes $p_x(x|y)$&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;What if we don't know p(x|y)?  If we know p(y|x), we can use Bayes.  We might measure p(y|x) experimentally, e.g., by sending many messages over the channel.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Bayes requires p(x).  What if we don't know even that?  E.g. we don't know the probability of the different possible transmitted messages.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Then use maximum likelihood estimator, ML. $$g_{\text{ML}} (y) = \max_x p_y(y|x) \text{ or } f_y(y|x)$$&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;There are other estimators for different applications.  E.g., regression using least squares might attempt to predict a graduate's QPA from his/her entering SAT scores.  At Saratoga in August we might attempt to predict a horse's chance of winning a race from its speed in previous races.   Some years ago, an Engineering Assoc Dean would do that each summer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Historically, IMO, some of the techniques, like least squares and logistic regression, have been used more because they're computationally easy than because they're logically justified.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="chapter-7-p-359-sums-of-random-variables"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class23/#id5"&gt;3.2   Chapter 7, p 359, Sums of Random Variables&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The long term goal of this section is to summarize information from a large
group of random variables.  E.g., the mean is one way.  We will start with
that, and go farther.&lt;/p&gt;
&lt;p&gt;The next step is to infer the true mean of a large set of variables from a
small &lt;strong&gt;sample&lt;/strong&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="sums-of-random-variables-ctd"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class23/#id6"&gt;3.3   Sums of random variables ctd&lt;/a&gt;&lt;/h3&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Let Z=X+Y.&lt;/li&gt;
&lt;li&gt;$f_Z$ is convolution of  $f_X$ and  $f_Y$:  $$f_Z(z) = (f_X * f_Y)(z)$$ $$f_Z(z) = \int f_X(x) f_Y(z-x) dx$$&lt;/li&gt;
&lt;li&gt;Characteristic functions are useful.  $$\Phi_X(\omega) = E[e^{j\omega X} ]$$&lt;/li&gt;
&lt;li&gt;$\Phi_Z = \Phi_X \Phi_Y$.&lt;/li&gt;
&lt;li&gt;This extends to the sum of n random variables:  if $Z=\sum_i X_i$ then $\Phi_Z (\omega) = \Pi_i \Phi_{X_i} (\omega)$&lt;/li&gt;
&lt;li&gt;E.g. Exponential with  $\lambda=1$:   $\Phi_1(\omega) = 1/(1-j\omega)$  (page 164).&lt;/li&gt;
&lt;li&gt;Sum of m exponentials has  $\Phi(\omega)= 1/{(1-j\omega)}^m$.  That's called an m-Erlang.&lt;/li&gt;
&lt;li&gt;Example 2: sum of n iid Bernoullis.  Probability generating function is more useful for discrete random variables.&lt;/li&gt;
&lt;li&gt;Example 3: sum of n iid Gaussians.  $$\Phi_{X_1} = e^{j\mu\omega - \frac{1}{2} \sigma^2 \omega^2}$$   $$\Phi_{Z} = e^{jn\mu\omega - \frac{1}{2}n \sigma^2 \omega^2}$$  I.e., mean and variance sum.&lt;/li&gt;
&lt;li&gt;As the number increases, no matter what distribution the initial random variance is (provided that its moments are finite), for the sum   $\Phi$ starts looking like a Gaussian.&lt;/li&gt;
&lt;li&gt;The mean  $M_n$ of n random variables is itself a random variable.&lt;/li&gt;
&lt;li&gt;As $n\rightarrow\infty$  $M_n \rightarrow \mu$.&lt;/li&gt;
&lt;li&gt;That's a &lt;strong&gt;law of large numbers&lt;/strong&gt; (LLN).&lt;/li&gt;
&lt;li&gt;$E[ M_n ] = \mu$.  It's an &lt;strong&gt;unbiased estimator&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;$VAR[ M_n ] = n \sigma ^2$&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Weak law of large numbers&lt;/strong&gt; $$\forall \epsilon &amp;gt;0 \lim_{n\rightarrow\infty} P[ |M_n-\mu| &amp;lt; \epsilon] = 1$$&lt;/li&gt;
&lt;li&gt;How fast does it happen?   We can use Chebyshev, though that is very conservative.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Strong law of large numbers&lt;/strong&gt; $$P [ \lim _ {n\rightarrow\infty} M_n = \mu ] =1$$&lt;/li&gt;
&lt;li&gt;As $n\rightarrow\infty$, $F_{M_n}$ becomes Gaussian.  That's the &lt;strong&gt;Central Limit Theorem&lt;/strong&gt; (CLT).&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class="section" id="counterintuitive-things-in-statistics"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class23/#id7"&gt;4   Counterintuitive things in statistics&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Statistics has some surprising examples, which would appear to be impossible.    Here are some.&lt;/p&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;Average income can increase faster in a whole country than in any part of the country.&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;Consider a country with two parts: east and west.&lt;/li&gt;
&lt;li&gt;Each part has 100 people.&lt;/li&gt;
&lt;li&gt;Each person in the west makes \$100 per year; each person in the east \$200.&lt;/li&gt;
&lt;li&gt;The total income in the west is \$10K, in the east \$20K,  and in the whole country \$30K.&lt;/li&gt;
&lt;li&gt;The average income in the west is \$100, in the east \$200, and in the whole country \$150.&lt;/li&gt;
&lt;li&gt;Assume that next year nothing changes except that one westerner moves east and gets an average eastern job, so he now makes \$200 instead of \$100.&lt;/li&gt;
&lt;li&gt;The west now has 99 people @ \$100; its average income didn't change.&lt;/li&gt;
&lt;li&gt;The east now has 101 people @ \$200; its average income didn't change.&lt;/li&gt;
&lt;li&gt;The whole country's income is \$30100 for an average of \$150.50; that went up.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;College acceptance rate surprise.&lt;/p&gt;
&lt;ol class="loweralpha"&gt;
&lt;li&gt;&lt;p class="first"&gt;Imagine that we have two groups of people: Albanians and Bostonians.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;They're applying to two programs at the university: Engineering and Humanities.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Here are the numbers.    The fractions are accepted/applied.&lt;/p&gt;
&lt;table border="1" class="docutils"&gt;
&lt;colgroup&gt;
&lt;col width="40%"&gt;
&lt;col width="20%"&gt;
&lt;col width="20%"&gt;
&lt;col width="20%"&gt;
&lt;/colgroup&gt;
&lt;thead valign="bottom"&gt;
&lt;tr&gt;&lt;th class="head"&gt;city-major&lt;/th&gt;
&lt;th class="head"&gt;Engin&lt;/th&gt;
&lt;th class="head"&gt;Human&lt;/th&gt;
&lt;th class="head"&gt;Total&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;&lt;td&gt;Albanians&lt;/td&gt;
&lt;td&gt;11/15&lt;/td&gt;
&lt;td&gt;2/5&lt;/td&gt;
&lt;td&gt;13/20&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Bostonians&lt;/td&gt;
&lt;td&gt;4/5&lt;/td&gt;
&lt;td&gt;7/15&lt;/td&gt;
&lt;td&gt;11/20&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Total&lt;/td&gt;
&lt;td&gt;15/20&lt;/td&gt;
&lt;td&gt;9/20&lt;/td&gt;
&lt;td&gt;24/40&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;E.g, 15 Albanians applied to Engin; 11 were accepted.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Note that in Engineering, a &lt;em&gt;smaller&lt;/em&gt; fraction of Albanian applicants were accepted than Bostonian applicants.  &lt;em&gt;(corrected)&lt;/em&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Ditto in Humanities.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;However in all, a &lt;em&gt;larger&lt;/em&gt; fraction of Albanian applicants were accepted than Bostonian applicants.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;I could go on.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="relevant-xkcd-comics"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class23/#id8"&gt;5   Relevant Xkcd comics&lt;/a&gt;&lt;/h2&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;&lt;a class="reference external" href="https://xkcd.com/1985/"&gt;Meteorologist&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://xkcd.com/882/"&gt;Significant&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://xkcd.com/1478/"&gt;P-Values&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://xkcd.com/552/"&gt;Correlation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://xkcd.com/1725/"&gt;Linear Regression&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://xkcd.com/925/"&gt;Cell Phones&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://xkcd.com/1132/"&gt;Frequentists vs. Bayesians&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://xkcd.com/1236/"&gt;Seashell&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://xkcd.com/795/"&gt;Conditional Risk&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://xkcd.com/892/"&gt;Null Hypothesis&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="section" id="chapter-8-statistics"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class23/#id9"&gt;5.1   Chapter 8, Statistics&lt;/a&gt;&lt;/h3&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;We have a population.  &lt;strong&gt;(E.g., voters in next election, who will vote Democrat or Republican).&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;We don't know the population mean.  &lt;strong&gt;(E.g., fraction of voters who will vote Democrat).&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;We take several samples (observations).  From them we want to estimate the population mean and standard deviation.  &lt;strong&gt;(Ask 1000 potential voters; 520 say they will vote Democrat.  Sample mean is .52)&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;We want error bounds on our estimates.   &lt;strong&gt;(.52 plus or minus .04, 95 times out of 100)&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Another application: testing whether 2 populations have the same mean.  &lt;strong&gt;(Is this batch of Guiness as good as the last one?)&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Observations cost money, so we want to do as few as possible.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;This gets beyond this course, but the biggest problems may be non-math ones.  E.g., how do you pick a random likely voter?  In the past phone books were used.  In a famous 1936 Presidential poll, that biased against poor people, who voted for Roosevelt.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;In &lt;strong&gt;probability&lt;/strong&gt;, we know the parameters (e.g., mean and standard deviation) of a distribution and use them to compute the probability of some event.&lt;/p&gt;
&lt;p&gt;E.g., if we toss a fair coin 4 times what's the probability of exactly 4 heads?  Answer: 1/16.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;In &lt;strong&gt;statistics&lt;/strong&gt; we do not know all the parameters, though we usually know that type the distribution is, e.g., normal.  (We often know the standard deviation.)&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;We make observations about some members of the distribution, i.e., draw some samples.&lt;/li&gt;
&lt;li&gt;From them we &lt;strong&gt;estimate&lt;/strong&gt; the unknown parameters.&lt;/li&gt;
&lt;li&gt;We often also compute a confidence interval on that estimate.&lt;/li&gt;
&lt;li&gt;E.g., we toss an unknown coin 100 times and see 60 heads.  A good estimate for the probability of that coin coming up heads is 0.6.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Some estimators are better than others, though that gets beyond this course.&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Suppose I want to estimate the average height of an RPI student by measuring the heights of N random students.&lt;/li&gt;
&lt;li&gt;The mean of the highest and lowest heights of my N students would converge to the population mean as N increased.&lt;/li&gt;
&lt;li&gt;However the median of my sample would converge faster.  Technically, the variance of the sample median is smaller than the variance of the sample hi-lo mean.&lt;/li&gt;
&lt;li&gt;The mean of my whole sample would converge the fastest.  Technically, the variance of the sample mean is smaller than the variance of any other estimator of the population mean.  That's why we use it.&lt;/li&gt;
&lt;li&gt;However perhaps the population's distribution is not normal.  Then one of the other estimators might be better.  It would be more &lt;strong&gt;robust&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;(Enrichment) How to tell if the population is normal?  We can do various plots of the observations and look.  We can compute the probability that the observations would be this uneven if the population were normal.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;An estimator may be &lt;strong&gt;biased&lt;/strong&gt;.  We have an distribution that is U[0,b] for unknown b.  We take a sample.  The max of the sample has a mean n/(n+1)b though it converges to b as n increases.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Example 8.2, page 413: One-tailed probability.  This is the probability that the mean of our sample is at least so far above the population mean.  $$\alpha = P[\overline{X_n}-\mu &amp;gt; c] = Q\left( \frac{c}{\sigma_x / \sqrt{n} } \right)$$  Q is defined on page 169:  $$Q(x) = \int_x^ { \infty} \frac{1}{\sqrt{2\pi} } e^{-\frac{x^2}{2} } dx$$&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Application: You sample n=100 students' verbal SAT scores, and see $ \overline{X} = 550$.  You know that $\sigma=100$.  If $\mu = 525$, what is the probability that $\overline{X_n} &amp;gt; 550$ ?&lt;/p&gt;
&lt;p&gt;Answer: Q(2.5) = 0.006&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;This means that if we take 1000 random sample of students, each with 100 students, and measure each sample's mean, then, on average, 6 of those 1000 samples will have a mean over 550.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;This is often worded as the probability of the population's mean being under 525 is 0.006, which is different.  The problem with saying that is that presumes some probability distribution for the population mean.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;The formula also works for the other tail, computing the probability that our sample mean is at least so far &lt;strong&gt;below&lt;/strong&gt; the population mean.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;The &lt;strong&gt;2-tail probability&lt;/strong&gt; is the probability that our sample mean is at least this far away from the sample mean in either direction.   It is twice the 1-tail probability.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;All this also works when you know the probability and want to know c, the cutoff.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="hypothesis-testing"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class23/#id10"&gt;5.2   Hypothesis testing&lt;/a&gt;&lt;/h3&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Say we want to test whether the average height of an RPI student (called the population) is 2m.&lt;/li&gt;
&lt;li&gt;We assume that the distribution is Gaussian (normal) and that the standard deviation of heights is, say, 0.2m.&lt;/li&gt;
&lt;li&gt;However we don't know the mean.&lt;/li&gt;
&lt;li&gt;We do an experiment and measure the heights of n=100 random students.   Their mean height is, say, 1.9m.&lt;/li&gt;
&lt;li&gt;The question on the table is, is the population mean 2m?&lt;/li&gt;
&lt;li&gt;This is different from the earlier question that we analyzed, which was this: What is the most likely population mean?  (Answer: 1.9m.)&lt;/li&gt;
&lt;li&gt;Now we have a hypothesis (that the population mean is 2m) that we're testing.&lt;/li&gt;
&lt;li&gt;The standard way that this is handled is as follows.&lt;/li&gt;
&lt;li&gt;Define a null hypothesis, called H0, that the population mean is 2m.&lt;/li&gt;
&lt;li&gt;Define an alternate hypothesis, called HA, that the population mean is not 2m.&lt;/li&gt;
&lt;li&gt;Note that we observed our sample mean to be $0.5 \sigma$ below the population mean, if H0 is true.&lt;/li&gt;
&lt;li&gt;Each time we rerun the experiment (measure 100 students) we'll observe a different number.&lt;/li&gt;
&lt;li&gt;We compute the probability that, if H0 is true, our sample mean would be this far from 2m.&lt;/li&gt;
&lt;li&gt;Depending on what our underlying model of students is, we might use a 1-tail or a 2-tail probability.&lt;/li&gt;
&lt;li&gt;Perhaps we think that the population mean might be less than 2m but it's not going to be more.  Then a 1-tail distribution makes sense.&lt;/li&gt;
&lt;li&gt;That is, our assumptions affect the results.&lt;/li&gt;
&lt;li&gt;The probability is Q(5), which is very small.&lt;/li&gt;
&lt;li&gt;Therefore we reject H0 and accept HA.&lt;/li&gt;
&lt;li&gt;We make a type-1 error if we reject H0 and it was really true.  See &lt;a class="reference external" href="http://en.wikipedia.org/wiki/Type_I_and_type_II_errors"&gt;http://en.wikipedia.org/wiki/Type_I_and_type_II_errors&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;We make a type-2 error if we accept H0 and it was really false.&lt;/li&gt;
&lt;li&gt;These two errors trade off: by reducing the probability of one we increase the probability of the other, for a given sample size.&lt;/li&gt;
&lt;li&gt;E.g. in a criminal trial we prefer that a guilty person go free to having an innocent person convicted.&lt;/li&gt;
&lt;li&gt;Rejecting H0 says nothing about what the population mean really is, just that it's not likely 2m.&lt;/li&gt;
&lt;li&gt;&lt;dl class="first docutils"&gt;
&lt;dt&gt;(Enrichment)  Random sampling is hard.  The US government got it wrong here:&lt;/dt&gt;
&lt;dd&gt;&lt;a class="reference external" href="http://politics.slashdot.org/story/11/05/13/2249256/Algorithm-Glitch-Voids-Outcome-of-US-Green-Card-Lottery"&gt;http://politics.slashdot.org/story/11/05/13/2249256/Algorithm-Glitch-Voids-Outcome-of-US-Green-Card-Lottery&lt;/a&gt;&lt;/dd&gt;
&lt;/dl&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;</description><category>mathjax</category><guid>https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class23/</guid><pubDate>Mon, 08 Apr 2019 04:00:00 GMT</pubDate></item><item><title>Engineering Probability Class 22 Thu 2019-04-04</title><link>https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class22/</link><dc:creator>W Randolph Franklin (WRF), RPI</dc:creator><description>&lt;div&gt;&lt;div class="contents topic" id="table-of-contents"&gt;
&lt;p class="topic-title first"&gt;Table of contents&lt;/p&gt;
&lt;ul class="auto-toc simple"&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class22/#iclicker-questions" id="id1"&gt;1   Iclicker questions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class22/#mathematica-demo" id="id2"&gt;2   Mathematica demo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class22/#material-from-text" id="id3"&gt;3   Material from text&lt;/a&gt;&lt;ul class="auto-toc"&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class22/#section-6-5-page-332-estimation-of-random-variables" id="id4"&gt;3.1   Section 6.5, page 332: Estimation of random variables&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class22/#central-limit-theorem-etc" id="id5"&gt;3.2   Central limit theorem etc&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;!--  --&gt;
&lt;div class="section" id="iclicker-questions"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class22/#id1"&gt;1   Iclicker questions&lt;/a&gt;&lt;/h2&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;X and Y are two uniform r.v. on the interval [0,1].  X and Y are independent.  Z=X+Y.  What is E[Z]?&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;0&lt;/li&gt;
&lt;li&gt;1/2&lt;/li&gt;
&lt;li&gt;2/3&lt;/li&gt;
&lt;li&gt;&lt;ol class="first arabic"&gt;
&lt;li&gt;
&lt;/li&gt;&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;ol class="first arabic" start="2"&gt;
&lt;li&gt;
&lt;/li&gt;&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Now let W=max(X,Y).    What is E[W]?&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;0&lt;/li&gt;
&lt;li&gt;1/2&lt;/li&gt;
&lt;li&gt;2/3&lt;/li&gt;
&lt;li&gt;&lt;ol class="first arabic"&gt;
&lt;li&gt;
&lt;/li&gt;&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;ol class="first arabic" start="2"&gt;
&lt;li&gt;
&lt;/li&gt;&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Experiment: toss two fair coins, one after the other.   Observe two random variables:&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;X is the number of heads.&lt;/li&gt;
&lt;li&gt;Y is the toss when the first head occurred, with 0 meaning both coins were tails.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;What is P[X=1]?&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;0&lt;/li&gt;
&lt;li&gt;1/4&lt;/li&gt;
&lt;li&gt;1/2&lt;/li&gt;
&lt;li&gt;3/4&lt;/li&gt;
&lt;li&gt;1&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;What is P[Y=1]?&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;0&lt;/li&gt;
&lt;li&gt;1/4&lt;/li&gt;
&lt;li&gt;1/2&lt;/li&gt;
&lt;li&gt;3/4&lt;/li&gt;
&lt;li&gt;1&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;What is P[Y=1 &amp;amp; X=1]?&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;0&lt;/li&gt;
&lt;li&gt;1/4&lt;/li&gt;
&lt;li&gt;1/2&lt;/li&gt;
&lt;li&gt;3/4&lt;/li&gt;
&lt;li&gt;1&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;What is P[Y=1|X=1]?&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;0&lt;/li&gt;
&lt;li&gt;1/4&lt;/li&gt;
&lt;li&gt;1/2&lt;/li&gt;
&lt;li&gt;3/4&lt;/li&gt;
&lt;li&gt;1&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;What is P[X=1|Y=1]?&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;0&lt;/li&gt;
&lt;li&gt;1/4&lt;/li&gt;
&lt;li&gt;1/2&lt;/li&gt;
&lt;li&gt;3/4&lt;/li&gt;
&lt;li&gt;1&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="mathematica-demo"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class22/#id2"&gt;2   Mathematica demo&lt;/a&gt;&lt;/h2&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Exercise 6.47, page 353.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="material-from-text"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class22/#id3"&gt;3   Material from text&lt;/a&gt;&lt;/h2&gt;
&lt;div class="section" id="section-6-5-page-332-estimation-of-random-variables"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class22/#id4"&gt;3.1   Section 6.5, page 332: Estimation of random variables&lt;/a&gt;&lt;/h3&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;Assume that we want to know X but can only see Y, which depends on X.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;This is a generalization of our long-running noisy communication channel example.  We'll do things a little more precisely now.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Another application would be to estimate tomorrow's price of GOOG (X) given the prices to date (Y).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Sometimes, but not always, we have a prior probability for X.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;For the communication channel we do, for GOOG, we don't.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;If we do, it's a ''maximum a posteriori estimator''.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;If we don't, it's a ''maximum likelihood estimator''.  We effectively assume that that prior probability of X is uniform, even though that may not completely make sense.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;You toss a fair coin 3 times.  X is the number of heads, from 0 to 3.  Y is the position of the 1st head. from 0 to 3.  If there are no heads, we'll say that the first head's position is 0.&lt;/p&gt;
&lt;table border="1" class="docutils"&gt;
&lt;colgroup&gt;
&lt;col width="46%"&gt;
&lt;col width="54%"&gt;
&lt;/colgroup&gt;
&lt;thead valign="bottom"&gt;
&lt;tr&gt;&lt;th class="head"&gt;(X,Y)&lt;/th&gt;
&lt;th class="head"&gt;p(X,Y)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;&lt;td&gt;(0,0)&lt;/td&gt;
&lt;td&gt;1/8&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;(1,1)&lt;/td&gt;
&lt;td&gt;1/8&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;(1,2)&lt;/td&gt;
&lt;td&gt;1/8&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;(1,3)&lt;/td&gt;
&lt;td&gt;1/8&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;(2,1)&lt;/td&gt;
&lt;td&gt;2/8&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;(2,2)&lt;/td&gt;
&lt;td&gt;1/8&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;(3,1)&lt;/td&gt;
&lt;td&gt;1/8&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;E.g., 1 head can occur 3 ways (out of 8): HTT, THT, TTH.  The 1st (and only) head occurs in position 1, one of those ways.  p=1/8.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Conditional probabilities:&lt;/p&gt;
&lt;table border="1" class="docutils"&gt;
&lt;colgroup&gt;
&lt;col width="48%"&gt;
&lt;col width="10%"&gt;
&lt;col width="10%"&gt;
&lt;col width="23%"&gt;
&lt;col width="10%"&gt;
&lt;/colgroup&gt;
&lt;thead valign="bottom"&gt;
&lt;tr&gt;&lt;th class="head"&gt;p(x|y)&lt;/th&gt;
&lt;th class="head"&gt;y=0&lt;/th&gt;
&lt;th class="head"&gt;y=1&lt;/th&gt;
&lt;th class="head"&gt;y=2&lt;/th&gt;
&lt;th class="head"&gt;y=3&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody valign="top"&gt;
&lt;tr&gt;&lt;td&gt;x=0&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;x=1&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1/4&lt;/td&gt;
&lt;td&gt;1/2&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;x=2&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1/2&lt;/td&gt;
&lt;td&gt;1/2&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;x=3&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1/4&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;td&gt; &lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;$g_{MAP}(y)$&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;1 or 2&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;$P_{error}(y)$&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1/2&lt;/td&gt;
&lt;td&gt;1/2&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;p(y)&lt;/td&gt;
&lt;td&gt;1/8&lt;/td&gt;
&lt;td&gt;1/2&lt;/td&gt;
&lt;td&gt;1/4&lt;/td&gt;
&lt;td&gt;1/8&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The total probability of error is 3/8.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;We observe Y and want to guess X from Y.  E.g., If we observe  $$\small y= \begin{pmatrix}0\\1\\2\\3\end{pmatrix} \text{then } x= \begin{pmatrix}0\\ 2 \text{ most likely} \\ 1, 2 \text{ equally likely} \\ 1 \end{pmatrix}$$&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;There are different formulae.  The above one was the MAP, maximum a posteriori probability.&lt;/p&gt;
&lt;p&gt;$$g_{\text{MAP}} (y) = \max_x p_x(x|y) \text{ or } f_x(x|y)$$&lt;/p&gt;
&lt;p&gt;That means, the value of $x$ that maximizes $p_x(x|y)$&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;What if we don't know p(x|y)?  If we know p(y|x), we can use Bayes.  We might measure p(y|x) experimentally, e.g., by sending many messages over the channel.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Bayes requires p(x).  What if we don't know even that?  E.g. we don't know the probability of the different possible transmitted messages.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Then use maximum likelihood estimator, ML. $$g_{\text{ML}} (y) = \max_x p_y(y|x) \text{ or } f_y(y|x)$$&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;There are other estimators for different applications.  E.g., regression using least squares might attempt to predict a graduate's QPA from his/her entering SAT scores.  At Saratoga in August we might attempt to predict a horse's chance of winning a race from its speed in previous races.   Some years ago, an Engineering Assoc Dean would do that each summer.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Historically, IMO, some of the techniques, like least squares and logistic regression, have been used more because they're computationally easy than because they're logically justified.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="central-limit-theorem-etc"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class22/#id5"&gt;3.2   Central limit theorem etc&lt;/a&gt;&lt;/h3&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Review: Almost no matter what distribution the random variable X is,  $F_{M_n}$ quickly becomes Gaussian as n increases.  n=5 already gives a good approximation.&lt;/li&gt;
&lt;li&gt;nice applets:&lt;ol class="loweralpha"&gt;
&lt;li&gt;&lt;a class="reference external" href="http://onlinestatbook.com/stat_sim/normal_approx/index.html"&gt;http://onlinestatbook.com/stat_sim/normal_approx/index.html&lt;/a&gt;  This tests how good is the normal approximation to the binomial distribution.&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="http://onlinestatbook.com/stat_sim/sampling_dist/index.html"&gt;http://onlinestatbook.com/stat_sim/sampling_dist/index.html&lt;/a&gt;  This lets you define a distribution, and take repeated samples of a given size.   It shows how the means of the samples are distributed.  For sample with more than a few observations, they look fairly normal.&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="http://www.umd.umich.edu/casl/socsci/econ/StudyAids/JavaStat/CentralLimitTheorem.html"&gt;http://www.umd.umich.edu/casl/socsci/econ/StudyAids/JavaStat/CentralLimitTheorem.html&lt;/a&gt;  This might also be interesting.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Sample problems.&lt;ol class="loweralpha"&gt;
&lt;li&gt;Problem 7.1 on page 402.&lt;/li&gt;
&lt;li&gt;Problem 7.22.&lt;/li&gt;
&lt;li&gt;Problem 7.25.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;</description><category>mathjax</category><guid>https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class22/</guid><pubDate>Thu, 04 Apr 2019 04:00:00 GMT</pubDate></item><item><title>Engineering Probability Class 21 Mon 2019-04-01</title><link>https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class21/</link><dc:creator>W Randolph Franklin (WRF), RPI</dc:creator><description>&lt;div&gt;&lt;div class="contents topic" id="table-of-contents"&gt;
&lt;p class="topic-title first"&gt;Table of contents&lt;/p&gt;
&lt;ul class="auto-toc simple"&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class21/#iclicker-questions" id="id1"&gt;1   Iclicker questions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class21/#material-from-text" id="id2"&gt;2   Material from text&lt;/a&gt;&lt;ul class="auto-toc"&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class21/#joint-distribution-functions-ctd" id="id3"&gt;2.1   6.1.2 Joint Distribution Functions, ctd.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class21/#independence-p-309" id="id4"&gt;2.2   6.1.3 Independence, p 309&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class21/#transformations-of-random-vectors" id="id5"&gt;2.3   6.2.2 Transformations of Random Vectors&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class21/#pdf-of-general-transformations" id="id6"&gt;2.4   6.2.3 pdf of General Transformations&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class21/#expected-values-of-vector-random-variables-p-318" id="id7"&gt;2.5   6.3 Expected values of vector random variables, p 318&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class21/#joint-gaussian-r-v-p-325" id="id8"&gt;2.6   6.4 Joint Gaussian r.v p 325&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;!--  --&gt;
&lt;div class="section" id="iclicker-questions"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class21/#id1"&gt;1   Iclicker questions&lt;/a&gt;&lt;/h2&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;What is $$\int_{-\infty}^\infty e^{\big(-\frac{x^2}{2}\big)} dx$$?&lt;ol class="loweralpha"&gt;
&lt;li&gt;1/2&lt;/li&gt;
&lt;li&gt;1&lt;/li&gt;
&lt;li&gt;$2\pi$&lt;/li&gt;
&lt;li&gt;$\sqrt{2\pi}$&lt;/li&gt;
&lt;li&gt;$1/\sqrt{2\pi}$&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;What is the largest possible value for a correlation coefficient?&lt;ol class="loweralpha"&gt;
&lt;li&gt;1/2&lt;/li&gt;
&lt;li&gt;1&lt;/li&gt;
&lt;li&gt;$2\pi$&lt;/li&gt;
&lt;li&gt;$\sqrt{2\pi}$&lt;/li&gt;
&lt;li&gt;$1/\sqrt{2\pi}$&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;The most reasonable probability distribution for the number of defects on an integrated circuit caused by dust particles, cosmic rays, etc, is&lt;ol class="loweralpha"&gt;
&lt;li&gt;Exponential&lt;/li&gt;
&lt;li&gt;Poisson&lt;/li&gt;
&lt;li&gt;Normal&lt;/li&gt;
&lt;li&gt;Uniform&lt;/li&gt;
&lt;li&gt;Binomial&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;The most reasonable probability distribution for the time until the next request hits your web server is:&lt;ol class="loweralpha"&gt;
&lt;li&gt;Exponential&lt;/li&gt;
&lt;li&gt;Poisson&lt;/li&gt;
&lt;li&gt;Normal&lt;/li&gt;
&lt;li&gt;Uniform&lt;/li&gt;
&lt;li&gt;Binomial&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;If you add two independent normal random variables, each with variance 10, what is the variance of the sum?&lt;ol class="loweralpha"&gt;
&lt;li&gt;1&lt;/li&gt;
&lt;li&gt;$\sqrt2$&lt;/li&gt;
&lt;li&gt;10&lt;/li&gt;
&lt;li&gt;$10\sqrt2$&lt;/li&gt;
&lt;li&gt;20&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="material-from-text"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class21/#id2"&gt;2   Material from text&lt;/a&gt;&lt;/h2&gt;
&lt;div class="section" id="joint-distribution-functions-ctd"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class21/#id3"&gt;2.1   6.1.2 Joint Distribution Functions, ctd.&lt;/a&gt;&lt;/h3&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Example 6.7 Multiplicative Sequence, p 308.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="independence-p-309"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class21/#id4"&gt;2.2   6.1.3 Independence, p 309&lt;/a&gt;&lt;/h3&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;Definition 6.16.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Example 6.8  Independence.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Example 6.9 Maximum and Minimum of n Random Variables&lt;/p&gt;
&lt;p&gt;Apply this to uniform r.v.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Example 6.10 Merging of Independent Poisson Arrivals, p 310&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Example 6.11  Reliability of Redundant Systems&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Reminder for exponential r.v.:&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;$f(x) = \lambda e^{-\lambda x}$&lt;/li&gt;
&lt;li&gt;$F(x) = 1-e^{-\lambda x}$&lt;/li&gt;
&lt;li&gt;$\mu = 1/\lambda$&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="transformations-of-random-vectors"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class21/#id5"&gt;2.3   6.2.2 Transformations of Random Vectors&lt;/a&gt;&lt;/h3&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Let A be a 1 km cube in the atmosphere.   Your coordinates are in km.&lt;/li&gt;
&lt;li&gt;Pick a point uniformly in it.  $f_X(\vec{x}) = 1$.&lt;/li&gt;
&lt;li&gt;Now transform to use m, not km.  Z=1000 X.&lt;/li&gt;
&lt;li&gt;$F_Z(\vec{z}) = 1/(1000^3) f_X(\vec{z}/1000)$&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="pdf-of-general-transformations"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class21/#id6"&gt;2.4   6.2.3 pdf of General Transformations&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;We skip Section 6.2.3.  However, a historical note about Student's T distribution:&lt;/p&gt;
&lt;p&gt;Student was a pseudonymn of a mathematician working for Guinness in Ireland.  He developed several statistical techniques to sample beer to assure its quality.  Guinness didn't let him publish under his real name because these were trade secrets.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="expected-values-of-vector-random-variables-p-318"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class21/#id7"&gt;2.5   6.3 Expected values of vector random variables, p 318&lt;/a&gt;&lt;/h3&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Section 6.3, page 316, extends the covariance to a matrix.  Even with N variables, note that we're comparing only pairs of variables.  If there were a complicated 3 variable dependency, which could happen (and did in a much earlier example), all the pairwise covariances would be 0.&lt;/li&gt;
&lt;li&gt;Note the sequence.&lt;ol class="loweralpha"&gt;
&lt;li&gt;First, the correlation matrix has the expectations of the products.&lt;/li&gt;
&lt;li&gt;Then the covariance matrix corrects for the means not being 0.&lt;/li&gt;
&lt;li&gt;Finally the correlation coefficents (not shown here) correct for the variances not being 1.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="joint-gaussian-r-v-p-325"&gt;
&lt;h3&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class21/#id8"&gt;2.6   6.4 Joint Gaussian r.v p 325&lt;/a&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;/div&gt;</description><category>mathjax</category><guid>https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class21/</guid><pubDate>Mon, 01 Apr 2019 04:00:00 GMT</pubDate></item><item><title>Engineering Probability Class 20 Thu 2019-03-28</title><link>https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class20/</link><dc:creator>W Randolph Franklin (WRF), RPI</dc:creator><description>&lt;div&gt;&lt;div class="contents topic" id="table-of-contents"&gt;
&lt;p class="topic-title first"&gt;Table of contents&lt;/p&gt;
&lt;ul class="auto-toc simple"&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class20/#exam-2-stats" id="id1"&gt;1   Exam 2 stats&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class20/#normal-distribution-table" id="id2"&gt;2   Normal distribution table&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class20/#the-large-effect-of-a-small-bias" id="id3"&gt;3   The large effect of a small bias&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class20/#min-max-of-2-r-v" id="id4"&gt;4   Min, max of 2 r.v.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class20/#chapter-6-vector-random-variables-page-303" id="id5"&gt;5   Chapter 6: Vector random variables, page 303-&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;!--  --&gt;
&lt;div class="section" id="exam-2-stats"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class20/#id1"&gt;1   Exam 2 stats&lt;/a&gt;&lt;/h2&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Number of students registered: 107&lt;/li&gt;
&lt;li&gt;Number of exam2 submissions: 104&lt;/li&gt;
&lt;li&gt;Highest score: 80&lt;/li&gt;
&lt;li&gt;Lowest score: 10&lt;/li&gt;
&lt;li&gt;Average score: 59.9&lt;/li&gt;
&lt;li&gt;Median score: 64&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="normal-distribution-table"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class20/#id2"&gt;2   Normal distribution table&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;For your convenience.   I computed it with Matlab.:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
x          f(x)      F(x)      Q(x)
-3.0000    0.0044    0.0013    0.9987
-2.9000    0.0060    0.0019    0.9981
-2.8000    0.0079    0.0026    0.9974
-2.7000    0.0104    0.0035    0.9965
-2.6000    0.0136    0.0047    0.9953
-2.5000    0.0175    0.0062    0.9938
-2.4000    0.0224    0.0082    0.9918
-2.3000    0.0283    0.0107    0.9893
-2.2000    0.0355    0.0139    0.9861
-2.1000    0.0440    0.0179    0.9821
-2.0000    0.0540    0.0228    0.9772
-1.9000    0.0656    0.0287    0.9713
-1.8000    0.0790    0.0359    0.9641
-1.7000    0.0940    0.0446    0.9554
-1.6000    0.1109    0.0548    0.9452
-1.5000    0.1295    0.0668    0.9332
-1.4000    0.1497    0.0808    0.9192
-1.3000    0.1714    0.0968    0.9032
-1.2000    0.1942    0.1151    0.8849
-1.1000    0.2179    0.1357    0.8643
-1.0000    0.2420    0.1587    0.8413
-0.9000    0.2661    0.1841    0.8159
-0.8000    0.2897    0.2119    0.7881
-0.7000    0.3123    0.2420    0.7580
-0.6000    0.3332    0.2743    0.7257
-0.5000    0.3521    0.3085    0.6915
-0.4000    0.3683    0.3446    0.6554
-0.3000    0.3814    0.3821    0.6179
-0.2000    0.3910    0.4207    0.5793
-0.1000    0.3970    0.4602    0.5398
      0    0.3989    0.5000    0.5000
 0.1000    0.3970    0.5398    0.4602
 0.2000    0.3910    0.5793    0.4207
 0.3000    0.3814    0.6179    0.3821
 0.4000    0.3683    0.6554    0.3446
 0.5000    0.3521    0.6915    0.3085
 0.6000    0.3332    0.7257    0.2743
 0.7000    0.3123    0.7580    0.2420
 0.8000    0.2897    0.7881    0.2119
 0.9000    0.2661    0.8159    0.1841
 1.0000    0.2420    0.8413    0.1587
 1.1000    0.2179    0.8643    0.1357
 1.2000    0.1942    0.8849    0.1151
 1.3000    0.1714    0.9032    0.0968
 1.4000    0.1497    0.9192    0.0808
 1.5000    0.1295    0.9332    0.0668
 1.6000    0.1109    0.9452    0.0548
 1.7000    0.0940    0.9554    0.0446
 1.8000    0.0790    0.9641    0.0359
 1.9000    0.0656    0.9713    0.0287
 2.0000    0.0540    0.9772    0.0228
 2.1000    0.0440    0.9821    0.0179
 2.2000    0.0355    0.9861    0.0139
 2.3000    0.0283    0.9893    0.0107
 2.4000    0.0224    0.9918    0.0082
 2.5000    0.0175    0.9938    0.0062
 2.6000    0.0136    0.9953    0.0047
 2.7000    0.0104    0.9965    0.0035
 2.8000    0.0079    0.9974    0.0026
 2.9000    0.0060    0.9981    0.0019
 3.0000    0.0044    0.9987    0.0013
&lt;/pre&gt;
&lt;p&gt;x is often called z.&lt;/p&gt;
&lt;p&gt;More info: &lt;a class="reference external" href="https://en.wikipedia.org/wiki/Standard_normal_table"&gt;https://en.wikipedia.org/wiki/Standard_normal_table&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="the-large-effect-of-a-small-bias"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class20/#id3"&gt;3   The large effect of a small bias&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;This is enrichment material.  It is not in the text, and will not be on the exam.  However, it might be in a future homework.&lt;/p&gt;
&lt;p&gt;Consider tossing $n=10^6$ fair coins.&lt;/p&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;P[more heads than tails] = 0.5&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Now assume that each coin has chance of being heads $p=0.5005$.&lt;/p&gt;
&lt;p&gt;What's P[more heads than tails]?&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;Approx with a Gaussian.  $\mu=500500, \sigma=500$.&lt;/li&gt;
&lt;li&gt;Let X be the r.v. for the number of heads.&lt;/li&gt;
&lt;li&gt;P[X&amp;gt;500000] = Q(-1) = .84&lt;/li&gt;
&lt;li&gt;I.e., increasing the probability of winning 1 toss by 1 part in 1000, increased the probability of winning 1,000,000 tosses from 50% to 84%.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Now assume that 999,000 of the coins are fair, but 1,000 will always be heads.&lt;/p&gt;
&lt;p&gt;What's P[more heads than tails]?&lt;/p&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;Let X = number of heads in 999,000 tosses.&lt;/li&gt;
&lt;li&gt;We want P[X&amp;gt;499,000].&lt;/li&gt;
&lt;/ol&gt;
&lt;ol class="loweralpha simple"&gt;
&lt;li&gt;Approx with a Gaussian.  $\mu=499,500, \sigma=500$.&lt;/li&gt;
&lt;li&gt;P[X&amp;gt;499,000] = Q(-1) = .84  as before.&lt;/li&gt;
&lt;li&gt;I.e., fixing 0.1% of the coins increased the probability of winning 1,000,000 tosses from 50% to 84%.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The lesson for fixing elections: you decide.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="min-max-of-2-r-v"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class20/#id4"&gt;4   Min, max of 2 r.v.&lt;/a&gt;&lt;/h2&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Example 5.43, page 274.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="chapter-6-vector-random-variables-page-303"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class20/#id5"&gt;5   Chapter 6: Vector random variables, page 303-&lt;/a&gt;&lt;/h2&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Skip the starred sections.&lt;/li&gt;
&lt;li&gt;Examples:&lt;ol class="loweralpha"&gt;
&lt;li&gt;arrivals in a multiport switch,&lt;/li&gt;
&lt;li&gt;audio signal at different times.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;pmf, cdf, marginal pmf and cdf are obvious.&lt;/li&gt;
&lt;li&gt;conditional pmf has a nice chaining rule.&lt;/li&gt;
&lt;li&gt;For continuous random variables, the pdf, cdf, conditional pdf etc are all obvious.&lt;/li&gt;
&lt;li&gt;Independence is obvious.&lt;/li&gt;
&lt;li&gt;Work out example 6.5, page 306.  The input ports are a distraction.
This problem reduces to a multinomial probability where N is itself a
random variable.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;&lt;/div&gt;</description><category>mathjax</category><guid>https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class20/</guid><pubDate>Thu, 28 Mar 2019 04:00:00 GMT</pubDate></item><item><title>Engineering Probability Class 19 Mon 2019-03-25</title><link>https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class19/</link><dc:creator>W Randolph Franklin (WRF), RPI</dc:creator><description>&lt;div&gt;&lt;div class="contents topic" id="table-of-contents"&gt;
&lt;p class="topic-title first"&gt;Table of contents&lt;/p&gt;
&lt;ul class="auto-toc simple"&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class19/#no-new-homework-today" id="id1"&gt;1   No new homework today&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class19/#no-iclicker-today" id="id2"&gt;2   No iclicker today&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class19/#section-5-7-conditional-probability-ctd" id="id3"&gt;3   Section 5.7 Conditional probability ctd&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class19/#section-5-8-page-271-functions-of-two-random-variables-ctd" id="id4"&gt;4   Section 5.8 page 271: Functions of two random variables, ctd&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class19/#section-5-9-page-278-pairs-of-jointly-gaussian-r-v" id="id5"&gt;5   Section 5.9, page 278: pairs of jointly Gaussian r.v.&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference internal" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class19/#tutorial-on-probability-density-2-variables" id="id6"&gt;6   Tutorial on probability density - 2 variables&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;!--  --&gt;
&lt;div class="section" id="no-new-homework-today"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class19/#id1"&gt;1   No new homework today&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Enjoy GM week.   The next homework will be posted Thurs, due next Thurs.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="no-iclicker-today"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class19/#id2"&gt;2   No iclicker today&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Ditto.&lt;/p&gt;
&lt;/div&gt;
&lt;div class="section" id="section-5-7-conditional-probability-ctd"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class19/#id3"&gt;3   Section 5.7 Conditional probability ctd&lt;/a&gt;&lt;/h2&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Example 5.35 Maximum A Posteriori Receiver on page 268.&lt;/li&gt;
&lt;li&gt;Example 5.37, page 270.&lt;/li&gt;
&lt;li&gt;Remember equations 5.49 a,b for total probability on page 269-70 for conditional expectation of Y given X.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="section-5-8-page-271-functions-of-two-random-variables-ctd"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class19/#id4"&gt;4   Section 5.8 page 271: Functions of two random variables, ctd&lt;/a&gt;&lt;/h2&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;Example 5.39 Sum of Two Random Variables, page 271.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Example 5.40 Sum of Nonindependent Gaussian Random Variables, page 272.&lt;/p&gt;
&lt;p&gt;I'll do an easier case of independent N(0,1) r.v.   The sum will be N(0, $\sqrt{2}$ ).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;dl class="first docutils"&gt;
&lt;dt&gt;Example 5.44, page 275. Tranform two independent Gaussian r.v from&lt;/dt&gt;
&lt;dd&gt;&lt;p class="first last"&gt;(X,Y) to (R, $\theta$).&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="section-5-9-page-278-pairs-of-jointly-gaussian-r-v"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class19/#id5"&gt;5   Section 5.9, page 278: pairs of jointly Gaussian r.v.&lt;/a&gt;&lt;/h2&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;I will simplify formula 5.61a by assuming that $\mu=0, \sigma=1$.&lt;/p&gt;
&lt;p&gt;$$f_{XY}(x,y)= \frac{1}{2\pi \sqrt{1-\rho^2}} e^{ \frac{-\left( x^2-2\rho x y + y^2\right)}{2(1-\rho^2)} }  $$ .&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;The r.v. are probably dependent.  $\rho$} says how much.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;The formula degenerates if $|\rho|=1$ since the numerator and denominator are both zero.  However the pdf is still valid.  You could make the formula valid with l'Hopital's rule.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;The lines of equal probability density are ellipses.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;The marginal pdf is a 1 variable Gaussian.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Example 5.47, page 282: Estimation of signal in noise&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;This is our perennial example of signal and noise.  However, here the signal is not just $\pm1$ but is normal.  Our job is to find the ''most likely'' input signal for a given output.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Important concept in the noisy channel example (with X and N both being
Gaussian):   The most likely value of X given Y is
not Y but is somewhat smaller, depending on the relative sizes of
&lt;span class="math"&gt;\(\sigma_X\)&lt;/span&gt; and &lt;span class="math"&gt;\(\sigma_N\)&lt;/span&gt;.  This is true in spite of &lt;span class="math"&gt;\(\mu_N=0\)&lt;/span&gt;. It
would be really useful for you to understand this intuitively.  Here's
one way:&lt;/p&gt;
&lt;p&gt;If you don't know Y, then the most likely value of X is 0.  Knowing Y
gives you more information, which you combine with your initial info
(that X is &lt;span class="math"&gt;\(N(0,\sigma_X)\)&lt;/span&gt; to get a new estimate for the most likely X.
The smaller the noise, the more valuable is Y.  If the noise is very
small, then the mostly likely X is close to Y.  If the noise is very
large (on average) then the most likely X is still close to 0.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="section" id="tutorial-on-probability-density-2-variables"&gt;
&lt;h2&gt;&lt;a class="toc-backref" href="https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class19/#id6"&gt;6   Tutorial on probability density - 2 variables&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;In class 15, I tried to motivate the effect of changing one variable on probability density.   Here's a try at motivating changing 2 variables.&lt;/p&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;We're throwing darts uniformly at a one foot square dartboard.&lt;/li&gt;
&lt;li&gt;We observe 2 random variables, X, Y, where the dart hits (in Cartesian coordinates).&lt;/li&gt;
&lt;li&gt;$$f_{X,Y}(x,y) =  \begin{cases} 1&amp;amp; \text{if}\,\,  0\le x\le1 \cap 0\le y\le1\\ 0&amp;amp;\text{otherwise} \end{cases}$$&lt;/li&gt;
&lt;li&gt;$$P[.5\le x\le .6 \cap .8\le y\le.9]  = \int_{.5}^{.6}\int_{.8}^{.9} f_{XY}(x,y) dx \, dy = 0.01 $$&lt;/li&gt;
&lt;li&gt;Transform to centimeters:  $$\begin{bmatrix}V\\W\end{bmatrix} = \begin{pmatrix}30&amp;amp;0\\0&amp;amp;30\end{pmatrix} \begin{bmatrix}X\\Y\end{bmatrix}$$&lt;/li&gt;
&lt;li&gt;$$f_{V,W}(v,w)   = \begin{cases} 1/900&amp;amp; \text{if } 0\le v\le30 \cap 0\le w\le30\\ 0&amp;amp;\text{otherwise} \end{cases}$$&lt;/li&gt;
&lt;li&gt;$$P[15\le v\le 18 \cap 24\le w\le27]  = \\ \int_{15}^{18}\int_{24}^{27} f_{VW}(v,w)\, dv\, dw = \frac{ (18-15)(27-24) }{900} =  0.01$$&lt;/li&gt;
&lt;li&gt;See Section 5.8.3 on page 286.&lt;/li&gt;
&lt;li&gt;Next time: We've seen 1 r.v., we've seen 2 r.v.  Now we'll see several r.v.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;&lt;/div&gt;</description><category>mathjax</category><guid>https://wrf.ecse.rpi.edu/Teaching/probability-s2019/posts/class19/</guid><pubDate>Mon, 25 Mar 2019 04:00:00 GMT</pubDate></item></channel></rss>