One Sample T-Test in Python

The one-sample t-test is a statistical hypothesis test that can be used to see if the mean of an unknown population differs from a given or known value. In this article let’s learn how to perform a one-sample t-test.

null hypothesis: the mean of the areas is 5000.

alternative hypothesis: the mean of the areas is not  5000.

CSV Used:

Create a Dataframe for demonestration 

Python3




# import packages
import scipy.stats as stats
import pandas as pd
  
# loading the csv file
data = pd.read_csv('areas.csv')
data.head()


Output:

How to Conduct a One Sample T-Test in Python

In this article, we are going to see how to conduct a one sample T-Test in Python.

Similar Reads

One Sample T-Test in Python

The one-sample t-test is a statistical hypothesis test that can be used to see if the mean of an unknown population differs from a given or known value. In this article let’s learn how to perform a one-sample t-test....

Conduct a One Sample T-Test in Python

...