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 8 questions in our bank on this topic. Choose an answer to see why every option is right or wrong.
A frequency distribution shows:
Answer: How often each value occurs
A frequency distribution tabulates each value, or class interval, with the number of times it occurs in the data. It is the basis of histograms and frequency polygons.
Frequency distribution
- Frequency = count per value or class
- Basis of histogram
- Relative frequency gives percentages
- Spread is SD, not frequency
Remember A frequency distribution tabulates how often each value occurs.
Why the other options are wrong
- Only the percentage of values Percentages are the relative frequency; the table also gives counts.
- Which values are missing Missing data are handled separately and are not what the table shows.
- The spread of the data Spread is described by range, variance and standard deviation.
- The average of the data The average is the mean, a measure of central tendency.
Sex, blood group and religion are examples of which type of data?
Answer: Nominal
Nominal data are named categories with no inherent order, so only counts and proportions can be reported. Sex, blood group and religion all fit this. Ordinal data have a rank order but unequal gaps.
Types of data
- Nominal: categories, no order
- Examples: sex, blood group, religion
- Summarised with mode and proportions
- Tested with chi-square
Remember Nominal data are unordered named categories such as blood group.
Why the other options are wrong
- Continuous A numeric variable that can take any value; these categories are not numeric.
- Interval Numeric scale with equal intervals but no true zero, such as temperature in Celsius.
- Ordinal Categories with a natural order, such as mild, moderate and severe.
- Ratio Numeric scale with a true zero, such as weight or height.
In a study, 40% of women received HRT and 60% did not. Which display best shows these shares of the whole?
Answer: Pie chart
A pie chart shows how a whole divides into categories as percentages, so it suits two proportions that add to 100%. Histograms and frequency polygons show continuous data, and scatter plots show relation between two continuous variables.
Presenting data
- Pie chart shows parts of a whole
- Bar chart compares separate categories
- Histogram is for continuous data
- Scatter plot shows two variables
Remember Pie chart shows proportions of a whole; histogram is for continuous data.
Why the other options are wrong
- Histogram A histogram displays frequency of continuous data in class intervals.
- Bar chart A bar chart compares category sizes but does not show shares of a whole as directly.
- Frequency polygon A frequency polygon joins histogram midpoints for continuous data.
- Scatter plot A scatter plot shows the relationship between two continuous variables.
Presence or absence of vomiting is which type of data?
Answer: Nominal
Presence or absence is a binary category with no natural order, so it is nominal (dichotomous) data. Ordinal data have a rank, while interval and ratio data are measured on numerical scales.
Types of data
- Binary categories are nominal
- Ranked categories are ordinal
- True zero means ratio
Remember Two unordered categories, such as vomiting present or absent, are nominal data.
Why the other options are wrong
- Ratio Numerical scale with true zero such as weight or blood pressure.
- Discrete numerical Counted whole numbers such as number of episodes; yes/no is not a count.
- Interval Numerical scale without true zero such as temperature in Celsius.
- Ordinal Categories with a rank such as mild, moderate and severe; vomiting yes/no has no order.
A pain score recorded as mild, moderate or severe is which type of data?
Answer: Ordinal
Ordinal data are categories with a meaningful rank but unknown or unequal gaps between them. Mild, moderate and severe are ordered, yet the difference between them is not measurable. Median and non-parametric tests suit them.
Types of data
- Ordinal: ranked categories
- Examples: pain grade, cancer stage
- Summarised by median
- Analysed with non-parametric tests
Remember Ranked categories with unequal gaps are ordinal data.
Why the other options are wrong
- Ratio Numeric with a true zero, like weight; pain categories are not measured this way.
- Nominal Categories without any order, such as blood group.
- Interval Equal numeric spacing without a true zero; pain grades have no such spacing.
- Discrete A count-type numeric variable; verbal pain grades are categories, not counts.
Where this sits in the CPSP syllabus
- Paper 1: Biostatistics, Types of data, scales and presentation (graphs, tables)