Project: Basic Statistics

Python

Project Overview

Tip

This assignment must be completed in the assignment.ipynb file provided in the GitHub repository you created when you accepted this assignment.

I will NOT grade any other file.

These instructions are also included in the README.md file in the repository for your reference.

For more on connecting to the GitHub repository, see below.

In this project, you will work with the dataset that was approved in the dataset & questions assignment. The goal of this assignment is to begin the early stages of exploratory data analysis by calculating and visualizing basic statistics of the dataset on two variables that you think might be pertinent to your research question.

First:

  • Print out the basic statistics for all variables of the data. For numeric data, this should include the mean, median, mode, range, standard deviation, and interquartile (25%, 50%, 75%) range. For categorical data, it should include the number of unique values.

For the two variables you choose to explore, complete the following:

  • Why are you choosing these variables?
    • How do they relate to your research question?
    • What do you learn about them from the initial variable information printed above, and how does it relate to your research?
  • For the two variables you chose, calculate the skew and kurtosis for each of these variables.
    • What do these statistics tell you about the distribution of these variables?
    • Visualize one variable in a histogram.
    • Visualize the other as multiple box plots separated by a categorical column in the data.
  • Explain why you made the choices you did for the visualizations.
  • Interpret the results of both the statistics and the visualizations in relation to your research question.
  • Remember to use markdown cells for the written portions of the assignments.

Basic Stats Rubric

Criteria 4 Points 3 Points 2 Points 1 Point
Printing Requisite Information The submission prints out the requisite information for all variables. N/A N/A The submission does NOT print out the requisite information for all variables.
Explanation The submission effectively discusses (1) why the two chosen variables were selected, (2) how they relate to the research question, and (3) what was learned from the initial expoloration of the variables in relation to the research question and specifically the chosen two. The submission discusses why the two chosen variables were selected, how they relate to the research question, and what was learned from the initial variable information printed about these variables in relation to the research, but the discussion is not developed and thought out. The submission discusses only two of the three required explanation criteria. The submission discusses only one or none of the three required explanation criteria.
Statistics The submission correctly calculates skew and kurtosis for both variables and explains what these statistics indicate about the distributions in relation to the research question. The submission correctly calculates skew and kurtosis for both variables but only partially explains what these statistics indicate about the distributions in relation to the research question. The submission correctly calculates skew and kurtosis for only one variable and provides minimal explanation of what these statistics indicate about the distributions in relation to the research question. The submission does not correctly calculate skew and kurtosis for either variable and/or does not provide any explanation of what these statistics indicate about the distributions in relation to the research question.
Visualizations The submission creates both visualizations (histogram and box plots) effectively, with clear labels and appropriate choices for the data presented. The submission creates both visualizations but with minor issues in labeling or appropriateness for the data presented. The submission creates only one of the required visualizations or both with significant issues in labeling or appropriateness for the data presented. The submission does not create the required visualizations.
Interpretation The submission provides a thorough interpretation of both the statistics and visualizations, clearly relating them to the research question. The submission provides a good interpretation of both the statistics and visualizations, but the connection to the research question is only partially clear. The submission provides a minimal interpretation of either the statistics or visualizations, with little connection to the research question. The submission does not provide any interpretation of the statistics or visualizations.
Narrative and Integration The submission is well-organized and written in a clear narrative form using markdown to describe the code, and it integrates the statistics both within the narrative and the visualizations effectively. The submission is organized and written in a narrative form using markdown to describe the code, but the integration of statistics with the narrative and visualizations is only partially effective. The submission lacks clear organization or narrative form, and the integration of statistics with the narrative and visualizations is minimal. The submission is disorganized, lacks narrative form, and does not integrate statistics with the narrative or visualizations.

GitHub Classroom

This assignment uses GitHub Classroom. GitHub Classroom is a tool that helps instructors manage coding assignments using GitHub repositories. When you accept the assignment, GitHub Classroom will create a private repository for you where you can work on your code. To complete this assignment you will have to accept the assignment, clone the repository to your local machine, complete the assignment, and then commit and push your changes back to GitHub.

To accept the assignment, go to the assignment page on Canvas and click on the link to create the GitHub repository.

Note

Part of this assignment is not just completing the coding tasks, but also learning how to use GitHub and Git for version control. Make sure to follow the instructions carefully and reach out to me if you encounter any issues.

Understand, problems with Git/GitHub are not an excuse for late work. Plan ahead to ensure you have time to resolve any issues that may arise. In industry, version control is an essential skill, and being proficient with these tools is crucial for collaboration and project management. Moreover, technology issues (including those with GitHub) will never be accepted as an excuse for missing deadlines. This is a programming class. The technology is part of the assignment.

If technology difficulties arise, I’m happy to help, but before deadlines (not after).

Cloning the Repository

Once you have accepted the assignment, a new repository titled - will be created in your GitHub account. You can log in to GitHub to view the repository. You will need to clone this repository to your local machine to work on the assignment. Follow these steps to clone the repository:

  1. Open VS Code
  2. Press Ctrl+Shift+P (or Cmd+Shift+P on Mac) to open the command palette.
  3. Type Git: Clone and select it.
  4. Select Clone from GitHub...
  5. You might be prompted to sign in to GitHub if you haven’t already.
  6. After signing in to GitHub, you will need to follow steps 1-4 again to clone the repository.
  7. You should receive a list of your repositories. Select the repository for this assignment.
    1. If you do not see your repository, you can copy the URL from GitHub and paste it into the prompt in VS Code.
  8. Choose a local directory where you want to clone the repository.
    1. Choose the folder location carefully. File management is incredibly important in programming, and it is best to keep all your assignments for this class in one folder.
    2. Make sure NOT to clone the repository into another repository.
  9. Click Select Repository Location to complete the cloning process.

Committing and Pushing Changes

In order to submit your assignment, you will need to commit any changes you make to your local repository and push them to GitHub. Committing saves your changes to the local repository, while pushing uploads those changes to the remote repository on GitHub. In other words, just saving your files is not enough. Saving updates the files on your computer, but when you commit those saves, you are creating a snapshot of your project at that point in time. Think of a commit like a save point in a video game that you can always return to. Remember, you can commit multiple changes to multiple files at once You should commit your changes to the repository often, especially after completing significant portions of the assignment. To do so, follow these directions.

  1. Click the Source Control icon in the Activity Bar on the side of VS Code (it looks like a branch with a dot at the end). You should see a list of files that have been changed.
  2. Stage changes to be committed. Not all files need to be in every commit. You can stage individual files by hovering over the file name and clicking the plus (+) icon that appears, or you can stage all changes at once by clicking the plus (+) icon next to the “Changes” header.
  3. Enter a commit message in the text box at the top of the Source Control panel that describes the changes you made. A good commit message is concise yet descriptive, such as “Completed function to calculate average” or “Fixed bug in data processing loop.”
  4. Press the blue button below the commit message box that looks like a checkmark to commit your changes.
  5. After committing, these changes are still only saved locally. The blue button below the commit message input box now states “Sync Changes” with an up and down arrow icon. Click this button to push your committed changes to the remote repository on GitHub. You may be prompted to sign in to GitHub again if you haven’t done so recently.
  6. Check the GitHub repository online to ensure your changes have been pushed successfully. If you cannot see your changes online, try refreshing the page. If you still cannot see your changes, the process was not completed successfully, and you should try pushing again.