{ "cells": [ { "cell_type": "markdown", "id": "96e9c08c", "metadata": {}, "source": [ "# Homework 11 - Chapter 16" ] }, { "cell_type": "markdown", "id": "cbd32b7e", "metadata": {}, "source": [ "- Due Date: Friday, April 24th no later than 11:59 p.m.\n", "- Partner Information: You may complete this assignment individually or with exactly one classmate.\n", "- Submission Instructions (working alone): Upload your solution, entitled **YourFirstName-YourLastName-Homework11.ipynb** to the \n", "Canvas Homework 11 Dropbox.\n", "- Submission Instructions (working with one classmate): Upload your solution, entitled \n", "**YourFirstName-YourLastName-PartnerFirstName-PartnerLastName-Homework11.ipynb** to the Canvas Homework 11 Dropbox. Note: If you \n", "work with a partner, only one person needs to submit a solution. If you both submit a solution, the submission that will be graded is the one \n", "from the partner whose last name comes alphabetically first.\n", "- Deadline Reminder: Once the submission deadline passes, Canvas will no longer accept your submission and you will no longer be able to earn credit. \n", "Thus, if you are not able to fully complete the assignment, submit whatever you have before the deadline so that partial credit can be earned." ] }, { "cell_type": "markdown", "id": "9c4296c8", "metadata": {}, "source": [ "## Starting Code" ] }, { "cell_type": "code", "execution_count": null, "id": "b43f2728", "metadata": {}, "outputs": [], "source": [ "from datascience import *\n", "import matplotlib.pyplot as plots\n", "import numpy as np\n", "%matplotlib inline" ] }, { "cell_type": "markdown", "id": "81afc34d", "metadata": {}, "source": [ "Download the file [cricket_chirps.csv]() into the same directory as this Jupyter notebook." ] }, { "cell_type": "code", "execution_count": null, "id": "6d4f8bae", "metadata": {}, "outputs": [], "source": [ "# Place the csv file in the same directory as your solution\n", "chirps = Table().read_table(\"cricket_chirps.csv\")\n", "chirps.show(5)" ] }, { "cell_type": "markdown", "id": "f75327c0", "metadata": {}, "source": [ "## Question 1a - 3 Points" ] }, { "cell_type": "markdown", "id": "7a50cb52", "metadata": {}, "source": [ "To better utilize the vast amounts of data that are being generated, the number of Montana State professors who either are data scientists or who collaborate with data scientists has increased rapidly in recent years. For example, Dr. Cascade Tuholske in Earth Sciences conducts research and teaches courses that involve data science. In the School of Computing, Dr. Fasy, Dr. Nazemi and Dr. Reinhold all have research programs that involve data. One common data science application is to better understand our natural world.\n", "\n", "You have been selected to work on a study that analyzes how different variables affect the chirp rate of crickets. The researchers believe a linear relationship exists between temperature and chirp rate, but need your help determining whether it is statistically meaningful or simply the result of random chance. \n", "\n", "First, convert the temperature to standard units. Bootstrap the sample 5000 times and calculate the slope of the regression line each time. Then, create a histogram of the bootstrapped slopes with 10 bins. Plot a 99% confidence interval as a yellow bar along the x-axis (at y=0), and mark the observed slope as a red dot on top of the yellow bar." ] }, { "cell_type": "code", "execution_count": null, "id": "8a44eb9f", "metadata": {}, "outputs": [], "source": [ "# Place answer here." ] }, { "cell_type": "markdown", "id": "afdbb2df", "metadata": {}, "source": [ "## Question 1b - 1 Point" ] }, { "cell_type": "markdown", "id": "d6a4ee32", "metadata": {}, "source": [ "Create a conclusion for the researchers if their Null Hypothesis was \"The slope of the true relationship between temperature and chirps is 0.\"" ] }, { "cell_type": "markdown", "id": "b3dfa560", "metadata": {}, "source": [ "**Answer -**" ] }, { "cell_type": "markdown", "id": "ef1ffb03", "metadata": {}, "source": [ "## Question 2a - 3 Points" ] }, { "cell_type": "markdown", "id": "92f11898", "metadata": {}, "source": [ "The researchers want to use the model you created to estimate the number of chirps when the temperature is 50 degrees. Bootstrap the sample 5000 times, generating a prediction each time. Use this to create a 99% confidence interval. Then, print the predicted number of chirps in the following format where d is a digit: \n", "\n", "*Predicted Chirps When 50 Degrees: dd.dd \n", "99% Confidence Interval: [dd.dd, dd.dd]*" ] }, { "cell_type": "code", "execution_count": null, "id": "da75594c", "metadata": {}, "outputs": [], "source": [ "# Place answer here." ] }, { "cell_type": "markdown", "id": "3bf3ea1a", "metadata": {}, "source": [ "## Question 2b - 1 Point" ] }, { "cell_type": "markdown", "id": "789c2f53", "metadata": {}, "source": [ "Discuss any concerns that a data scientist might have about using the model to \n", "predict the number of chirps when the temperature is 50 degrees." ] }, { "cell_type": "markdown", "id": "85a7016d", "metadata": {}, "source": [ "**Answer -**" ] }, { "cell_type": "markdown", "id": "a2b8e585", "metadata": {}, "source": [ "## Question 3 - 2 Points" ] }, { "cell_type": "markdown", "id": "f68ef4e2", "metadata": {}, "source": [ "Develop an insightful visualization that uses the provided csv file, Chapter 16 knowledge, and any other data science knowledge that you have previously learned. Explain your visualization and what makes it insightful." ] }, { "cell_type": "code", "execution_count": null, "id": "a0efda73", "metadata": {}, "outputs": [], "source": [ "# Place answer here." ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.14.2" } }, "nbformat": 4, "nbformat_minor": 5 }