hw07.pdf - hw07[11 Initialize OK from client.api.notebook import Notebook ok = Notebook'hw07.ok = Assignment Homework 7 Testing Hypotheses OK version

# hw07.pdf - hw07[11 Initialize OK from client.api.notebook...

• 14
• 73% (11) 8 out of 11 people found this document helpful

This preview shows page 1 - 4 out of 14 pages.

% matplotlib inline import matplotlib.pyplot as plt plt . style . use( 'fivethirtyeight' ) import warnings warnings . simplefilter( 'ignore' , FutureWarning ) from client.api.notebook import Notebook ok = Notebook( 'hw07.ok' ) _ = ok . auth(inline = True ) ===================================================================== Assignment: Homework 7: Testing Hypotheses OK, version v1.12.5 ===================================================================== Successfully logged in as [email protected] 1.1 1. Spam Calls 1.2 Part 1: 781 Fun Yanay gets a lot of spam calls. An area code is defined to be a three digit number from 200-999 inclusive. In reality, many of these area codes are not in use, but for this question we’ll simplify things and assume they all are. Throughout these questions, you should assume that Yanay’s area code is 781. Question 1. Assuming each area code is just as likely as any other, what’s the probability that the area code of two back to back spam calls are 781? [13]: prob_781 = ( 1/800 ) **2 prob_781 [13]: 1.5625e-06 [14]: ok . grade( "q1_1" ); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Running tests --------------------------------------------------------------------- Test summary Passed: 1 Failed: 0 [ooooooooook] 100.0% passed Question 2. Rohan already knows that Yanay’s area code is 781. Rohan randomly guesses the last 7 digits (0-9 inclusive) of his phone number. What’s the probability that Rohan correctly guesses 2
Yanay’s number, assuming he’s equally likely to choose any digit? Note: A phone number contains an area code and 7 additional digits, i.e. xxx-xxx-xxxx [15]: prob_yanay_num = ( 1/9 ) **7 prob_yanay_num [15]: 2.090751581287689e-07 [16]: ok . grade( "q1_2" ); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Running tests --------------------------------------------------------------------- Test summary Passed: 1 Failed: 0 [ooooooooook] 100.0% passed Yanay suspects that there’s a higher chance that the spammers are using his area code (781) to trick him into thinking it’s someone from his area calling him. Ashley thinks that this is not the case,

#### You've reached the end of your free preview.

Want to read all 14 pages?

• Fall '17
• Null hypothesis, Statistical hypothesis testing, area code, Yanay

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern