{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Homework 6 - Chapter 11" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "- Due Date: Tuesday, March 11th no later than 11:59 p.m.\n", "- Partner Information: You must work with exactly one other classmate on this assignment.\n", "- Submission Instructions (working with one classmate): Upload your solution, entitled \n", "**YourFirstName-YourLastName-PartnerFirstName-PartnerLastName-Homework6.ipynb** to the BrightSpace Homework 6 Dropbox. Note: only one \n", "partner needs to submit the solution. If both partners 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, BrightSpace 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", "metadata": {}, "source": [ "## Starting Code" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from datascience import *\n", "%matplotlib inline\n", "import numpy as np" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "As many of you likely know, the 2025 Oscars were awarded this past Sunday. In this assignment, we will deploy our Data Science skills to gain insights into the nominees and award winners. Place the *oscars.csv* file into the same directory as this Jupyter notebook." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Place the csv file in the same directory as your solution\n", "academy_awards = Table().read_table(\"oscars.csv\")\n", "academy_awards" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Question 1 - 1 Point" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The Academy Awards, also known as the Oscars, are an award show to recognize excellence in movies. The ceremony has been held every year since 1929, with many storied movie makers winning a multitude of awards. For this assignment, we want to analyze the 2025 ceremony. Create a table called **oscars_2025** that only contains values that are from the 2025 Academy Awards and then print how many rows are in this table." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Place answer here." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Question 2 - 3 Points" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The film **Anora** was nominated for an Oscar in 6 different categories:\n", "\n", "- Actor in a Supporting Role\n", "- Actress in a Leading Role\n", "- Directing\n", "- Film Editing\n", "- Best Picture\n", "- Writing (Original Screenplay)\n", "\n", "Create a function that randomly selects a nominated movie to win in each of these 6 categories. Then, call this function 10,000 times. Save the results in a table called **simulations**, and display the first 10 rows of that table." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Place answer here." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Question 3a - 2 Points" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Using the **simulations** table created in Question 2, create a histogram showing the distribution of Oscar wins for the movie Anora. The bins for the histogram should be the number of Oscars won (0-6), with the y-axis being the number of simulations where Anora won that many Oscars. The number of wins on the x-axis should be centered so that it is clear which bin belongs to which number." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Place answer here." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Question 3b - 1 Point" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Using your knowledge of probability, if the winner in each category is determined by pure chance (the **null hypothesis**), what is the expected number of Oscar wins for Anora?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Answer with explanation** - " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Question 3c - 1 Point" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In reality, Anora won 5 Oscars, suprising many. Calculate a p-value with 5 as the **observed statistic**. Display the value as a percentage with 2 digits to the right of the decimal, e.g. \"*The p-value is 8.27%*\"" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Place answer here." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Question 4a - 1 Point" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Is the p-value **statistically significant**, **highly statistically significant** or **neither**? " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Answer with explanation** - " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Question 4b - 1 Point" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Should the **null hypothesis** be accepted or rejected?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Answer with explanation** - " ] } ], "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.13.1" } }, "nbformat": 4, "nbformat_minor": 4 }