Types of data
Types of Data, Measurement Scales and Graphs in Biostatistics
Nominal, ordinal, discrete and continuous data, interval versus ratio scales, and which graph, summary statistic and test fits each type of data. Also covers histograms, box plots, ogives, pie charts, population pyramids and the data sources used in Pakistan.
Why data type matters
- The type of a variable decides three things: which average you may use, which graph shows it fairly and which statistical test compares groups. Most FCPS questions on this topic are really asking you to classify a variable first.
Types of variables
| Type | Subtype | Description | Examples |
|---|---|---|---|
| Qualitative (categorical) | Nominal | Named categories with no order | Blood group, sex, religion, diagnosis, eye colour |
| Binary (dichotomous) | A nominal variable with two categories | Presence or absence of vomiting, alive or dead, smoker or non-smoker | |
| Ordinal | Categories with a natural order but unequal gaps | Pain (mild, moderate, severe), cancer stage, Likert scales, Apgar, GCS, ASA grade, NYHA class, social class | |
| Quantitative (numerical) | Discrete | Whole-number counts | Number of children, pregnancies, admissions, decayed teeth |
| Continuous | Any value within a range | Height, weight, BP, haemoglobin, age, temperature |
- Ordinal data carry rank but not distance: the step from ASA I to II is not necessarily the same as from III to IV, so averaging ordinal scores is unsafe.
- A continuous variable can be turned into categories (BMI into underweight, normal, overweight), but this loses information and statistical power.
Exam trap Presence or absence of a symptom is nominal (binary) data, not ordinal: there is no order between yes and no.
Scales of measurement
| Scale | Order | Equal intervals | True zero | Examples |
|---|---|---|---|---|
| Nominal | No | No | No | Blood group |
| Ordinal | Yes | No | No | Stage, rank, ASA grade |
| Interval | Yes | Yes | No: ratios meaningless | Temperature in °C or °F, calendar year, IQ |
| Ratio | Yes | Yes | Yes | Weight, height, pulse, temperature in kelvin, income |
- 40 °C is not "twice as hot" as 20 °C because 0 °C is an arbitrary point; 80 kg is twice 40 kg because zero weight means no weight.
Remember Nominal names, ordinal orders, interval measures equal steps, ratio has a true zero.
Matching data type to summary and test
| Data type | Average | Spread | Typical test comparing two groups |
|---|---|---|---|
| Nominal | Mode, proportion | None | Chi-squared (2 × 2 table); Fisher exact for small numbers |
| Ordinal | Median | IQR | Mann–Whitney U |
| Continuous, normal | Mean | SD | t-test |
| Continuous, skewed | Median | IQR | Mann–Whitney U |
- A 2 × 2 table of two categorical variables is analysed with the chi-squared test; a t-test compares means of a numerical variable between two groups.
Choosing a graph
| Data or purpose | Graph |
|---|---|
| Categories (nominal or ordinal) | Bar chart: separate bars, height shows frequency |
| Parts of a whole, percentages adding to 100% | Pie chart: sector angle proportional to share |
| Comparing a percentage between groups (40% vs 20% on HRT) | Bar chart |
| Distribution of one continuous variable | Histogram: bars touch, area proportional to frequency; frequency polygon; stem-and-leaf plot (keeps raw values) |
| Median, IQR, range and outliers; comparing groups | Box-and-whisker plot |
| Cumulative frequency (read median and percentiles) | Ogive |
| Relationship between two continuous variables | Scatter plot |
| Trend over time | Line graph |
| Cases by date of onset in an outbreak | Epidemic curve |
| Geographic spread | Spot map; shaded (choropleth) map |
| Survival over time | Kaplan–Meier curve |
| Pooled studies; publication bias | Forest plot; funnel plot |
| Age–sex structure | Population pyramid |
| Components within groups | Stacked (component) bar chart |
| Test cut-offs | ROC curve |
| Laboratory quality control | Levey–Jennings chart |
- A pictogram uses pictures for lay audiences.
- In a histogram with unequal class widths, bar area (not height) must match frequency.
- Graphs mislead when axes are truncated, intervals are unequal or 3-D effects distort size.
Exam trap A histogram is for continuous data with touching bars; a bar chart is for categories with gaps between bars.
Tables and frequency distributions
- A good table stands alone: clear title, units, row and column labels, totals and source.
- A frequency distribution table groups continuous data into class intervals and shows frequency, relative frequency (%) and cumulative frequency; the cumulative column is plotted as an ogive.
Population pyramids
- Horizontal bars for each age group, males on one side and females on the other.
- Broad base, narrow top (expansive): high birth rate, high mortality, young population, as in Pakistan.
- Straight sides (stationary) or narrow base (constrictive): low fertility and ageing population, as in Japan and much of Europe.
Data handling
- Coding categories as numbers for analysis, data cleaning and handling missing values.
- Log transformation makes right-skewed data (triglycerides, viral load, antibody titres) closer to normal.
- Primary data are collected by the researcher for the study; secondary data come from existing sources (records, registries, census, published studies). Combining results from several published studies is a meta-analysis of secondary data.
Sources of health data
- Census: Pakistan counts its population about every 10 years; the 2023 census was the first digital one. A de facto census counts people where they are found; de jure counts them where they usually live.
- Civil registration of births and deaths (incomplete in Pakistan), sample registration, hospital records, disease registers (cancer), surveys (Pakistan Demographic and Health Survey, National Nutrition Survey), notifiable disease reports.
- Diagnoses are coded using the International Classification of Diseases (ICD-11).
How FCPS asks about this
- Presence or absence of vomiting: nominal (binary) data.
- ASA grade, cancer stage, pain score: ordinal data.
- Temperature in °C: interval scale (no true zero); weight is ratio.
- Best graph for percentages of a whole: pie chart; for comparing categories, bar chart.
- Graph for two continuous variables: scatter plot; continuous distribution, histogram (touching bars).
- Test for a 2 × 2 table of categorical data: chi-squared; t-test compares two means.
- Graph showing median and IQR: box-and-whisker plot; cumulative frequency, ogive.
Test yourself on this topic
5 of the 13 questions in our bank on this topic. Choose an answer to see why every option is right or wrong.
The number of children in a family is which type of data?
Answer: Discrete quantitative
Quantitative (numerical) data are discrete when they can take only whole-number counts (number of children, number of attacks, teeth decayed) and continuous when any value within a range is possible (height, weight, blood pressure, haemoglobin). Qualitative (categorical) data are nominal (named groups with no order: blood group, sex), ordinal (ordered groups: pain mild/moderate/severe, cancer stage) or binary (two categories: alive/dead).
Types of data
- Quantitative: discrete (counts) or continuous (measurements)
- Qualitative: nominal (no order), ordinal (ordered), binary
Remember Counted = discrete; measured = continuous.
Why the other options are wrong
- Continuous quantitative Can take any value, e.g. weight.
- Nominal Categories without order.
- Ordinal Ordered categories.
- Binary Only two categories.
Which diagram is most suitable for showing the monthly number of dengue cases in a district over three years?
Answer: Line graph
A line graph (time-series chart) plots a variable against time and shows trends, seasonal patterns and outbreaks—here, monsoon peaks of dengue. In an epidemic, an epidemic curve (a histogram of cases by date of onset) shows the type of outbreak: a single sharp peak suggests a common-source exposure; successive waves suggest person-to-person (propagated) spread. A spot map shows geographic clustering.
Time and place
- Over time: line graph
- Outbreak: epidemic curve (point source vs propagated)
- Place: spot map (John Snow, cholera)
Remember Time goes on the line.
Why the other options are wrong
- Pie chart Proportions at one time.
- Scatter diagram Relationship of two continuous variables.
- Box plot Distribution summary.
- Venn diagram Overlap of sets.
How often is a national census conducted in most countries, including Pakistan?
Answer: Every 10 years
A census, the complete count of a population with demographic data, is conducted about every 10 years in most countries (Pakistan's most recent was the 2023 digital census). It provides denominators for rates. Other sources: vital registration, surveys and disease surveillance.
Health data sources
- Census: about every 10 years
- Vital registration: births, deaths
- Surveys, surveillance, hospital records
Remember Census counts everyone once a decade.
Why the other options are wrong
- Every year Too frequent and expensive.
- Every 2 years Too frequent.
- Every 50 years Too infrequent.
- Every 5 years Most countries count every 10 years; some run smaller surveys in between.
Staging of cervical cancer as stage I, II, III or IV is which type of data?
Answer: Ordinal
Cancer stages are ordered categories: stage IV is worse than stage III, but the gaps between stages are not equal and the numbers are labels, not measurements. That makes them ordinal. Ordinal data are summarised with median and range or IQR and compared with non-parametric tests (e.g. Mann-Whitney U). Other ordinal examples: Glasgow Coma Scale, Apgar score, Likert scales, socioeconomic class.
Ordinal data
- Ordered, unequal gaps
- Examples: cancer stage, GCS, Apgar, Likert
- Summarise with median; test with non-parametric tests
Remember If you can rank it but not measure the gap, it is ordinal.
Why the other options are wrong
- Nominal Nominal categories have no order (e.g. blood group).
- Continuous Stages are not measurements.
- Discrete quantitative Stages are not counts.
- Interval Gaps between stages are not equal.
What is the key difference between a histogram and a bar chart?
Answer: Histogram: continuous, no gaps
A histogram displays the frequency distribution of continuous data grouped into class intervals. Bars touch because the data are continuous, and the area of each bar (not only its height) represents frequency, which matters when intervals are unequal. A bar chart displays categorical or discrete data; bars are separated by gaps and their length represents frequency. Joining the mid-points of histogram bars gives a frequency polygon.
Histogram vs bar chart
- Histogram: continuous, bars touch, area = frequency
- Bar chart: categorical, gaps between bars
- Mid-points joined: frequency polygon
Remember Histogram holds hands; bar chart keeps its distance.
Why the other options are wrong
- Histogram: for nominal data Nominal data go in bar charts.
- Bar chart: percentages only Can show counts or percentages.
- Histogram: gaps between bars Bar charts have gaps.
- Bar chart: two variables at once Scatter diagrams show two variables.
Where this sits in the CPSP syllabus
- Paper 1: Biostatistics, Types of data, scales and presentation (graphs, tables)