STA215 Statistics II

Statistics IIUnit 610 min read

Measurement Scales & Data Analysis: Types, Tools & Techniques

Unit 6 of Statistics II explores measurement scales (nominal, ordinal, interval, ratio), their applications in data analysis, and techniques like descriptive statistics, graphical representation, and data transformation for decision-making in CS/IT contexts.

Key Concepts & Measurement Scales

1. Definition of Measurement Scales

Measurement scales classify data based on numerical properties and mathematical operations allowed. They determine:

  • Type of data (qualitative/quantitative).
  • Statistical techniques applicable (e.g., mean vs. mode).
  • Graphical representation (bar charts vs. histograms).
Scale Type Definition Examples Allowed Operations Statistical Measures
Nominal Categories without order or magnitude. Gender, blood type, IT departments. Counting, mode only. Mode, frequency tables.
Ordinal Categories with order but no equal intervals. Survey ratings (1-5), education level. Ranking, median. Median, percentiles.
Interval Ordered with equal intervals but no true zero. Temperature (°C), IQ scores. Addition/subtraction, mean. Mean, standard deviation.
Ratio Ordered with equal intervals and true zero. Height, weight, processing time. All operations (multiplication/division). All measures (mean, SD, ratios).

Worked Example: Classify the following variables:

  • Operating system (Windows/Linux/Mac): Nominal.
  • Employee performance (Poor/Fair/Good/Excellent): Ordinal.
  • CPU speed (GHz): Ratio.
  • Customer satisfaction (1-10 scale): Interval (if arbitrary zero) or Ordinal (if subjective).

2. Data Analysis Techniques by Scale

A. Descriptive Statistics

Scale Central Tendency Dispersion Shape
Nominal Mode None (use frequencies) Bar charts
Ordinal Median Range, quartiles Box plots
Interval Mean Standard deviation Histograms, skewness
Ratio Mean, Geometric mean CV (Coefficient of Variation) All graphical tools

Example: For CSIT vs. BCA maze completion times (from past exam):

  • CSIT (Ratio): Mean = 10.625s, SD = 2.24s.
  • BCA (Ratio): Mean = 9.75s, SD = 3.54s. Analysis: CSIT students took ~9% longer on average, with less consistency (higher SD).

B. Graphical Representation

Scale Recommended Graphs Avoid
Nominal Bar charts, pie charts. Line graphs, histograms.
Ordinal Ordered bar charts, dot plots. Pie charts (misleading).
Interval Histograms, box plots, stem-and-leaf plots. Bar charts (unless grouped).
Ratio All graphs + scatter plots, time-series. None.

Worked Example: Acquaintance vs. Marriage Duration (Ordinal/Interval)

Acquaintance (months): 3, 6, 12, 24, 36
Marriage Duration (years): 2, 5, 10, 15, 20

Graph: Use a scatter plot with ordered axes (ordinal → interval). Insight: Longer acquaintanceship may correlate with longer marriages (visual trend).


3. Data Transformation & Standardization

A. Why Transform Data?

  • Normalize skewed data (e.g., log-transform for exponential growth).
  • Compare datasets with different units (e.g., CPU speed vs. memory).
  • Meet test assumptions (e.g., ANOVA requires normality).

Common Transformations:

Transformation When to Use Example
Log (log₁₀) Right-skewed data (e.g., income). log(income) → normal distribution.
Square root Count data (e.g., bug reports). sqrt(defects) → reduces variance.
Z-score Standardize to compare distributions.
Percentiles Convert to relative ranks. 75th percentile of exam scores.

Example: Processing Time Data Original data (skewed): [5, 10, 12, 15, 200, 300] ms. After log₁₀: [0.7, 1, 1.08, 1.18, 2.3, 2.48] → normal-like.

B. Standardization (Z-scores)

Convert data to a common scale (mean = 0, SD = 1). Formula: Use Case: Compare IT officer CVS (Computer Vision Syndrome) scores across age groups.

  • Age 25: CVS score = 60, μ = 50, σ = 10 → (1 SD above average).
  • Age 40: CVS score = 70, μ = 60, σ = 8 → (more severe relative to peers).

4. Applications in CS/IT

Scenario Scale Used Analysis Technique Decision Support
Software efficiency (past exam) Ratio (data size, tables) Regression, ANOVA. Optimize program parameters.
Hardware testing (rod diameters) Ratio (mm). Control charts, hypothesis testing. Detect manufacturing defects.
User experience (maze time) Ratio (seconds). t-test, paired samples. Compare CSIT vs. BCA performance.
Survey responses (Likert scale) Ordinal (1-5). Median, chi-square. Improve course content.
Network latency (ms) Ratio. Box plots, outliers analysis. Troubleshoot slow connections.

5. Common Pitfalls & Best Practices

A. Misclassifying Scales

  • Mistake: Treating ordinal data (e.g., survey ratings) as interval. Fix: Use median, not mean.
  • Mistake: Using ratio operations on interval data (e.g., "IQ is 50% higher"). Fix: Report differences, not ratios.

B. Graphical Misrepresentation

  • Avoid:
    • Pie charts for >5 categories (hard to compare).
    • 3D charts (distorts perception).
  • Do:
    • Use small multiples for large datasets (e.g., compare CPU efficiency across 3 programs).
    • Label axes clearly (e.g., "Log₁₀(Processing Time)").

C. Transformation Overuse

  • When NOT to transform:
    • Data is already normal (check with Shapiro-Wilk test).
    • Transformation loses interpretability (e.g., log of age).

Exam Tip: How to Score Full Marks

1. Question Patterns (Based on Past Exams)

Question Type Marks How to Answer
Define measurement scales. 5 Table format (as above) + 1 example per scale.
Classify variables. 6 State scale + justify (e.g., "Nominal because no order exists between OS types.").
Describe data analysis techniques. 8 Link scale → technique → example (e.g., "For ordinal data, use median and box plots.").
Interpret graphs. 7 Step-by-step:
  1. Identify scale.
  2. State what graph shows.
  3. Draw conclusion (e.g., "CSIT students have higher variance in maze times."). | | Transform data. | 6 | Show original → transformed data + explain why (e.g., "Log transform reduces skew."). | | Apply to real-world scenarios. | 10 | Structure:
  4. Identify scale(s).
  5. Choose analysis method.
  6. Interpret results (e.g., "Regression shows data size explains 72% of efficiency variance."). |

2. Model Answer Structure

Example Question: "A study measures IT officers' CVS (Computer Vision Syndrome) using age (years) and working hours (per day). Classify the variables, suggest analysis techniques, and explain how you’d interpret results."

Model Answer (10 Marks):

  1. Classification (2 marks):

    • Age: Ratio (true zero, equal intervals).
    • Working hours: Ratio.
    • CVS score (if 1-10): Interval (assuming equal intervals but arbitrary zero).
  2. Analysis Techniques (4 marks):

    • Descriptive: Mean/SD for age/hours, median for CVS if skewed.
    • Inferential:
      • Correlation: Pearson’s r (if CVS is interval) to check linear relationship.
      • Regression: Multiple linear regression to model CVS ~ age + hours.
      • ANOVA: If CVS is grouped (e.g., by department).
  3. Interpretation (4 marks):

    • Correlation: "r = 0.6" → moderate positive correlation between hours and CVS.
    • Regression: "For every 1-hour increase, CVS score rises by 0.5 units (p < 0.05)."
    • Recommendation: "Limit working hours to <8/hour to reduce CVS severity."

3. High-Scoring Tips

  • Use formulas (e.g., ) but explain in words too.
  • Link to CS/IT: Always relate to software/hardware/data (e.g., "Like CPU benchmarks, we standardize performance metrics.").
  • Visuals: Sketch a simple table/graph in your answer (e.g., for ANOVA or scatter plots).
  • Assumptions: If data is skewed, state it and suggest transformations.

Practice Questions (Self-Assessment)

  1. Classify: CPU speed (GHz), user satisfaction (Smiley faces 😊😐😞), error count in code.
  2. Transform: Given skewed data [2, 3, 4, 5, 100], apply log₁₀ and plot the effect.
  3. Analyze: For the maze time data (CSIT vs. BCA), write a 5-step plan to compare performance.
  4. Critique: Why is a pie chart poor for showing IT department budgets (5 departments)?

Key References

  • Textbook: Statistics for Computer Science (TU Syllabus, 2079).
  • Software: Use Python/R for transformations:
    import numpy as np
    data = np.array([5, 10, 12, 15, 200, 300])
    log_data = np.log10(data)  # Transform
    print("Z-score of 200:", (200 - np.mean(data)) / np.std(data))
    
  • Exam Focus: 20-25% of STA215 marks come from this unit, often combined with ANOVA (Unit 3) or regression (Unit 2).```

Based on the TU BSc CSIT syllabus for Statistics II (STA215), unit 6.

Discussion

Loading…