{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Homework 6 - Chapter 11" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "- Due Date: Friday, March 6th no later than 11:59 p.m.\n", "- Partner Information: Learning to collaborate with others is an important skill and one that employers value.\n", "To receive credit, this assignment requires you to partner with a classmate and submit one solution for the two of you.\n", "- Submission Instructions: Upload your solution, entitled **YourFirstName-YourLastName-PartnerFirstName-PartnerLastName-Homework6.ipynb** to the Canvas Homework 6 Dropbox.\n", "**Note**: only one person needs to submit a solution. If you and your partner both submit a solution, the submission that will be graded is the one 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. 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": [ "Download the file [Valve_Player_Data.csv]()\n", "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", "steam_games = Table().read_table(\"Valve_Player_Data.csv\")\n", "steam_games" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Question 1 - 1 Point" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Steam is an online marketplace where PC gamers can purchase and play a multitude of games. During the Covid-19 pandemic, Steam saw a record number of players. For this assignment, we only want to analyze values from 2020, a time when Steam saw record growth.\n", "\n", "Create a table called **steam_2020** that only contains values that are from the year 2020. Display the first 8 values of this table." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Place answer here." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Question 2 - 2 Points" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Steam records the average number of players per game each month. For this assignment, we are analyzing the popularity of the game **Counter Strike: Global Offensive**, a competitive FPS game. Create a function that randomly picks one of the games in each of the 12 months, then simulate this selection 2,000 times. Save the results in a table called **simulations**, and display the first 10 rows of the table.\n", "\n", "**Hint:** The simulations table should have 12 columns, each representing one of the different months. A list of the months has been provided." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']" ] }, { "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, display a histogram showing the distribution of months Counter Strike: Global Offensive was the top ranked game. The bins for the histogram should be the number of months (0-12) where Counter Strike: Global Offensive was the top ranked game that specific number of times. Make the histogram as readable as possible." ] }, { "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": [ "Formulate a **null hypothesis** about the number of times\n", "that Counter Strike: Global Offensive is expected to be the top-ranked game. \n", "(Hint: A null hypothesis assumes that outcomes are determined purely by chance.)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Answer** - " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Question 3c - 1 Point" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In reality, Counter Strike: Global Offensive was the top-ranked game all twelve months.\n", "Display the histogram from Question 3a but this time add a red dot at coordinate (12, 0)\n", "to indicate the actual number of times that CS:GO was the top-ranked game. Make\n", "the histogram as readable as possible." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Place answer here." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Question 3d - 1 Point" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Calculate a p-value that uses 12 as the **observed statistic**. Display the value as a percentage \n", "with 1 digit to the right of the decimal, e.g. \"*The p-value is 0.3%*\"" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Place answer here." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Based on the calculated p-value, should the **null hypothesis** be accepted or rejected? Explain your answer." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Answer -**" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Question 4 - 2 Points" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Discover something insightful with the provided data set. Explain what you have done and why it is insightful." ] }, { "cell_type": "code", "execution_count": null, "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": 4 }