0% found this document useful (0 votes)
217 views

Module 8 Inferential Statistics NonParametric Test

This document provides an overview of nonparametric tests and how to perform chi-square tests using SPSS. Nonparametric tests do not require normal distributions and can be used when data is ordinal or nominal. The chi-square test can test for differences between observed and expected frequencies or independence between two categorical variables. Steps for performing a chi-square test of goodness-of-fit and independence in SPSS are outlined.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
217 views

Module 8 Inferential Statistics NonParametric Test

This document provides an overview of nonparametric tests and how to perform chi-square tests using SPSS. Nonparametric tests do not require normal distributions and can be used when data is ordinal or nominal. The chi-square test can test for differences between observed and expected frequencies or independence between two categorical variables. Steps for performing a chi-square test of goodness-of-fit and independence in SPSS are outlined.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 112

MODULE IN MATH 408 – DATA ANALYSIS

M ODULE 8 – INFERENTIAL STATISTICS


(NONPARAMETRIC TEST) WITH SPSS
APPLICATION

In this module, you will be learning about inferential statistics under the non-
parametric test. Non-parametric test is usually used to test the relationship between or among
variables or if there is a significant difference between or among variables if the distribution of
the gathered data is not normally distributed. In other words, nonparametric tests are tests that
do not required a normal distribution.

The difference between the parametric and non-parametric test is that in a


parametric test, many hypothesis tests rely on the assumption that the population follows a
normal distribution with parameters μ and σ but here in a nonparametric test, we do not have
this assumption. These nonparametric tests are useful when the data are strongly non-normal,
say the data is skewed to the right or skewed to the left, and resistant to transformation as what
we have stated in our previous statement.

Learning Objectives:

At the end of this module, the student should be able to:

1. Tell the different test statistics under the nonparametric test.


2. Apply the appropriate statistical tool of the nonparametric test.
3. Analyze the treated data with the use of different statistical tool of nonparametric test.

THE NONPARAMETRIC TEST

What is non-parametric test? Basically, the non-parametric test is a counterpart of the


parametric test. We used this test if the distribution of the data is not normal or the linearity
of data are not satisfied or there are extreme outliers in a group of data. Meaning this test do
not require a normal distribution. We could use this test if the data to be treated is nominal
and ordinal which we studied this kind of data in our past lesson.

What are the limitations of nonparametric test? The following are the limitations of the
nonparametric test.
1. Nonparametric tests are usually less powerful than corresponding tests
designed for use on data that come from a specific distribution. Thus, it is less likely to reject
the null hypothesis when it is false.
MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 1
MODULE IN MATH 408 – DATA ANALYSIS
2. Nonparametric tests often require modifying the hypotheses.
Nonparametric test is used when the distribution is abnormal that is when the skewness is
either positive or negative and the kurtosis is greater than or less than 0.265. It is also used
when the level of measurement is expressed in ordinal or nominal data.

Some of the most commonly used test statistics under the nonparametric test are as
follows:

1. The Chi-square test


2. Mann-Whitney U Test
3. The Wilcoxon Rank-Sum Test
4. The Kruskal-Wallis Test
5. The Spearman Rank Order Coefficient of Correlation
6. The Sign Test
7. The Friedman Test
8. The Mc Nemar’s Test
9. The Kendall’s Coefficient of Concordance

The Chi-Square Test

One of the most commonly used tests under nonparametric test is the “Chi-Square
Test” and it is denoted by the symbol  2 . It is used to test the significance for data presented
in frequencies or nominal forms. This is a test of difference between the observed and
expected frequencies. The chi-square is considered a unique test due to its function; test of
goodness-of-fit and test of independence.

i. Chi-square test of goodness-of-fit

The “Chi-square goodness-of-fit” test is a test of difference between the


observed frequencies and the expected frequencies. It is also called as one-sample test or on
variable test with two or more categories. In this test, the theory (expected) is compared with
the actual experiment (observed). The test of goodness-of-fit is used when ratio is employed.

The formula for the test of goodness-of-fit is given below:

While the degree of freedom is 𝑑𝑓 = 𝑛 − 1 , where n is the number of categories.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 2


MODULE IN MATH 408 – DATA ANALYSIS
Example:

The Manager of a certain Bookstore decided to find out whether the computer books
have an equal selling in a week. See the table below. Determine if there is a significant
difference in the number of Computer books sold in a week. Use the 0.05 level of significance.

Solution:

Problem: Is there any significant difference in the number of Computer books sold in
a week?

1. Hypotheses:

Ho: There is no significant difference in the number of Computer books sold in a


week.

Ha: There is a significant difference in the number of Computer books sold in a


week.

2. Level of Significance:

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 3


MODULE IN MATH 408 – DATA ANALYSIS
3. Statistical Computation:

4. Decision Rule:

If the computed chi-square is greater than the chi-square tabular value, reject the
null hypothesis.

5. Conclusion: Since the computed chi-square of 7.092 is less than the chi-square tabular
value of 9.49 at 0.05 level of significance with 4 degrees of freedom, the null hypothesis
will be accepted. Thus, there is no significant difference in the number of Computer books
sold in a week.

Chi-square Test of Goodness-of-fit using SPSS

How to do a Chi-square test of Goodness-of-fit in SPSS? If you have a licensed SPSS


software, it is easy for you as a researcher to use this (SPSS) and do the test statistics. In being
able to present on how to do this, our previous set of data will be used. We need to encode the data
in SPSS.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 4


MODULE IN MATH 408 – DATA ANALYSIS

Now, let’s use the SPSS to run the chi-square test for goodness of fit.

Step 1. On the menu bar, look for the “Analyze” and proceed to “Non-parametric Tests”,
then look the “Legacy Dialogs” and click the first item which is the “Chi-square”.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 5


MODULE IN MATH 408 – DATA ANALYSIS
Step 2. After clicking the “Chi-square” another dialog box will appear.

Transfer the data (from this example is the “Title of Computer Books”) into the “Test
Variable List” by clicking the arrow to the right.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 6


MODULE IN MATH 408 – DATA ANALYSIS
Here, by default, SPSS will assume that all categorical variables are equal in number.
Step 3. Click “ok” and the output window will pop up or it will appear.

Here in the output window, you could see the summary statistics. In test statistics, the
numerical values that you could see here are important numbers which are very important in
analyzing the data where you could report that the computed chi-square is 7.091 with a degree of
freedom of 4 and the p-value (Assymp. Sig.) of 0.131 is greater than the critical value of 0.05 thus,
there is no significant difference in the number of Computer books sold in a week.

2. The Chi-square Test of Independence

If we want to determine the association or the relationship between two categorical or


qualitative data in a single population, the chi-square test statistics can be employed specifically
the chi-square test for independence. The sample used in this test consists of members randomly
selected from the same population. Let us say in an election survey, voters might be classified by
sex (male or female) and voting preference (PDP Laban, UNO, or Liberal Party). If we want to
test if the sex is related to the voting preference of the voters, the chi-square test for independence
is more appropriate to use. In other words, this test could be used if you want to test whether the
two categorical variables are statistically significant or not to each other.

When to use the chi-square test for independence?

Before we use this test, we need to consider the following:

1. Simple Random Sampling must be done.


2. The variables under study must be categorical in nature.
MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 7
MODULE IN MATH 408 – DATA ANALYSIS
3. The sample data must be presented in a contingency table and the expected frequency
count for each cell of the table is at least five (5).

If we want to test if there is a significant relationship between the two variables, the chi-
square test of independence can be used.

How to use the chi-square test for independence?

The computation for the chi-square test for independence is similar to the test of goodness-
of-fit. The following steps will help us to be able to determine if the two variables have a significant
relationship.

1. State the problem.


2. State the null and alternative hypothesis
3. Set the level of significance and determine the degree of freedom, that is ∝ can be 0.01 or
0.05 and the formula for the df = (c-1)(r-1) where c is the number of columns and r is the number
of rows.
4. Determine the expected frequencies. The expected frequency counts are computed
separately for each level of one categorical variable at each level of the other categorical variable.

The formula is:

Where:
R is the row total
C is the column total
N is the grand total

5. Compute the chi-square statistics. The formula is:

Where: χ2 = chi-square test


O = observed frequency
E = expected frequency

5. Interpret the result whether you are going to accept or reject the null hypothesis using
the table for chi-square.

Decision Rule: If the computed chi-square is greater than the tabular value, reject the
null hypothesis and confirm the alternative hypothesis. With this, we can draw a conclusion for
variables under investigation.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 8


MODULE IN MATH 408 – DATA ANALYSIS
Example: The Samahan ng Edukador sa Estatistika – SEE surveyed 1,500 selected
registered voters nationwide and asked for their voting preference. The respondents were classified
by their sex (Male or Female) and their preference (PDP, UNO, LP). Results are shown below.

Test if there is a significant relationship between the respondents’ sex and their voting
preference. Use ∝ = 0.05 as level of significance.

Solving using the step-by-step method:

1. State the Problem: Is there a significant relationship between the respondents’ sex and
their voting preference?

2. State the Null and Alternative Hypothesis:

Ho: There is no significant relationship between the respondents’ sex and their voting
preference.

Ha: There is a significant relationship between the respondents’ sex and their voting
preference.

3. Level of Significance and Degree of Freedom

∝ = 0.05

df = (c -1)(r-1) = ( 3 – 1)(2 – 1) = 2

χ2 at 0.05 = 5.99 tabular value

4. Compute the Expected Frequencies

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 9


MODULE IN MATH 408 – DATA ANALYSIS
To solve the expected frequencies or values, take the product of the column total
and the row total and divide the product by the grand total.

5. Computation for Chi-Square

Decision Rule: If the computed chi-square is greater than the tabular value
rejects the null hypothesis and accepts the alternative hypothesis.

Analysis and Conclusion: Since the computed chi-square of 5.466 is less than
the tabular value of 5.99 with 0.05 levels of significance and df of 2, we are not going to reject
the null hypothesis thus there is no significant relationship between the respondents’ sex and their
MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 10
MODULE IN MATH 408 – DATA ANALYSIS
voting preference. This implies that the respondent’s sex has no relationship on their voting
preference.

Example 2. A researcher surveyed 420 respondents if they are in favor or not in


the same sex marriage in the Philippines. He wants to determine if the response of the male
respondent has a significant relationship to the response of the female. The data is given below.

Test if there is a significant relationship between the respondents’ sex and their
voting preference. Use ∝ = 0.05 as level of significance.

1. State the Null and Alternative Hypothesis:

Ho : There is no significant difference between the respondents’ sex and their


favorable response in divorce.

Ha: There is significant difference between the respondents’ sex and their
favorable response in divorce.

2. Level of Significance and Degree of Freedom

∝ = 0.05 df = (c -1)(r-1) = ( 2 – 1)(2 – 1) = 1

χ2at 0.05 = 3.84 tabular value

Let us compute the expected value for each observed value.

(250)(95)
𝐸45 = 420
= 56.55

(170)(95)
𝐸50 = = 38.45
420

(250)(325)
𝐸205 = = 193.45
420

(170)(325)
𝐸120 = = 131.55
420

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 11


MODULE IN MATH 408 – DATA ANALYSIS

3. Computation for Chi-Square

4. Decision Rule:

If the computed chi-square is greater than the tabular value rejects the null hypothesis and
accepts the alternative hypothesis.

5. Analysis and Conclusion:

Since the computed chi-square of 7.53 is greater than the tabular value of 3.84 with 0.05
levels of significance and df of 1, reject the null hypothesis and accept the alternative hypothesis.
This implies that the respondent’s sex has a significant difference on the favorable response
whether they are in favor or not in favor to divorce.

Chi-square Test of Independence using SPSS

In doing the chi-square test of independence in SPSS, it is quite different from the chi-square
test of goodness-of-fit. Assuming that we already encoded our needed data.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 12


MODULE IN MATH 408 – DATA ANALYSIS

Note that our data view is not complete due to a large


number of observations.

To show this on how to treat the two groups of data in both categorical variables, we will be
using our previous data on the first example under this statistics test and it needs to follow these
steps.

Step 1. In the menu bar of SPSS, look at “Analyze”, then “Descriptive Statistics” and
proceed to “Crosstabs”.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 13


MODULE IN MATH 408 – DATA ANALYSIS
Step 2. Once you click the “Crosstabs”, a dialog box appears.

Transfer your data in a “Row(s)” box and in a “Column(s)” box. In our previous example
on this test statistics, the row data is “Sex” while the column data is the “Voting Preferences”. So,
highlight each categorical variable and place it in an appropriate box with the use of an arrow to
the right.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 14


MODULE IN MATH 408 – DATA ANALYSIS
Step 3. Other information that we need is the test statistics, so we need to click the
“Statistics” button and another dialog box will appear. Here, we need to check the “Chi-square”
and the “Phi and Cramer’s V” in order to determine the strength of the relationship. After this, you
need to click continue and it will go back to the original dialog box (crosstabs).

Step 4. Once you return to the original dialog box, you need to click the “cell” in order to
proceed to another dialog box which is “Crosstabs: Cell Display”. On this dialog box, the default
count is “observed” so we need to check the “expected” then click “continue”.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 15


MODULE IN MATH 408 – DATA ANALYSIS
Step 5. Once you click the “continue” you will return to the original dialog box. Here, you
need to click “ok”. With this action, the output window will appear.

In addition, a bar chart for this data will also appear. This graph could help you to picture
what really happened in our data and this could be additional information in analyzing the set of
data.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 16


MODULE IN MATH 408 – DATA ANALYSIS
Creating your report, you could use numerical information under “Chi-square Test”
specifically the result on the Pearson chi-square such as its value of chi-square, the degree of
freedom and the p-value. In this example, the computed chi-square is 5.465 with 2 as a degree of
freedom and the p-value is 0.065 where this value is greater than the level of significance of 0.05.
With this important information, we are not going to reject the null hypothesis thus there is no
significant relationship between the respondents’ sex and their voting preference. This implies that
the respondent’s sex has no relationship on their voting preference

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 17


MODULE IN MATH 408 – DATA ANALYSIS
SELF-ASSESSMENT ACTIVITY

Name: _________________________________________ Section: ____________

Date: _______________________________________ Rating: _____________

Practice Exercises
Chi-Square Goodness-of-Fit and Test of Independence

1. The Local Government Unit of a particular place in the Philippines wants to find out
whether the Covid vaccine has an equal rolling out in a week from Monday to Friday of one of the
Barangays in their place. See the table below. Determine if there is a significant difference in the
number of Covid vaccines rolled out in a week. Use the 0.05 level of significance.

2. A random sample of 100 students in the College of Informatics and Computing Sciences
are classified according to sex and asked their opinion if they are favor or not regarding the
implementation on the hair cut policy of the University. The following data were recorded:

Use chi-square test at 0.05 level of significance to test the null hypothesis that there is no
significant relationship between the opinion of male and female students on the implementation of
haircut policy in the University.

Note: Do this both manual computation and in using SPSS.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 18


MODULE IN MATH 408 – DATA ANALYSIS

MANN-WHITNEY U TEST

What is a Mann-Whitney U Test?

Another equally important test statistic in being able to analyze the data is the Mann-
Whitney U test. This test is also non-parametric or it is said to be that the distribution of data is
non normal or we are unable to assume the normality in both groups of variables. It is also known
as the Wilcoxon Rank Sum test and it is a counterpart or it can be used in place of an unpaired t-
test or F-test (ANOVA).

When do we use the Mann-Whitney U Test?

Basically, the Mann-Whitney U test is used to compare the distributions of scores on a


quantitative variable obtained from two independent groups, treatments or populations, and it
could also be used if the data is ordinal or ranked data and when the assumption of the t-test is not
satisfied. We could also use this test when we have a continuous level variable or in scale in SPSS
measured for all observations in two groups and we want to test if the distribution of this variable
is different in the two groups. Let us say group A and group B are two independent groups and we
need to test if these two groups are statistically different from each other. So, we could formulate
our null hypothesis as “There is no significant difference between the two groups”. For example,
the research problem would be: “Is there a difference in math anxiety scores between males and
females?” With this problem, we could formulate the null hypothesis or known as the Ho and this
is “There is no significant difference in the math anxiety scores between male and female”. It is
obvious that we have two independent groups; one is for the male group and the other one is the
female group.

How is the Mann-Whitney U test be Used?

In order to use this test, we need to know the formula for this statistical test. The
formula is illustrated below:

Where:
> U is the Mann-Whitney U (where this be computed separately for group 1 and 2)

> n is the number of observations in each group (the number of observations will be taken
separately say n1 and n2)

> Rank sum is the total rank for each group (where sum of the ranks for each group will be
determined separately, say RS1 and RS2)

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 19


MODULE IN MATH 408 – DATA ANALYSIS

So, in the previous formula for Mann-Whitney U test, this could be written as:

Example: A professor gave a final examination to his 20 students, 10 are male and the
remaining students are female. He wants to test if there is a difference in the performance of these
two groups of students. The professor used 0.05 as the level of significance under the two-tailed
test. The following scores are given below:

Research Problem: Is there any significant difference in the performance between male and
female?

Step 1: Stating the hypothesis

Ho: There is no significant difference in the performance between male and female.
Ha: There is a significant difference in the performance between male and female.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 20


MODULE IN MATH 408 – DATA ANALYSIS
Step 2: Determine the criterion

Level of significance: 0.05


Degree of freedom: n1 = 10 and n2 = 10
Critical Value at 0.05 (two-tailed test or non-directional test) = 23

Step 3: Decision Rule If the computed U is less than the U critical value, disconfirmed the
null hypothesis.

Note: The decision rule for this test is different from the previous decision where we reject
the Ho if the computed value is greater than the critical value. But in this test, if the computed
value is less than the U-critical value, we need to reject the null hypothesis.

Step 4: Test Statistics

a) Rank the score of students regardless the sex (in a group) from lowest to highest.
b) Make an additional column on the table to place the rank of the score of male and female.
c) Add the ranks for males and also add the ranks for females. d) Compute U for each of the
groups using the formula.

Note: In ranking, it is your choice if you want to rank from lowest to highest or from
highest to lowest.

Male Score Rank Female Score Rank


M1 90 19 F1 88 16.5
M2 89 18 F2 78 3
M3 86 14 F3 80 7
M4 88 16.5 F4 81 9
M5 78 3 F5 92 20
M6 86 14 F6 86 14
M7 80 7 F7 79 5
M8 82 10.5 F8 85 12
M9 73 1 F9 82 10.5
M10 78 3 F10 80 7
Sum of Rank(Male) 106 Sum of Rank(Female) 104

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 21


MODULE IN MATH 408 – DATA ANALYSIS

Computation:

Here, we need to choose a computed U that gives the smaller value. So, our U is 49.

Step 5: Analysis and Conclusion

Since the computed Ustat of 49 is greater than the U-critical value of 23 at 0.05 level of
significance, we do not reject the null hypothesis. Hence, there is no significant difference in the
performance between male and female.

Mann-Whitney U Test using SPSS

How does the Mann-Whitney U test can be used in SPSS? Just like on the previous statistical
test and if you are well versed in using the SPSS, analyzing the data set using this test would be
easy for you. But for those that could be considered as first time SPSS users, the following steps
would be a great help for you.

Of course, we need to have an encoded data set in the data view of SPSS. For discussion
purposes, the previous example would be used. Assuming that the data is already encoded in SPSS.
In doing this test, there are two ways that you could be applied. First is by treating the data and no
need to rank since SPSS will read the ranking and do the computation for you or second, you could
transform the data into rank and still you could get the same output.

Illustration:

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 22


MODULE IN MATH 408 – DATA ANALYSIS

Step 1. On the menu bar, look for “Analyze” then “Nonparametric Tests” proceed to
“Legacy Dialogs” and then click the “2 Independent Samples”.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 23


MODULE IN MATH 408 – DATA ANALYSIS

Step 2. Once you click the “2 Independent Samples”, another dialog box will appear.
Transfer the “Score” on the “Test Variable List” with the use of an arrow and the “Sex” on the
“Grouping Variable”. It is seen that the default is in the “Mann-Whitney U”. The “ok” button will
be available once you define the groups on your grouping variable. So, you need to define your
grouping variable, then click “ok”.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 24


MODULE IN MATH 408 – DATA ANALYSIS
Step 3. Once you click the “ok” button, an output view will appear.

You will notice here that the computed Mann-Whitney U which is 49.000 is the same as in
our previous illustration with the use of manual computation as well as the sum of the rank of
female group and the male group. At this point, we could analyze the data that the mean rank of
male and female is quite the same. In being able to prove that there will be no difference between
the mean rank of male and female is by the use of Asymp. Sig (2-tailed) that is equal to 0.939.
Since the p-value of 0.939 is greater than the level of significance of 0.05, we will not reject the
null hypothesis that is “There is no significant difference in the performance between male and
female”.

As what stated before, we could do another way in using this test by transforming the data
into rank. Let us do this with the use of SPSS. Here are the step-by-step procedure on how to do
this in SPSS.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 25


MODULE IN MATH 408 – DATA ANALYSIS
Step 1. First, transform the data into rank. On the menu bar, look for “Transform” and
proceed to “Rank Cases”.

Step 2. Click the “rank cases” and another dialog box will appear.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 26


MODULE IN MATH 408 – DATA ANALYSIS

Step 3. Since the data that we need to rank is the “score”, we will transfer it to the “variable/s
box” with the use of an arrow. On the “Assign Rank 1 to” it is your option to rank it from the
smallest value as your rank 1 or from the largest value. It doesn’t matter if you will rank it from
highest to lowest or on the other way around. Then click “ok”

Step 4. Once you click the “ok” button”, an output view will appear and you will notice that
there will be another column automatically added in the data view.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 27


MODULE IN MATH 408 – DATA ANALYSIS

Step 5: Now, if you want to test the data using the Mann-Whitney U, you will do the same
in our previous illustration but instead of using the “score” we will be using the “rank score”.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 28


MODULE IN MATH 408 – DATA ANALYSIS
Step 6: Then click “ok”. Once you click it, an output view will appear.

As you can see, it has same output.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 29


MODULE IN MATH 408 – DATA ANALYSIS

Name:_________________________________________ Section:_________________

Date:__________________________________________ Score:__________

Practice Exercises
Mann-Whitney U Test

The pharmaceutical company wants to determine if the two brands of COVID 19 vaccine
have an equal length of shelf life in terms of number of years and months. Ten samples for each
brand were examined. The data are as follows:

Based on the problem, determine the possible statement as your research problem and
formulate the null and alternative hypotheses. Test the hypothesis at 0.05 level of significance that
the two different brands of vaccine have an equal length of shelf life in terms of years and months.
Do both the manual computation and with the use of SPSS. Note: Use the space provided below
for your computation and analysis.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 30


MODULE IN MATH 408 – DATA ANALYSIS

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 31


MODULE IN MATH 408 – DATA ANALYSIS

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 32


MODULE IN MATH 408 – DATA ANALYSIS

The Kruskal-Wallis or H-test

What is Kruskal-Wallis Test?

The Kruskal-Wallis which is known as the H-test is another non-parametric test that can be
used to analyze the data. This was developed by Kruskal and Wallis, that is why the test was named
after them and it could be said a counterpart or an equivalent of a One-Way Analysis of Variance
in parametric tests meaning if we see that the distribution of data is normally distributed, it is better
to use the ANOVA since this test is more powerful compared to this test that we are talking to.

What are the uses of Kruskal-Wallis Test?

This statistical test is appropriate if the following conditions are met:

1. As stated previously, we only use this test if the distribution of the data to be treated is
not normal, otherwise it is better to use the F-test.

2. If we want to compare or test if there is a significant difference of three or more than three
groups.

3. The variances are not equal and the level of measurement of data is ordinal scale (rank
data).

Formula for Kruskal-Wallis Test

Where:

N is the total number of observations that was combined in all groups

Ri is the total rank of each group

Ni is the number of observations of each group

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 33


MODULE IN MATH 408 – DATA ANALYSIS
How do we perform the Kruskal-Wallis or H-test?

In order to perform and apply the formula, the step-by-step procedure is listed below.

Step 1: Rank the data. You can do the ranking from lowest to highest or from highest to
lowest and all of the data must be ranked regardless what group it belongs to. You have an option
when it comes to ranking the data.

Step 2: On the prepared table for your group of data, say you have three groups, meaning
there are three columns, four groups there will be four columns, etc., you will add a column to the
right of each column group so that you could place the assigned rank for each data in every group
column.

Step 3: Take the sum of the rank of the respective columns ranks of each group that will
serve as your ΣR1, ΣR2, ΣR3, …, Σ Rn.

Step 4: Substitute all the needed values in the formula.

Example: A teacher in Mathematics in the Modern World wants to determine if there is a


significant difference in the final grade of his students using the three different methods of
teaching, that is, Virtual/Online Teaching, Face-to-Face, and the Modular Learning Approach. He
uses the Kruskal-Wallis test with 0.05 levels of significance in order to test the null hypothesis that
their mean grades are not statistically significantly different. The data are as follows:

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 34


MODULE IN MATH 408 – DATA ANALYSIS
First, we need to rank the grade. (From lowest to highest)

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 35


MODULE IN MATH 408 – DATA ANALYSIS
Table:

Research Problem: Is there any significant difference in the mean grade of the students using
the three different methods of teaching?

Step 1: Formulate Hypotheses

Ho: There is no significant difference in the mean grade of the students using the three
different methods of teaching.
Ha: There is a significant difference in the mean grade of the students using the three
different methods of teaching.

Step 2: Criterion Level of Significance = 0.05 Degree of freedom = c - 1 = 3 - 1 = 2; where


c is the number of groups Critical Value (Use the chi-square table) = 5.991

Step 3: Decision: If the computed Kruskal-Wallis test or H is greater than the critical value,
reject the null hypothesis.

Step 4. Statistical Computation

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 36


MODULE IN MATH 408 – DATA ANALYSIS
Step 5. Analysis and Conclusion: Since the computed H-value of 9.096 is greater than the
critical value which is also a tabular value on chi-square of 5.991 with the degrees of freedom of
2 at 0.05 level of significance, we reject the null hypothesis in favor of the alternative hypothesis.
Therefore, there is a significant difference in the mean grade of the students using the three
different methods of teaching.

How do we use SPSS for the Kruskall-Wallis test?

Just like in our previous test statistics with the aid of SPSS, we must see to it that the data to
be treated is not normally distributed. In order to show how to use SPSS for this kind of test, these
are the following steps prior to treating the data using the H-test. Our assumption is that the data
is pre-encoded or there is data already encoded in the variable view of the SPSS.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 37


MODULE IN MATH 408 – DATA ANALYSIS
Step 1: On the main menu, look for “Analyze” and drop down to “Non-Parametric Test” and
proceed to “Legacy Dialog” then click the “K Independent Samples”.

Step 2: Click the “K Independent Samples”, and once you click this, another dialog box will
appear.

The test default of this dialog box is actually in Kruskal-Wallis H test.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 38


MODULE IN MATH 408 – DATA ANALYSIS
Step 3. Place the “Final Grade of Student” in the test variable and the “Methods of Teaching”
in the grouping variable by highlighting the data and with the use of an arrow. You may add
descriptive information by clicking the “option” button. Once you click this, you will see another
dialog box and you may click the “Descriptive” then click continue.

Step 4. If you click the continue button, you will go back to the previous dialog box. You
need to click the “Define Range” button since you will be declaring your three (3) grouping
variables and in this case the three different methods of teaching. Put 1 as the minimum and 3 as
the maximum. Then click continue.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 39


MODULE IN MATH 408 – DATA ANALYSIS
After clicking the “continue” button, you will see this dialog box below. On this dialog box
you will now click the “ok” button to proceed to the output view.

Step 5: Once you click “ok” an output window will now appear.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 40


MODULE IN MATH 408 – DATA ANALYSIS

Now, from here, we could do the analysis and draw the conclusion.

Analysis: The mean rank of the students’ final grade for the three different methods of
teaching such as virtual online, face to face and modular approach is 9.08, 15.08 and 4.33
respectively with the number of observations of 6 for each method. Since the p-value of 0.002 is
less than the level of significance of 0.05 with the degrees of freedom of 2 at 0.05 level of
significance, we reject the null hypothesis in favor of the alternative hypothesis.

Conclusion: Therefore, there is a significant difference in the mean grade of the students
using the three different methods of teaching.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 41


MODULE IN MATH 408 – DATA ANALYSIS

Name:____________________________________ Section:_________________

Date:_____________________________________ Score:__________

Practice Exercises
Kruskal-Wallis or H Test

Direction: Use the Kruskal-Wallis H test to solve the problem below. Initially, a farmer
planted an equal height of fruit bearing baby tree in a common quality of soil. He grouped the
plants into four groups where each group was treated by a fertilizer of different brands. Group A,
B, C, D plants are treated with brand A, B, C and D fertilizer respectively. After a month, the
farmer measures the height of the plants individually and the data are recorded below. All
measurements are in centimeters.

Test the hypothesis if there is a significant difference of the height of three treating different
kinds of fertilizers. Use 0.05 at level significance. Do this both with manual computation and with
the use of SPSS.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 42


MODULE IN MATH 408 – DATA ANALYSIS

Median Test Two-Sample Case or Sign Test for Two


Independent Samples

What is this test statistics all about?

This statistical test is another tool under the non-parametric test. The sign test for two
independent samples is also known as the median test of two sample cases. If in t-test, we compare
the mean of two groups, here in this test statistics, we basically compare the median of the two
independent samples or two independent groups in a categorical or numerical variable known as
the grouping variable. So, the counterpart of this test under parametric test is the student t-test or
simply t-test.

When do we use this test?

If we want to compare the median of two independent groups and the distribution of the data
on these groups are not normally distributed, this test is the appropriate statistical test to use. Also,
the data should be in a numerical data (interval and ratio scale) or in categorical scale (nominal
and ordinal scale) and an example is just like in the Likert-scale.

What is the formula for this test?

If you wish to test if there is a significant difference between the two independent groups or
if you want to know whether the median score of the first group, say group A is significantly
different or not with the second group, say group B, this test statistic is the appropriate test to use.
The formula for this test is given below.

Where;

𝑋2 Chi-square test
a = the number of positive observations in the first row
b = the number of negative observations in the first row
c = the number of positive observations in the second row
d = the number of negative observations in the second row
a+b = the row total on the first row
c+d = the row total on the second row
a+c = the column total on the first column
b+d = the column total on the second column
n = the grand total

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 43


MODULE IN MATH 408 – DATA ANALYSIS
Table: 2 x 2 Contingency Table

Example: A professor wants to know if there is a significant difference in the quiz


performance of the students between male and female in Data Analysis. The score of male and
female students are as follows:

SCORE
MALE FEMALE
6 10
4 8
3 10
6 5
5 7
3 9
5 5
8 6
4 8
3 2
5 8
7
7

The professor uses 0.05 as the level of significance.

But before we do the steps for hypothesis testing, the first thing we do is to arrange the data
(all scores) from lowest to highest and look for the median.

For this data, the median is 6. To translate each score whether it is positive or negative, if
the score is above the median, it is positive (+) but if the score is equal or below median, it is
negative (-).

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 44


MODULE IN MATH 408 – DATA ANALYSIS

SCORE SIGN
MALE FEMALE SIGN FOR MALE SIGN FOR FEMALE
6 10 - +
4 8 - +
3 10 - +
6 5 - -
5 7 - +
3 9 - +
5 5 - -
8 6 + -
4 8 - +
3 2 - -
5 8 - +
7 +
7 +

Let us now do the steps in hypothesis testing. The research problem would be, “Is there any
significant difference in the performance of male and female students in Data Analysis?”

Step 1: Formulate hypotheses

Ho: There is no significant difference in the quiz performance between male and female.
Ha: There is a significant difference in the quiz performance between male and female.

Step 2. Criterion

Level of significance = 0.05

Degree of freedom = (c -1)(r-1) = (2-1)(2-1) = 1

Critical Value (use the chi-square table) at 0.05 = 3.841

Step 3. Create a 2 x 2 Contingency Table

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 45


MODULE IN MATH 408 – DATA ANALYSIS
Step 4. Statistics

Step 5. Analysis and Conclusion Since the computed chi-square of 8.866 is greater than the
critical chi-square value of 3.841 at 0.05 level of significance with a degree of freedom of 1, we
have to reject the null hypothesis. Therefore, we could say that there is a significant difference in
the quiz performance of male and females in Data Analysis.

Median Test for Two-Sample Cases using SPSS

At this point, we will be using SPSS to test the hypothesis if the median of two independent
variables or groups is statistically significant or not. First, we need to encode all the data that are
necessary for the test. For presentation purposes, we will be using our previous hypothetical data
for this statistical test.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 46


MODULE IN MATH 408 – DATA ANALYSIS
Now, let us use SPSS in order to test the hypothesis. For this test, we will be having two
ways to determine if there is a significant difference between the two groups (median). Let us use
the first one.

Step 1. In the menu bar, place the cursor on “Analyze” and drop down to “Nonparametric
Tests”, then the “Legacy Dialogs” and proceed and click the “2 Independent Samples”.

Step 2. Once you click the “2 Independent Samples” another dialog box will appear. As you
see the dialog box, transfer “score” in the test variable list and the “sex” into grouping variable
and then define the range. But make it sure that you choose the “median” as the test type.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 47


MODULE IN MATH 408 – DATA ANALYSIS
Step 3. When you see another dialog box for the range for grouping variables, place the
proper code that you use for your group variable. For this example, the minimum is 1 for male and
2 for female, then click continue.

Step 4. After clicking on the “continue” button, it will return to the dialog box of “Test for
Several Independent Samples” and then click the ok button. Once you click it, the output view will
appear.

For this illustration, we can conclude that since the p-value of 0.005 is less than the level of
significance of 0.05, we will reject the null hypothesis in favor of the alternative hypothesis that
there is a significant difference between the score of males and females.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 48


MODULE IN MATH 408 – DATA ANALYSIS
Alternative:

Step 1. In the menu bar, place the cursor on “Analyze” and drop down to “Nonparametric
Tests”, and click the “Independent Samples”.

Step 2. As you click the “Independent Samples”, another dialog box appears and it will ask
you what is your objective? With this, you will click the button “Compare medians across groups”.
After clicking this, proceed to the “run” button and click this.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 49


MODULE IN MATH 408 – DATA ANALYSIS

Step 3. Highlight your data and transfer it to the appropriate box with the use of an arrow.
In this presentation, transfer the “sex” variable into groups while the “score in quiz” into the test
fields and then click the run button.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 50


MODULE IN MATH 408 – DATA ANALYSIS

Step 4. Once you click the run button, an output view will appear.

On this output view, we could now make our analysis and conclusion. Since the computed
chi-square (test statistic) of 8.866 with a median of 6 and degree of freedom of 1 where p-value of
0.005 is less than the level of significance of 0.05, we will reject the null hypothesis in favor of
the alternative hypothesis. This means that the performance of male and female in the quiz in Data
Analysis is statistically significant.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 51


MODULE IN MATH 408 – DATA ANALYSIS
Name:_________________________ Date:___________

Section:________________________ Score:__________

Practice Exercises
Median Test Two-Sample Case or Sign Test for Two Independent Samples

Directions: Use the sign test for two independent samples in this set of data both manual
computation and with the use of SPSS. Analyze and make a conclusion about it.

Determine whether there is a significant difference or not between the male and female
based on the given data below in the number of hours on the usage of social media in a
day. The data are as follows:

Number of Hours in a Day


Male Female
6.5 10.0
4.5 8.5
3.0 10.0
6.5 5.0
5.5 7.0
3.0 9.9
5.5 5.5
8.5 6.5
4.5 8.0
3.0 2.5
5.5 8.0
7.0 7.7
8.0 10.5

Use 0.05 as the level of significance.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 52


MODULE IN MATH 408 – DATA ANALYSIS

Fisher Sign Test or Sign


Test for Correlated Samples

What is a Fisher Sign test or known as Sign test for Correlated samples?

A Fisher Sign test is another test statistic under non parametric. This is also known
as the Sign Test for correlated samples and this test is the counterpart of the paired t-test or t-test for
correlated samples under parametric test and it is one of the easiest to perform. When we talk about
Fisher Sign test, we are dealing with two parameters that are being considered and tested in one sample
group or it simply compares two correlated samples or the data is in n-paired observations.

When do we use this test Statistics?

We use this test if you need to test if there is a difference between each pair
(dependent) of observations that are being tested or this test according to Broto is based on the idea
that half the difference between the paired observations will be positive and the other half will be
negative. This test is the counterpart of the t-test for one sample group or paired t-test in parametric
test and the level of data that are being treated with the use of this test are ordered categorical data
where a numerical scale is inappropriate but where it is possible to rank the observations or it can be
used if the data is continuous numeric.

What is the formula for this test (Fisher Sign Test) ?

The formula for Fisher Sign test or Sign Test for Correlated Samples is given below.

Where:

Z is the Fisher Sign Test or Sign Test for Correlated Samples

D = difference between the number of positive or plus signs (+) and the number of negative or minus
signs (-). So, D = (number of + sign) - (number of - sign)

|D| = absolute value of the difference between the number of + and –

n = the number of samples or observations

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 53


MODULE IN MATH 408 – DATA ANALYSIS

What are the steps in performing a Sign Test for Correlated Samples?

Listed below are the steps on how you will perform or use this test and as we all know;
we need to have a research problem before we do the hypothesis testing.

1. Make a table for the gathered data. First column is for the individual observations
and the second column and third column would be the paired data to be tested.

2. The fourth column for the table is for the determination of the sign for each pair
of observations. Note. In counting the number of positive and negative, zero
would not be included in the count.

3. Then do the hypothesis testing and apply it into the formula. The computed value
should be compared to the critical value in being able to know if you will accept
or reject the null hypothesis.

Let us have an illustration for this kind of test statistics.

During the first day of class, a professor conducted a 50-item pre-test to his fifteen
(15) students in Statistics and Probability before the formal lesson started on the said subject. After
a semester, he gave a posttest to his fifteen students using the same set of examinations that he was
given in the pretest. He wants to determine if there is a significant difference between the pretest
and the posttest. The following is the result of the experiment and he used the sign test for
correlated samples. The professor uses the α = 0.05 level of significance.

Student 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Pre-test 15 12 20 10 8 27 29 13 19 22 25 14 28 18 16
Post-test 20 18 25 25 20 35 43 28 29 37 46 27 33 37 28

Research Problem: Is there a significant difference between the Pretest and Posttest
of the fifteen students in Statistics and Probability on the use of the teaching method by the
Professor?

Step 1. Formulate the hypothesis

Ho: There is no significant difference between pre-test and post-test.


Pre-test = Post-test

Ha: There is a significant difference between pre-test and post-test.


Pre-test ≠ Post-test
MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 54
MODULE IN MATH 408 – DATA ANALYSIS

Step 2. Criterion

Level of significance = 0.05


Critical Value (z-table) = ∓1.96

Step 3. Computation (Fisher Sign Test)

Student Pre- Post- Sign


ID test test
Number
1 15 20 -
2 12 18 -
3 25 20 +
4 10 25 -
5 8 20 -
6 37 25 +
7 43 43 0
8 13 28 -
9 29 19 +
10 22 37 -
11 25 46 -
12 27 20 +
13 28 33 -
14 18 37 -
15 16 28 -

N (N positive) = 4; N (N negative) = 10; n = 14


+ -

Step 4. Analysis and Conclusion:

Since the computed value of z = 1.33 is less than the tabular value of
1.96, we confirmed the null hypothesis that there is no significant difference on the pre-test
and post-test. Therefore, there is no significant difference in the performance of fifteen
students on their pre-test and post-test in Statistics and Probability.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 55


MODULE IN MATH 408 – DATA ANALYSIS
How to use SPSS for Sign Test for Correlated Samples?

Just like what we did in the other test statistics, we could apply this test to test the
hypothesis if there is a significant difference or not by simply treating the data through the
“Analysis” on the main menu bar. Likewise, there should be of course encoded data that are
being tested or treated.

To do this, let us use the previous data given on this kind of test statistics. Assuming that
there is already data which are being encoded.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 56


MODULE IN MATH 408 – DATA ANALYSIS
Step 1. On the main menu bar, look for the “Analysis”, drop down the cursor
into the “non-parametric” then move to “Legacy Dialogs” and proceed to “2 Related
Samples”. Click the “ 2 Related Samples”.

Step 2. Once you click it, you will see another dialog box.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 57


MODULE IN MATH 408 – DATA ANALYSIS

Step 3. Transfer your independent variable (Pre-test) into “Test Pairs” under
variable 1 and your dependent variable (Post-test) in variable 2 using the
arrow. Wilcoxon is the default test statistic. Uncheck it and check the “Sign” as your
test statistics. If you want to have descriptive information, click the “option” and check
the “Descriptive”.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 58


MODULE IN MATH 408 – DATA ANALYSIS
Step 4. Click the “continue” button and you will be taken to the previous dialog
box and then click the “ok” button. Once you click it, the output view will appear.

So, at this point, you can now do your analysis of your data.

Based on your output view, there are 15 students who took the pre-test and post-
test. There are 4 under the negative differences, 10 for positive differences and 1 for ties. The
p-value of 0.180 is greater than the level of significance of 0.05, hence we need to accept the
null hypothesis. Thus, there is no significant difference between the pre-test and the post-test.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 59


MODULE IN MATH 408 – DATA ANALYSIS
Name:_________________________________________ Section:_________________

Date:__________________________________________ Score:__________

Practice Exercises
Signed Test for Correlated Sample

Direction: Given the data below, use the signed test for correlated sample both manual
computation and with the use of statistical software (SPSS) then analyze and interpret the result.

A nutritionist is curious as to whether the government agency's feeding program is


successful in addressing the nation's malnutrition issue. Before the feeding program began, a
nutritionist measured the weights in kilograms of fifteen indigenous children from Barangay
Poblacion 14 in Batangas City, ranging in age from pre-kindergarten to elementary school. The
dietitian reweighed the children who had been participating in a series of feeding programs after a
year (in kg). Below are the data displayed. Use α = 0.05 as the level of significance.

Participants A B C D E F G H I J K L M N O
Before Feeding 20 14 22 16 24 18 20 24 16 13 24 18 22 25 17
Program
After a year of 23 18 20 22 20 20 21 23 23 15 23 20 24 23 20
Feeding
Program

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 60


MODULE IN MATH 408 – DATA ANALYSIS

Median Test for Multiple Sample or


Sign Test for K-Independent
Groups/Samples
What are this test statistics all about?

Basically, this test is just an extension of the Sign Test for two independents
samples. This is also a non-parametric test that compares the medians of a quantitative
variable of two or more groups. This test is a counterpart of analysis of variance for
independent samples or this could be a special case of a chi-square for independence.
In order to apply this test, the formula for the chi-square test will be used but the
contingency table must be in a 2 x k table, where 2 represents the above and below
median and k is the number of independent groups.

What is the formula for this test?

As previously stated, this test is a special case of a chi-square test for independence,
thus the formula that we are going to use is similar in the chi-square. Below is the formula
for chi-square so that there is no need to go back to our previous topic of chi-square.

How to use these test statistics?

Just like in our previous lesson about chi-square test for independence, in being able
to use this test statistics (sign test for k-independent sample), simply do the same on what
you do in the chi-square test.

Example:

The manager wants to determine if there is a significant difference in the number


of sales in a week of a particular brand of cloth in three different ways of selling such as
online selling, mall selling or in selling in a public market. He uses 0.05 level of significance.
The following data are shown on the next page.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 61


MODULE IN MATH 408 – DATA ANALYSIS

Day Online Selling Mall Selling Selling in


Public Market
1 10 12 18
2 12 18 23
3 9 11 18
4 20 24 25
5 18 12 24
6 11 23 23
7 10 20 29

Research Problem:

Is there a significant difference in the number of sales in a week of a particular brand of cloth
in three different ways of selling?

Step 1. Hypothesis

Ho: There is no significant difference in the number of sales in a week of a particular


brand of cloth in three different ways of selling.

Ha: There is a significant difference in the number of sales in a week of a particular


brand of cloth in three different ways of selling.

Step 2. Criterion

Level of Significance = 0.05


Degree of Freedom = (c-1)(r-1) = (2 - 1)(3-1) = 2
Critical Value of chi-square at 0.05 = 5.991

Step 3. Decision Rule

If the computed chi-square is greater than the critical value, reject the null
hypothesis.

Step 4. Computation

First, determine the median of all data regardless of the place of selling. Here, the
median is 18. Then make a table. The data falls below or at the median will be
negative (-) and data which are above the median will be positive (+).

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 62


MODULE IN MATH 408 – DATA ANALYSIS

Let us create a contingency table (2 x 3) and compute the expected frequency.

Computed expected frequency.

(7)(9)/21 = 3 (7)(12)/21 = 4

(7)(9)/21 = 3 (7)(12)/21 = 4

(7)(9)/21 = 3 (7)(12)/21 = 4

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 63


MODULE IN MATH 408 – DATA ANALYSIS
Compute the Chi-square statistics.

Step 5. Analysis and Conclusion

Since the computed value for chi-square (sign test for k-independent sample) of
4.67 is less than the critical or tabular value of chi-square of 5.991 at 0.05 level of
significance, we will be confirming the null hypothesis. Therefore, there is no significant
difference in the number of sales in a week of a particular brand of cloth in three different
ways or places of selling.

Sign Test for K-Independent Groups/Samples in SPSS

Doing this test statistics manually is very tedious and time consuming for the
researcher. SPSS will make it easier to compute this test statistic as long as you know
how to use this software. Let us do this test statistics using the SPSS using the previous
data.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 64


MODULE IN MATH 408 – DATA ANALYSIS

Step 1. Based on the above data set, go to “Analyze” then down the cursor to
“Nonparametric Tests”, proceed to the “Legacy Dialogs” then move the cursor to “K
independent Samples” and click it.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 65


MODULE IN MATH 408 – DATA ANALYSIS
Step 2. Once you click the K-independent samples, another dialog box will appear.

Highlight and transfer the “Number of Sales” into the “Test Variable List” and
the “Way of Selling” on the “Grouping Variable” using the arrow right.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 66


MODULE IN MATH 408 – DATA ANALYSIS
Step 3. Once you transfer the needed data to each respective variable, you will
notice that on the grouping variable, SPSS will ask you to define the range. Click this and
another dialog box will pop up.

Here, you will type 1 as the minimum and 3 as the maximum since there are three
different ways of selling as our grouping variable, then click continue.

Step 4. Once you click the continue button, it will go back to the previous dialog
box. You will notice that the default statistical test is the “Kruskal-Wallis H”. What you
are going to do is to uncheck it and check the square on the “Median” and then click the
ok button.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 67


MODULE IN MATH 408 – DATA ANALYSIS
Step 5. Once you click on the ok button, the output view will appear.

From here you can now start doing your analysis, interpretation and conclusion
based on the treated data.

Analysis and Conclusion

Since the p-value (Asym. Sig.) of 0.097 is greater than the 0.05 level of
significance at median is 18 with a chi-square value of 4.667 and a degree of freedom
of 2, do not reject the null hypothesis. Therefore, there is no significant difference in
the number of sales in a week of a particular brand of cloth in three different ways or
places of selling.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 68


MODULE IN MATH 408 – DATA ANALYSIS
Name:_________________________________________ Section:_________________

Date:__________________________________________ Score:__________

Practice Exercises
Signed Test for K-Independent Group

Direction: Given the data below, use the signed test for K-independent group both manual
computation and with the use of statistical software (SPSS) then analyze and interpret the result.

The dean of a particular university's college of informatics and computing sciences is


attempting to ascertain whether there is a significant difference between the learning outcomes
of computer science students in the subject of Mathematics in the Modern World when taught
using pure online, face-to-face, and blended methods. The 0.05 threshold of significance is used
by the Dean. The information below is displayed.

Student Pure Online Face-to-Face Blended Learning


A 78 89 87
B 82 80 82
C 76 88 85
D 85 92 86
E 88 89 84
F 79 88 79
G 80 89 90

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 69


MODULE IN MATH 408 – DATA ANALYSIS

Spearman Rank Correlation (Spearman’s Rho)

What is the Spearman Rank Correlation and when do we use it?

The Spearman rank correlation or also known as spearman’s rho is a non-


parametric statistical test and this is a counter part of Pearson product moment of
correlation. We could use this statistical tool if you want to test for a rank order or test if
there is a relationship between two quantitative variables.

In order to apply this test statistics, make it sure that your data should be ordinal,
interval or ratio (turned into rank). But basically, we could use this test if one or both
variables is ordinal (rather than interval or ratio) In order to understand these test statistics,
we need to know what is the meaning of monotonic function. For sure your question
would be, “What is this function?” A monotonic function is one that either never increases
or never decreases as its independent variable increases. There are three kinds of
monotonic function. One is monotonically increasing, the second is monotonically
decreasing and the third is not monotonic. When we say monotonically increasing, as x
increases the y also increases. The monotonically decreasing is that as the x variable
increases, the y variable decreases and the not monotonic is that as the x variable increases
the y variable sometimes decreases and sometimes increases.

In other words, we use this test in order to measure the strength and direction of
the monotonic between two continuous or ordinal variables like in Likert scale.

Here are the graphs for these kinds of functions.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 70


MODULE IN MATH 408 – DATA ANALYSIS
What is the Spearman Rank Correlation coefficient and how do we interpret
it?

Similar to Pearson product moment of correlation, the spearman rank correlation


has what we call its coefficient of correlation and it is denoted by r s . This coefficient tells
the strength of the relationship between two variables. Unlike in Pearson correlation, there
is no need to test its normality since it belongs to the non-parametric test.

The value of spearman rank correlation coefficient, the r, is basically ranging from
-1 to 0 to 1 or if the value is negative, just simply take its absolute value and we could
verbally interpret these values are as follows:

Note: Values from +1 to -1. A rs of +1 indicates a perfect association of ranks,


a rs of zero indicates no association between ranks and a rs of -1 indicates a perfect
negative association of ranks. The closer rs is to zero, the weaker the association
between the ranks. These values could be interpreted as positive or negative, say for
example as very weak positively correlated or very weak negatively correlated; weak
positively correlated or weak negatively correlated, and so on.

What is the formula for the Spearman Rank-Order Correlation?

The formula for this test is given below.

where rs or 𝞺 is the spearman rank order coefficient correlation; di2 is the


difference between ranks of each observation; 𝑑 is the square of the difference between
ranks of each observation; ∑𝑛1 𝑑𝑖 2 is the sum of the square of the difference between rank
of each observation; and n is the number of observations or the sample size.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 71


MODULE IN MATH 408 – DATA ANALYSIS
How do we use or what are the steps to compute for the Spearman Rank-
Order Correlation?

Here is the step-by-step procedure on how to perform the Spearman rank order
correlation.

Step 1. Find the rank of the scores/data for each variable from highest to lowest.

Step 2. Look for the difference of the rank of the first variable to the second
variable for each observation.

Step 3. The difference between the variables must be squared.

Step 4. Take the summation of the difference of the two variables that are squared.

Step 5. Plug into the formula.

Note: It is important that in doing this test statistics manually, we need to create
a table for this.

Example: A health professor wants to determine if the height and weight of his
fifteen (15) students are correlated to each other. He calculated the correlation coefficient
using Spearman rank order correlation at 0.05 level of significance. The data are as
follows:
Student Weight Height
ID (kg) (cm)
1 72 172
2 62 169
3 58 167
4 75 195
5 43 155
6 70 182
7 56 151
8 59 167
9 41 157
10 49 163
11 77 188
12 60 179
13 50 172
14 45 160
15 63 189

Research Problem: Is there any significant relationship between the students’


height (in cm.) and weight (in kg.)?

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 72


MODULE IN MATH 408 – DATA ANALYSIS
Step 1. Hypotheses

Ho: There is no significant relationship between the students’ height and


weight.
Ha: There is a significant relationship between the students’ height and weight.

Step 2. Criterion

Level of Significance = 0.05


Degree of freedom; df = n - 1 = 15 -1 = 14
Critical value at 0.05 of rs = 0.538

Step 3. Decision Rule If the computed value of rs is greater than the critical value
rs at 0.05 level of significance, reject the null hypothesis.

Step 4: Computation: Rank the data from highest to lowest as 1 is the highest
rank.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 73


MODULE IN MATH 408 – DATA ANALYSIS
Plug into the formula.

Step 5. Analysis and Conclusion

The rs value that is 0.843 indicates that there is a very strong positive correlation
and since this value is greater than the critical value of 0.538 at 0.05 level of significance,
we reject the null hypothesis. Hence, there is a significant relationship between the
student’s height and weight. It implies that as the height of the student increases, the
weight is also increased.

Spearman Rank-Order of Correlation in SPSS

For sure, you will be saying that it is more convenient to use SPSS if you want to
use test statistics since the SPSS does the computation. But still, it is in your hand to get
the right test statistics. Even if the SPSS could do the computation, the output will be
based on the input you do.

Again, if you are going to use the software, make sure that you are already familiar
with its interface and how to explore it. You should have to encode the proper data set in
the data editor before treating and analyzing the data. So, let us apply SPSS by following
the steps on how to deal with these statistics, the Spearman Rank-Order of Correlation.

For presentation purposes, we will be using the previous data under this test
statistics.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 74


MODULE IN MATH 408 – DATA ANALYSIS

Step 1. In the menu bar, look for “Analyze” and drop down the cursor to
“Correlate” then click the “Bivariate”.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 75


MODULE IN MATH 408 – DATA ANALYSIS
Step 2. Once you click the “Bivariate”, a dialog box will appear. The default
statistics you could see here is the “Pearson-r.”

Step 3. Place the two groups of data into the variable window by highlighting each
data and click the arrow. Also, unclick the “Pearson” and click the small box on the
“Spearman” then click the “ok” button.

Step 4. Once the “ok” button is clicked, an output view will be displayed.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 76


MODULE IN MATH 408 – DATA ANALYSIS
At this point, we could now do the analysis and interpretation of data. In
interpreting and analyzing the data, it is just the same as how you interpret the data using
manual computation for this test statistics.

As you can see, the correlation coefficient of 0.843 tells us that the two
independent groups of variables have a positive strong association or correlation where
the p-value, Sig. (2-tailed) is less than the level of significance 0.05 and 0.01. Meaning,
we need to reject the null hypothesis in favor of the alternative hypothesis. Hence, there
is a significant relationship between the student’s height and weight. It implies that as the
height of the student increases, the weight is also increased.

Alternative Way on How to Use SPSS for Spearman Rank Order Correlation

For sure you will be asking, “If this is the test that we are going to use, where is
the ranking?” Another way to test its significant relationship is with the use of ranking.
We could also use this test in SPSS even if we rank the data set. In order to do that, we
need to rank first the data of each group of data.

Here is the step-by-step procedure to test if there is significant relationship


between the two variables using SPSS.

Step 1. In the menu bar, look for the “Transform” and drop down the cursor to
“Rank Cases”.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 77


MODULE IN MATH 408 – DATA ANALYSIS
Step 2. Click the “Rank” and the dialog box will appear.

Step 3. On the rank cases dialog box, move the two data sets on the window
variable by highlighting it and click the arrow for this.

Before clicking on the “ok” button, make sure that you choose the assigned rank
whether you are going to rank the data from smallest to largest or vice versa. Here in our
example, the ranking from largest to smallest was chosen, then click ok.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 78


MODULE IN MATH 408 – DATA ANALYSIS
Step 4. Once you have done it, you will see on the data view that the ranks are
included. Where the rank is located? There will be an added column for the rank for each
group of data set. For weight, 72 is rank 3, 62 is rank 6, etc. while for the height, 172 is
6.5 rank, 169 is 8 rank and so on.

Step 5. In analyzing the data, we will be adopting the steps in our previous
presentation but instead of using the data set, we will be using the data set that is being
ranked and then click “ok”.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 79


MODULE IN MATH 408 – DATA ANALYSIS
Step 6. After clicking the ok button, an output window will appear.You will notice
that the result is the same.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 80


MODULE IN MATH 408 – DATA ANALYSIS
Name:_________________________________________ Section:_________________

Date:__________________________________________ Score:__________

Practice Exercises
Spearman Rank Correlation

Direction: Use the spearman rank correlation to analyse and interpret the data below,
using both manual calculation and statistical software (SPSS).

The waistline and neckline (measured in inches) of a sample of students from one of the
university's colleges are being compared to see if there is any correlation. The data are listed below,
with 0.05 being the level of significance used by the researcher.

Students A B C D E F G H I J K L M N O
Waistline 35 34 29 30 33 29 35 36 28 34 28 33 33 29 30
Neckline 15 18 10 18 16 13 14 18 13 13 18 16 14 15 18

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 81


MODULE IN MATH 408 – DATA ANALYSIS
CRITICAL VALUES OF SPEARMAN RANK ORDER CORRELATION

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 82


MODULE IN MATH 408 – DATA ANALYSIS

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 83


MODULE IN MATH 408 – DATA ANALYSIS

Friedman Test (Randomized Block Design)

What is the Friedman Test and how will deal with this test?

Another non-parametric test is the Friedman Test. Since it is a non-parametric test,


it does not require that the data is subject for normality testing but they do assume that
data points are independent of each other and that each group has roughly equal variance.
This test is used to compare three or more matched groups or it is used for comparing the
distribution of measurements for k treatments laid out in b blocks using the randomized
block design according to Broto (2007) and the data should be transformed in rank by
block. This is similar to the one-way repeated measures of Analysis of Variance
(ANOVA) and the dependent data to be measured must be in an ordinal scale.

For sure you will ask what is your k as treatment and b as the block. For example,
there are 8 individual observations who are subject to be treated in 4 different methods of
teaching and learning. For this example, k is the number of different methods of teaching
and learning and the b is the number of observations that serve as the number of blocks.

What are the steps in doing this test statistics?

Step 1. Label the treatments as k (If there are 3 treatments, k = 3. If there are 4
different treatments, k = 4, and so on) and the b as the number of blocks is the number of
samples subject for testing.

Step 2. Do the ranking for each block. Meaning, the data for different treatments
in one particular observation will be ranked from highest to lowest.

Step 3. After determining the ranks for each block of different treatments, take the
sum of the rank per treatment or separately and label this as T 1 , T2 , … Tn , where T1 is
the first treatment, T2 is the second treatment up to the Tn and this is the nth treatment.

Do this step in the prepared table. After this, we could proceed now to the
computation of the Friedman Fr test.

What is the formula for this test statistics? The formula for the Friedman test is
given below.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 84


MODULE IN MATH 408 – DATA ANALYSIS

Where:

𝐹r is the Friedman test

k is the number of treatments (it could be 3, 4, 5, … , n)

b is the number of blocks (this is the number of n-observations)

Ti is the rank sum for each treatment i = 3, 4, 5, ...., k

Example. Five students are subject to a test if there are significant differences in
their level of acceptance on the four different designs of computers in the 1970s, 1980s,
1990s and in the 2000s. The level of acceptance in a 5-likert scale is 1 is unacceptable, 2
is slightly unacceptable, 3 is undecided, 4 is slightly acceptable and 5 is acceptable. The
responses of the five students are given below. Use 0.05 as the level of significance to
test whether there is a significant difference of 5 students on their level of acceptance of
computer designs for the said four years.

Research Problem: Is there any significant difference in the level of acceptance of


five (5) students on computer design to four (4) different years?

Step 1. Hypothesis

Ho: There is no significant difference in the level of acceptance of five


(5) students on computer design to four (4) different years?

Ha: There is a significant difference in the level of acceptance of five (5)


students on computer design to four (4) different years?

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 85


MODULE IN MATH 408 – DATA ANALYSIS
Step 2. Criterion

Level of Significance = 0.05

Degree of freedom = df = k - 1 = 4 - 1 = 3

Tabular or Critical value for Chi-square = 7.815

Step 3. Decision Rule

If the computed value is greater than the critical value, reject the null
hypothesis.

Step 4. Computation: Note that ranking is from the lowest grade to highest.

Plug into the formula.

𝐹r = (0. 12)(674) − 75 = 5.880

Step 5. Analysis and Conclusion

Since the computed value for Fr which is 5.88 is less than the critical value for
chi-square of 7.815 at 0.05 level of significance at degree of freedom of 3, do not reject
the null hypothesis. Hence, the hypothesis that there is no significant difference in the
level of acceptance of five (5) students on computer design to four (4) different years was
confirmed.
MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 86
MODULE IN MATH 408 – DATA ANALYSIS

How do we apply SPSS for the Friedman Fr Test?

Using SPSS for this test statistics is not as difficult as you think. If you really have
a strong knowledge on how to explore SPSS, just like what you did to other test statistics,
for sure you could do this in a very simple manner.

Let us use the previous data under this test statistics with the use of SPSS. But
make sure that you already encoded the necessary data in the variable and data view of
SPSS. Assuming that you already encoded all the necessary data, this could be the
environment.

Here is the step-by-step procedure on how to apply SPSS for this test statistics.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 87


MODULE IN MATH 408 – DATA ANALYSIS
Step 1. Go to “Analyze” → “Nonparametric Test” → “Legacy Dialog” → “K-Related
Samples”. Click the K-related sample.

Step 2. Once you click the “K-related Samples”, a dialog box will appear. This
dialog box is the “Test for Several Samples”. Note: You will notice that the default test
statistics here is the Friedman Test. In this dialog box, you will need to click the “Statistics”
button first.

Step 3. After clicking the “Statistics” button, another dialog box will pop-up and
you need to check the “Descriptive” part. After doing this, just simply hit the “continue”
button and it will bring back to previous dialog box.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 88


MODULE IN MATH 408 – DATA ANALYSIS
Step 4. Transfer or drag the data variable into the “Test Variable” by highlighting
all the data and transfer it using the arrow or just double click it to automatically transfer
it to the test variable. Once all the needed data to be treated is on the test variable, just
simply click the “Ok” button.

After clicking the “Ok” button, the SPSS will give you an output.

At this point, we can now make our analysis and interpretation. Based on this
output, instead of using the critical value, we will be using the p-value in able to make a
conclusion. Here, the p-value of 0.118 is greater than the level of significant 0.05, hence,
we will confirm the Ho, that is that there is no significant difference in the level of
acceptance of five (5) students on computer design to four (4) different years.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 89


MODULE IN MATH 408 – DATA ANALYSIS
Name:_________________________________________ Section:_________________

Date:__________________________________________ Score:__________

Practice Exercises
Friedman Test

Direction: Use Friedman test to analyse and interpret the data below, using both manual
calculation and statistical software (SPSS).

If there are significant differences in the level of acceptance of the three various teaching
approaches—pure online, face-to-face, and mixed learning—among the chosen students, they are
put to a test. On a 5-likert scale, the levels of acceptability are as follows: 1, slightly unacceptable,
2, indecisive, 4, slightly acceptable, and 5, acceptable. The students' responses are listed below.
To determine whether there is a significant difference between the levels of acceptability of the
selected students for the various teaching techniques, use a significance threshold of 0.05.

Student Pure Online Face-to- Mixed


Face Learning
A 2 5 3
B 2 3 4
C 4 5 3
D 3 4 2
E 1 5 4

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 90


MODULE IN MATH 408 – DATA ANALYSIS

McNemar’s Test for Correlated


Proportion

What is the McNemar Test for Two Correlated Proportions?

Another equally important test statistics under the nonparametric test is known as the
McNemar test for correlated proportion. This test is similar to the chi-square test. The only
difference from this is that the McNemar test only have a 2 x 2 contingency table meaning
this test is a before and after design which is tested whether there is a significant difference
between the before and after event. In short, this test compares the proportions for two
correlated dichotomous variables.

Dichotomous variables are can be classified as categorical variables with two


categories or levels but in different groups within the same independent variable. Just like
other variables, these variables can be described as either discrete or continuous dichotomous
variable. Some of the examples of this variables are: Question answerable by “Yes or No
“before and after the event; the flipping of coin getting a “Head or a Tail”; the economic status
of a certain family categorized as “Rich or Poor” and so on.

In addition, this test has always a one (1) degree of freedom since it used a 2 x 2
contingency table hence the chi-square tabular value for this df is 3.841 at 0.05 level of
significance. If you will be using different level of significance, let us say 0.01, you will need
to use the critical value table or known as the percentage points of chi-square distribution.

What is the formula for McNemar Test for Two Correlated Proportions?

The formula for this test is:

2
(𝑏 − 𝑐)2
𝑥 =
𝑏+𝑐
Where:

X2 is the chi-square
b is the first cell of the second column in the 2x2 table
c is the first cell of the second row in a 2 x 2 table

So, an example for the table using this test would be look like this.

After Total
Before A B A+B
C D C+D
Total A+C B+D Grand Total

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 91


MODULE IN MATH 408 – DATA ANALYSIS

Example: A teacher wants to know if there is a difference on an online teaching and


face-to-face teaching in passing of the students of a certain examination.

Face-to-face Teaching Total


Online Pass Fail
Teaching Pass 10 5 15
Fail 9 16 25
Total 19 21 N = 40

Research Problem: Is there significant difference of the two different methods of


teaching, online and face to face, in the passing of student in a certain examination.

Step 1. Stating the hypotheses

Ho: There is no significant difference in the use of two different


method of teaching in the passing of student in an examination.

Ha: There is a significant difference in the use of two different method


of teaching in the passing of student in an examination.

Step 2. Setting the Criterion

α = 0.05 (level of significant)


df = (c – 1)(r – 1) = (2 -1)(2 – 1) = (1)(1) = 1
chi-square tabular value at 0.05 = 3.841

Step 3. Computation: Using McNemar’s test for Correlated proportion

2
(𝑏 − 𝑐)2
𝑥 =
𝑏+𝑐

2
(5 − 9)2 (−4)2
𝑥 = = = 1.143
5+9 14
Step 4. Decision Rule

If the computed chi-square is greater than the tabular value, reject the
Ho, otherwise do not reject.

Step 5. Conclusion

Since the computed value of chi-square which is 1.143 is less than the
tabular value of 3.841 at 0.05 level of significance with a degree of freedom of 1, the null
hypothesis would not be rejected. Therefore, there is no significant difference in the use of
two different method of teaching in the passing of student in an examination.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 92


MODULE IN MATH 408 – DATA ANALYSIS
McNemar’s Test for Two Correlated Proportions using SPSS

When using SPSS to test whether there is significant or it is not significant


with this kind of statistical test, the only value the could give the SPSS is the p-value and not
the value of McNemar.

How to use SPSS conducting the McNemar Test?

Using our previous, let us say the data were already encoded in the SPSS.

Note that the data entry here is


incomplete.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 93


MODULE IN MATH 408 – DATA ANALYSIS
Here are the steps using McNemar test in SPSS.

Step 1. Go to “Analyze”, then “Descriptive Statistics” then go to “Crosstabs”

Step 2. Click “Crosstab” and another dialog box will appear.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 94


MODULE IN MATH 408 – DATA ANALYSIS
Step 3. On the previous dialog box, move over the two variables such as online and
face to the row and column. Highlight the variable and use the arrow to move the said
variables. (Here, the variable online would be placed in the row/s while the variable face
would be placed in the column/s)

Step 4. On the previous dialog box, click statistics and check the box of McNemar
then click the continue button.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 95


MODULE IN MATH 408 – DATA ANALYSIS

Step 5. Once you click continue, it will return to the “crosstab” dialog box. Here,
click the “cells” and another dialog box will appear. This time check the “observe”,
“expected”, the “row” and “column” under the percentage and then click continue.

After clicking “continue” button, SPSS will send you to its output window.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 96


MODULE IN MATH 408 – DATA ANALYSIS

At this point, we could now analyze and interpret the result. As stated before,
here in SPSS, the value of McNemar test will not be displayed. However, the cross-tabulation
as well as the p-value will be given by this software. Based on the result of p-value which is
0.424 is higher than the level of significant of 0.05. Hence, the null hypothesis will not be
rejected that is there is no significant difference in the use of two different method of teaching
in the passing of student in an examination.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 97


MODULE IN MATH 408 – DATA ANALYSIS
Name:_________________________________________ Section:_________________

Date:__________________________________________ Score:__________

Practice Exercises
McNemar Test for Correlated Proportion

Direction: Use McNemar test to analyse and interpret the data below, using both manual
calculation and statistical software (SPSS).

Following is information about the policy on male students' hair cuts, both before and
after a discussion among school officials. Set the level of significance to 0.05. Use the
statistical test indicated above to determine whether the discussion of the hair cut policy will
alter the opinions of male students.

After Discussion
Before Response Yes No Total
Discussion Yes 19 26 45
No 28 27 55
Total 47 53 100

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 98


MODULE IN MATH 408 – DATA ANALYSIS

Kendall’s Coefficient of Concordance W

Are you fond of watching cultural competitions in your school like dancing, singing,
poster making contests, etc. even watching beauty pageants for male and female students?
Usually, if there are competitions to be held in your school, the organizer of whatever event
it is, they are inviting judges in order to rate the performance of the participants and determine
who will be the winner. But, have you asked yourself how these groups of judges agreed or
conformed based on their ratings given to the participants? To answer this question, there is
another non-parametric test in statistics that is able to analyze and interpret the gathered
numerical information is the Kendall Tau Coefficient of Concordance W.

What is Kendall’s Coefficient of Concordance W?

As stated above, Kendall’s Coefficient of Concordance W is another test statistic under


the nonparametric test. This test statistics gives the degree of association or agreement among
the ranks assigned by different judges or respondents (this would serve as the observation) on
different objects or attributes.

How to interpret the value of W?

Another question that could come to your mind is, “How can I interpret the value of
W?” In previous test statistics like Pearson-r, we interpret the value of this statistics as perfect
positive or negative correlation denoted as r = 1 and r = -1 respectively and if there is no
correlation, the value of Pearson-r is zero, that is, r = 0. Here, if the value of W is ranging
from 0 to 1. If W is 0, meaning there is no agreement at all between raters but if W is 1, it
only means that there is a perfect agreement among the raters or judges. Also, we could say
that the higher the value of W, the stronger the association.

The table below presents the level of Kendall Coefficient of Concordance W and its
equivalent verbal interpretation.

Kendall’s Coefficient Verbal Interpretation


of Concordance W
0.00 No agreement
0.01 0.20 Poor
0.21 0.40 Slight
0.41 0.60 Moderate
0.61 0.80 Good
0.81 0.90 Very Good
0.91 0.99 Excellent
1.00 Perfect Agreement

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 99


MODULE IN MATH 408 – DATA ANALYSIS
You may be wondering how the judge’s agreement makes it a perfect agreement and
even no agreement at all. Let us consider two different tables below for five different judges
who rate the performance of five candidates in the question-and-answer portion of a beauty
pageant. Here, 1 is the highest rank and 5 will be the lowest rank.

Candidates
RATER A B C D E
Judge A 3 5 1 4 2
Judge B 3 5 1 4 2
Judge C 3 5 1 4 2
Judge D 3 5 1 4 2
Judge E 3 5 1 4 2
Column 15 25 5 20 10
Total

The table above represents or considered as perfect agreement. As you can see, all the
rank of each candidate are all equal on five different judges.

Now, let us consider the table below.

Candidates
RATER A B C D E
Judge A 1 2 3 4 5
Judge B 2 3 4 5 1
Judge C 3 4 5 1 2
Judge D 4 5 1 2 3
Judge E 5 1 2 3 4
Column 15 15 15 15 15
Total

As you can see on the above table, their column rank total is the same with all rankings
of the judges being different for each of the candidates. In this case, this is known as a no
agreement or perfect disagreement.

Based on the two previous tables, it is easy to identify or observe if the agreement is a
perfect agreement or no agreement at all. However, not all the ratings of the judges would
look like these two tables. There is a possibility that there will be a great difference from these
two tables when there are ties rank given in a particular object among the raters. How can we
calculate the coefficient of agreement? To do this, we will be using the formula and this is
the Kendall’s Coefficient of Concordance W.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 100
MODULE IN MATH 408 – DATA ANALYSIS
What is the formula for Kendall’s Coefficient of Concordance W?

The formula below is on how to determine the Kendall’s coefficient of


concordance.

𝟏𝟐𝑺
𝑾=
𝒎𝟐 (𝑵)(𝑵𝟐 − 𝟏)
Where:

W is the Kendall’s Coefficient of Concordance

S is the sum of square of the difference denoted by  D2

m is the number of judges or the respondents who rank the object or whatever
attributes

N is the objects or individuals being rated or ranked

Example: One of the student organizations under the College of Informatics and
Computing Sciences conducted an activity called “Search for Best Research Paper
Presentation”. The contest was participated by five pre-selected students and judged by eight
experts in the field of research. The table below is the rank given by the judges among the
five student participants.

Student Judge’s Rank


Participants J J J J J J J J
1 2 3 4 5 6 7 8
A 4 2 1 2 1 4 3 1
B 3 4 3 3 4 1 4 5
C 1 1 2 1 2 3 2 2
D 5 3 5 4 3 2 1 4
E 2 5 4 5 5 5 5 3

Research Problem: Is there an agreement or concordance among the eight (8) judges
on the presentation of five student researchers? Use 0.05 as level of significance.

Step 1. Hypotheses

Ho: There is no agreement or concordance among the eight (8) judges on the
presentation of five (5) student researchers.

Ha: There is an agreement or concordance among the eight (8) judges on the
presentation of five (5) student researchers.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 101
MODULE IN MATH 408 – DATA ANALYSIS
Step 2. Criterion

Level of Significance = 0.05


df = n – 1 = 5 -1 = 4
Tabular chi-square at 0.05 = 9.49

Step 3. Statistics (Computation for W)

a. For each participant, add the rank based on the rank given by the judges
for each participant to get the “sum of ranks”.
b. Add the “sum of ranks” to get the total.
c. Compute for the mean for the “sum of ranks” denoted by 𝑅̅
d. Find the difference between the mean for the “sum of ranks” and the sum
of the ranks of each participant.
e. Square the difference which is denoted by D2.
f. Find the sum of D2.
g. Plug in the formula.

Below is the new table.

𝟏𝟐𝑺
𝑾=
𝒎𝟐 (𝑵)(𝑵𝟐 − 𝟏)

𝟏𝟐(𝟐𝟓𝟒) 𝟑, 𝟎𝟒𝟖 𝟑, 𝟎𝟒𝟖


𝑾= = = = 𝟎. 𝟑𝟗𝟕
𝟖𝟐 (𝟓)(𝟓𝟐
− 𝟏) (𝟔𝟒)(𝟓)(𝟐𝟒) 𝟕, 𝟔𝟖𝟎

For the significant test: 𝑋 2 = 𝑚(𝑛 − 1)𝑊

𝑋 2 = 8(5 − 1)0.3969 = (8)(4)(0.3969) = 12.70 (Computed value)

Step 4. Decision Rule: If the computed value is greater than the tabular value, reject
Ho otherwise do not reject.
MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 102
MODULE IN MATH 408 – DATA ANALYSIS
Step 5. Conclusion

Since the computed value of chi-square = 12.70 is greater than the tabular
value of chi-square which is equal to 9.49 at 0.05 level of significance with the degree of
freedom of 4, we reject the null hypothesis. Hence, there is an agreement or concordance
among the eight (8) judges on the presentation of five (5) student researchers.

How to use SPSS in conducting the Kendall’s Coefficient of Concordance?

You may be wondering how the judge’s agreement makes it a perfect agreement and
even no agreement at all. Let us consider two different tables below for five different judges
who rate the performance of five candidates in the question-and-answer portion of a beauty
pageant. Here, 1 is the highest rank and 5 will be the lowest rank.

Just like in our previous test statistics, using SPSS is one of the easiest ways to treat
the data especially if you want to determine Kendall's coefficient of concordance. There are
two ways to determine Kendall's coefficient of concordance in SPSS. The first one is by using
the nonparametric test for related samples and the other one is also in nonparametric test but
this time using the k-related sample under the legacy dialog. Let us use these two ways. The
data to be used is the previous data, the rating of eight judges to five different students in the
“Search for Best Paper Presenter”.

Assuming the data are already encoded in the variable and data view of
SPSS. This would look like.

Variable View

Note that even the data is in rank, the measure of the variable would be still scale
since if the measure would be ordinal, it will not be read by the software.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 103
MODULE IN MATH 408 – DATA ANALYSIS

Data View

First Option

Step 1: In the menu bar, look for “Analyze” then look for the “Nonparametric Tests”
and proceed to “Related Samples”. Click it and another dialog box will appear.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 104
MODULE IN MATH 408 – DATA ANALYSIS
Step 2. Once the dialog box for nonparametric tests for two or more related samples
appears, you will see the tab button for “Objective”, “Fields” and “Settings”. First, click the
objective and see if the “Automatically compare observed data to hypothesized” was checked.
If this is ok, proceed to the “Fields” button and click it.

Step 3. After clicking the “Fields” button, on the field box, you could see the data to
be tested. Transfer all the data into the “Test Field” by highlighting the data and transfer it
using the arrow.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 105
MODULE IN MATH 408 – DATA ANALYSIS

Step 4. After transferring all the data into the test fields, click the “Setting” button.
Here, check the “Kendall’s coefficient of concordance (K-sample) and make it sure the
multiple comparison is “All pairwise”

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 106
MODULE IN MATH 408 – DATA ANALYSIS

Step 5. Lastly, click the “Run” button. Once it is clicked, the output window will
appear.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 107
MODULE IN MATH 408 – DATA ANALYSIS
Option 2.

Step 1. In the menu bar, look for “Analyze” then look for the “Nonparametric Tests”
and proceed to “Legacy Dialogs” then to “K Related Samples”. Click it and another dialog
box will appear.

Step 2. Once it enters in the “Test for Several Related Samples”, transfer all the data
into the “Test Variables” by highlighting the data and by clicking the arrow.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 108
MODULE IN MATH 408 – DATA ANALYSIS
Step 3. When all the data were transferred into the test variable box, check the
“Kendall’s W” in the test type and click the “OK” button.

Now, after clicking the “OK” button, the output window will appear.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 109
MODULE IN MATH 408 – DATA ANALYSIS
It shows that the result on both manual competition and with the use of SPSS,
the value of Kendall’s coefficient as well as the value of its chi-square are both the same. At
this stage, it could now make an interpretation and analysis of data to draw a concrete
conclusion.

We could now conclude that since the p-value (Asymp. Sig.) of 0.013 is less
than the level of significance of 0.05, we reject the null hypothesis in favor of the alternative
hypothesis.

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 110
MODULE IN MATH 408 – DATA ANALYSIS
Name:_________________________________________ Section:_________________

Date:__________________________________________ Score:__________

Practice Exercises
Kendall’s Coefficient of Concordance W

Directions: Use Kendall’s Coefficient of Concordance W to analyse and interpret the data
below, using both manual calculation and statistical software (SPSS).

An essay writing competition on how to stop the Covid 19 pandemic was held
by the English Department of the College of Informatics and Computing Sciences of a
particular university. The six participants' works are evaluated by five judges. At a
significance level of 0.05, calculate the concordance coefficient W.

Student Participant
Judge S1 S2 S3 S4 S5 S6
A 2 4 1 6 3 5
B 1 5 2 4 3 6
C 3 6 1 5 2 4
D 3 4 2 6 1 5
E 1 4 3 5 2 6

MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 111
MODULE IN MATH 408 – DATA ANALYSIS
References:

https://www.statstutor.ac.uk/resources/uploaded/mannwhitney.pdf

https://psych.unl.edu/psycrs/handcomp/hcmann.PDF

https://www.bristol.ac.uk/cmm/media/research/ba-teaching-
ebooks/pdf/Mann%20Whitney%20- %20Practical.pdf

https://www.statisticssolutions.com/free-resources/directory-of-statistical-
analyses/mann-whitne y-u-test/

https://www.real-statistics.com/statistics-tables/mann-whitney-table

https://users.sussex.ac.uk/~grahamh/RM1web/Kruskal-Wallis%20Handoout2011.pdf

Antonio S. Broto, Nonparametric Statistics (with Computer-Aided Solutions),


National Book Store, 2008

https://davidmlane.com/hyperstat/viswanathan/Median_Test.html

https://onlinelibrary.wiley.com/doi/pdf/10.1002/9780470776124.app1

https://www.stat.purdue.edu/~lfindsen/stat503/Table%207%20-%20b.pdf

https://psych.unl.edu/psycrs/handcomp/hcmedian.PDF

https://www.statisticshowto.com/probability-and-statistics/correlation-coefficient-
formula/spear man-rank-correlation-definition-calculate/

https://www.google.com/search?q=spearman+rank+order+correlation+table

https://www.statstutor.ac.uk/resources/uploaded/spearmans.pdf

https://statistics.laerd.com/statistical-guides/spearmans-rank-order-correlation-
statistical-guide-2. php

https://www.sciencedirect.com/topics/medicine-and-dentistry/friedman-test

https://ncss-wpengine.netdna-ssl.com/wp
content/themes/ncss/pdf/Procedures/PASS/Tests_for_Two_Correlated_Proportions-
McNemar_Test.pdf

https://www.slideshare.net/DalagangBigo/kendall-coefficient-of-concordance

https://esjeevanand.uccollege.edu.in/wp-content/uploads/sites/114/2020/08/NON-PARAMTERIC-
TEST-8.pdf
MODULE 8 | DATA ANALYSIS – INFERENTIAL STATISTICS (NONPARAMETRIC) WITH SPPS APPLICATION 112

You might also like