Statistics: Data Types, Scales, and Visualization

Course Logistics and Setup

  • Textbooks should be in use for this course; if you have trouble obtaining your textbook, meet with the instructor after class to discuss options.
  • The instructor will provide additional readings and post supportive documents.
  • A document outlining which sections of the textbook to read will be posted later today; some sections may be skipped.
  • A list of recommended classroom sections will be provided to help you focus on concepts you’re familiar with; some content may be skipped if less emphasized in this course.
  • Tutorial format: a morning tutorial will be held on campus; Sofia will teach next week; some time conflicts may occur at the start of the year.
  • Feedback: TA-led tutorials are learning experiences; provide constructive feedback kindly.
  • Technical issues discussed: internet access and SPSS access can affect submission times; late quiz submissions may be accommodated due to connectivity problems.
  • If you have trouble accessing SPSS or online resources, contact the instructor or use on-campus resources; best solution may be to use a stable Wi‑Fi connection.
  • This week’s tutorials (for Wednesday and Friday) will involve working with SPSS.
  • Today’s core topics include different types of variables, summation of data, and basic data visualization concepts; emphasis on terminology and practical interpretation.

Core Concepts: Variables, Data, and Measurements

  • Types of variables in statistics:
    • Categorical (qualitative) vs Continuous (quantitative)
    • Categorical variables are often described as discrete and involve counting in categories (frequency data).
    • Examples of categorical variables: gender (e.g., male, female), faculty (e.g., Science, Medicine, Humanities).
    • Categories are mutually exclusive: you are in one category or another, not both.
    • Continuous data lie on a number scale and can take infinitely many values within a range; sometimes a construct can be represented as either categorical or continuous depending on coding decisions.
  • Coding and categorization:
    • When using numerical codes for nominal data (e.g., eye color), the numbers are arbitrary and carry no inherent order or magnitude.
    • Example: eye color could be coded as 1 = green, 2 = brown, 3 = blue (the specific numbers do not matter).
  • Why the data type matters:
    • Different statistical tests are appropriate for different data types and scales of measurement.
    • The type of data determines what properties (equality, order, difference, ratio) can be meaningfully discussed.

Scales of Measurement: From Nominal to Ratio

  • Four primary scales of measurement:
    1) Nominal scale (categorical data)
    2) Ordinal scale (ordered categories)
    3) Interval scale (ordered with equal intervals, no meaningful zero)
    4) Ratio scale (ordered with equal intervals and meaningful zero)

  • Key properties to identify for each scale:

    • Do we know whether things are the same or different? (equality/inequality)
    • Can we order the values? (ranking, order)
    • Are the differences between values meaningful? (difference between scores)
    • Is there a meaningful zero that allows ratio comparisons? (multiplication/division)
  • Nominal scale (categorical):

    • Data are categories with no inherent order (e.g., right-handed vs left-handed, eye color, religion codes).
    • Categories are named or numbered arbitrarily; only equality/inequality matters.
    • Properties: equality/inequality; no meaningful order or difference.
    • Example: color eyes coded as {1, 2, 3} with arbitrary meanings; or sports jersey numbers used for identification, not ranking.
    • Important note: nominal data are qualitative and describe “which category.”
  • Ordinal scale (ordered categories):

    • Data are ranked; there is an inherent order (e.g., cancer stage: 1, 2, 3, 4; course evaluations 1–5).
    • Differences between adjacent ranks are not necessarily equal or meaningful.
    • Example: satisfaction ratings from 1 (low) to 5 (high).
    • Implication: you can determine if one value is higher or lower than another, but you cannot assert that the gap between ranks is uniform.
  • Interval scale (ordered, equal intervals, no true zero):

    • Differences between values are meaningful and consistent (e.g., temperature in Celsius or Fahrenheit, IQ score).
    • Zero is arbitrary and not a true absence of the quantity (e.g., 0°C does not mean no temperature).
    • Implication: you can discuss differences and averages, but ratios are not meaningful (e.g., 20°C is not twice as hot as 10°C).
    • Example clarification: Temperature scales have equal intervals, but no true zero;
    • On Celsius, the difference between 10°C and 20°C is 10 degrees, same as between 0°C and 10°C.
    • However, 20°C is not twice as hot as 10°C.
  • Ratio scale (ordered, equal intervals, meaningful zero):

    • Both differences and ratios are meaningful; a true zero exists (absence of the quantity).
    • Example: exam scores (0–100), height, weight, time, reaction time (depending on measurement).
    • Implication: you can state that one value is twice another (x = 2y), and you can compare magnitudes meaningfully.
    • Example: exam score 24 vs 12: 24 is twice as many correct as 12.
  • Why these distinctions matter:

    • They determine which statistical analyses are appropriate for the data.
    • Early design decisions may involve deciding whether to treat a variable as categorical or continuous based on its measurement and research questions.

Visual and Descriptive Tools for Data

  • Patterns are often easier to identify visually than via raw data tables.

  • Scatter plots as a pattern-detection tool:

    • Show relationship between two continuous variables, e.g., years of post-secondary education vs writing test score.
    • Each point represents an individual; a trend line can be added to summarize the overall pattern.
    • This course will cover correlation and regression later, which formalize the pattern seen in scatter plots.
  • Frequencies and distributions: summarizing data with counts

    • Start with raw data: one row per participant, e.g., a score column.
    • Create bins (categories of scores) to summarize frequency patterns.
    • Frequency: how many observations fall into each category/bin.
    • Example: a small dataset with scores of 1, 5, 4, etc.; frequencies show how many people scored each value.
    • A simple tabular frequency distribution lists each bin and its frequency.
  • Histograms vs frequency distributions:

    • Histogram: bars along the x-axis (score or variable) with height equal to frequency (or relative frequency) on the y-axis; makes it easy to see where scores cluster and where they are rare.
    • Frequency distribution: a table listing bins and their frequencies; not a graph but shows the same information.
    • Bin width and the number of bins affect the shape; in this course, the conceptual use is emphasized over the exact bin choices.
  • Frequency polygon (a smooth representation):

    • Create a histogram as a backbone and connect the tops of the bars with a line to form a polygon.
    • Advantages: provides a continuous-looking view of the distribution, helpful for discussing percentiles and areas under the curve without relying on bar heights.
    • Percentiles and areas under the curve are easier to discuss with a smooth curve than with discrete bars.
    • Key idea: the polygon highlights relative frequencies and allows estimation of percentiles and probabilities.
  • From histogram to normal distribution and beyond:

    • The normal distribution is a foundational concept in statistics; many tests assume normality.
    • Shapes to recognize:
    • Symmetrical distributions: mirror images around the center; the normal distribution is a prime example.
    • Uniform distribution: roughly the same frequency across bins.
    • Bimodal distribution: two peaks (modes) indicate two common ranges.
    • Negatively skewed: tail to the left (most scores high, few low).
    • Positively skewed: tail to the right (most scores low, some very high).
    • Outliers: observations far from the main cluster; a judgment call on when a point is an outlier (how large a gap is needed). Outliers can influence analyses and may be excluded to reveal underlying patterns.
    • Example given: course grades with an average around 70–75 and a few very low scores; five scores of zero discussed as possible auspic to class withdrawal or testing issues, not true course performance.
  • Practical notes on distributions and outliers:

    • Outliers can be high or low; they are not necessarily errors but may indicate unusual cases or data collection issues.
    • Decisions to exclude outliers depend on the research question and the impact on the analysis (e.g., to reveal general patterns within the majority of the data).

Applying the Concepts: Examples and Intuition from the Lecture

  • Example of a trend pattern in education and writing ability:
    • A scatter plot with years of postsecondary education on the x-axis and writing test scores on the y-axis shows a visible positive association: as education increases, writing scores tend to rise.
    • A line of best fit (trend line) helps summarize this pattern across the dataset.
  • Example of data summarization workflow:
    • Start with raw data: a list of scores per participant.
    • Create bins (e.g., 300–375, 375–400, etc.) to form a frequency distribution.
    • Convert to a histogram to visualize where scores cluster and how many observations fall into each bin.
    • Optionally convert to a frequency polygon for a smooth representation to discuss percentiles and probabilities.
  • Understanding distribution shapes in real data:
    • A course grade distribution might look approximately normal: most students cluster around the middle with fewer students at the high and low ends.
    • It’s common to see a small number of outliers (e.g., five zeros) due to issues like missing submissions or misgrading rather than actual performance.

Quick Formulas and Notation (LaTeX)

  • Mean (for a numeric variable X with n observations):
    extMean Xˉ=1n<br/>∇ X<em>i=1n∇ ∣</em>i=1nXiext{Mean} \, \bar{X} = \frac{1}{n} <br />\nabla \,X<em>i = \frac{1}{n}\nabla \,\bigg|</em>{i=1}^{n} X_i

  • If using a dataset with bins i = 1, 2, …, k having frequencies f_i and total N =

    Frequency for bin i: f<em>if<em>i Relative frequency (proportion): p</em>i=fiNp</em>i = \frac{f_i}{N}

  • Percentiles:

    • The p-th percentile xp is the value such that P(X≤x</em>p)=p100P(X \le x</em>p) = \frac{p}{100}
  • For interval scale concepts:

    • A difference between two values is meaningful: X<em>j−X</em>iX<em>j - X</em>i
    • Ratios are not meaningful because the zero is arbitrary.
  • For ratio scale concepts:

    • Both differences and ratios are meaningful: X<em>jX</em>i\frac{X<em>j}{X</em>i} is interpretable when X_i > 0.
    • A true zero allows statements like "Xj is twice Xi".

Key Takeaways

  • Data types and scales of measurement determine appropriate analysis methods and interpretation.
  • Nominal data are categories with no inherent order; ordinal data add order but not equal intervals; interval data have equal intervals but no true zero; ratio data have both equal intervals and meaningful zero.
  • Visual tools like histograms and frequency distributions help reveal the shape, central tendency, dispersion, and potential outliers in data.
  • A frequency polygon provides a continuous representation of a distribution, useful for discussing probabilities and percentiles.
  • Recognizing distribution shapes (normal, skewed, bimodal, uniform) and identifying outliers are foundational steps before applying statistical tests.
  • Practical classroom notes emphasize flexible reading plans, tutorial logistics, and handling technical challenges in data collection and analysis.