0% found this document useful (0 votes)
9 views14 pages

STAT4 Lesson 8 T Test

This document provides an overview of t-tests, including one-sample, dependent, and independent samples, focusing on their application when the population standard deviation is unknown and the sample size is small. It outlines the assumptions, formulas, and steps for hypothesis testing, along with examples illustrating how to perform t-tests and interpret results. The document emphasizes the importance of normal distribution and proper hypothesis formulation in statistical analysis.

Uploaded by

Noli Muyco Jr.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views14 pages

STAT4 Lesson 8 T Test

This document provides an overview of t-tests, including one-sample, dependent, and independent samples, focusing on their application when the population standard deviation is unknown and the sample size is small. It outlines the assumptions, formulas, and steps for hypothesis testing, along with examples illustrating how to perform t-tests and interpret results. The document emphasizes the importance of normal distribution and proper hypothesis formulation in statistical analysis.

Uploaded by

Noli Muyco Jr.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Lesson 8

Test of Differences using t-test


One sample, Dependent and Independent Samples)

INTRODUCTION:

When the sample is small (n<30) and the population standard


deviation is unknown, we will use the sample standard deviation as an
estimator of the population standard deviation. In case like this, we will
use the t distribution as a test statistics.
More of the concept of t distribution will be discussed in this lesson.

OBJECTIVES:

At the end of this lesson, you should be able to:


1. Discuss the requirements in using t-test and
2. Perform hypothesis testing involving t-test for one sample,
dependent and independent samples ;

1
t-test for a mean

The t test is a statistical test for the mean of a population and is used
when the population is normally or approximately normally distributed,
population standard deviation 𝜎 is unknown.
The formula for t-test when the sample mean 𝑥̅ and the standard
deviation 𝑠 are known is

x μ
t
s/ n

Where: 𝑥̅ = sample mean


µ = population mean
n = sample size
s = sample standard deviation

Assumption in Using t-test (Bluman, 2017)


1. The sample is a random sample.
2. Either 𝑛 ≥ 30 or the population is normally distributed if 𝑛 < 30.

Example 8.1.a
According to the Department of Education, high school teachers
work an average of 40 hours per week during the school year. A district
supervisor of a certain school surveys 28 randomly selected teachers and
found that they work on the average of 42.6 hours a week and the
standard deviation was 3.75 hours. Test if the mean number of hours
worked by teachers in the supervisor’s district differs from the national
average. Use α = 0.05.

Solution:

Step 1: State the null and alternative hypotheses and identify the
claim if needed.

H0: µ = 𝟒𝟎 𝒉𝒐𝒖𝒓𝒔
Ha: µ ≠ 𝟒𝟎 𝒉𝒐𝒖𝒓𝒔

2
Step 2: Find the critical value(s) from the appropriate table.

Using the t-distribution table, at α = 0.05, two-tailed test, the


critical value of tabular value of t with df=27 (df=n-1) is 2.052.

Step 3: Compute the test value.

x μ
t
s/ n

42.6  40
t
3.75/ 28
t  3.67

Step 4: Make the decision.

Since the computed value is greater than the tabular value, we have
to reject the null hypothesis.

Step 5: Make a conclusion.

The mean number of hours worked by teachers in the supervisor’s


district is the different from the national average.

Example 8.1.b
A professor in a typing class found out that the average performance of
an expert typist is 65 words per minute. A random sample of 16 students
took a typing test and an average typing speed of 62 words per minute
was obtained with a standard deviation of 8. Can we say that the sample
students’ performance is below than the standard level? Use α = 0.05.

Solution:

Step 1: State the null and alternative hypotheses and identify the
claim if needed.

H0: The sample students’ performance is within the standard level.


𝑥̅ = 65
Ha: The sample students’ performance is below the standard level.

3
𝑥̅ < 65

Step 2: Find the critical value(s) from the appropriate table.

Using the t-distribution table, at α = 0.05, one-tailed test, the


critical value or tabular value of t with df=15 (df=n-1) is -2.131.

Step 3: Compute the test value.

x μ
t
s/ n

62  65
t
8/ 16
t  1.5

Step 4: Make the decision.

Since the computed value is greater than the tabular values,


t computed = -1.5 > t tabular = -2.131 , we do not reject the null
hypothesis.

Step 5: Make a conclusion.

The sample students’ performance in typing is in the standard level.

4
t-test for Independent Samples

When the samples are taken from two normally or approximately normally
distributed populations, a 𝑡 test is used to test the difference between
means when the two samples are independent. Samples are
independent samples when they are not related.

Formula for the t Test—For Testing the Difference Between Two Means—
Independent Samples

Variances are assumed to be unequal


̅𝟏 − 𝑿
(𝑿 ̅ 𝟐 ) − (𝝁𝟏 − 𝝁𝟐 )
𝒕=
𝒔𝟐 𝟏 𝒔𝟐 𝟐
√ +
𝒏𝟏 𝒏𝟐

where the degrees of freedom are equal to the smaller of 𝑛1 − 1 or


𝑛2 − 1

Example 8.2.a

Farm Sizes. The average size of a farm in Indiana County,


Pennsylvania, is 191 acres. The average size of a farm in Greene County,
Pennsylvania, is 199 acres. Assume the data were obtained from two
samples with standard deviations of 38 and 12 acres, respectively, and
sample sizes of 8 and 10, respectively. Can it be concluded at 𝛼 = 0.05
that the average size of the farms in the two counties is different? Assume
the populations are normally distributed.

Solution:

Step 1: State the hypotheses and identify the claim for the means.

𝑯𝟎 : 𝝁𝟏 = 𝝁𝟐 and 𝑯𝟏 : 𝝁𝟏 ≠ 𝝁𝟐 (claim)

5
Step 2: Find the critical values. Since the test is two-tailed, since 𝛼 =
0.05, and since the variances are unequal, the degrees of freedom
are the smaller of 𝑛1 − 1 or 𝑛2 − 1. In this case, the degrees of
freedom are 8 − 1 = 7. Hence, from t Table, the critical values are
+2.365 and −2.365.

Step 3: Compute the test value. Since the variances are unequal, use the
first formula.
̅𝟏 − 𝑿
(𝑿 ̅ 𝟐 ) − (𝝁𝟏 − 𝝁𝟐 ) (𝟏𝟗𝟏 − 𝟏𝟗𝟗) − 𝟎
𝒕= = = −𝟎. 𝟓𝟕
𝒔𝟐 𝒔𝟐 𝟐 𝟐
√ 𝟏+ 𝟐 √𝟑𝟖 + 𝟏𝟐
𝒏𝟏 𝒏𝟐 𝟖 𝟏𝟎

Step 4: Make the decision. Do not reject the null hypothesis, since
−0.57 > −2.365.

Step 5: Summarize the results. There is not enough evidence to support


the claim that the average size of the farms is different.

6
t-test for Dependent Samples

In previous lesson, the t test was used to compare two sample


means when the samples were independent. In this section, a different
version of the t test is explained. This version is used when the samples
are dependent. Samples are considered to be dependent samples when
the subjects are paired or matched in some way.

When the samples are dependent, a special t test for dependent


means is used. This test employs the difference in values of the matched
pairs. The hypotheses are as follows:

Two-tailed Left-tailed Right-tailed


𝑯𝟎 : 𝝁𝑫 = 𝟎 𝑯𝟎 : 𝝁𝑫 = 𝟎 𝑯𝟎 : 𝝁𝑫 = 𝟎
𝑯𝟏 : 𝝁𝑫 ≠ 𝟎 𝑯𝟏 : 𝝁𝑫 < 𝟎 𝑯𝟏 : 𝝁𝑫 > 𝟎

where 𝝁𝑫 is the symbol for the expected mean of the difference of


the matched pairs. The general procedure for finding the test value
involves several steps.

First, find the differences of the values of the pairs of data.

𝐷 = 𝑋1 − 𝑋2

Second, find the mean of the differences 𝐷


̅ , using the formula

∑𝐷
̅=
𝐷
𝑛
where n is the number of data pairs.

Third, find the standard deviation 𝑠𝐷 of the differences, using the formula

𝑛 ∑ 𝐷 2 − (∑ 𝐷 )2
𝑠𝐷 = √
𝑛 (𝑛 − 1 )

7
Fourth, find the estimated standard error 𝑠𝐷̅ of the differences, which is
𝑠𝐷
𝑠𝐷̅ =
√𝑛

Finally, find the test value, using the formula

̅ − 𝜇𝐷
𝐷
𝑡=
𝑠𝐷 /√𝑛

With d.f.=n-1

The formula in the final step follows the basic format


(𝑜𝑏𝑠𝑒𝑟𝑣𝑒𝑑 𝑣𝑎𝑙𝑢𝑒) − (𝑒𝑥𝑝𝑒𝑐𝑡𝑒𝑑 𝑣𝑎𝑙𝑢𝑒)
𝑇𝑒𝑠𝑡 𝑣𝑎𝑙𝑢𝑒 =
𝑠𝑡𝑎𝑛𝑑𝑎𝑟𝑑 𝑒𝑟𝑟𝑜𝑟
where the observed value is the mean of the differences. The expected
value 𝜇𝐷 is zero if the hypothesis is 𝜇𝐷 = 0. The standard error of the
difference is the standard deviation of the difference, divided by the
square root of the sample size. Both populations must be normally or
approximately normally distributed.

Example 8.3.a

Vitamin for Increased Strength. A physical education director


claims by taking a special vitamin, a weight lifter can increase his strength.
Eight athletes are selected and given a test of strength, using the standard
bench press. After 2 weeks of regular training, supplemented with the
vitamin, they are tested again. Test the effectiveness of the vitamin
regimen at 𝛼 = 0.05. Each value in these data represents the maximum
number of pounds the athlete can bench-press. Assume that the variable
is approximately normally distributed.

8
Athlete 1 2 3 4 5 6 7 8
Before (𝑿𝟏 ) 210 230 182 205 262 253 219 216
After (𝑿𝟐 ) 219 236 179 204 270 250 222 216

Solution

Step 1: State the hypotheses and identify the claim. For the vitamin
to be effective, the before weights must be significantly less
than the after weights; hence, the mean of the differences must
be less than zero.

𝐻0 : 𝜇𝐷 = 𝜇𝐷 and 𝐻1 : 𝜇𝐷 < 0 (claim)

Step 2: Find the critical value. The degrees of freedom are 𝑛 − 1. In


this case, 𝑑. 𝑓. = 8 − 1 = 7. The critical value for a left-tailed test
with 𝛼 = 0.05 is −1.895.

Step 3: Compute the test value.

a. Make a table.

𝑨 𝑩
Before (𝑿𝟏 ) After (𝑿𝟐 ) 𝑫 = 𝑿𝟏 − 𝑿𝟐 𝑫 𝟐

= (𝑿𝟏 − 𝑿𝟐 ) 𝟐
210 219
230 236
182 179
205 204
262 270
253 250
219 222
216 216

9
b. Complete the table

𝑨 𝑩
Before (𝑿𝟏 ) After (𝑿𝟐 ) 𝑫 = 𝑿𝟏 − 𝑿𝟐 𝑫𝟐

= (𝑿𝟏 − 𝑿𝟐 ) 𝟐
210 219 -9 81
230 236 -6 36
182 179 3 9
205 204 1 1
262 270 -8 64
253 250 3 9
219 222 -3 9
216 216 0 9
∑ 𝐷 = −19 ∑ 𝐷 2 = 209

c. Find the mean of the differences.


∑ 𝐷 −19
̅=
𝐷 = = −2.375
𝑛 8

d. Find the standard deviation of the differences.


𝑛 ∑ 𝐷 2 − (∑ 𝐷 )2
𝑆𝐷 = √
𝑛(𝑛 − 1)

8(209) − (−19)2 1672 − 361


𝑆𝐷 = √ =√ = 4.84
8(8 − 1) 56

e. Find the test value


̅ − 𝜇𝐷 −2.375 − 0
𝐷
𝑡= = = −1.388
𝑠𝐷 /√𝑛 4.84/√8

Step 4: Make the decision. The decision is not to reject the null
hypothesis at 𝛼 = 0.05, since |−1.388| = 1.388 < |−1.895| = 1.895.

10
Step 5: Summarize the results. There is not enough evidence to
support the claim that the vitamin increases the strength of weight
lifters.

Example 8.3.b

Cholesterol Levels A dietitian wishes to see if a person’s cholesterol


level will change if the diet is supplemented by a certain mineral. Six
subjects were pretested, and then they took the mineral supplement for a
6-week period. The results are shown in the table. (Cholesterol level is
measured in milligrams per deciliter.) Can it be concluded that the
cholesterol level has been changed at 𝛼 = 0.10? Assume the variable is
approximately normally distributed.

Subject 1 2 3 4 5 6
Before (𝑿𝟏 ) 210 235 208 190 172 244
After (𝑿𝟐 ) 190 170 210 188 173 228

Solution

Step 1: State the hypotheses and identify the claim. If the diet is
effective, the before cholesterol levels should be different from
the after levels.

𝐻0 : 𝜇𝐷 = 𝜇𝐷 and 𝐻1 : 𝜇𝐷 ≠ 0 (claim)

11
Step 2: Find the critical value. The degrees of freedom are 𝑛 − 1. In
this case, 𝑑. 𝑓. = 6 − 1 = 5. At 𝛼 = 0.10, the critical value
±2.015.

Step 3: Compute the test value.

a. Make a table.

𝑨 𝑩
Before (𝑿𝟏 ) After (𝑿𝟐 ) 𝑫 = 𝑿𝟏 − 𝑿𝟐 𝑫 𝟐

= (𝑿𝟏 − 𝑿𝟐 ) 𝟐
210 190
235 170
208 210
190 188
172 173
244 228
b. Complete the table

𝑨 𝑩
Before (𝑿𝟏 ) After (𝑿𝟐 ) 𝑫 = 𝑿𝟏 − 𝑿𝟐 𝑫 𝟐

= (𝑿𝟏 − 𝑿𝟐 ) 𝟐
210 190 20 400
235 170 65 4225
208 210 -2 4
190 188 2 4
172 173 -1 1
244 228 16 256
∑ 𝐷 = 100 ∑ 𝐷 2 = 4890

c. Find the mean of the differences.


∑ 𝐷 100
̅=
𝐷 = = 16.7
𝑛 6

12
d. Find the standard deviation of the differences.
𝑛 ∑ 𝐷 2 − (∑ 𝐷 )2
𝑆𝐷 = √
𝑛(𝑛 − 1)

6(4890) − (100)2 29340 − 10000


𝑆𝐷 = √ =√ = 25.4
6(6 − 1) 30

e. Find the test value


̅ − 𝜇𝐷 16.7 − 0
𝐷
𝑡= = = 1.610
𝑠𝐷 /√𝑛 25.4/√6

Step 4: Make the decision. The decision is not to reject the null
hypothesis, since 1.610 < 2.015.

As shown in Figure below.

Step 5: Summarize the results. There is not enough evidence to


support the claim that the mineral changes a person’s cholesterol level.

13
14

You might also like