Vous êtes sur la page 1sur 22

Introduction

The independent t-test, also called the two sample t-test or student's t-test, is an inferential
statistical test that determines whether there is a statistically significant difference between the
means in two unrelated groups. The null hypothesis for the independent t-test is that the
population means from the two unrelated groups are equal:
H0: u1 = u2
In most cases, we are looking to see if we can show that we can reject the null hypothesis and
accept the alternative hypothesis, which is that the population means are not equal:
Ha: u1 u2
To do this, we need to set a significance level (alpha) that allows us to either reject or
accept the alternative hypothesis. Most commonly, this value is set at 0.05. With an independentsamples t test, each case must have scores on two variables, the grouping (independent) variable
and the test (dependent) variable. The grouping variable divides cases into two mutually
exclusive groups or categories, such as boys or girls for the grouping variable gender, while the
test variable describes each case on some quantitative dimension such as test performance. The t
test evaluates whether the mean value of the test variable (e.g., test performance) for one group
(e.g., boys) differs significantly from the mean value of the test variable for the second group
(e.g., girls).
Assumptions underlying the Independent samples t-test
1) The data (scores) are independent of each other (that is, scores of one participant are not
systematically related to scores of the other participants). This is commonly referred to as the
assumption of independence.
2) The test (dependent) variable is normally distributed within each of the two populations (as
defined by the grouping variable). This is commonly referred to as the assumption of
normality.

3) The variances of the test (dependent) variable in the two populations are equal.

We collect actual data from the samples of 20 students in Library Tunku Tun Aminah. The data
collected by using a simple demographic form.
Student
1
2
3
4
5
6
7
8
9
10

Weight in kg
(Male)
94
97
70
65
78
73
64
60
77
73

Weight in kg
(Female)
57
49
46
58
55
55
43
60
53
48

Height in cm
(Male)
178
178
175
175
174
173
171
169
168
177

Height in cm
(Female)
160
155
165
160
160
164
158
152
161
156

CALCULATION
USING
MANUAL METHOD

TABLE 1 (WEIGHT FOR MALE AND FEMALE STUDENT)


MALE
STUDEN
T
1
2
3
4
5
6
7
8
9
10
TOTAL

X 1X

WEIGHT
(X1)
94
97
70
65
78
73
64
60
77
73
751

FEMALE
STUDENT

357.21
479.61
26.01
102.01
8.41
4.41
123.21
288.01
3.61
4.41
1396.9

1
2
3
4
5
6
7
8
9
10

1st step: define the null hypothesis and alternative hypothesis.


Ho = Mean weight of male and female student are equal.
Ha = Mean weight of male and female student are not equal.

2nd step: define the mean weight for male student

Mean weight for male student=

total weight for male student


number of male student
751
10

= 75.1

WEIGHT
(X2)
57
49
46
58
55
55
43
60
53
48
524

X 2 X

21.16
11.56
40.96
31.36
6.76
6.76
88.36
57.76
0.36
19.36
284.4

3rd step: define the standard deviation for weight of male student

Standard deviation for

weight of male student

X 1X

( 9475.1 ) + ( 9775.1 ) + ( 7075.1 )


2
2
+ ( 6575.1 ) + (7875.1 ) + ( 7375.1 )2 + ( 6475.1 )2 + ( 6075.1 )2+ ( 7775.1 )2+ ( 7375.1 )2
101
=12.458

4th step: define the mean weight for the female student

Mean weight for


Female student

Total Weight For Female Student


Number Of Female Student

524
10

=52.4

5th step: define the standard deviation for weight of the female student

Standard deviation for

Weight of female student

X 2 X

( 5752.4 )2 + ( 4952.4 )2+ ( 4652.4 )2


2
2
+ ( 5852.4 ) + ( 5552.4 )
2
2
2
+ ( 5552.4 ) + ( 4352.4 ) + ( 6052.4 )
+ ( 5352.4 )2+ ( 4852.4 )2
101

=5.621
6th step: define the t value based on t-value formulation and compare with the critical
value
X BA R 1

t value =

X 2

var 1 var 2
+
n1
n2

75.152.4
=

12.1882 5.6212
+
10
10

22.7
= 4.244
= 5.35

df

critical value = 2.10

= 20-2

= 0.05

= 18

7th step:do the conclusion whether accept Ho or reject Ho based on the value of t-value and
t-critical.
t-value> t-critical
So, the different between the means for the two groups is statistically significant makes the Ho of
this test is rejected.As a conclusion, the mean weight of male and female student are not equal.

TABLE 2 ( HEIGHT FOR MALE AND FEMALE STUDENT)


MALE
STUDEN
T

HEIGHT
(X1)

X 1X

FEMALE
STUDEN
T

HEIGHT
(X2)

X 2 X

1
2
3
4
5
6
7
8
9
10
TOTAL

178
178
175
175
174
173
171
169
168
177
1738

16.81
16.81
1.21
1.21
0.01
0.81
8.41
24.01
34.81
9.61
113.7

1
2
3
4
5
6
7
8
9
10

160
155
165
160
160
164
158
152
161
156
1751

0.81
16.81
34.81
0.81
0.81
24.01
1.21
50.41
3.61
9.61
142.9

1st step: define the null hypothesis and alternative hypothesis.


Ho = Mean height of male and female student are equal.
Ha = Mean height of male and female student are not equal.
2nd step: define the mean height for male student

Mean of Height For Male Student

total high for male student


number of male student

1739
10

173.9

3rd step: define the standard deviation for height of male student

Standard Deviation For

The Height Of Male Student

X 1X

( 178173.9 )2+ (178173.9 )2 + ( 175173.9 )2 + ( 175173.9 )2+ (174173.9 )2 + ( 173173.9 )2 + ( 171173.9 )2


2
+ ( 168173.9 )
2
+ ( 17775.1 )
101

=3.55

4nd step: define the mean height for female student

mean of high for


female student

total high for female student


number of female student

=
=

1591
10

159.1

5th step: define the standard deviation for height of the female student
Standard Deviation For The

Height of Female Student

X 1X

( 160159.1 )2+ ( 155159.1 )2+ (165159.1 )2+ ( 160159.1 )2 + ( 160159.1 )2


2
2
2
2
+ ( 164159.1 ) + ( 158159.1 ) + ( 152159.1 ) + ( 161159.1 )
2
+ ( 156159.1 )
101

=3.98

6th step: define the t value based on t-value formulation and compare with the critical
value
X 1
t value =

X 2

var 1 var 2
+
n1
n2

173.9159.1
=

3.552 3.892
+
10
10

14.8
= 1.68
= 8.77

df

= 20-2

critical value = 2.101

= 0.05

= 18

7th step: do the conclusions whether accept Ho or reject Ho based on the value of t-value and
t-critical.
t-value> t-critical
So, the different between the means of height for the two groups is statistically significant. As a
conclusion, the Ho will be rejected. As a conclusion, the mean height of male and female student
are not equal.

CALCULATION
USING SPSS SOFTWARE

1. In the sample data, we use two variables: Gender and Height. The variable Gender has
values of either "1" or "2" which correspond to male and female, respectively. The
variable Gender will serve as our grouping variable and will function as the independent
variable in the Independent Samples t Test. The variable Height is a continuous measure
of height in cm and exhibits a range of values from 156 cm to 178 cm. In SPSS, the data
look like this:

2. To run the Independent Samples t Test, click Analyze> Compare Means> Independent
Samples T Test. Move the variable Gender to the Grouping Variable field, and move
the variable Height to the Test Variable (s) area. Now Gender is defined as the
independent variable and Height is defined as the dependent variable.

3. The IndependentSamples T Test window opens where we specify the variables to be


used in the analysis. All of the variables in our dataset appear in the list on the left side.
4. Move variables to the right by selecting them in the list and clicking the blue arrow
buttons. We can move a variable (s) to either of two areas:
Grouping Variable or Test Variable(s)

5. Click Define Groups, which opens a new window. Use specified values are selected by
default. Type "1" in the first text box, and "2" in the second text box; this indicates
that we will compare groups 1 and 2, which correspond to males and females,
respectively.

6. Clicking Options will open a window where we can specify the Confidence Interval
Percentage and how the analysis will address Missing Values (i.e., Exclude cases analysis
by analysis or Exclude cases list wise). Click Continue when finished making
specifications.

7. Click Continue. Click OK to run the Independent Samples t Test. Output for the analysis
will display in the Output Viewer. Two sections (boxes) appear in the output: Group
Statistics and Independent Samples Test. The first section, Group Statistics, provides
basic information about the group comparisons, including the sample size (n), mean,
standard deviation, and standard error mean for height separately for each sex, male
and female. In this example, there are 10 males and females 10. The mean height for
males is 173.8 cm, and the mean height for females is 159.1 cm.

Gender
Height

1.00
2.00

Group Statistics
N
Mean
Std.
Deviation
10 173.8000
3.55278
10 159.1000
3.98469

Std. Error
Mean
1.12349
1.26007

8. The second section, Independent Samples Test, displays the results most relevant to the
Independent Samples t Test.

9. T-test for Equality of Means: This area provides the actual t test statistic and significance.
In this example (assuming equal variance, male female T-test for Equality of Means: This
area provides the actual t test statistic and significance. In this example (assuming equal
variance, and thus using the first row in the table), t = 8.709. Note that t is calculated by
dividing the mean difference by the standard error difference.

10. The associated p value is .000 (2tailed test). Since p = .000, we can reject the null
hypothesis; the mean heights for males and females are the same and conclude that there
is a significant difference in mean heights for males and females.
Based on the results, we can state the following:
The average height for men is about 15 cm taller than the average height for women.
There is a significant difference in mean heights between females and males
(p = .000)

11. In the sample data, we use two variables: Gender and Weight. The variable Gender has
values of either "1" or "2" which correspond to male and female, respectively. The
variable Gender will serve as our grouping variable and will function as the independent
variable in the Independent Samples t Test. The variable Weight is a continuous measure
of weight in kg and exhibits a range of values from 43 kg to 94 kg (Analyze> Descriptive

Statistics> Descriptive). The variable Height will serve as the dependent variable. In
SPSS, the data look like this:

12. To run the Independent Samples t Test, click Analyze> Compare Means> Independent
Samples T Test. Move the variable Gender to the Grouping Variable field, and move
the variable Weight to the Test Variable (s) area. Now Gender is defined as the
independent variable and Weight is defined as the dependent variable.

13. The IndependentSamples T Test window opens where you will specify the variables to be
used in the analysis. All of the variables in your dataset appear in the list on the left side.
14. Move variables to the right by selecting them in the list and clicking the blue arrow
buttons. You can move a variable (s) to either of two areas:

Grouping Variable or Test Variable(s)

15. Click Define Groups, which opens a new window. Use specified values is selected by
default. Type "1" in the first text box, and "2" in the second text box; this indicates
that we will compare groups 1 and 2, which correspond to males and females,
respectively.

16. Clicking Options will open a window where you can specify the Confidence Interval
Percentage and how the analysis will address Missing Values (i.e., Exclude cases analysis
by analysis or Exclude cases list wise). Click Continue when you are finished making
specifications.

17. Click Continue. Click OK to run the Independent Samples t Test. Output for the analysis
will display in the Output Viewer. Two sections (boxes) appear in the output: Group
Statistics and Independent Samples Test. The first section, Group Statistics, provides
basic information about the group comparisons, including the sample size (n), mean,
standard deviation, and standard error mean for weight separately for each sex, male
and female. In this example, there are 10 males and 10 females. The mean weight for
males is 75.1 kg, and the mean weight for females is 52.4 kg.
Group Statistics
Gender
Weight

Mean

Std. Deviation

Std. Error Mean

1.00

10

75.1000

12.18788

3.85415

2.00

10

52.4000

5.62139

1.77764

18. The second section, Independent Samples Test, displays the results most relevant to the
Independent Samples t Test.

19. T-test for Equality of Means: This area provides the actual t test statistic and significance.
In this example (assuming equal variance, male female T-test for Equality of Means: This
area provides the actual t test statistic and significance. In this example (assuming equal
variance, and thus using the first row in the table), t = 5.348. Note that t is calculated by
dividing the mean difference by the standard error difference.

20. The associated p value is .000 (2tailed test). Since p = .000, we can reject the null
hypothesis that the mean weight for males and females are the same and conclude that
there is a significant difference in mean weight for males and females.
Based on the results, we can state the following:
The average height for men is about 23 kg weight than the average weight for women.
There is a significant difference in mean heights between females and males
(p = .000)

Conclusion
From the study, we can conclude that the result of using manual method is similar to the result
using SPSS analysis. By using manual method, in the case of comparing weight between two
groups we got t-value equals to 5.35 and critical value is 2.10 with df=18 (considering the alpha
value = 0.05). Since t-value is greater than t-critical, null hypothesis is rejected. Therefore, the
mean weight between male and female is not equal. The same goes to the case of comparing
height in which t-value is 8.77 and critical value is 2.10 with df=18 (considering alpha value =
0.05). So, null hypothesis is rejected and the mean height between male and female is
significantly different. All these values are supported by SPSS analysis which produce almost the

same result with manual calculation. Thus, we conclude that both method are valid and reliable
in calculating t-test(independent) and our objective was fullfiled.

Vous aimerez peut-être aussi