Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Group 8 (Semblante, Lague, Peras, Rama)

T-TEST
● Type of inferential statistics.
● Used to determine whether the means of two groups are statistically different from each
other and is often used in hypothesis testing.
● Is a parametric test of difference - implies that it makes the same assumptions about
data as other parametric tests.
● Assumes data as:
○ Independent
○ (Approximately) normally distributed
○ Have a similar amount of variance within each group being compared.
(Homogeneity of variance)
● T-Score - the ratio between the difference between two groups and the difference ​within
the groups. The smaller the T score, the more similarity there is between groups.
○ A large t-score implies that the groups are different
○ A small t-score implies that the groups are similar.

Types of T-Test
There are three main types of t-test, which are categorized into one-sample and two-sample
techniques, namely:

1. One Sample Technique


a. One Sample T-Test
■ Tests the mean of a ​single sample or group against a known mean, a
hypothesized or predetermined population parameter, or with a ​standard
value​.
■ Example Usage:
1. Comparing the average salary of nurses within a company with a
value that has known to represent the national average for nurses.
2. Comparing the acidity of a liquid to a neutral pH or 7.
2. Two Sample Technique
a. Two Sample T-Test / Independent T-Test
■ Utilizes ​two separate independent sample​ means to be compared.
■ Is used if the sample or groups come from two ​different populations​.
■ Example Usage:
1. Comparing the salaries of nurses and physicians to evaluate
whether there is a difference in their salaries.
2. Comparing the means of two different species, or people from two
separate cities.
b. Paired Sample T-Test / Dependent T-Test
■ Is used to compare the means of ​two variables in a ​single group at
different times​ (e.g. one year apart).
■ Is used if the means/scores come from a single group.
■ Essentially connected - they are tests on the same person or thing.
■ Example Usage:
1. Could be used to see if there is a statistically significant difference
between starting salaries and current salaries among the general
nurses in an organization.
2. Measuring or comparing results before and after an experimental
treatment.
3. Two blood pressure measurements on the same person using
different equipment.

When choosing a type of t-test to utilize, you will need to consider whether the groups being
compared come from a ​single population ​or ​two different populations, ​and whether you want to
test the difference in a specific direction.

Performing a T-Test
A. One Sample Technique
● One Sample T-Test

- where x bar is the sample mean, s² is the sample variance, n is the sample size, µ is the
specified population mean and t is a Student t quantile with n-1 degrees of freedom.

Example :
Consider 20 first year resident female doctors drawn at random from one area, resting systolic
blood pressures measured using an electronic sphygmomanometer were:

128 127

118 115

144 142

133 140

132 131

111 132

149 122

139 119

136 129

126 128

From previous large studies of women drawn at random from the healthy general public, a
resting systolic blood pressure of 120 mm Hg was predicted as the population mean for the
relevant age group.

For this example:


Single sample t test H o : μ = 120 → ​t = t crit
H i : μ ≠​ 120 → ​t ​≠ ​t crit
Sample name: Systolic BP
Sample mean = 130.05
Population mean = 120
Sample size n = 20
Sample sd = 9.960316
95% confidence interval

Df (n-1) = 19
t = 4.512404 or 4.512

t crit = 2.093

Therefore, the t score of the systolic BP among 20 first year resident female doctors is
4.512 ​with ​a resting systolic blood pressure of ​120 mm Hg was predicted as the
population mean for the relevant age group.

A null hypothesis of no difference between sample and population means has clearly
been ​rejected.

B. Two Sample Technique


● Two Sample T-Test / Independent T-Test

Example :
Calculate an independent samples t test for the following data sets:

Data set A:​ 1,2,2,3,3,4,4,5,5,6

Data set B:​ 1,2,4,5,5,5,6,6,7,9


Confidence interval = 95%

Step 1:​ Sum the two groups:

A​: 1 + 2 + 2 + 3 + 3 + 4 + 4 + 5 + 5 + 6 = 35

B: 1 + 2 + 4 + 5 + 5 + 5 + 6 + 6 + 7 + 9 = 50 (​To find the mean and standard


deviation)​

Step 2:​ Square the sums from Step 1:

35 = ​1225

50 = ​2500

Set these numbers aside for a moment.

Step 3: ​Calculate the ​means ​for the two groups:

A: (1 + 2 + 2 + 3 + 3 + 4 + 4 + 5 + 5 + 6)/10 = 35/10 = ​3.5

B: (1 + 2 + 4 + 5 + 5 + 5 + 6 + 6 + 7 + 9) = 50/10 =​ 5

Set these numbers aside for a moment.

Step 4:​ Square the individual scores and then add them up:

A: 11 + 22 + 22 + 33 + 33 + 44 + 44 + 55 + 55 + 66 = ​145

B: 12 + 22 + 44 + 55 + 55 + 55 + 66 + 66 + 77 + 99 =​ 298

Set these numbers aside for a moment.

Step 5:​ Insert your numbers into the following formula and solve:

(ΣA) 2 : Sum of data set A, squared (Step 2).

(ΣB) 2 : Sum of data set B, squared (Step 2).

μA: Mean of data set A (Step 3)

μB: Mean of data set B (Step 3)

ΣA 2 Sum of the squares of data set A (Step 4)


ΣB 2 : Sum of the squares of data set B (Step 4)

nA: Number of items in data set A

nB: Number of items in data set B

Step 6:​ Find the ​Degrees of freedom​ (nA-1 + nB-1) = 18

(10-1)+(10-1) = 9=9= ​18

Step 7: ​Look up your degrees of freedom (​Step 6​) in the ​t-table​. If you don’t know what your
alpha level​ is, use 5% (0.05).

18 degrees of freedom at an alpha level of 0.05 = 2.10.

Step 8:​ Compare your calculated value (​Step 5)​ to your table value (​Step 7​).

The calculated value of -1.79 is less than the cutoff of 2.10 from the table. Therefore t crit >
-1.79. As the ​t crit is greater than the t-score , we cannot conclude that there is a difference
between means.
● Paired Sample T-Test / Dependent T-Test
Example :
Suppose a sample of ​n students were given a diagnostic test before studying a particular
module and then again after completing the module. We want to find out if, in general, our
teaching leads to improvements in students’ knowledge/skills (i.e. test scores). We can use the
results from our sample of students to draw conclusions about the impact of this module in
general.

Let​ x ​= test score before the module,​ y​ = test score after the module

To test the null hypothesis that the true mean difference is zero, the procedure is as follows:

NOTE :​ For this test to be valid the differences only need to be approximately normally
distributed. Therefore, it would not be advisable to use a paired t-test where there were any
extreme outliers.

Example

Using the above example with n = 20 students, the following results were obtained

Confidence interval = 95%


Calculating the mean and standard deviation of the differences gives:

Sd = √ ∑(41−2.05)2

20

= 2.837

t= 3.231
t crit = 2.093

The calculated value of 3.231 is greater than the cutoff of 2.093 from the table. As the ​t crit is
less than the t-score , then t is in the critical region.

A null hypothesis has clearly been ​rejected.

Interpreting Test Results


● T-value​: A t-value of 0 indicates that the sample results exactly equal the null
hypothesis. As the difference between the sample data and the null hypothesis
increases, the absolute value of the t-value increases.
● Degrees of freedom: Degrees of freedom are related to your sample size. It shows how
many ‘free’ data points are available in your test for making comparisons. ​The greater
the degrees of freedom, the better your statistical test will work.
● A statement of the alternate hypothesis (H​a​)​. The H​a​ is that the difference is not 0.
● The ​95% ​confidence interval​. This is the range of numbers within which the true
difference in means will be 95% of the time. This can be changed from 95% if you want a
larger or smaller interval, but 95% is very commonly used.
● The ​mean​ petal length for each group.

A. One Sample Technique


· ​One Sample T-test

- ​If the absolute value of the t-test statistics (t) is greater than the critical value, then the
difference is significant. Otherwise, it is not.

Note: ​The t-test can be used only when the data are normally distributed

B.​ ​Two Sample Technique

a. ​Two Sample T-test / Independent T-Test

- ​If the absolute value of the t-test statistics (t) is greater than the critical value, then the
difference is significant. Otherwise, it is not.
Note: ​The test can be used only when the two groups are samples (A and B) being
compared follow bivariate normal distribution with equal variances

b.​ ​Paired Sample T-Test / Dependent T-Test

- ​If the absolute value of the t-test statistics (t) is greater than the critical value, then the
difference is significant.

Note: ​The test can be used only when the difference d is normally distributed.

Presenting the Results of a T-test

The basic format for reporting the result of a t-test is the same in each case (The color ​blue
means you substitute in the appropriate value from your study

t (​ ​degrees of freedom​) = ​the ​t​ statistic

Here are some examples:

A.​ ​One Sample Technique


a.​ ​One Sample T-test
● United fans reported higher levels of stress (​M= ​ 83, ​SD=​ 5) than found in
the population as a whole, t​ ​(48) =2.3
● Coffee drinkers spent more time awake (​M= ​ 17.8, ​SD​=1.4) than the
population norm, ​t (​ 28) =2.6
B.​ ​Two Sample Technique
a.​ ​Two Sample T-test / Independent T-Test
● The 25 participants who received the drug intervention (​M = 480, ​SD =
34.5) compared to the 28 participants in the control group (​M = 425, ​SD =
31) demonstrated significantly better peak flow scores, ​t (​ 51) = 2.1
● There was no significant effect for sex, ​t ​(38) = 1.7, despite women (​M =
55, ​SD​ = 8) attaining higher scores than men (M = 53, SD = 7.8).

b. Paired Sample T-Test / Dependent T-Test


● The results from the pre-test (​M = 13.5, ​SD = 2.4) and post-test (​M =
16.2, ​SD = 2.7) memory task indicate that the presence of caffeine in the
bloodstream resulted in an improvement in memory recall, ​t ​(19) = 3.1
● There was a significant increase in the volume of alcohol consumed in the
week after the end of semester (​M = 8.7, ​SD = 3.1) compared to the week
before the end of semester (​M​ = 3.2, ​SD​ = 1.5), ​t (​ 52) = 4.8
Notes
o The abbreviations ​M​ and ​SD​ stand for mean and standard deviation, respectively.

o If your ​t​-test is one-tailed, you need to say so.

o No need to provide a formula for ​t​.


o Degrees of freedom are ​N - 1 for the single sample and dependent measures ​t-​ tests;
and (​N​1​ - 1) + (​N2​ ​ - 1) for the independent ​t​-test.

o If you are hypothesis testing, then remember to restate your hypothesis.

You might also like