How to Perform t-Tests in Python

A Step-to-Step Guide to t-Tests on the Predicting Heart Failure Dataset in Jupyter Notebook

Steffi
Data science & AI Learning Journey

--

In my previous article Introduction to Statistical Hypothesis Testing, we introduced the statistical tools to analyse the relationships of two attributes. The overview can be found here. Now we would like to use these statistical tools together with the t-test which is used to test a hypothesis and to validate the findings from our Exploratory Data Analysis on the Predicting Heart Failure Dataset. The Exploratory Data Analysis can be found here.

Overview

In this article, we will provide a step-to-step guide how to perform t-Tests in Python. This article will cover the following topics:

  • What is a t-Test?
  • How to calculate the t-statistic?
  • Different types of t-Tests
  • Implementing t-Tests in Python

What is a t-Test?

A t-Test is a test where two means are compared to check whether those means are significantly different from each other or not.

How to calculate the t-statistic?

--

--

Steffi
Data science & AI Learning Journey

Software Engineer & ML Research Associate | Passionate about Innovation and Technology