You are on page 1of 11

Module 6: T-test

Learning outcomes:
At the end of the lesson, students will be able to:
• Testing hypothesis about a single mean using small samples with unknown population standard deviation, (
σ ); and
• Test the Differences Between Two Sample Means.

6.1 T-test: Testing hypothesis about a single mean using small samples with unknown population standard deviation, ( σ )

If n is small (n<30), the standard deviation of the sample may not be a good estimator of the population
standard deviation (σ ) and the z-test is not generally used. Fortunately, there is a test statistic available for this. It
was developed by William S. Gosset, the brewmaster of the Guiness brewery in Ireland who published it in 1908
using the pen name “Student t”. However, in a later year, it was commonly called t-test.

One sample case t-test is a statistical procedure that is applied to know the difference between the sample
mean ( x ) and the known value of the population mean ( M ). This test is advisable if the sample size is small (n<30),
the population standard deviation (σ ) is unknown, the samples are taken at random, and we want to test significant
difference between the sample mean and the population mean. We presume here, that the population is normal or
nearly normal. This test is advisable for one or two-sample case/s only. An interval or ratio scale of measurement is
applied.

The t-distribution is more spread out and flatter than the z-distribution. However, as sample size increases (
n → 30 and above). The curve representing the t-distribution approaches the z-normal distribution since the
population standard deviation (σ ) is unknown, the sample standard deviation (sd) is used instead. This gives rise to
n-1 degrees of freedom (df=n-1) which means that there is one less degree of freedom for the variables that are
free to vary. The formula for a t-test one-sample case then is:

x −M
t c=
sd with df = n-1
√n
where:

t c =¿ t-computed value for one-sample case

x=¿ sample mean

M =¿ population mean

sd=¿ sample standard deviation

n=¿ number of observations in the sample


Application 1. One of the Deans of a higher education institution claims that the average salary of an instructor in the
college is Php 15,200 per month. The salaries of a random sample of 10 instructors are Php 15,000, Php 15,100, Php
15,400, Php 15,300, Php 15,200, Php 14,700, Php 15,100, Php 14,800, Php 15,000 and Php 14,900. Is there enough
evidence to reject the Dean’s claim at α =0.01 ? Assume that the population is normally distributed.

Step 1. State the H o and H a .

H o : M =¿ Php 15,200/month (claim)

H a : M ≠ Php 15,200/month

Step 2. The level of significance is α =1 % level.

Step 3. T-test (one-sample case). This is a two-tailed test and the rejection region is on both sides of the t-
distribution with df = n-1.
Step 4. Compute the test statistic using the formula of a t-test for a single mean.

x −M
t c=
sd with df = n-1
√n
Solving for the sample mean ( x ) and the sample standard deviation (sd):

x=
∑ x = 15,000+ …+14,900 =Php15,050.00
n 10

s . d .= √∑ x −¿ ¿ ¿¿ ¿
2


22,650,250,000
2,265,450,000−
10
s . d .=
9

s . d .=√ 47,222.22

s . d .=Php217.306

15,050−15,200 −150(3.162)
t c= =
217.306 217.306
√10
t c =−2.183

n t c =¿−2.183∨¿ 2.183

Step 5. By referring to Appendix Table 2, the t-critical value is ±3.250, (it is a two-tailed test, since it does not
mention about the direction of the distribution (i.e., ≠ it is either < or >) with df = n-1 (df = 10-1 = 9).
Step 6. Decision rule
Accept the null hypothesis ( H o : M =¿ Php 15,200/mo.) at α = 1% level, since the t-computed value is 2.183 is less
than the t(tab 0.005, df = 9) = 3.250 considering that we fail to reject the null hypothesis, we can conclude that there is
enough evidence to support the claim of the Dean that the mean monthly salary of an instructor in the College is Php =
15,200.00 at α = 1% level.

Application 2. The average farm rice yield per hectare in a certain municipality in South Cotabato was reported as 3.80
tons/hectare. A random sample of eight farmers were interviewed and gave the following results in tons/ha. 4.2, 4.5, 3.6,
5.1, 3.5, 5.6, 4.4, and 4.6. Assuming that the population is normally distributed, test the hypothesis that the average farm
rice yield per hectare is higher than the reported average rice yield per hectare at α = 5% level.

Solution:

Step 1. State the H o and H a .

H o : M =¿ 3.80 tons/ha.

H a : M > ¿ 3.80 tons/ha.

Step 2. A = 5% (a one-tailed test since H a : M > ¿ 3.80 tons/ha).

Step 3. T-test (one-sample case). The rejection region is on the right side (>) of the t-distribution curve hence, a
one-sided test-with df = n-1.

Step 4. Determine the t-computed value (t c) using a single mean formula.

x −M
t c=
sd with df = n-1
√n
Solving for the sample mean ( x ) and the sample standard deviation (sd) for ungrouped data, we have:

x=
∑ x = 4.2+ …+ 4.6 = 35.50
n 8 8

x=4.438tons /ha
s . d .= √∑ x −¿ ¿ ¿¿ ¿
2


2 2 ( 35.50 )2
[( 4.2 ) + …+ ( 4.6 ) ]−
8
s . d .=
8−1

s . d .=
√ 160.99−157.531
7
= √ 0.494

s . d .=0.702 ton

Then,

(x ¿)−M √ n
t c= ¿
s.d .

(4.438−3.80) √8
t c=
0.702

t c =2.57 ton

Step 5. Determine the t-tabular value at a = 5% and df = 8-1 = 7 (one-tailed test). Refer to Appendix Table 2.

t (¿tab 0.05 , df =7)=1.895¿

Step 6. Reject the null hypothesis ( H o : M =¿ 3.80 tons/ha) at α = 5% level since the t-computed value (2.57) is
greater than the t-tabulated value (1.895). Since we reject the null hypothesis, we can conclude that there is enough
evidence that the average farm rice yield is higher than the reported average yield of 3.80 tons/ha at α = 5% level.

T-test: Testing the Differences Between Two Sample Means

As discussed earlier, t-test is used to test hypothesis about a single mean using small samples (n<30) taken at
random from a normal or a nearly normal population with an unknown population standard deviation (σ ). The student t-test
of difference of means can also be applied to test the significance of the difference between two sample means. This can be
used to compare the sample means between two independent samples.

In applying t-test for comparing two sample means, certain requirements or assumptions should be satisfied such
as:

1. The population must be at least approximately or nearly normally distributed.


2. The population should be independent. (i.e., samples are taken at random).
3. The population variances are homogeneous or equal.
4. The samples are small i.e., less than 30 (n<30).
5. The population standard deviation (σ ) is unknown (hence, the sample standard deviation is used instead).
6. Interval or Ratio scale of measurement is use.

6.2 Independent sample t-test or T- test for uncorrelated samples (between groups)

The formula for a Independent sample t-test or T- test for uncorrelated samples (between groups) is:

A. Variances are assumed to be unequal:

( x 1−x 2) −(μ 1−μ2)


t=

√ s21 s 22
+
n1 n2

Where the degrees of freedom are equal to smaller of n1 −1 or n2 −1

B. Variances are assumed to be equal:

( x 1−x 2 )−( μ1−μ2 )


t=

√ (n1−1) s21 +(n2−1)s 22 1 1


n1+ n2−2
+

n1 n 2

Where t = t-test for two independent samples

x 1 , x 2 = mean values of the sample group 1 and 2

2 2
s1 , s 2=the variances if the sample group 1∧2

n1 , n2= sample population of group 1 and 2

x 1−x 2 = the observed difference

μ1−μ 2 = the expected difference

Where the degrees of freedom is n1 +n 2−2

Example No. 1: A researcher wishes to determine whether the monthly salary of professional elementary teachers in private
schools and elementary teachers in public schools differs. He selects a sample of elementary teachers. From each type of
school calculate the means and standard deviations of their salaries. At ∝ = 0.01, can he conclude that the private school
teachers does nit receive the same salary with the public school teachers? Assume that the populations are approximately
normally distributed.

Private Public

x 1=Php16,400 x 2=Php 15,170

2 2
s1=Php 700 s2=Php 800
n1 =15 n2 =9

Solution:

Step 1. State the H o and H a .

H o : μ1=μ 2 (There is no significant difference between the monthly salaries of private and public elementary
teachers)

H a : μ1 ≠ μ2 (There is significant difference between the monthly salaries of private and public elementary teachers)

Step 2. The level of significance is α =0.01 .

Step 3. Independent sample t-test or T- test for uncorrelated samples (between groups) .This is a two-tailed test and the
rejection region is on both sides of the t-distribution with df = n1 +n 2−2.

Step 4: Compute the test value. Use the formula for variances assumed to be equal.

( x 1−x 2 )−( μ1−μ2 )


t=

√ √
2 2
(n1−1) s1 +(n2−1)s 2 1 1
+
n1+ n2−2 n1 n 2

( 16,400−15,170 ) −0
t=
√( 15−1)¿ ¿ ¿ ¿
t = 3.953

Step 5. Critical region or the tabular value

The tabular value is the value under the 0.01 level of significance under a two-tailed test with df = n1 +n 2−2 (df = 15+9-2 =
22). So, the t-critical value is ±2.819.

Step 6. Decision rule.


Since, t computed 3.953 greater than t tabular 2.819 at level of significance 0.01, therefore, we would need to reject the null
hypothesis. Thus, we can conclude that there is significant difference between the monthly salaries of private and public
elementary teachers.

Example No. 2: A budget head for SSS Sales Inc. would like to compare the daily travel expenses for the sales staff and the
audit staff. He collected the following sample information.

At 0.05 significance level, can he conclude that the mean daily expenses of sales staff are greater than the audit staff?

Solution:

Step 1. State the H o and H a .

H o : μ1=μ 2 (the mean daily expenses of sales staff are not greater than the audit staff)

H a : μ1 > μ2 (the mean daily expenses of sales staff are greater than the audit staff)

Step 2. The level of significance is α =0.01 .

Step 3. Independent sample t-test or T- test for uncorrelated samples (between groups) .This is a one-tailed test and the
rejection region is on the right tail of the t-distribution with df = n1 +n 2−2.

Step 4: Compute the t value.

Before we can compute for the t-test for two independent samples, we need to obtain the sample means and sample
variances of the two groups.
x 1=
∑ x1 = 1,755 =146.25
n 12

x 2=
∑ x 2 = 915 =101.67
n 9

2
s=
∑ ( x 1−x 1 ¿2 9,056.25
= =823.30
1
n−1 12−1

2
s=
∑ ( x 2−x 2 ¿2 12,300
= =1,537.5
2
n−1 9−1

Then we substitute the values on means and standard deviations.

( x 1−x 2 )−( μ1−μ2 )


t=

√ (n1−1) s21 +(n2−1)s 22 1 1


n1+ n2−2
+

n1 n 2

( 146.25−101.67 ) −0
t=
√(12−1)¿ ¿ ¿ ¿
44.58
t=

√ (11)(677,822.89)+(8)(2,363,906.25)
19
√ 0.083333+0.11111111

44.58
t=

√ 7,456,051.79+18,911,250
19
√ 0.19444444433

44.58
t=
(1,178.02917)(0.440959)

44.58
t=
519.46256477403

t=0.09

Step 5. Critical region or the tabular value

The tabular value is the value under the 0.05 level of significance under a one-tailed test with df = n1 +n 2−2 (df = 12+9-2
=19). So, the t-critical value is 1.729.

Step 6. Decision rule.


Since, t computed 0.09 less than t tabular 1.729 at level of significance 0.05, therefore, we would need to accept the null
hypothesis. Thus, we can conclude that the daily expenses of sales staff are greater than the audit staff.
6.3 Paired t-test or dependent samples t-test (within groups)
The formula for the paired sample t-test is:
D−μ D
t=
S D /√ n

D=
∑DS =√ ∑ D −¿ ¿ ¿ ¿ ¿
2
D
n
Example no. 1: The management of Resale Furniture, a change of second hand furniture stores in Metro Manila, designed
an incentive plan for salespeople. To evaluate this innovative incentive plan, 10 salespeople were selected at random, and
their weekly incomes before and after the incentive plan were recorded.

Was there a significant increase in the typical salesperson’s weekly income due to the innovative incentive plan? Use the
0.05 significance level.
Solution:
Step 1. State the H o and H a .
H o : There is no significant increase in the typical salesperson’s weekly income due to the innovative incentive plan

H a :T here  is  a significant increase in the typical salesperson’s weekly income due to the innovative incentive plan

Step 2. The level of significance is α =0.05 .


Step 3. Paired t-test or dependent samples t-test (within groups).This is a one-tailed test and the rejection region is the right
tail of the t-distribution with df = n−1.
Step 4: Compute the t value for paired samples.
Before we can compute for the t value we need to obtain the differences.
Determine the mean of the differences.

D=
∑ D = 6,000 =600
n 10
Determine the standard deviation of the differences.

S D= √ ∑ D −¿ ¿¿ ¿ ¿
2

Determine the test value.


D−μ D 600−0
t= = =2.041
S D /√ n 929.50/ √ 10

Step 5. Critical region or the tabular value


The tabular value is the value under the 0.05 level of significance under a one-tailed test with df = n−1(df = 10-1 =9). So,
the t-critical value is 1.833.

Step 6. Decision rule.


Since, t computed 2.041 greater than t tabular 1.833 at level of significance 0.05, therefore, we would need to reject the
null hypothesis. Thus, we can conclude that
t here  is a significant increase in the typical salesperson’s weekly income due to the innovative incentive plan .
ACTIVITY 6: T-TEST
Direction:
General instruction: In every activity always indicate your name, CN, time and activity no. You can use band paper or
yellow pad paper in answering the activity. Answers can be hand written or computer-encoded. Use the

appropriate statistical tool for each questions. Follow the six steps in hypothesis testing.

1. One of the undersecretaries of the Department of Labor and Employment (DOLE) claims that the average salary of
civil engineer is Php 18,000. A sample of 19 civil engineer’s salary has a mean of Php 17, 350 and a standard
deviation of Php 1,230. Is there enough evidence to reject the undersecretary’s claim at α =0.01 ?
2. The average family size in the Philippines was reported as 4.25. A random of families in a particular street resulted
in the following family sizes: 5,6,7,4,3,8,2, and 9. At α =0.10 , does the average family size more than the national
average?
3. A researcher claims that 20-year-old women on a special diet will have an average weight of 110 pounds. A sample
of 15 women has an average weight of 112.5 pounds and a standard deviation of 5 pounds. At α =0.01 , can the
claim be rejected?
4. A researcher wishes to determine whether the monthly salary of professional elementary teachers in private
schools and elementary teacher in public schools differ. He selects a sample of elementary teachers. From each
type of school calculate the means and standard deviations of their salaries. At α =0.01 , can he conclude that the
private school teachers do not receive the same salary with the public-school teachers? Assume that the
populations are approximately normally distributed.

Private Public
X 1 =Php 16,400 X 2 =Php15,170
sd 1=Php700 sd 2=Php 800
n1 =15 n2 =9

You might also like