Measure of association
What is Measure of Association?
o Whether two variables are related or not
o How strong the relationship is…
o Direction: positive (+) or negative (−)
Most common in Measure of Association:
• Pearson correlation coefficient (for numerical data)
• Spearman rank correlation coefficient (for ranked data)
• Chi-square Test (for categorical data)
For SPSS
1. Pearson correlation coefficient (for numerical data)
• Click: Analyze → Correlate → Bivariate
• Move two numerical variables (e.g., height, weight) into the box
• Select Pearson (default)
• Click OK
2. Spearman rank correlation coefficient (for ranked data)
• Go to: Analyze → Correlate → Bivariate
• Select your variables
• Tick Spearman
• Click OK
3. Chi-square Test (for categorical data)
• Go to: Analyze → Descriptive Statistics → Crosstabs
• Put: One variable in Row and another variable in Column
• Click Statistics → select Chi-square
• Click Cells → tick Observed and Expected
• Click OK
For STATA
1. Pearson correlation coefficient (for numerical data)
• Command: pwcorr var1 var2, sig
2. Spearman rank correlation coefficient (for ranked data)
• Command: spearman var1 var2
3. Chi-square Test (for categorical data)
• Command: tabulate var1 var2, chi2
Normality Test
A normality test checks whether your data follows a normal distribution (bell-shaped curve).
This is important because many statistical tests (like t-test, ANOVA, Pearson correlation
coefficient) assume normality.
Common Normality Tests
• Shapiro-Wilk test
• Kolmogorov-Smirnov test
Decision Rule
• p > 0.05 → Data is normal
• p < 0.05 → Data is not normal
For SPSS
• Go to: Analyze → Descriptive Statistics → Explore
• Move variable to Dependent List
• Click Plots
✓ Normality plots with tests
✓ Histogram
• Click OK
For STATA
Command:
Shapiro-Wilk test: swilk variable_name
ksmirnov variable_name = normal(variable_name)
Skewness & Kurtosis Test: sktest variable_name
Histogram: histogram variable_name, normal
Q-Q Plot: qnorm variable_name
Graphical Representation of Data
Graphical representation of data means presenting numerical or categorical information using
charts, graphs, or diagrams so that patterns, trends, and comparisons become easier to understand.
Common Types of Graphical Representation
1. Bar Chart:
Simple Bar Chart – one variable comparison
Multiple Bar Chart – comparison of two or more variables
Component/Stacked Bar Chart – shows parts of a whole
Percentage Bar Chart – shows relative percentages
2. Histogram:
Used for continuous data
3. Pie Chart:
Shows proportions/percentages
4. Line Graph:
Used for time series data
Shows trends and changes over time
5. Scatter Plot:
Shows relationship between two variables
6. Box Plot:
Shows: Median, Quartiles (Q1, Q3), Minimum and maximum, Outliers
7. Stem-and-Leaf Plot
8. Dot Plot
9. Area Chart
For STATA
Command:
Bar Chart:
Simple Bar Chart – graph bar (count), over(gender)
Multiple Bar Chart – graph bar (count), over(gender) over(department)
Component/Stacked Bar Chart – graph bar (count), over(department) over(gender)
stack
Percentage Bar Chart – graph bar (percent), over(department) over(gender)
2. Histogram: histogram marks
3. Pie Chart: graph pie, over(gender), graph pie, over(gender) plabel(_all percent)
4. Line Graph: twoway line sales year
5. Scatter Plot: scatter weight height
6. Box Plot: graph box marks
graph box marks, over(gender)
7. Stem-and-Leaf Plot: stem marks
8. Dot Plot: dotplot marks
9. Area Chart: twoway area sales year