Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
This practicum is due on Canvas by 11:59 PM on Monday March 2. Your solutions to theoretical questions should be done in Markdown/MathJax directly below the associated question. Your solutions to computational questions should include any specified Python code and results as well as written commentary on your conclusions.
Here are the rules:
All work, code and analysis, must be your own.
You may use your course notes, posted lecture slides, textbooks, in-class notebooks, and homework solutions as resources. You may also search online for answers to general knowledge questions like the form of a probability distribution function or how to perform a particular operation in Python/Pandas.
This is meant to be like a coding portion of your midterm exam. So, the instructional team will be much less helpful than we typically are with homework. For example, we will not check answers, help debug your code, and so on.
If something is left open-ended, it is because we want to see how you approach the kinds of problems you will encounter in the wild, where it will not always be clear what sort of tests/methods should be applied. Feel free to ask clarifying questions though.
You may NOT post to message boards or other online resources asking for help.
You may NOT copy-paste solutions from anywhere.
You may NOT collaborate with classmates or anyone else.
In short, your work must be your own. It really is that simple.
Violation of the above rules will result in an immediate academic sanction (at the very least, you will receive a 0 on this practicum or an F in the course, depending on severity), and a trip to the Honor Code Council.
By submitting this assignment, you agree to abide by the rules given above.
Name:
NOTES:
You may not use late days on the practicums nor can you drop your practicum grades.
If you have a question for us, post it as a PRIVATE message on Piazza. If we decide that the question is appropriate for the entire class, then we will add it to a Practicum clarifications thread.
Do NOT load or use any Python packages that are not available in Anaconda 3.6.
Some problems with code may be autograded. If we provide a function API do not change it. If we do not provide a function API then you're free to structure your code however you like.
Submit only this Jupyter notebook to Canvas. Do not compress it using tar, rar, zip, etc.
This should go without saying, but... For any question that asks you to calculate something, you must show all work to receive credit. Sparse or nonexistent work will receive sparse or nonexistent credit.
In [1]:
from scipy import stats
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
[30 points] Problem 1: Gambling With A Peg Legged Pirate:
You're a time traveling data scientist, and have traveled way back to the year 1654. Immediately upon arriving you're picked up by a bunch of pirates, and made to join a pirate crew. When the pirates realize that you're immensely knowledgable about probabilities and statistics, they promote you to be their captain! You rename the ship to be the "Certain Probability of Death", and set out upon the high seas. After a few days of sailing you come upon another band of buccaneers in their ship. Their captain, Peg Leg Pascal Fermat, challanges you to a gambling game, but you're not sure if you should play it. The rules for the game are below:
You and Peg Leg Pascal Fermat will take turns repeatedly rolling a 20 sided die. The die has values 1 - 20 on it.
On your turn, the rules are as follows:
If you roll the same value as what Peg Leg Pascal Fermat rolled on his last turn, you have to give him 5 dubloons. Do not perform any additional actions from the below list of rules if you rolled the same value as what Peg Leg Pascal Fermat rolled on his last turn. Otherwise:
If you roll an 8, Peg Leg Pascal Fermat will give you two gold dubloons.
If you roll a 7, Peg Leg Pascal Fermat will give you four gold dubloon.
If you roll a 15, you have to give Peg Leg Pascal Fermat one dubloon.