You are on page 1of 28

University of Baghdad/ College of Medicine 2022-2023

t test
Title: t test

Grade: Three
Module: RM
Speaker: Dr Falah H. Kareem
Date: 16\10\2023
University of Baghdad/ College of Medicine 2022-2023

Objectives
By the end of this lecture you should be able to:

1. Identify the t test.


2. List the uses and types of t test.
3. Use t distribution table to find t value.
4. Use SPSS to calculate t value.
Difference of means or mean of difference
What Is a T-Test? T test=
University of Baghdad/ College of Medicine 2022-2023
Standard error SE
Inferential statistic test Calculating a t-test requires three key data values.
The difference between the mean values or the mean of
used to determine if there is difference from each data(paired) set (called the difference
of mean or the mean of difference).
a significant difference between The standard deviation of each group.
The number of data values of each group.
the means of two groups.
There are several different types
of t-test that can be performed depending on the data and type of analysis required.
The t-distribution table is available in one-tail and two-tails formats.
The t-value is a ratio of the difference between the mean of the two sample sets
and the variation that exists within the sample sets
University of Baghdad/ College of Medicine 2022-2023

t test vs z score

A z-test is used to test a Null Hypothesis if


the population variance is known, or if the
sample size is larger than 30, for an unknown
population variance. A t-test is used when the
sample size is less than 30 and the population
variance is unknown
t-test assumptions University of Baghdad/ College of Medicine 2022-2023

The data are continuous.


The sample data have been randomly sampled from a population.
There is homogeneity of variance (i.e., the variability of the data in each group is
similar).
The distribution is approximately normal.
Uses of t-test: University of Baghdad/ College of Medicine 2022-2023

Predict the mean of population through certain range


(if we know the mean and SD of the sample)
Hypothesis testing in statistics

Types of t-test:
Independent Samples t-test (compares the means for two groups)
Paired sample t-test (compares means from the same group at different times
say, one week, month or year apart).
One sample t-test (tests the mean of a single group against a known mean)
How to use the t table (tabulated t value) University of Baghdad/ College of Medicine 2022-2023

Step 1: Choose two-tailed or one-tailed


Step 2: Calculate the degrees of freedom
How to use the t table University of Baghdad/ College of Medicine 2022-2023

Step 3: Choose a significance level (the significance level


(α) is usually .05
Step 4: Find the critical value of t in the t table
The degrees of freedom (df) are listed along the left side(rows) of the table.
Find the table row for the df you calculated in Step 2. If you need a df that isn’t listed,
then round down to the next smallest number (e.g., use df = 40 instead of df = 46).
The significance levels are listed along the top(coloumns) of the table. Find the
column for the significance level that you chose in Step 3. The critical value of t for
your test is found where the row and column meet.
Uses of t-test: University of Baghdad/ College of Medicine 2022-2023

Predict the mean of population through certain range (if we know


the mean and SD of the sample)

Range interval=Estimator± Reliability coefficient X standard error


Example
A rare congenital disease cause reduction in concentration of blood sodium, 18 such cases aged 20-
44 years old have a mean of blood sodium concentration of 115 mmol/l , SD of 12 mmol/l. What are
the 95% confidence limits within which the mean of the total population of such cases may be
expected lie?
_
Range interval= x ± Reliability coefficient X s √n

=115 ±2.11x12 √18 =115 ±2.11x2.83=115 ±5.97


=109.03-120.97 mmol/l
We are 95% confidant that the population mean lie within
this range
Uses of t-test: University of Baghdad/ College of Medicine 2022-2023

Hypothesis testing in statistics(Calculate t value)


Types of t-test
There are three main types of t-test:
An Independent Samples t-test “compares the means for two
groups”
Degrees of freedom= n1 + n2 -2 Use sample standard deviations for each group or pooled Sd

A Paired sample t-test “compares means from the same group at


different times or matched pairs of values”
Use sample standard deviation of differences in paired
Degrees of freedom= n–1 measurements

A One sample t-test tests “the mean of a single group against a


known mean of population”
Degrees of freedom= n–1 Use sample standard deviation
Uses of t-test: University of Baghdad/ College of Medicine 2022-2023

Hypothesis testing in statistics(Calculate t value)


Types of t-test
There are three main types of t-test:
A One sample t-test tests “the mean of a single group against a
known mean of population”
Degrees of freedom= n–1 Use sample standard deviation

A Paired sample t-test “compares means from the same group at


different times or matched pairs of values”
Use sample standard deviation of differences in paired
measurements
Degrees of freedom= n–1

An Independent Samples t-test “compares the means for two


groups”
Degrees of freedom= n1 + n2 -2 Use sample standard deviations for each group or pooled Sd
If the two samples have different sample sizes with
Types of t-test samples no missing data, theyofmust
University beCollege
Baghdad/ independent. If the
of Medicine 2022-2023
two samples have the same sample size, the
Two independent samples If the samples may or may not be independent.

sample values from one population Standard deviation of difference(Sd ) for


paired t test
are not related to or matched with
the sample values from the other
population.
Two dependent samples(or consist of matched pairs)
If each pair of sample values consists of two measurements from the same subject—
such as before and after data
Or each pair of sample values consists of matched pairs—such as husband and wife
data—where the matching is based on some meaningful relationship.
One sample values mean compared with known population mean.
Table 1
Example1: Name
University Sex of Medicine
of Baghdad/ College Age Pulse
2022-2023
Average heart rate for Americans is 72 rate
1 Cara Wiley Female 22 72
beats/minute. A group of 25 individuals 2 Kevin Wang Male 24 68
participated in an aerobics fitness program to 3 Lourdes Snyder Male 25 59
4 Cesar Miranda Male 43 77
lower their heart rate. After six months the group 5 Cody Dennis Female 51 65
was evaluated to identify is the program had 6 Maynard Dixon Male 33 71
7 Cecilia Garcia Female 32 72
significantly slowed their heart(table 1) . 8 Maribel Browning Male 24 80
Calculate the t value? 9 Chauncey Boyd Male 25 67
10 Marisol Mcdonald Male 32 70
(Use SPSS) 11 Jeannine Reese Female 21 74
12 Jose Lloyd Female 42 68
31 Amado Lyons Male 32 78
14 Tracey Figueroa Male 33 77
15 Mikel Taylor Male 26 67
16 Dale Calderon Female 29 65
17 Dawn Hooper Female 21 67
18 Virgie Mcneil Female 21 59
19 Jimmy Riddle Male 44 71
20 Rosario Sutton Male 32 88
21 Vance Perez Female 37 67
22 Michale Delgado Male 36 70
23 Stephen Pierce Male 24 70
24 Cathryn Meza Female 23 69
Enter data as you learned before
University of Baghdad/ College of Medicine 2022-2023
Analyze -> Compare means -> One-Sample T test.
University of Baghdad/ College of Medicine 2022-2023

By default, it will
also give you the
95% confidence
interval. To change
the confidence
level, you may click
Move the variable into the “Test Variable(s)” box. “Options” on the
Type the value of under into the “Test Value” box. right bottom corner
Continue -> OK. of the “One-Sample
T Test” window and
then change it.
In the output, the calculated t score seen in the 2nd table
in addition to the P-value, Sig. 2-tailed, is for two-sided University of Baghdad/ College of Medicine 2022-2023

test.
One sample t test University of Baghdad/ College of Medicine 2022-2023

Example1a:
Average heart rate for Americans is 72 beats/minute. A group of 25 individuals participated in an
aerobics fitness program to lower their heart rate. After six months the group was evaluated to
identify is the program had significantly slowed their heart. The mean heart rate for the group was
69.84 beats/minute with a standard deviation of 5.169 beats/minute. Calculate the t value?
?
A\
One sample t test

69.84-72
= --2.089
5.169\5
Table 2
Example2: Name University
Sex of Baghdad/ College of MedicinePR
PR before 2022-2023
after
A group of 11 individuals participated in an Son Stark Male 98 76

experiment, pulse rate measured for each. Jimmy Gould Male 110 82

Then each of them took oral drug used to Blair Jacobson Male 88 72
Rachelle Meyers Female
treat Trudy Saunders Male
94

72
70

60
tachycardia. After one hour the pulse rate was Andrea Mcmillan Female 104 82

measured again(table 2) . Calculate the t value? Ervin Tran Female 78 72


Kitty Charles Female 82 80
(Use SPSS) Frank Francis Male 84 76
Lina Graves Female 94 82
Gordon Wilkerson Male 78 80
1-Enter data as you learned before
University of Baghdad/ College of Medicine 2022-2023

2-Click on Analyze\Compare means\Paired Samples T


test.
Move the two variables that you are interested in comparing into the Paired variables box.
Click OK. University of Baghdad/ College of Medicine 2022-2023

In the output, the calculated t


score seen in the 3td table in
addition to the P-value.
Table 2
Example2a: Name University of Sex
Baghdad/ College ofPRMedicine
before 2022-2023
PR after
A group of 11 individuals participated in an Son Stark Male 98 76

experiment, pulse rate measured for each(mean Jimmy Gould Male 110 82

75.63 beats per min. Then each of them took Blair Jacobson Male 88 72
Rachelle Meyers Female
oral drug used to treat Trudy Saunders Male
94

72
70

60
tachycardia. After one hour the pulse rate are Andrea Mcmillan Female 104 82

measured again with a mean of 62.36 beats per min. Ervin Tran Female 78 72
Kitty Charles Female 82 80
If I tell you, mean of difference was 13.27 beats per Frank Francis Male 84 76
min and the standard deviation of difference was Lina Graves Female 94 82
9.06 beats per min. Gordon Wilkerson Male 78 80

Calculate the t value?

13.27
=
9.06\√11
Sex Score
Example 3/ Consider a sample of males who were given University of Baghdad/ College of Medicine 2022-2023
test measuring their knowledge of a topic. Another
Male 10
sample of Females who were given the same test, Male 14
the test scores were shown in the table. Female 15
Calculate t value? Use SPSS. Female 18

Assuming equal variances for the two populations. Male 12


Female 15

A\Enter data as you learned before


From the menu, choose Analyze > Compare Means > Independent-Samples T Test
Select one or more test variables and move the variable(s) to the Test Variable(s) list. A separate t-test is computed
for each variable. University of Baghdad/ College of Medicine 2022-2023

Select a single grouping variable and move it to the Grouping Variable field.
Click Define Groups to specify the two codes which identify your two groups, then click Continue, OK
University of Baghdad/ College of Medicine 2022-2023
University of Baghdad/ College of Medicine 2022-2023

In the output, the calculated t


score seen in the 2nd table in
addition to the P-value.
University of Baghdad/ College of Medicine 2022-2023
University of Baghdad/ College of Medicine 2022-2023

THANX

You might also like