Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
What is t-test | Statistical Testing
Learning Statistics with Python
course content

Course Content

Learning Statistics with Python

Learning Statistics with Python

1. Basic Concepts
2. Mean, Median and Mode with Python
3. Variance and Standard Deviation
4. Covariance vs Correlation
5. Confidence Interval
6. Statistical Testing

book
What is t-test

T-test is a statistical test used to determine whether there is a significant difference between the means of two samples.

To better understand this definition, let's take a look at an example. Suppose we want to determine whether there is a significant difference between the heights of males and females.

To do this, we need two samples: one for male heights and another for female heights:

Calculating the means and plotting the histograms together gives us this:

Based on this, we can conclude that, on average, males are taller. Mystery solved? Not quite. Let's take a look at another example below:

These are two samples of male heights, both sampled from the same population, so they should be roughly equal. However, by chance, the second sample happened to have more tall men. We can't conclusively say that men are taller than men. The difference between these two samples is purely the result of chance.

Returning to our male/female height example:

Is the difference in means merely a result of chance, or do the samples indeed differ? This is the question that the t-test can help us answer.

Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 6. Chapter 1
We're sorry to hear that something went wrong. What happened?
some-alt