**TWO-SAMPLE t-TEST or INDEPENDENT SAMPLE t-TEST**

**INTRODUCTION**

The two-sample (independent groups) t-test is used to determine whether means of two populations are different from each other based on independent samples selected from each population. Depending on the design of the study, we may decide to perform a one- or two-tailed test.

**Hypotheses for a Two-Sample ***t***-Test**

There are two populations and we are interested in testing the equality of two population means (μ_{1} and μ_{2}). The hypotheses for the comparison of the means in a two-sample *t-*test are as follows:

Null hypothesis-*H*_{0}: μ_{1} = μ_{2} (the population means of the two groups are the same).

Alternative Hypothesis- *H*_{1}: μ_{1} ≠ μ_{2} (the population means of the two groups are different).

**Hypotheses for a ****One-Tailed Tests**

If the purpose of the experiment is to test whether one population mean is larger or smaller than the other, we may choose to perform a one-tailed t-test. The hypotheses in this case are as follows:

Null hypothesis-*H*_{0}: μ_{1} = μ_{2} (the population means of the two groups are the same).

Alternative Hypothesis- *H _{1}*: μ

_{2}> or (<) μ

_{1}

**CASE ANALYSIS****-1**

** ****PROBLEM**

A test is conducted to compare the results of graduation students of two colleges X and Y. A random sample of 16 students of X and 18 students of Y were selected and a test is conducted on them .The marks of selected students are as follows.

**Table-1:** Sample Data

The hypotheses for the analysis are:

Null hypothesis-H_{0}: The students of the colleges X and Y perform equally. (μ_{1} = μ_{2})

Alternative Hypothesis- H_{1}: The average performances of the students of two colleges are not equal. (μ_{1} ≠ μ_{2})

**Input Data**

The data so collected encompass two variables: first variable: – College Name (X, Y) and the second variable: Mark. The test variable is the mark and it is numeric data. The college is a group variable or coded variable. (Code = 1 for college X and code = 2 for college Y). The following table serves as the input data for the analysis.

**Table-2:** Input Data

**Performing the Analysis with SPSS**

For SPSS Version 11, click on **Analyze ⇒ ****Compare Means ⇒ Independent-Samples T test. **

This will bring up the SPSS screen dialogue box as shown below.

After clicking **Independent-Samples T test, **this will bring up the SPSS screen dialogue box as shown below.

Select the test variable and move it to **Test Variable(s) **box.

Define the range of values of the grouping variable by clicking on **Define** **Groups** just below the grouping variable box. This will bring up the **dialogue box** shown below.

Group variable (College) is defined with the value 1 for college X and 2 for the college Y. Now click **Continue **to return the main dialogue box**. **This will bring **Independent-Samples T Test** **dialogue** box as shown below.

Finally click OK.

**SPSS Output**

The SPSS outputs of the analysis are given in the following tables.

**T-Test**

The table tells that the average mark of 16 students of college X is 63 and those of 18 students of college Y is 61.9444.

**From the output, ****t ****= .195 with 27.839 degrees of freedom.**

**DECISION**

Reject the null hypothesis if Sig. (2-tailed) ≤ 0.05

**INTERPRETATION**

The p-value is 0.847 and it is more than 0.05 (**5% level of significance**), so we accept the null hypothesis and reject the alternative hypothesis at 5% level of significance. It is concluded that the average marks of the students of two colleges are equal.

**CASE ANALYSIS-2 **

**PROBLEM**

A study is carried out to examine whether the average number of credit cards issued per month by the bank A is more than the bank B. The data of number of credit cards issued per month by the banks A and B are recorded over ten months period are as follows.

**Table-1:** Sample data

Null hypothesis-H_{0}: The average number of credit cards issued by two banks A and B are equal. (μ_{1} = μ_{2)}

Alternative Hypothesis- H_{1}: The average number of credit cards issued by bank A is more than bank B. (μ_{1} > μ_{2})

**SPSS Outputs **

The outputs are projected in tabular form as shown below.

**Table-2:** Group Statistics

**Table-3:** Independent Samples Test

**From the output, t = -0.532 with 17.658 degrees of freedom.**

**DECISION**

Reject the null hypothesis if p-value (Sig. (2-tailed)) ≤ 0.05

The p-value for one-tailed test would be (Sig. (2-tailed))/2.

**INTERPRETATION**

The p-value is (Sig. (2-tailed))/2 = 0.602/2 = 0.301 and it is more than 0.05 (**5% level of significance**), so we accept the null hypothesis and reject the alternative hypothesis at 5% level of significance. Therefore it is concluded that the average number of credit cards issued by bank A is not more than bank B.

**SPSS Command**

- Click on ANALYZE at the SPSS menu bar (in older versions of SPSS, click on STATISTICS instead of ANALYZE).
- Click on COMPARE MEANS followed by INDEPENDENT SAMPLES T TEST.
- Select the test variable and move it TEST VARIABLE(S) box. Then select the grouping variable and move it to GROUPING VARIABLE box. Define range and fill it with the appropriate code and click CONTINUE.
- Select OK of the main dialogue box.