26
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: H 0 : u 1 = u 2 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: H a : u 1 ≠ u 2 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 independent- samples 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

Independent t Test

Embed Size (px)

DESCRIPTION

statistic

Citation preview

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 independent-samples 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-test1) 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.StudentWeight in kg (Male)Weight in kg (Female)Height in cm (Male)Height in cm (Female)

19457178160

29749178155

37046175165

46558175160

57855174160

67355173164

76443171158

86060169152

97753168161

107348177156

CALCULATION USING MANUAL METHOD

TABLE 1 (WEIGHT FOR MALE AND FEMALE STUDENT)MALE STUDENTWEIGHT (X1)FEMALE STUDENTWEIGHT (X2)

194357.2115721.16

297479.6124911.56

37026.0134640.96

465102.0145831.36

5788.415556.76

6734.416556.76

764123.2174388.36

860288.0186057.76

9773.619530.36

10734.41104819.36

TOTAL7511396.9524284.4

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= = = 75.1

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

Standard deviation for weight of male student= = =12.458

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

Mean weight for Female student = ==52.4

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

Standard deviation for Weight of female student=

= =5.6216th step: define the t value based on t-value formulation and compare with the critical valuet value = = == 5.35 , critical value = 2.10

df= 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-criticalSo, 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 STUDENTHEIGHT (X1)FEMALE STUDENTHEIGHT (X2)

117816.8111600.81

217816.81215516.81

31751.21316534.81

41751.2141600.81

51740.0151600.81

61730.81616424.01

71718.4171581.21

816924.01815250.41

916834.8191613.61

101779.61101569.61

TOTAL1738113.71751142.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 = = = 173.9

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

Standard Deviation For The Height Of Male Student=

==3.55

4nd step: define the mean height for female student

mean of high forfemale student= = = 159.1

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

= =3.98

6th step: define the t value based on t-value formulation and compare with the critical valuet value = = == 8.77 , critical value = 2.101

df= 20-2= 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-criticalSo, 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. TheIndependentSamplesTTestwindowopenswherewespecifythevariablestobe usedintheanalysis.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:

GroupingVariableorTestVariable(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.Group Statistics

GenderNMeanStd. DeviationStd. Error Mean

Height1.0010173.80003.552781.12349

2.0010159.10003.984691.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. TheIndependentSamplesTTestwindowopenswhereyouwillspecifythevariables tobe usedintheanalysis.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:

GroupingVariableorTestVariable(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

GenderNMeanStd. DeviationStd. Error Mean

Weight1.001075.100012.187883.85415

2.001052.40005.621391.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.