Estadística no paramétrica aplicada
Table of contents
- Introduction
- Unit I: Concept of Statistics
- Unit I: The Mann-Whitney U Test
- Unit II: Objectives
- Unit II: The Kruskal-Wallis Test
- Unit II: The Wilcoxon Test
- Unit III: Objectives
- Unit III: Friedman Test
- Unit III: Spearman Correlation Coefficients (rS)
- Unit IV: Objectives
- Unit IV: Chi-Squared Distribution (X2)
1. Introduction
1.1 Practical approach to non-parametric statistics
This text focuses on non-parametric statistics applied to scientific research, utilizing software such as SPSS, Minitab, and Excel. It emphasizes a practical approach to learning, aiming to foster the ability to learn independently and solve problems autonomously.
The goal is to stimulate research and the reading of scientific and technological texts, ultimately contributing to innovation and problem-solving in institutions and society 10.
Non-parametric statistics are particularly useful when data does not conform to a normal distribution. In such cases, appropriate non-parametric statistical tests are selected to validate hypotheses.
This book aims to assist researchers in adequately processing their data and uncovering scientific truths through suitable hypothesis testing 10.
📝 The Mann-Whitney U test, Kruskal-Wallis test, Wilcoxon test, Friedman test, Spearman correlation coefficients, and the Chi-squared distribution are specific non-parametric tests detailed in this book 5.
1.2 Statistical concepts and software
The field of statistics is integral to all professional areas and is studied from basic education through postgraduate levels, actively influencing other disciplines. This book provides a practical guide to applying non-parametric statistics using common software tools 2 3 10.
The content covers various statistical concepts and their application through software:
- Statistical concepts: Definitions of statistics, parametric statistics, and non-parametric statistics are introduced.
- Non-parametric tests: Specific non-parametric tests are detailed, including the Mann-Whitney U test, Kruskal-Wallis test, Wilcoxon test, Friedman test, Spearman correlation coefficients, and the Chi-squared distribution 5.
- Software application: The use of SPSS, Minitab, and Excel for data processing and analysis is demonstrated through figures illustrating various steps and results within the software 6 7.
1.3 Authors and publication details
This work is part of the "Resultado de Investigación" collection, first published in 2019 by Editorial EIDEC in Colombia. The authors of this text are Adrián Quispe Andía, Kriss Melody Calla Vasquez, Judith Soledad Yangali Vicente, José Luis Rodríguez López, and Ilich Ivan Pumacayo Palomino.
The book's ISBN is 978-958-52030-9-9 1 2 3 4.
2. Unit I: Concept of Statistics
2.1 Concept of statistics
Statistics is the technique used in research for data collection, classification, presentation, analysis, and decision-making. It is a fundamental subject applied in various fields, including business, market studies, demographics, elections, and scientific research for hypothesis testing.
The field is broadly divided into descriptive and inferential statistics 12.
- Statistics: it originates from the Italian word "Statista," meaning "expression," and was introduced to England in the 18th century.
- National Institute of Statistics and Informatics (INEI): this Peruvian institution studies demographic, economic, and national production behavior to inform government and private sector decisions 12.
2.2 Descriptive statistics
This branch of statistics focuses on describing the behavior of data through collection, classification, presentation, and analysis, enabling decisions without making inferences 12.
📝 The National Institute of Statistics and Informatics (INEI) studies demographic, economic, and national production behavior to inform government and private sector decisions 12.
2.3 Inferential statistics
This branch uses probabilities in the behavior of data during collection, classification, presentation, and analysis, allowing for decisions to be made through statistical inference 12.
2.4 Data and variables
Data are records of information or collections of related observations that need to be organized to identify trends and draw logical conclusions. Variables are symbols that can take on any value from a specific set, representing the elements or properties being studied 13.
- Data: it is a record of information or a group of related observations that require organization to reveal trends and support conclusions.
- Variable: it is a symbol, such as X or Y, that can assume any value from a defined set called its domain; these are the elements or properties under study 13.
2.5 Qualitative variables
These variables cannot be expressed numerically and are characterized by categories or attributes, often described using words 13.
📝 Marital status can be categorized as Single, married, widowed, or common-law union 13.
2.6 Non-orderable qualitative variable14
In this type, elementary events are grouped into categories that do not require a specific order but are mutually exclusive and have defined limits 13.
| Variable | Category |
|---|---|
| Marital status | Single, married, widowed, common-law union |
| Religiosity | Catholic, Protestant, Buddhist, etc. |
| Sex | Female, male |
| Nationality | Colombian, Peruvian, etc. |
2.7 Ordinal qualitative variable
Data are grouped into ranks defined by qualities or attributes, allowing for ordering based on these characteristics 14.
- Academic performance: excellent, good, regular, deficient.
- Socio-economic level: high, medium, low 14.
📝 Academic performance can be ranked as excellent, good, regular, or deficient 14.
2.8 Quantitative variables
These variables are defined by numbers and can be ranked, though the intensity of the ranks may not be fully known 14.
2.9 Continuous quantitative variable
This type of variable can take any value between two consecutive given values, often measurable 14.
- Continuous quantitative variable: it can assume any value between two consecutive given values and is measurable.
- Examples include height, weight, academic performance, IQ, salaries, and temperature 14.
2.10 Discrete quantitative variable
This type of variable consists of whole numbers, representing countable events or data 15.
- Discrete quantitative variable: it is characterized by integer values, representing countable events or data 15.
2.11 Parametric statistics
Parametric statistics encompass estimation of parameters, confidence intervals, and hypothesis testing, primarily applied to continuous variables. These methods assume the population from which a sample is drawn follows a normal distribution, which is crucial for valid hypothesis testing 15.
- Parametric statistics: they involve estimation of parameters, confidence intervals, and hypothesis testing, mainly for continuous variables.
- Assumption: parametric statistics assume the population distribution is normal for hypothesis testing to be valid 15.
2.12 Non-parametric statistics
Non-parametric statistics are used when the original distribution or the distribution of statistics cannot be determined, meaning there are no specific parameters to estimate. These methods are applied when comparing distributions, and the variables involved are typically nominal or ordinal 15.
- Non-parametric statistics: they are employed when population distributions are unknown or cannot be specified, focusing on comparing distributions.
- Variable types: non-parametric statistics are generally applied to nominal or ordinal variables 15.
2.13 The U test of Mann-Whitney
This non-parametric test is designed for two independent samples and serves as the non-parametric equivalent of Student's T-test 15.
- U test of Mann-Whitney: it is a non-parametric test used for comparing two independent samples.
- Equivalence: it is considered the non-parametric counterpart to Student's T-test 15.
3. Unit I: The Mann-Whitney U Test
3.1 Introduction to the Mann-Whitney U Test
The Mann-Whitney U test is a non-parametric statistical test used to compare two independent samples. It is particularly useful when the data are ordinal or continuous and do not meet the assumptions of parametric tests, such as normality.
The test assesses whether observations from one sample tend to be larger or smaller than observations from the other sample 16.
Key assumptions for the Mann-Whitney U test include:
- Observations within each group are independent.
- The data consist of ordinal or continuous variables.
- Under the null hypothesis, the distributions of both populations are identical.
- Under the alternative hypothesis, the values in one sample tend to exceed those in the other 16.
The test calculates a U statistic, which is the minimum of two possible values, U1 and U2. These values are derived from the sum of ranks for each sample 16.
3.2 Calculating the U Statistic
To calculate the U statistic, all observations from both samples are combined and ranked. Ties in ranks are handled by assigning the average rank to the tied observations 16.
The formulas for U1 and U2 are: U1=n1n2+2n1(n1+1)−∑R1 U2=n1n2+2n2(n2+1)−∑R2 Where:
- n1 and n2 are the sizes of sample 1 and sample 2, respectively.
- ∑R1 and ∑R2 are the sums of the ranks for sample 1 and sample 2, respectively.
The U statistic is the minimum of U1 and U2: U=min(U1,U2). A quick arithmetic check is that U1+U2=n1n2 16.
3.3 Approximation to the Normal Distribution
For samples with more than 20 observations, the distribution of the U statistic can be well approximated by the normal distribution. This approximation allows for the calculation of a Z-score 16.
The Z-score is calculated using the following formula: Z=σUU−μU Where μU and σU are the mean and standard deviation of U under the null hypothesis 17.
The mean and standard deviation of the U distribution are given by: μU=2n1n2 σU=12n1n2(n1+n2+1) 18.
3.4 Hypothesis Formulation and Decision Criteria18
The Mann-Whitney U test is used to test hypotheses about the equality of two population distributions 17.
The hypotheses are typically formulated as:
- Null Hypothesis (H0): u1=u2 (There is no difference between the two populations; their means are equal).
- Alternative Hypothesis (H1): u1=u2 (There is a difference between the two populations; their means are different) 17.
The decision criteria for rejecting or accepting the null hypothesis depend on the calculated Z-score and a critical Z-value, which is determined by the chosen significance level (α) 17.
| Criterion | Decision |
|---|---|
| Reject H0 if Z>Zα/2 | Accept H1 |
| Accept H0 if Z<Zα/2 | Accept H1 |
| For a 95% confidence level, Zα/2=1.96 | — |
| If the probability value (p-value) is ≤0.05 | Reject H0 and accept H1 |
| If the probability value (p-value) is >0.05 | Accept H0 and reject H1 |
3.5 Example: Ceramic Cooling Times
A factory wants to compare the cooling times of ceramic pieces using two different methods. They burn 12 pieces with Method 1 and 10 pieces with Method 2. The cooling times in minutes are recorded 18.
The data are ranked, and the sums of ranks are calculated. Using these sums and the sample sizes (n1=12, n2=10), the U statistics are computed 18.
📝 For the ceramic cooling times, after ranking all 22 pieces, if the sum of ranks for Method 1 (∑R1) is 130 and for Method 2 (∑R2) is 93, then U1=12×10+212(12+1)−130=120+78−130=68. And U2=12×10+210(10+1)−93=120+55−93=82. The U statistic is min(68,82)=68 18.
The mean (μU) and standard deviation (σU) of the U distribution are calculated. For n1=12 and n2=10, μU=212×10=60.
And σU=1212×10(12+10+1)=12120×23=230≈15.17 18.
The Z-score is then calculated: Z=σUU−μU. If U=68, Z=15.1768−60≈0.53 19.
With a significance level of 10% (α=0.10), the critical Z-value (Zα/2) is 1.65. Since the calculated Z (0.53) falls between -1.65 and 1.65, the null hypothesis is not rejected. This means there is no significant difference in the average cooling times between the two methods 19.
3.6 Application: Pharmacological Treatment Results
This example involves comparing the percentage of favorable results from a pharmacological treatment. 5 patients received an experimental treatment (x) and 5 received a conventional treatment (y) 19.
The hypotheses are:
- H0:u1≥u2 (The mean of the experimental group is greater than or equal to the mean of the conventional group).
- H1:u1<u2 (The mean of the experimental group is less than the mean of the conventional group) 20.
The process involves using statistical software like SPSS to input data, define variables, and run the Mann-Whitney U test 20 21 22.
The SPSS output provides the Z-statistic and the significance level (p-value) 22.
Analysis: If the calculated Z-score is -1.567 and the critical Z-value for a 95% confidence level is -1.96, the Z-score falls within the acceptance region for the null hypothesis. If the p-value is greater than 0.05, the null hypothesis (H0:u1≥u2) is accepted.
This indicates that the mean of the experimental group is not significantly less than the mean of the conventional group 23.
3.7 Proposed Exercises
Several exercises are provided to practice the application of the Mann-Whitney U test. These exercises cover various scenarios, including comparing study hours for different subjects, average grades in two schools, and teaching method effectiveness 23 24 25 26.
| Exercise | Scenario |
|---|---|
| Ejercicio 1 | Weekly study hours for mathematics vs. accounting. |
| Ejercicio 2 | Average grades in two supervised schools. |
| Ejercicio 3 | Effectiveness of a traditional vs. an invented reading teaching method. |
| Ejercicio 5 | Cooling times for ceramic pieces using two methods (reiteration of earlier example). |
| Ejercicio 6 | Mean durations of two types of 9-volt batteries. |
| Ejercicio 7 | Weight gain in young turkeys fed two different diets. |
For each exercise, the task is to formulate the appropriate hypotheses and then test them using the Mann-Whitney U test, often with a specified confidence level 23 24 26.
4. Unit II: Objectives
4.1 Differentiating non-parametric statistics applications
This section outlines the primary objectives for understanding non-parametric statistics. The focus is on correctly distinguishing their applications based on the types of variables involved 27.
- Key objective: To accurately differentiate non-parametric statistical methods based on the nature of the variables they are applied to.
- Application focus: Understanding when and why specific non-parametric tests are appropriate for different data types 27.
4.2 Applying Kruskal-Wallis and Wilcoxon tests
A core objective is the efficient application of two specific non-parametric statistical tests: the Kruskal-Wallis test and the Wilcoxon test 27.
- Kruskal-Wallis test: This objective involves mastering its application, typically used for comparing three or more independent groups.
- Wilcoxon test: The goal is to apply this test efficiently, which is commonly used for comparing two related samples or two independent samples 27.
5. Unit II: The Kruskal-Wallis Test
5.1 The Kruskal-Wallis Test
The Kruskal-Wallis test is a non-parametric statistical test used to determine if there are significant differences between three or more independent groups. It is an extension of the Mann-Whitney U test and does not assume normality in the data, unlike the traditional ANOVA.
The test assesses whether a group of data comes from the same population 28.
The core hypotheses for the Kruskal-Wallis test are:
- H0 (Null Hypothesis): There are no differences between the means of the k populations (u1=u2=u3=⋯=uk).
- Ha (Alternative Hypothesis): At least two means differ; there are differences between the means of the k populations 28.
The formula for the Kruskal-Wallis H statistic is: H=(n(n+1)12∑j=1knjRj2)−3(n+1) Where:
- nj: the number of elements in sample j.
- Rj: the sum of ranks for all elements in sample j.
- k: the number of samples.
- n: the total number of observations (n=n1+n2+⋯+nk) 28 29.
The calculated H statistic is compared to a critical value from the chi-squared distribution with k−1 degrees of freedom. If the calculated H exceeds the critical chi-squared value, the null hypothesis is rejected 30.
5.2 Post-hoc pairwise comparisons
If the null hypothesis is rejected, post-hoc tests are conducted to identify which specific pairs of groups differ significantly. This involves calculating the average rank for each sample and then comparing the absolute differences between these average ranks against critical values 30.
The critical value Ck for pairwise comparisons is calculated using the formula: Ck=12n(n+1)(ni1+nj1)χα,k−12 Where:
- n: total number of observations.
- ni,nj: number of observations in samples i and j.
- χα,k−12: the critical chi-squared value for a given significance level α and k−1 degrees of freedom 31.
A significant difference between two groups is indicated if the absolute difference between their average ranks is greater than the calculated critical value Ck 31.
5.3 Example: Avon customer payment times
A new Avon manager wants to compare the payment times for three customer groups for a new product. Data on the number of days taken to pay for shipments was collected 29.
The Kruskal-Wallis H statistic was calculated as 18.8. The critical chi-squared value for α=0.05 with k−1=3−1=2 degrees of freedom is 5.99 29 30.
Since H=18.8>5.99, the null hypothesis is rejected, indicating a significant difference in the time it takes for the three customer groups to pay their accounts 30.
Following this, pairwise comparisons were made. The average ranks for the groups were calculated as 9.14, 75.5, and 86.8. The absolute differences between these ranks were computed.
The critical values for pairwise comparisons were calculated as 19.91, 15.65, and 27.76 30 31.
Comparing the absolute differences to the critical values:
- The difference between group 3 and group 2 (15.9) is less than the critical value (19.91), so no significant difference is found.
- The difference between group 3 and group 1 (75.5 - 9.14 = 66.36) is greater than the critical value (27.76), indicating a significant difference.
- The difference between group 2 and group 1 (75.5 - 9.14 = 66.36) is greater than the critical value (27.76), indicating a significant difference 31.
5.4 Example: Instructional methods 34
A study compares the effectiveness of three different instructional methods (A, B, and C) on student learning. Scores from 20 students are collected, with 6 students in method A, 5 in method B, and 9 in method C. The significance level is set at 5% 31 32.
The data was analyzed using SPSS. The output showed the following:
| Group | No. | Average Rank |
|---|---|---|
| A | 6 | 10.17 |
| B | 5 | 8.40 |
| C | 9 | 11.89 |
| Total | 20 | — |
The contrast statistics provided a Chi-Square value of 1.145 with 2 degrees of freedom. The asymptotic significance was 0.564 35.
The critical chi-squared value for 2 degrees of freedom at a 95% confidence level ( α=0.05) is 5.99 35.
Since the calculated Chi-Square (1.145) is less than the critical chi-squared value (5.99), the null hypothesis (H0) is accepted. This means there are no significant differences between the three instructional methods used in the learning process 35.
📝 The Kruskal-Wallis test is used when comparing the effectiveness of three different teaching methods on student test scores, and the scores do not meet the assumptions of normality required for an ANOVA test 28.
5.5 Exercise 1
This exercise involves comparing the performance evaluations of employees from three different schools (A, B, and C), with 7 employees from school A, 6 from school B, and 7 from school C. The Kruskal-Wallis test is to be applied to determine if there are significant differences in performance evaluations across these schools 35.
The hypotheses are:
- H0: The populations are identical in terms of performance evaluations.
- Ha: The populations are not identical in terms of performance evaluations 35.
5.6 Exercise 2
Three neighbors want to determine which of their dogs runs fastest. Each dog runs a short distance three times, and the times are recorded in seconds.
This scenario involves three independent groups (the dogs), and the Kruskal-Wallis test is appropriate for comparing their running times 36.
The hypotheses are:
- Ho: The distribution of the times for the three dogs is equal.
- H1: The distribution of the times for at least one of the dogs is distinct 36.
6. Unit II: The Wilcoxon Test
6.1 Introduction to the Wilcoxon Test
The Wilcoxon signed-rank test is a non-parametric statistical method used to compare two related samples. It serves as an alternative to the paired t-test when the assumptions of the t-test, such as normality, are not met.
This test analyzes the differences between paired observations to determine if there is a statistically significant difference between the two conditions or groups 37.
6.2 Hypothesis Testing with the Wilcoxon Test
The Wilcoxon test involves setting up null and alternative hypotheses to evaluate the data.
- Null Hypothesis (H0): States that there is no difference between the paired samples (e.g., the treatment has no effect). Mathematically, this is often represented as u1=u2.
- Alternative Hypothesis (Ha): States that there is a difference between the paired samples (e.g., the treatment has an effect). This can be directional (e.g., u1<u2 or u1>u2) or non-directional (u1=u2) 37.
📝 The null hypothesis (H0) is u1=u2 (no difference), and the alternative hypothesis (Ha) is u1=u2 (there is a difference) 37.
6.3 Application in SPSS
The Wilcoxon signed-rank test can be implemented using statistical software like SPSS. The process involves defining variables, entering the data, and navigating through specific menus to select the appropriate test.
- Variable Definition: Create two variables to represent the paired measurements (e.g., "Before" and "After" treatment).
- Data Entry: Input the recorded data for each patient or subject into the respective variables 37.
- Test Selection: Access the test through the "Analyze" menu, then "Compare Means" or "Nonparametric Tests," selecting "Related Samples" or "Paired Samples" and choosing the Wilcoxon test.
- Variable Assignment: Assign the "Before" and "After" variables to the test dialog box 38.
- Results Interpretation: The software provides test statistics, such as the Z-score, and a p-value, which are used to accept or reject the null hypothesis based on a chosen significance level (e.g., 95% confidence level) 39.
6.4 Example: Coronary Circulation Treatment Efficacy 37
An experiment was conducted to assess the effectiveness of a treatment aimed at improving coronary circulation in patients with chronic severe anemia. Eight patients were included, and a specific coronary blood pressure index was recorded before and after the treatment.
| Patient | Before | After |
|---|---|---|
| 1 | 10.9 | 56 |
| 2 | 57 | 44 |
| 3 | 53 | 55 |
| 4 | 57 | 40 |
| 5 | 68 | 62 |
| 6 | 72 | 46 |
| 7 | 51 | 49 |
| 8 | 65 | 41 |
The null hypothesis (H0) was that there is no efficacy in the treatment (u1=u2), while the alternative hypothesis (Ha) was that there is efficacy (u1<u2). The SPSS output yielded a Z-score of -2.313. With a critical Z-value of -1.96 for a bilateral test at 95% confidence, the null hypothesis is rejected, accepting Ha, indicating treatment efficacy 37 39.
📝 For coronary circulation treatment efficacy, the null hypothesis was u1=u2 (no efficacy), and the alternative was u1<u2 (efficacy). The test yielded a Z-score of -2.313, leading to the rejection of H0 and acceptance of Ha at a 95% confidence level 37.
6.5 Exercise 1: Methodology Impact on Student Scores 40
This exercise requires verifying the hypothesis that a special methodology improves student scores. Data from 16 students, recorded before and after applying the methodology, are provided.
The Wilcoxon signed-rank test should be used with a 5% significance level to test the hypothesis that the methodology improves scores (u1<u2) 39.
| Student | Before | After |
|---|---|---|
| 1 | 16.4 | 16.2 |
| 2 | 19.4 | 19.9 |
| 3 | 12.2 | 12.8 |
| 4 | 18.1 | 17.7 |
| 5 | 15.3 | 16.5 |
| 6 | 13.8 | 14.7 |
| 7 | 17.6 | 18.6 |
| 8 | 17.9 | 19.2 |
| 9 | 15.9 | 16.7 |
| 10 | 17.3 | 17.2 |
| 11 | 13.5 | 14.9 |
| 12 | 18.5 | 19 |
| 13 | 15.9 | 16.7 |
| 14 | 13.5 | 13.2 |
| 15 | 14.9 | 15.8 |
| 16 | 18.9 | 19.6 |
The hypotheses are H0: u1=u2 and Ha: u1<u2 40.
6.6 Exercise 2: Gasoline Additive Performance
This exercise aims to determine if there is a difference in gasoline performance (km per gallon) when using different additives. Data from 12 cars, with measurements for two additives, are presented.
The Wilcoxon test should be applied at a 95% confidence level to ascertain if a difference exists between these additives 40.
| Car | Aditive 1 | Aditive 2 |
|---|---|---|
| 1 | 20.12 | 18.5 |
| 2 | 23.56 | 21.77 |
| 3 | 22.03 | 22.57 |
| 4 | 19.15 | 17.06 |
| 5 | 21.23 | 21.22 |
| 6 | 24.77 | 23.8 |
| 7 | 16.16 | 17.2 |
| 8 | 18.55 | 14.98 |
| 9 | 21.87 | 20.03 |
| 10 | 24.23 | 21.15 |
| 11 | 23.21 | 22.78 |
| 12 | 25.02 | 23.7 |
7. Unit III: Objectives
7.1 Objectives
- Differentiate non-parametric statistics based on their application according to variable types.
- Apply the Friedman and Spearman non-parametric statistics efficiently 41.
8. Unit III: Friedman Test
8.1 Friedman Test
The Friedman test is a non-parametric statistical test developed by Milton Friedman. It is used for analyzing multiple related samples, serving as the non-parametric equivalent to the repeated measures ANOVA.
The method involves ranking the data within each row or block and replacing the original values with their corresponding ranks. This test is a variant of the Kruskal-Wallis test, particularly when dealing with identical data points 42.
The formula for the Friedman test statistic (Xr2) is as follows:
Xr2=H⋅K⋅(K+1)12∑i=1KRi2−3⋅H⋅(K+1)
Where:
- H represents the number of elements or blocks (number of rows).
- K represents the number of related variables.
- ∑Ri2 is the sum of the squared ranks for each column 42.
8.2 Hypothesis testing
The hypotheses for the Friedman test are:
- Null Hypothesis (H0): The means of all related groups are equal (μ1=μ2=⋯=μK).
- Alternative Hypothesis (Ha): At least two of the means are different 43 46.
8.3 Application in SPSS
To perform the Friedman test in SPSS:
- Enter the data into the SPSS data editor 43.
- Navigate to
Analyze>Nonparametric Tests>Legacy Dialogs>K Related Samples. - Move the variables representing the related samples into the "Test Variables" box 44.
- Ensure "Friedman" is selected in the test type options and click "OK".
The output will provide the average ranks for each group and the Chi-Square statistic, degrees of freedom, and significance level 45.
8.4 Example: Learning Methods Evaluation
Eight jurors evaluated four learning methods (A, B, C, D). The results, presented as scores, were ranked to test for significant differences between the methods at a 5% significance level 43.
- Juror: Method A, Method B, Method C, Method D
- I
- II
- III
- IV
- V
- VI
- VII 43.
The average ranks calculated for each method were:
- Method I: 2.94
- Method II: 1.13
- Method III: 1.94
- Method IV: 4.00 45.
The SPSS output for the test statistics showed a Chi-Square value of 1.145 with 2 degrees of freedom and a significance level of 0.564 45.
📝 In the learning methods example, the Chi-Square statistic (1.145) is less than the critical Chi-Square value (7.71) for 3 degrees of freedom at a 95% confidence level. This leads to the acceptance of the null hypothesis, indicating no significant differences between the learning methods 45.
8.5 Exercise: Toxic Concentration in Fish Organs
An exercise involves studying the concentration of a toxic substance (mg/1000) in the brain, heart, and blood of fish. The goal is to determine if the toxic concentration is equal or different across these three organs.
A sample of 12 fish (n=12) was studied, with K=3 organs.
The hypotheses are:
- H0: There are no significant differences in the toxic concentration in the brain, heart, and blood.
- Ha: There are significant differences in the toxic concentration in the brain, heart, and blood 46.
9. Unit III: Spearman Correlation Coefficients (rS)
9.1 Spearman Rank Correlation Coefficient (rS)
The Spearman rank correlation coefficient (rS) is used when one or both variables are of ordinal scale, such as a Likert scale. It measures association based on the ranks of observations rather than their numerical values.
The formula for rS when there are no or few ties in the data is:
rS=1−N(N2−1)6∑Di2
Where:
- Di: The difference between the i-th pair of ranks (R(Xi)−R(Yi)).
- R(Xi): The rank of the i-th data point for variable X.
- R(Yi): The rank of the i-th data point for variable Y.
- N: The number of pairs of ranks 47.
The calculation involves ranking the data for each variable, finding the difference between the ranks for each pair, squaring these differences, summing the squared differences, and then applying the formula 48.
-
Procedure for manual calculation:
-
Rank the data for each variable separately.
-
Calculate the difference (Di) between the ranks for each pair of observations.
-
Square each difference (Di2).
-
Sum the squared differences (∑Di2).
-
Apply the Spearman formula using the sum of squared differences and the total number of pairs (N) 48.
-
Example calculation: To determine the relationship between directive leadership and the quality of emotional intelligence, data was collected and ranked.
-
For N=10 pairs of ranks, the sum of squared differences (∑Di2) was 23.
-
The Spearman correlation coefficient (rS) was calculated as: rS=1−10(102−1)6×23=1−10(99)138=1−990138≈1−0.139=0.861 48.
📝 For the leadership and quality data, the calculation yields rS=0.86 48.
9.2 Statistical Significance Testing for Spearman Correlation
To determine if the calculated Spearman correlation coefficient is statistically significant, a hypothesis test is performed. This involves setting up null and alternative hypotheses, choosing a significance level, and comparing the calculated p-value to the significance level 48.
- Hypothesis testing steps:
- Statistical Hypotheses:
- Null Hypothesis (H0): There is no relationship between the two variables.
- Alternative Hypothesis (Ha): There is a relationship between the two variables.
- Significance Level and Degrees of Freedom:
- Significance level (α) is typically set at 0.05 (5%).
- Degrees of freedom are usually equal to N−2 for hypothesis testing with rS, though critical values are often directly compared to rS for a given N and α.
- P-value Calculation:
- Software like SPSS provides a p-value (sig. bilateral).
- If the p-value is less than α (e.g., p<0.05), the null hypothesis (H0) is rejected in favor of the alternative hypothesis (Ha).
- If the p-value is greater than α (e.g., p>0.05), the null hypothesis (H0) is accepted 48.
- Contrastation: Based on the comparison between the p-value and α, a conclusion is drawn about the existence of a significant relationship 49.
-
SPSS Procedure:
-
Define variables in SPSS.
-
Enter data into the data view.
-
Navigate to Analyze > Correlate > Bivariate.
-
Select the variables of interest.
-
Check the "Spearman" option under correlations.
-
Click "OK" to obtain the correlation matrix 49.
-
SPSS Output Interpretation:
-
The output table shows the Spearman correlation coefficient and its significance level (bilateral).
-
A value of rS=0.872 with a significance of 0.000 was obtained for the leadership and quality example.
-
Since p=0.000<0.05, the null hypothesis is rejected, indicating a significant relationship 50.
📝 The correlation is significant at the 0.01 level (bilateral) 50.
9.3 Application of Spearman Correlation with Examples
The Spearman correlation coefficient is applied in various scenarios to assess the relationship between ranked variables. These examples demonstrate manual calculation and interpretation of the results 51.
- Example 1: Income and Consumption Classification
- Data on income classification and consumption classification was ranked.
- The differences in ranks (Di) and their squares (Di2) were calculated.
- For N=11, the sum of squared differences (∑Di2) was 32.
- The Spearman coefficient (rS) was calculated as: rS=1−11(112−1)6×32=1−11(120)192=1−1320192≈1−0.145=0.855.
- A critical value (r) for α=0.05 and N=11 is 0.6091.
- Since rS=0.855>0.6091, the null hypothesis is rejected, indicating a significant relationship 51.
📝 The calculation shows rS=0.85, suggesting a relationship between income and consumption classification 51.
- Example 2: Aggressiveness in Twins
- Data on aggressiveness levels for twelve pairs of twins was collected and ranked.
- The differences in ranks (Di) and their squares (Di2) were calculated.
- For N=10, the sum of squared differences (∑Di2) was 45.
- The Spearman coefficient (rS) was calculated as: rS=1−10(102−1)6×45=1−10(99)270=1−990270≈1−0.273=0.727.
- A critical value (r) for α=0.10 and N=10 is 0.5515.
- Since rS=0.727>0.5515, the null hypothesis is rejected, indicating a significant relationship 52.
📝 The calculated rS=0.72 indicates a significant relationship between the aggressiveness levels of twins 52.
9.4 Proposed Exercises
The following exercises involve calculating the Spearman correlation coefficient and testing its statistical significance for different datasets 53 54.
-
Exercise 1: Sales Data
-
Calculate the Spearman correlation coefficient between current year sales and expected next year sales for 10 vendors.
-
Test for significance at a 10% level 54.
-
Exercise 2: Seniority vs. Performance
-
A manager classified 8 workers based on seniority and performance.
-
Determine if the rank correlation is significant at a 7% level 54.
-
Exercise 3: University Success and Company Level
-
Calculate the rank correlation coefficient between university success and company level achieved 10 years later for several students.
-
Present the hypothesis test for α=0.05 53.
-
Exercise 4: University Rank vs. Company Rank
-
Calculate the rank correlation coefficient between university rank and company rank for several observations.
-
Present the hypothesis test for α=0.05 53.
10. Unit IV: Objectives
10.1 Objectives
- Differentiate non-parametric statistics based on their application according to variable types.
- Apply non-parametric Chi-squared statistics efficiently 55.
11. Unit IV: Chi-Squared Distribution (X2)
11.1 Introduction to the Chi-Squared Distribution
The Chi-squared (X2) distribution is a statistical test particularly useful for categorical variables, applicable when a nominal variable has two or more categories. It serves two primary applications: the goodness-of-fit test (for one variable) and the Chi-squared test of association or homogeneity (for two variables).
These latter tests assess whether observed frequencies significantly differ from expected frequencies. The core question addressed is whether a relationship exists between two categorical variables (X and Y), determining if they are independent or associated.
The null hypothesis (H0) posits that the variables are independent (not related), while the alternative hypothesis (H1) states they are not independent (related) 56.
11.2 Characteristics of the Chi-Squared Distribution
The Chi-squared distribution has several key characteristics that define its behavior and application. It is read with degrees of freedom (G.L.), calculated as (Number of rows - 1) * (Number of columns - 1). It does not have negative values; the minimum value is 0. All its curves are asymmetrical. As the degrees of freedom increase, the curves become less elevated and more spread out to the right. This distribution is used for variables measured on a nominal or ordinal scale 57.
11.3 Calculating Expected Frequencies
To determine the expected frequencies (E) from observed data (O), one multiplies the respective marginal totals and divides by the grand total. This calculation is crucial for comparing observed counts to what would be expected under the assumption of independence between variables 58.
The formula for expected frequency is: E=Grand TotalRow Total×Column Total 57.
11.4 Example: Motivation and Academic Performance
Consider a 2x2 contingency table examining the association between motivation (Alta, Baja) and academic performance in mathematics (Alto, Bajo) for 180 students 58.
| MOTIVACIÓN | RENDIMIENTO ALTO | RENDIMIENTO BAJO | TOTAL |
|---|---|---|---|
| ALTA | 50 | 10 | 60 |
| BAJA | 25 | 95 | 120 |
| TOTAL | 75 | 105 | 180 |
Calculating the expected frequencies:
| MOTIVACIÓN | RENDIMIENTO ALTO (E) | RENDIMIENTO BAJO (E) | TOTAL |
|---|---|---|---|
| ALTA | 60/180 = 25 | 60/180 = 35 | 60 |
| BAJA | 12075/180 = 50 | 120/180 = 70 | 120 |
| TOTAL | 75 | 105 | 180 |
The Chi-squared statistic is calculated by summing the squared differences between observed and expected frequencies, divided by the expected frequencies for each cell 59.
| O | E | (O - E) | (O - E)² | (O - E)²/E |
|---|---|---|---|---|
| 50 | 25 | 25 | 625 | 25 |
| 10 | 35 | -25 | 625 | 17.8 |
| 25 | 50 | -25 | 625 | 12.5 |
| 95 | 70 | 25 | 625 | 8.9 |
Total | | | | 64.2 | 59.
The calculated Chi-squared value (X2) is 64.2 59.
📝 If the observed X2 value is greater than the critical X2 value, it indicates a statistically significant association between the variables studied.
11.5 Hypothesis Testing with Chi-Squared
To conduct a Chi-squared test of hypothesis, several steps are followed:
- Statistical Hypotheses:
- H0: The variables X and Y are independent.
- H1: The variables X and Y are not independent (they are associated). 56 62.
- Significance Level and Degrees of Freedom:
- The significance level (α) is typically set at 0.05 (5%) or 0.10 (10%), representing the probability of the results being due to chance 60.
- Degrees of freedom (g.l.) are calculated as (Number of rows - 1) × (Number of columns - 1) 59 63.
-
Calculate Observed Chi-Squared (Xobtenido2): This involves computing the Chi-squared statistic from the observed and expected frequencies 59 63.
-
Calculate Critical Chi-Squared (Xcrıˊtico2): This value is obtained from a Chi-squared distribution table using the significance level (α) and degrees of freedom (g.l.) 59 60 63.
-
Decision Rule:
- If Xobtenido2≥Xcrıˊtico2 (or if the P-value < α), reject the null hypothesis (H0) and accept the alternative hypothesis (H1). This indicates a statistically significant association between the variables 59 63.
- If Xobtenido2<Xcrıˊtico2 (or if the P-value ≥α), fail to reject the null hypothesis (H0). This suggests no statistically significant association.
11.6 Example: Educational Level and CTA Learning
In a study of 1040 students, the association between educational level (primary, secondary) and learning of CTA (conceptual, procedural, attitudinal) was examined 60 61 62.
- Hypotheses:
- H0: There is no association between educational level and CTA learning.
- H1: There is an association between educational level and CTA learning 62.
- Significance Level and Degrees of Freedom:
- α=0.05
- g.l. = (3 rows - 1) × (2 columns - 1) = 2.
- Calculated Xobtenido2: 47.33.
- Calculated Xcrıˊtico2: 5.9915 (for α=0.05 and g.l. = 2).
- Decision: Since 47.33≥5.9915, the null hypothesis is rejected, indicating a significant association between educational level and CTA learning 63.
📝 A P-value of 0.000 indicates a statistically significant result, leading to the rejection of the null hypothesis.
11.7 Chi-Squared Tests in Software
Statistical software packages like Minitab, SPSS, and Excel can perform Chi-squared tests, simplifying the calculation process.
11.8 Minitab
- Enter the observed data into Minitab.
- Navigate to
Stat > Tables > Two-Way Table. - Select the variables and specify the Chi-squared test.
- The output will provide the Chi-squared statistic and P-value, which should be compared to the manually calculated results 64 65.
11.9 SPSS
- Define variables with their measurement levels and assign values.
- Enter the data according to row and column order.
- Go to
Analyze > Descriptive Statistics > Crosstabs. - Add the variables to the rows and columns.
- In the
Statisticsbutton, selectChi-square. - Ensure cases are weighted appropriately if necessary 66 67.
The SPSS output includes a contingency table of observed frequencies and the Chi-square test results, including Pearson's Chi-squared value and the asymptotic significance (P-value) 68 69.
11.10 Excel
- Input observed data and calculate the expected frequencies in separate tables.
- Use the
CHISQ.TESTfunction, providing the range of observed frequencies and the range of expected frequencies. - The function returns the P-value. If the P-value is less than the significance level (α), reject the null hypothesis 69 70 71.
The formula in Excel is: =PRUEBA.CHICUAD(rango_real, rango_esperado) 69.
11.11 Exercises
The following exercises apply the Chi-squared test to various scenarios:
- A university is considering three grading systems (A1, A2, A3) and surveys 500 students from different areas of interest (engineering, science, fine arts) to determine if there's a relationship between area of interest and preferred system 71.
- a) State the null hypothesis.
- b) State the alternative hypothesis.
- c) Perform the hypothesis test using α=0.05.
- An economist is examining if there is a relationship between employment type and attitude towards government price and wage controls, based on collected data from individuals 72.
- a) State the null hypothesis.
- b) State the alternative hypothesis.
- c) Perform the hypothesis test using α=0.05.
- Determine if the Chi-squared test can be performed for the following scenarios and explain why:
- a) Relationship between student seating location (front, back) and attention level (low, medium-low, low-low) 72.
- b) Relationship between cigarette consumption (high, low, non-smoker) and work performance (high, low) in an office of 10 employees 73.
- Three groups of university students (A, B, C) responded to the E Scale of Dogmatism. The results show the number of students below and above a certain score X 73.
- a) State the null hypothesis.
- b) State the alternative hypothesis.
- c) Perform the hypothesis test using α=0.05.
- A study investigates the association between seatbelt use in private vehicles and the driver's socioeconomic level (low, medium, high) based on observed frequencies 73 74.
- H0: "Seatbelt use is independent of socioeconomic level."
- H1: "Seatbelt use depends on socioeconomic level."
- A study on dental caries in children across six cities with varying fluoride levels in their water supply presents data on the number of children with and without caries in each community 74 75.
- H0: The incidence of caries is equal in the six cities (populations are homogeneous).
- H1: The incidence of caries is not equal in the six cities (populations are not homogeneous).
- A random sample of 200 adults is classified by sex and the number of hours they watch television weekly. The frequencies are provided to determine if TV viewing time is independent of sex, using α=0.05 75.
- H0: Sex is independent of hours spent watching television.
- H1: Sex and hours spent watching television are related.
© 2026 Maeve. All rights reserved. This content is protected by copyright.