Book Image

Become a Python Data Analyst

By : Alvaro Fuentes
Book Image

Become a Python Data Analyst

By: Alvaro Fuentes

Overview of this book

Python is one of the most common and popular languages preferred by leading data analysts and statisticians for working with massive datasets and complex data visualizations. Become a Python Data Analyst introduces Python’s most essential tools and libraries necessary to work with the data analysis process, right from preparing data to performing simple statistical analyses and creating meaningful data visualizations. In this book, we will cover Python libraries such as NumPy, pandas, matplotlib, seaborn, SciPy, and scikit-learn, and apply them in practical data analysis and statistics examples. As you make your way through the chapters, you will learn to efficiently use the Jupyter Notebook to operate and manipulate data using NumPy and the pandas library. In the concluding chapters, you will gain experience in building simple predictive models and carrying out statistical computation and analysis using rich Python tools and proven data analysis techniques. By the end of this book, you will have hands-on experience performing data analysis with Python.
Table of Contents (8 chapters)

Hypothesis testing

In this section, we will perform hypothesis testing to answer this question: "does alcohol consumption affect academic performance?".

We will cover the following topics:

  • A null hypothesis testing framework
  • Performing a test for the equality of population variances
  • Performing a t-test for the equality of population means

We will be using these results to answer the question that we proposed. We will use the Jupyter Notebook and conduct a brief review of the following steps, which we usually follow when we use hypothesis testing to answer a question:

  1. We will set up two competing hypotheses; one is called the null hypothesis and the other is called the alternative hypothesis. What determines these hypotheses is the type of question that we would like to answer.
  2. We will set in advance a significance level, called alpha. The most common alpha value...