# Statistics : T-test & Chi-Square test

## Introduction:

In statistics we have various types of test to validate the a single group or multiple groups.Here we can say a group as a feature in the data set.These features can be either categorical or numerical features.

With the help of T-test and Chi-square test we can conclude that if the given group/feature’s are independent or dependent with each other.

## T-test :

When we want to compare one or two numerical variable for independence we use T-test.Git Link

It is of three types.

1-Sample T-test
2-Sample T-Test or Independent T-test
3-Paired T-test

1-Sample T-test

To compare population mean and sample means if they are same or different we use 1-Sample T-test.

Below code to test in Python.

2-Sample T-Test or Independent T-test

Sample T-test will compare two independent means of two features to validate if both are same or different

3-Paired T-test

We go for paired t-test when we want to compare different means of same group taken at different time interval.

## Chi-Square test:

Chi-Square test is used to compare two categorical variables to see if they are same or different .Git Link

Conclusion: These test are very important in data Preprocessing and feature engineering steps where we drop the columns which depict same information to avoid multicollinearity issue.

Hope you like my article.Please hit Clap 👏(50 times) to motivate me to write further.