Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1b: Nicolas Cage: Good or Bad? [2 points] Although it is clear from 1a that Nicolas Cage might possibly be indirectly responsible for people

image text in transcribed

Question 1b: Nicolas Cage: Good or Bad? [2 points] Although it is clear from 1a that Nicolas Cage might possibly be indirectly responsible for people falling into pools and consequently dying, there is also a strong negative correlation between the number of films he stars in and the number of deaths from helicopter accidents. That is, the more movies Nicolas Cage starred in within a given year, the fewer people died in tragic helicopter accidents. So, we have to consider that he might save more lives than he ends The file cage.csv contains another column that represents the number of helicopter accidents that ended up killing the occupant. Use this data to answer the question that drove Abed to madness in Community: is Niolas Cage good or bad? 1. Create two linear models (using Linear Regression) to predict the number of deaths both by helicopter accident and drowning (after falling into a pool) as a function of the number of films Nicolas Cage is in. 2. Use these models to predict how many people will die by both helicopter accident and drowning (after falling into a pool) if Nicolas Cage stars in 6 movies in a year? (round to the nearest whole number). 3. How many movies does Nicolas Cage have to star in if he wants to start saving lives? Specifically, how many movies does he need to star in for (number of deaths by drowning) (number of deaths by helicopter) to be a negative number? Format your code in a function called cage. Your function should take no arguments, and return a list with three elements: [a, b, c] a Number of people who would die by helicopter accident if Nicolas Cage stars in 6 movies, rounded to the nearest whole number. b Number of people who would die by drowning in a pool (after falling in, of course) if Nicolas Cage stars in 6 movies, rounded to the nearest whole numbe. c : Minimum number of movies Nicolas Cage needs to star in for number-of_people-dying-inpools number_of_people_dying_in_helicopters to become a negative number. In [ ] : | | # YOUR CODE HERE In [ ] : | 1 # Test case for number of people dying by dying by helicopter assert cage () [0] -24 In [ ] : | 1 # Test case to make sure your list is the correct length 2 assert len (cage3 In case you are wondering where we came up wth these correlations, check out the website Spurious Correlations at htto lwww.tylervigen.com/spurious- correlations, It contains such interesting facts as: . the per capita consumption of cheese in the United States is strongly correlated with the number of people who died by becoming tangled in their bedsheets (dont eat cheese in bed! the total revenue generated by video game arcades is strongly correlated with the number of computer science doctorates awarded in the US (nerds like video games!) Question 1b: Nicolas Cage: Good or Bad? [2 points] Although it is clear from 1a that Nicolas Cage might possibly be indirectly responsible for people falling into pools and consequently dying, there is also a strong negative correlation between the number of films he stars in and the number of deaths from helicopter accidents. That is, the more movies Nicolas Cage starred in within a given year, the fewer people died in tragic helicopter accidents. So, we have to consider that he might save more lives than he ends The file cage.csv contains another column that represents the number of helicopter accidents that ended up killing the occupant. Use this data to answer the question that drove Abed to madness in Community: is Niolas Cage good or bad? 1. Create two linear models (using Linear Regression) to predict the number of deaths both by helicopter accident and drowning (after falling into a pool) as a function of the number of films Nicolas Cage is in. 2. Use these models to predict how many people will die by both helicopter accident and drowning (after falling into a pool) if Nicolas Cage stars in 6 movies in a year? (round to the nearest whole number). 3. How many movies does Nicolas Cage have to star in if he wants to start saving lives? Specifically, how many movies does he need to star in for (number of deaths by drowning) (number of deaths by helicopter) to be a negative number? Format your code in a function called cage. Your function should take no arguments, and return a list with three elements: [a, b, c] a Number of people who would die by helicopter accident if Nicolas Cage stars in 6 movies, rounded to the nearest whole number. b Number of people who would die by drowning in a pool (after falling in, of course) if Nicolas Cage stars in 6 movies, rounded to the nearest whole numbe. c : Minimum number of movies Nicolas Cage needs to star in for number-of_people-dying-inpools number_of_people_dying_in_helicopters to become a negative number. In [ ] : | | # YOUR CODE HERE In [ ] : | 1 # Test case for number of people dying by dying by helicopter assert cage () [0] -24 In [ ] : | 1 # Test case to make sure your list is the correct length 2 assert len (cage3 In case you are wondering where we came up wth these correlations, check out the website Spurious Correlations at htto lwww.tylervigen.com/spurious- correlations, It contains such interesting facts as: . the per capita consumption of cheese in the United States is strongly correlated with the number of people who died by becoming tangled in their bedsheets (dont eat cheese in bed! the total revenue generated by video game arcades is strongly correlated with the number of computer science doctorates awarded in the US (nerds like video games!)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions