T-Test

What is T-Test?

A T-Test is a method used to derive an inference in statistics, which is aimed to find out if there is any major difference between two means wherein the two groups considered may be related to each other.

Explanation

T-Test

You are free to use this image on your website, templates etc, Please provide us with an attribution linkHow to Provide Attribution?Article Link to be Hyperlinked
For eg:
Source: T-Test (wallstreetmojo.com)

Types of T-Test

There are primarily four types of t-test, which are as follows:

#1 – 1-Sample T-Test

It is aimed for testing if the mean of the value one has targeted is equal to the mean of a single population, e.g., Testing whether the average weight of Class 5 students are more than 45kg

#2 – 2-Sample T-Test

It is aimed for testing if the mean of the value one has targeted is equal to the mean of two independent populations, e.g., Testing whether the average weight of Class 5 boy students is different from Class 5 girl students.

#3 – Paired T-Test

It is aimed at testing if the mean of the value one has targeted is equal to the mean of differences between the observations which are dependent. e.g., comparing the marks of students before and after taking tuitions for each subject helps us identify whether taking tuitions is significant enough to improve the marks of students.

#4 – T-Test in Regression Output

It takes into consideration the coefficient in the regressionRegressionRegression Analysis is a statistical approach for evaluating the relationship between 1 dependent variable & 1 or more independent variables. It is widely used in investing & financing sectors to improve the products & services further. read more equation and tests to what degree it differs from zero value. e.g., If the entrance exam score is a significant factor to determine whether a student will obtain a good final score.

Assumptions of T-Test

How to Calculate?

It works in two different scenarios, i.e., one for the independent sample and another for the dependent sample.

#1 – Independent Sample Scenario

  • We need to calculate the sum, the sample size, which is determined by “N,” and the score value for the mean for each of the independent samples. After this, the degree of freedom needs to be calculated for every independent sample.
  • This is represented by subtracting the sample by one, which we denote as “n-1”. After this, the variance and standard deviation need to be calculated.
  • The degrees of freedom of the samples are added, and this is termed as “df-total.” Next, we need to multiply the degree of freedom of each sample with the variance of each. We need to add the resultants and then divide the total by “df-total.” The result obtained is called the pooled variance.
  • The pooled variance is then divided by the n of the samples. The result obtained for all the samples is then added. The square root of this is taken, and this is termed as the standard error of the difference.
  • Lastly, we need to subtract the lower mean of the sample from the greater mean of the sample. The difference obtained is then divided by the standard error of the difference, and the results obtained are called the T-value.

#2 – Dependent Sample Scenario

  • The scores obtained from each of the pairs of data set are noted, and we need to subtract it. The differences obtained are added and termed as “D.” The differences of each sample are squared and added to obtain a resultant called “D-Squared.” After this, we need to multiply the “N” or number of scores paired with the “D-squared.”
  • The resultant obtained is subtracted from the square of total “D.” This result is further divided with “N-1”. The square root of the resultant is obtained and is termed as a divisor. Lastly, we need to divide the total “D” by the divisor, which gives us the final t-value.

T-Test Examples

Let us consider we have scores for each subject in the examination held for two terms.

SubjectMark Phase 1Mark Phase 2
Maths4562
Physics4555
Chemistry4555
Biology5065
History5568
Geography8070

Step 1: Subtract Phase 1 from Phase 2

Example 1-1

Step 2: Add up all the difference i.e. -55

Step 3: Square up the differences

Example 1-2

Step 4: Add up all the squares of difference i.e. 983

Step 5: Usage of formula to calculate the T value

T = {(∑D)/N}/√{∑D2 – (∑D)2/N)}/(N-1) – N

  • = -9.16/√{983-(-55)2/6)}/(6-1)*6
  • = -9.16/√15.96
  • = -9.16/3.99
  • T Value = -2.29

The T value obtained is then compared with the T value obtained from the table using p-value and degree of freedom. If the calculated t value is greater than the table value at a specific predefined alpha level, we can reject the null hypothesis saying there is a difference between the means.

When It’s Used?

This is used to compare two means or proportions. Also, we use a t-test when the population parameters are unknown to the user. There are broadly three cases of t-test scenario usage, which are as follows:

  • An independent sample t-test is used when we want to compare the mean of two groups.
  • A paired sample t-test is used when we want to compare the mean of the same group but at different points of time.
  • One sample t-test is used when we are in need of checking the mean of an individual group against an unknown mean.

T-Test Usage in Excel

  • In excel, the first and foremost thing we need is the installation of an add-in called Data Analysis. After this, we need to go to “Data” on the menu tab and click on it. The “Data Analysis” option will be visible there.
  • To conduct a T-Test, we need to have our data in a columnar format. On click “Data Analysis,” we will get a number of statistical tests that we can perform, and from the list, we need to choose a t-test and click “Ok.”
  • A dialog box comes up where we need to enter the data for trail 1 in the variable range 1 box and also the trial 2 data in the variable range 2 boxes. By default, the value of alpha remains at 0.05, but this can be changed based on our preference. When all if fine, click on “OK.”
  • We can now see the result of our T-Test on the excel sheet. The most important value here to note is P-value. On what we have selected our alpha value, if our P-value in excelP-value In ExcelP-value is used in correlation and regression analysis in Excel to determine whether the result obtained is feasible or not and which data set from the result to work with. It's value ranges from 0 to 1.read more is less than the alpha value, we can conclude there is a statistical material difference between the means of our two sets of values.

Conclusion

The T-Test is aimed at hypothesis testing, which basically is used to test a hypothesis pertaining to a given population. It tells us the level of significance of the difference between the groups, which are generally measured on the basis of the mean. Here we basically find out the difference between population meansPopulation MeansThe population mean is the mean or average of all values in the given population and is calculated by the sum of all values in population denoted by the summation of X divided by the number of values in population which is denoted by N.read more and a hypothesized value.

This has been a guide to What is T-Test & its Definition. Here we discuss how to calculate the t-test, types, and assumptions along with examples and when it’s used. You can learn more about from the following articles –

  • 16 Courses
  • 15+ Projects
  • 90+ Hours
  • Full Lifetime Access
  • Certificate of Completion
LEARN MORE >>

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *