Link to source file
Group discussion (15-20min)
As a group with everyone in the section (TA + all students), discuss for each of the example random variables given…
- …whether it’s discrete or continuous?
- …which type of random variable (e.g. bernoulli, poisson, geometric, uniform, etc…) or function of random variable(s) would best model it?
- …why does this type of random variable best model it? (what assumptions are you making and why are they likely to be satisfied?)
- …what situations can cause this model to fail? (in particular, how could these assumptions potentially be violated?)
Random variables to discuss:
- Number of passing cars in an hour.
- How many people contract covid-19 in a placebo trial.
- The BMI of a population.
- Number of cats in a litter.
- Total of pair of dice (hint: it’s a function of discrete uniform variables,).
- How many times you have to roll a pair of dice before getting doubles. (hint: it’s a memoryless discrete RV we’ve covered in lecture)
- Bonus: How long your laptop lasts before dying (hint: this could be modeled as the continuous analog of the previous RV)
Exercise (rest of time)
Now, break off into groups of 3-4 students. In your group, nominate one person to share your screen. As a group, choose at least 2 (you’re welcome to choose more) of the above random variables. For each chosen RV, do the following:
- Generate a few observations using an appropriate model (if it requires parameters, you may guess something sensible or use Google to find better estimates) and show us the output.
- Do the numbers you generated in step 1 make sense? Why or why not?
- Generate more observations (at least 1000 (don’t print the output this time)) and make a simple histogram of the result. Is this what you expected? Comment on how this might change if you chose different parameters OR if some of the assumptions you made are violated.
Submission
Make sure the names of everyone who worked on this with you is included in the header of this document. Then, knit this document and submit both this file and the HTML output on Canvas under Assignments ⇒ Discussion 3.