Homework 5
Homework 5
Due: 2022-09-25, 11:59pm
All homework must be submitted via Blackboard. Your answers must be in a MS Word (DOCX) or PDF format. Your submitted document should have sections corresponding to those in this homework.
Please make sure that you have watched the videos and have done the readings. Everyone should do this independently; you can discuss the process, but the answers are expected to be different.
Include graphs as images in your document. Use the lecture notes as a guide.
1. Coin flip simulator (40%)
Interact with the coin flip simulator and answer the following questions.
- With the simulator at default values, press the reset button 10 times. What do you see in the graph?
- What happends as you progressively increase the number of flips (try at least 10,000). How different is the empirical proportion of heads compared to the true proportion? Include a screenshot.
- Reset the simulator. Increase the number of replications to 10. This is what would happen if the whole class flipped coin 100 times. How variable is the final proportion of heads? Include a screenshot.
- Reset the simulator. Increase the replications to 10. Vary the proportion of heads. Try at least 4 values other than 0.5. How close is the final value to the true value? Do you see any patterns as you vary the true probability of heads?
2. Probability rules and Bayes theorem (60%)
Use the interactive tool to answer the following questions. The purpose is to get a feel for the rules governing probabilities using an interactive graphical tool.
- With the the sliders are at their default values, calculate the following.
- What is the area corresponding to the event AB (multiply the sides of the rectangle)?
- What are P(A), and P(B) from the area of the blue shades, and the area of the dark shades respectively (calculate area of component rectangles and add)?
- Change the P(A) slider and include the screenshot.
- What are P(AB) and p(Ab)?
- Show that P(AB) = P(A) P(B) by calculating all three event probabilities.
- Change the P(B) slider and include the screenshot.
- What is P(B)?
- Verify that P(AB) = P(A) P(B).
- Now change the odds ratio slider and include the screenshot.
- Calculate P(AB), P(Ab), P(aB), and P(ab).
- Calculate the odds ratio, and check if it is close to what the display is saying.
- Keep the slider in the same position as the previous question.
- What are P(B|A) and P(B|a)? Justify based on the figure.
- Keep the sliders unchanged.
- What is P(A|B)? Use Bayes theorem.
- What is P(A|b)? Use Bayes theorem replacing B by b.
3. Acknowledgements
Please acknowledge individuals who helped you or resources thay were helpful in completing the homework.