100%(8)8 out of 8 people found this document helpful
This preview shows page 1 - 3 out of 11 pages.
hw07_masterNovember 1, 20191Homework 7: Testing HypothesesReading: *Testing HypothesesPlease complete this notebook by filling in the cells provided.Before you begin, execute thefollowing cell to load the provided tests. Each time you start your server, you will need to executethis cell again to load the tests.Homework 7 is dueFriday, 10/18 at 11:59pm. You will receive an early submission bonus pointif you turn in your final submission byThursday, 10/17 at 11:59pm. Start early so that youcan come to office hours if you’re stuck. Check the website for the office hours schedule. Late workwill not be accepted as per thepoliciesof this course.Directly sharing answers is not okay, but discussing problems with the course staff or with otherstudents is encouraged. Refer to the policies page to learn more about how to learn cooperatively.For all problems that you must write our explanations and sentences for, youmustprovide youranswer in the designated space. Moreover, throughout this homework and all future ones, please besure to not re-assign variables throughout the notebook! For example, if you usemax_temperaturein your answer to one question, do not reassign it later on.[ ]:# Don't change this cell; just run it.importnumpyasnpfromdatascienceimport*# These lines do some fancy plotting magic.importmatplotlib%matplotlibinlineimportmatplotlib.pyplotaspltplt.style.use('fivethirtyeight')importwarningswarnings.simplefilter('ignore',FutureWarning)fromclient.api.notebookimportNotebookok=Notebook('hw07.ok')_=ok.auth(inline=True)1
1.11. Landing a Spacecraft(Note: This problem describes something that’s close toa real story with a very exciting video,but the details have been changed somewhat.)SpaceY, a company that builds and tests spacecraft, is testing a new reusable launch system. Mostspacecraft use a ”first stage” rocket that propels a smaller payload craft away from Earth, thenfalls back to the ground and crashes. SpaceY’s new system is designed to land safely at a landingpad at a certain location, ready for later reuse. If it doesn’t land in the right location, it crashes,and the very, very expensive vehicle is destroyed.SpaceY has tested this system over 1000 times. Ordinarily, the vehicle doesn’t land exactly on thelanding pad. For example, a gust of wind might move it by a few meters just before it lands. It’sreasonable to think of these small errors as random. That is, the landing locations are drawn fromsome distribution over locations on the surface of Earth, centered around the landing pad.Run the next cell to see a plot of those locations.:ordinary_landing_spots=Table.read_table("ordinary_landing_spots.csv")ordinary_landing_spots.scatter("x", label="Landing locations")plt.scatter(0,0, c="w", s=1000, marker="*", label="Landing pad")plt.legend(scatterpoints=1, bbox_to_anchor=(1.6,.5));During one test, the vehicle lands far away from the landing pad and crashes. The coordinates ofthe crash site are contained in the arraycrash_site, where the first item contains the x-coordinateand the second item contains the y-coordinate.2