T-Test Formula

The t-test is any statistical hypothesis test in which the test statistic follows a Student’s t-distribution under the null hypothesis. It can be used to determine if two sets of data are significantly different from each other, and is most commonly applied when the test statistic would follow a normal distribution if the value of a scaling term in the test statistic were known.

T-test uses means and standard deviations of two samples to make a comparison. The formula for T-test is given below:

\begin{array}{l}\qquad t=\frac{\bar{X}_{1}-\bar{X}_{2}}{s_{\bar{\Delta}}} \\ \text { where } \\ \qquad s_{\bar{\Delta}}=\sqrt{\frac{s_{1}^{2}}{n_{1}}+\frac{s_{2}^{2}}{n_{2}}} \\ \end{array}

Where,

\(\begin{array}{l}\overline{x}\end{array} \)
= Mean of first set of values
\(\begin{array}{l}\overline{x}_{2}\end{array} \)
 = Mean of second set of values
\(\begin{array}{l}S_{1}\end{array} \)
  = Standard deviation of first set of values
\(\begin{array}{l}S_{2}\end{array} \)
  = Standard deviation of second set of values
\(\begin{array}{l}n_{1}\end{array} \)
  = Total number of values in first set
\(\begin{array}{l}n_{2}\end{array} \)
  = Total number of values in second set.

The formula for standard deviation is given by:

\[\large S=\sqrt{\frac{\sum\left(x-\overline{x}\right)^{2}}{n-1}}\]

Where,
x = Values given

\(\begin{array}{l}\overline{x}\end{array} \)
= Mean
n = Total number of values.

T-Test Solved Examples

Question 1: Find the t-test value for the following two sets of values: 7, 2, 9, 8 and 1, 2, 3, 4?

Solution:

Formula for mean:

\(\begin{array}{l}\overline{x}=\frac{\sum x}{n}\end{array} \)

Formula for standard deviation: 

\(\begin{array}{l}S=\sqrt{\frac{\sum\left(x-\overline{x}\right)^{2}}{n-1}}\end{array} \)

Number of terms in first set: 

\(\begin{array}{l}n_{1}\end{array} \)
= 4

Mean for first set of data:

\(\begin{array}{l}\overline{x}_{1}\end{array} \)
= 6.5

Construct the following table for standard deviation:

\(\begin{array}{l}x_{1}\end{array} \)
\(\begin{array}{l}x_{1}-\overline{x}_{1}\end{array} \)
\(\begin{array}{l}\left(x_{1}-\overline{x}_{1}\right)^{2}\end{array} \)
7 0.5 0.25
2 -4.5 20.25
9 2.5 6.25
8 1.5 2.25
\(\begin{array}{l}\sum \left(x_{1}-\overline{x}_{1}\right)^{2}=29\end{array} \)

Standard deviation for the first set of data: S1 = 3.11

Number of terms in second set: n2 = 4

Mean for second set of data:

\(\begin{array}{l}\overline{x}_{2}=2.5\end{array} \)

Construct the following table for standard deviation:

\(\begin{array}{l}x_{2}\end{array} \)
\(\begin{array}{l}x_{2}-\overline{x}_{2}\end{array} \)
\(\begin{array}{l}\left (x_{2}-\overline{x}_{2} \right )^{2}\end{array} \)
1 -1.5 2.25
2 -0.5 0.25
3 0.5 0.25
4 1.5 2.25
\(\begin{array}{l}\sum \left (x_{2}-\overline{x}_{2} \right )^{2}=5\end{array} \)

Standard deviation for first set of data:

\(\begin{array}{l}S_{2}\end{array} \)
= 1.29

Formula for t-test value:

\begin{array}{l}\qquad t=\frac{\bar{X}_{1}-\bar{X}_{2}}{s_{\bar{\Delta}}} \\ \text { where } \\ \qquad s_{\bar{\Delta}}=\sqrt{\frac{s_{1}^{2}}{n_{1}}+\frac{s_{2}^{2}}{n_{2}}} \\ \end{array}

\(\begin{array}{l}\large t=\frac{6.5-2.5}{\sqrt{\frac{9.67}{4}+\frac{1.67}{4}}}\end{array} \)

t = 2.3764 = 2.36 (approx)

More topics in T Test Formula
T-Distribution Formula

Comments

Leave a Comment

Your Mobile number and Email id will not be published.

*

*