You are on page 1of 46

Independent t-Test and

Mann Whitney U Test

Dr. Edna t. Salva


Independent t-Test
• The independent t-test compares the means between two
unrelated groups on the same continuous variable.

• For example, you could use an independent t-test to


understand whether first year graduate salaries differed
based on gender (your dependent variable would be “first
year graduate salaries” and your independent variable
would be “gender” which has two groups, “male” and
“female”.
Independent t-Test
• The independent t-test compares the means between two
unrelated groups on the same continuous variable.

• Another example, you could use an independent t-test to


understand whether there is a difference in the “test
anxiety” based on educational level (your dependent
variable would be “test anxiety” and the independent
variable would be “educational level”, which has two
groups, “postgraduates” and “graduates”.
Independent t-Test and its
Assumptions
Assumption #1: Your dependent variable should be
measured on a continuous scale (i.e., it is measured at
the interval or ratio level).

Assumption #2: Your independent variable should


consist of two categorical, independent groups.

Assumption #3: You should have independence of


observations, which means that there is no relationship
between the observations in each group or between the
groups themselves.
Assumption #4: There should be no significant outliers.

Assumption #5: Your dependent variable should


be approximately normally distributed for each group
of the independent variable. 

Assumption #6: There needs to be homogeneity of


variances. 
You can check assumptions #4, #5 and
#6 using SPSS Statistics. Before doing
this, you should make sure that your
data meets assumptions #1, #2 and #3,
although you don't need SPSS Statistics
to do this.
When moving on to assumptions #4, #5 and
#6, I suggest testing them in this order
because it represents an order where, if a
violation to the assumption is not
correctable, you will no longer be able to
use an independent t-test (although you may
be able to run another statistical test on your
data instead).
Just remember that if you do not run the
statistical tests on these assumptions
correctly, the results you get when
running an independent t-test might not
be valid.
Independent t-Test
• The independent t-test is used to determine the likelihood
that two independent data samples came from populations
with identical means.

• If this were true, then the difference between the means


should equal zero. In this case, the null hypothesis would
indicate that the two means are equal.
Independent t-Test
Research Question:
Is there a significant difference in
the quiz scores between male and
female students?
Independent t-Test
What is the variable that divides the
the other variable into two groups?
Ho: the quiz scores of male students = the quiz scores of female students
H1: the quiz scores of male students ≠ the quiz scores of female students

Ho: There is no significant difference in the quiz scores


between male and female students.
H1: There is a significant difference in the quiz scores
between male and female students.
Independent t-Test

The dependent variable is the “quiz scores” and the


independent variable that divides the data into two
groups is the gender, “male” and “female”.
Independent t-Test
• Practice Hands-on: How to run an independent t-test
Male Quiz Scores Female Quiz Scores
using the SPSS Program? Students
Students
1 10 9 12
2 50 10 52
3 20 11 25
4 8 12 10
5 115 13 120
6 75 14 80
7 45 15 50
8 170 16 175
Independent t-Test
• Practice Hands-on: To run an independent t-test using the
SPSS Program:

 Encode the quiz scores of the eight male participants, and


the eight female students in the first column of the data
view.
 For the second column of the data view, encode 1 for the
male students, and encode 2 for the female students.
 The measure for quiz scores is scale, and nominal for gender.
Independent t-Test
• Practice Hands-on: To run an independent t-test using the
SPSS Program:

 In the Data View, click the Analyze menu, point to


Compare Means, and then click Independent Samples t-
Test.
Independent t-Test
• Practice Hands-on: To run an independent t-test using the
SPSS Program:
Independent t-Test
• Practice Hands-on: To run an independent t-test using the
SPSS Program:
Independent t-Test
• Practice Hands-on: To run an independent t-test using the
SPSS Program:

Click OK
Independent t-Test Outputs

The Group Statistics table provides useful descriptive statistics


for the two groups that you compared, including the mean and
the standard deviation.
Independent t-Test Outputs

The Independent Samples Test SPSS output for Levene's test for homogeneity of variances
shows a p-value of 0.959 which is greater than .05. This means that the quiz scores of male
and female students have equal variances (Assumptions 1, 2, 3, & 6 are met).
Independent t-Test Outputs

The test for normality as revealed by Kolmogorov-Smirnov p-value is greater than .05
which supports that the distribution is approximately normal.
Independent t-Test Outputs

The box plot shows that there are no significant outliers (Assumption 4, and 5 are met).
Independent t-Test Outputs

Research Question: Is there a significant difference in the quiz scores of male and female
students?

Answer: The mean difference in the quiz scores between male and female students was
-3.875. The value of t, which is -.136, was not statistically significant with a p-value of .
894 (p > .05). Therefore, we failed to reject the null hypothesis. It means that the means
score of male students are not significantly different from the mean scores of female
students.
Independent t-Test Outputs
Reporting the output of an independent t- test:

General:

This study found that quiz scores of male students had no statistical
significant difference (61.63 ± 56.64) compared to female quiz scores
(65.50± 57.540), t(14) = -.136 , p = 0.894.
Nonparametric Test:
Mann Whitney
U Test

DR. EDNA T. SALVA


How to perform a Mann Whitney U Test?

For instance you had performed a Science experiment to determine if there is a significant
difference in the growth of plants in the control group (without organic fertilizer) and in the
experimental group (with organic fertilizer). Each seedling was measured in centimeters after
two weeks.
The null hypothesis would be: There is no significant difference in the growth of plants in the
control group (without organic fertilizer) and in the experimental group (with organic fertilizer).

The alternative hypothesis would be: There is a significant difference in the growth of plants in
the control group (without organic fertilizer) and in the experimental group (with organic
fertilizer).
How to perform a Mann Whitney U Test?
• In SPSS, you need to encode the two data
variables: a continuous scale ‘growth in
plants’ which was measured in centimeters,
and a group (nominal) variable called
‘Treatment’. The Treatment is coded so that
‘1’ signifies the control group and ‘2’
signifies the experimental group.
How to perform a Mann Whitney U Test?
Plant No. Growth in cm Treatment Plant No. Growth in cm Treatment

1 4.50 1 13 5.50 2
2 3.40 1 14 5.24 2
3 5.60 1 15 5.49 2
4 3.30 1 16 9.87 2
5 2.90 1 17 5.67 2
6 2.85 1 18 5.33 2
7 4.56 1 19 6.75 2
8 8.90 1 20 4.87 2
9 2.94 1 21 5.21 2
10 2.99 1 22 7.82 2
11 3.01 1 23 6.73 2
12 2.67 1 24 5.87 2
2. A new window will open. Here you need
to move the dependent variable (Growth in
Plants in cm in the example) into the window
called Test Variable List. Also, move the
variable containing information (Treatment
group) into the box titled Grouping Variable:
Click Run
Go to Output window in SPSS to view the results.
You should see one box under the Hypothesis
Test Summary.
Interpretation

• In this case, we are interested in a two-tailed


analysis, since we did not specify in our hypothesis
which group would be higher than the other.
Therefore, we look at the Sig. value which is .001.
Since .001 is less than our desired significance (p < .
05), we reject the null the hypothesis as also,
indicated by the decision in the output.
Reporting

When reporting data that is not normally distributed,


it is more appropriate to quote the group median
and the quartile range (25th and 75th percentiles), as
opposed to the mean and the standard deviation.
This is because the data in the groups are skewed, so
reporting the mean would be misinformative.
2. In the new Explore window, move the dependent variable (Growth in
plants) into the Dependent List box and the grouping variable
(Treatment group) into the Factor List box. This is telling SPSS to give us
the descriptive statistics for the Growth in plants and to separate the
outputs by the treatment group:
3. While still in the Explore window, click the Statistics… button.
You want to tick the Percentiles option.
4. Then click the Continue window, click the Statistics… button. You
want to tick the Percentiles button and next the OK button in the original
Explore window to run the command.
5. Now if you go to SPSS output window, you will see the multiple boxes of descriptive
statistics. Scroll down to the one with the heading Percentiles.
5. Now if you go to SPSS output window, you will see the multiple boxes of descriptive
statistics. Scroll down to the one with the heading Percentiles.
We could write:

The growth in plants which was treated with organic


fertilizer (median: 5.58; Q1: 5.26 - Q3: 6.74 cm) had
significantly higher growth compared to those plants in the
control group (median: 3.16; Q1: 2.91 – Q3: 4.54 cm) (U =
22; p= .001).

You might also like