You are on page 1of 12

t-test for Independent Data

Lesson 12
t-test for independent data

(First Semester 2020)


STEPS IN HYPOTHESIS TESTING

State Null Hypothesis (Ho)

State Alternative Hypothesis (Ha)

Set the level of Significance (α)

(Consider 0.01 or 0.05 level)

Determine the Test to be Used

(z-test, t-test, Pearson r, etc.)

Determine the Degrees of Freedom

Identify the Tabular Value

Calculate the Test Statistic (using


Analysis ToolPak or Online Calculator)

Make the Statistical Decision

Do not Reject Ho Reject Ho

Conclude Ho May Conclude Ha is


Be True True

Make the Final Table and Discuss the


Results
2

Assumptions of t-Test for Independent or Uncorrelated Data; n < 30


1. The dependent variable should be measured on a continuous scale.
Examples: interval scale (temperature) or ratio scale (scores)
2. The independent variable should consist of 2 categorical, independent groups.
Examples: sex (male or female); type of school (private or public)
3. The data are independent.
4. There should be no significant outliers.
5. The dependent variable should be normally distributed (each group).
6. Homegeneity of variances should be met.

Example 2: (Using t-Test for Comparing Two Sample Means; n < 30)
The following are the scores of 14 male and 14 female students in Business Economics. Test the null
hypothesis that there is no significant difference between the performance of the male and female students. Use
0.05 level of significance. (Assume all assumptions are met.)
Male Female
80 81 Solution:
80 84 1. Ho:There is no significant difference between the mean scores of the students in
84 84
84 85 Business Economics subject.
84 85 (μ 1 = μ 2)
87 87
88 87 Ha : There is a significant difference between the mean scores of the students in
Let’s Hit These:
89 88 Business Economics subject.
90 90
(μ 1 ≠ μ 2) non directional test, two tailed test
90 91
91 2. lesson,
91 the end of this
At α = 0.05
the students must have:
91 91 Comprehended 3. use t-Test forofcomparing
the concepts Statistics; two means (n < 30)
92 91 Used t-test for independent data in identifying if difference exists between the 2 sets of data.
92 92 Appreciated4.thedfdifferent
= n1 +applications
n2 – 2 = of 14Statistics.
+ 14 - 2 = 26
Tabular t or critical t = 2.056
5. computation:

Useful Link in solving for the mean, standard deviations and variance if excel is not available.
https://www.mathsisfun.com/data/standard-deviation-calculator.html
https://www.socscistatistics.com/descriptive/variance/default.aspx
3

Method 1: (Use excel or online calculator in getting the mean and standard deviation
and manually compute the value of t.)
−¿¿ −¿¿
x 1 = 87.28 (Male) x 2 = 87.64 (Female)

s1 = 4.20 s2 = 3.46
n1 = 14 n2 = 14

Disregard the
negative sign

Computed value of t α = 0.05

t-distribution Table

two-tails

df

The intersection of df = 26 and α = 0.05 is 2.056 which is the tabular/critical value of t.


4

Method 2: Using Analysis ToolPak

Steps:
1. Click Data then Click Data Analaysis. The dialog box will be seen. Look for t-Test Two Sample
Assuming Equal Variances and click OK.

2. This dialog box will appear.


For Variable 1 Range, highlight data of male students (or Type B4:B17)
For Variable 2 Range, highlight data of female students (or Type C4:C17)

3. Click Output Range, click the window and click any cell where you want your
output to be displayed (or Type E20). Finally, click OK.

4. This output will be reflected. The means, standard deviations, computed t and p values are shown.

Male Students
Square Root of the
n1 = 14 Variance (S12) =
= 87.29 Standard Deviation (S1)
2
s1 = 17.60
s1 = 4.20 (square root of 17.60)
Female Students
n2 = 14
= 87.64
2
s2 = 11.94
s2 = 3.46 (square root of 11.94)
Computed Value
Computed t = -0.246 (or 0.246)
p-value = 0.808
Critical or Tabular t = 2.056
5

Method 3: Using Online Calculator


Link: http://vassarstats.net/
Steps
1. Type vassarstats.net
2. Click t-Tests & Procedures (found at the left side)
3. Click Two-Sample t-Test for Independent or Correlated Samples
4. Click Independent Samples
5. Copy Scores of Male students and Paste in Sample A Box (or read the procedures below).
6. Copy Scores of Female students and Paste in Sample B Box.
7. Click Calculate. Results will be reflected as shown below.

Read these procedures

Mean (Male)

Mean (Female)

Computed t-value

p-value (tw0-tailed)

In this online calculator, the tabular t-value is not reflected (but you can refer to the t-distribution table). Hence,
you will be using the p-value to decide whether to reject or fail to reject the null hypothesis.
6

Method 4: Another Online Calculator


Link: https://www.socscistatistics.com/tests/studentttest/default.aspx

Steps:
1. Copy and paste the link.
2. Click T-Test Calculator.
3. Input data of male students (or copy and paste).
4. Input data of female students.
5. Click 0.05 (if level of significance is 5%).
6. Click Two-tailed.
7. Click Calculate T and P Values.
7

These will be reflected after clicking clicking Calculate T and P Values.

Mean (Male)

Variance (Male)

Mean (Female)

Variance (Female)

Computed t-value

Disregard the negative sign. Computed t-value p-value


8

FINAL TABLE AND DISCUSSION

Using results from Data Analysis ToolPak (Method 2)

Male Students
n1 = 14
= 87.29
s12 = 17.60
s1 = 4.20 (square root of 17.60)
Female Students
n2 = 14
= 87.64
2
s2 = 11.94
s2 = 3.46 (square root of 11.94)
Computed Value
Computed t = -0.246 (or 0.246)
p-value = 0.808
Critical or Tabular t = 2.056

Using Computed t-value and Tabular or Critical t-value

Table 2
Analysis Table of the Mean Scores of the Students in Business Economics
n = 28
5% Respondent Compute Critica level
of
s s n d t lt Decision Remark
4.2
Male 87.29 0 14 0.246 2.056 Fail to reject Ho Not significant
3.4
Female 87.64 6 14
significance and 26 degrees of freedom

Discussion:

Table 2 presents the mean scores of the students in Business Economics subject. It is reflected that the
mean score of the female students (87.64) is numerically higher than the mean score of the male students
(87.28). To test the data statistically, t-test for comparing two means is applied. It is shown that the computed t-
value (0.246) is less than the tabular or critical t-value (2.056). At 5% level of significance and 26 degrees of
freedom, the null hypoyhesis is not rejected. This means that the data are not sufficient to conclude that there is
a significant difference between their means. This result may suggest that the mean achievements of the female
and male students are just the same.
9

Using p-value and level of significance

Table 2
Analysis Table of the Mean Scores of the Students in Business Economics
n = 28
Computed Critical p-
Respondents s n t t value Decision Remark
Male 87.29 4.20 14 0.246 2.056 0.808 Fail to reject Ho Not significant
Female 87.64 3.46 14
Level of significance = 0.05; df = 26

Discussion:

Table 2 presents the mean scores of the students in Business Economics subject. It is reflected that the
mean score of the female students (87.64) is numerically higher than the mean score of the male students
(87.28). To test the data statistically, t-test for comparing two means is applied. It is shown that the p-value
(0.808) is greater than the level of significance (0.05). Thus, the null hypoyhesis is not rejected. This means that
the data are not sufficient to conclude that there is a significant difference between their means. This result may
suggest that the mean achievements of the female and male students are just the same.

Recall Decision Rules in Rejecting the Null Hypothesis

Using the computed value and tabular/critical value


If computed value > tabular value --- reject Ho and accept Ha
If computed value < tabular value --- do not reject Ho or fail to reject Ho

Using the p-value and level of significance


If p-value < level of significance (α) --- reject Ho and accept Ha
If p-value > level of significance (α --- do not reject Ho or fail to reject Ho
10

Name: __________________________ Score:_________________________

Activity# 15
t-test for Comparing Two Sample Means (Independent or Uncorrelated Data)

Problem:
A personality test was administered to 15 male employees and 11 female employees in a private company.
Test whether the male employees differed in their personality from that of the female employees. Higher scores
indicate higher personality traits. (Assume all assumptions are met.)

Data:

No. Male Female


Employees Employees
1. 11 17
2. 16 19
3. 16 22
4. 19 24
5. 20 27
6. 20 25
7. 20 26
8. 21 29
9. 23 32
10. 24 35
11. 26 36
12. 27
13. 28
14. 30
15. 32
Solution:
1. Ho: ______________________________________________________________________________________
_______________________________________________________________________________________
(μ 1 = μ 2)
Ha : ______________________________________________________________________________________
_______________________________________________________________________________________
(μ 1 ≠ μ 2) non directional test, two tailed test

2. α = 0.05 (use 0.05 if it’s not emphasized in the problem)

3. use t-test for comparing two sample means (< 30).

4. df = n1 + n2 – 2 = ___________________ = ______

Tabular or critical t-value = ______ (from the t-distribution Table or this can be seen in the output if you are using
Data Analysis ToolPak)
5. Computation:

Use Data Analysis ToolPak in getting the mean, standard deviation, t-value and p-value.
Male Employees

1 = ______

s1 = ______

Female Employees
2 = ______
s2 = ______

t-value = ______
p-value = ______
11

FINAL TABLE AND DISCUSSION

Using the p-value and level of significance

Table 1
Analysis Table of the Mean Scores of the Boys and Girls in a Personality Test
n = _________

Computed Critical p-value


Respondents t t Decision Remark
s n

Boys

Girls
Level of significance = 0.05; df = ________________

Discussion:

_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
_________________________________________________________________________________________
t-test for Independent Data

You might also like