Data Tables, Kinds of Data and Fair Samples | StemPy Lab
Statistics & Data Science
Data Tables, Kinds of Data and Fair Samples
A brief note on What Is Data?: tables of cases and variables, the four kinds of data, and how to choose a fair sample and ask a fair question. With a worked example, practice, a program and questions.
A brief note on Data Tables, Kinds of Data and Fair Samples. Read it before a test. Try each question at the end before you open its answer.
Tables
Data is a set of facts. We keep it in a table.
A row is one case, such as one student or one day. A column is one variable, one fact about every case.
The number of facts is rows × columns.
A good table has one fact in a cell, one unit in a column, and a blank or NA for a missing value. Never a zero.
The kinds of data
Kind
What it is
Examples
Categorical, nominal
labels with no order
colour, city, PIN code
Categorical, ordinal
labels with an order
shirt size, poor to good
Numerical, discrete
counted, whole steps
siblings, goals
Numerical, continuous
measured, any value
height, time, mass
A number used as a label, such as a roll number, is categorical. Ask: would you ever add two of them?
Samples
The population is everyone we want to know about. The sample is the few we ask.
A fair sample gives everyone the same chance, so we choose it by chance.
A biased sample leaves out a kind of person, such as asking only one club or one place.
A fair question is neutral. It asks for a fact and does not push the answer.
A worked example
A survey table has 35 rows. Its columns are the student's name, house colour, number of cousins and time to run 50 m.
Facts.35×4=140.
Kinds. The name and the house colour are categorical, nominal. The number of cousins is counted, so it is discrete. The running time is measured, so it is continuous.
Fairness. If the 35 students were the first 35 to reach the sports ground, the fastest runners may be over-counted. Choosing 35 names by chance from the school list is fairer.
Practice with new numbers
A program to try
The program sorts the columns of a small survey by a rough rule: words, whole numbers or decimals.
Mistakes to avoid
Calling every number numerical. A roll number or a phone number is a label.
Calling a rounded measurement discrete. A height of 152 cm was measured, so it is continuous.
Writing zero for a missing value. It pulls the mean down.
Trusting a big sample that is biased. Many answers from the wrong people still give the wrong picture.
Check yourself
A table has 26 rows and 6 columns. How many facts does it hold?
Which kind of data is the number of stamps in a collection?
Which kind of data is a seat on a train: first class, second class or third class?
A gym asks its own members how often people in the town exercise. Why is the result too high?