Home > Stats for DS > Topics > Topic 6
Topic 6 of 7

📊 Topic 6: Types of Data

Topic 6/7 ⭐⭐ Core ⏱️ ~18 min

Classify variables correctly—categorical, numerical, discrete, continuous—and recognise structural patterns like cross-sectional and time-series data.

🎯 Learning Objectives

  • Recognise categorical variables and encode them properly.
  • Distinguish between discrete and continuous numerical variables.
  • Identify when you are dealing with cross-sectional or time-series data.
  • Select appropriate visualisations and summaries for each data type.

6.1 Categorical data

Categorical variables record group membership.

Nominal

Categories without any inherent order.

  • Example: blood group {A, B, AB, O}.
  • Summary tools: counts, bar charts, pie charts.

Ordinal

Categories with a natural order but no fixed spacing.

  • Example: service feedback {Poor, Fair, Good, Excellent}.
  • Summary tools: ordered bar charts, cumulative percentages.

6.2 Numerical data

Discrete

Counts that take isolated values, often integers.

Example: number of calls handled by a support agent.

Continuous

Measurements that can take any value over an interval.

Example: temperature recorded every hour.

Visualise discrete data with bar charts or dot plots; continuous data often require histograms or density plots.

6.3 Cross-sectional vs time-series

Cross-sectional

Multiple units observed at a single point in time. Ideal for comparing groups.

Example: income of all IITM students in the 2025 graduating batch.

Time-series

Single unit observed across time. Ideal for trend and seasonality analysis.

Example: daily rainfall in Chennai during July 2020.

Some datasets combine both dimensions, leading to panel data (multiple units tracked over time). Panel data techniques appear later in the programme.

6.4 Choosing the right tool

Data type Typical summaries Visualisations Inferential techniques
Nominal categorical Counts, proportions, mode Bar chart, Pareto chart Chi-square tests for independence
Ordinal categorical Medians, percentiles Ordered bar chart Non-parametric tests (Mann-Whitney, Kruskal-Wallis)
Discrete numerical Mean, variance Stem-and-leaf, bar chart Poisson/Binomial models
Continuous numerical Mean, standard deviation Histogram, box plot t-tests, regression, ANOVA